示例#1
0
void Settings::readSettings()
{
    setLanguage(value(KEY_LANGUAGE, defaultValue(KEY_LANGUAGE)).toString());

    setPlaylist(value(KEY_PLAYLIST, defaultValue(KEY_PLAYLIST)).toString());
    setPlaylistUpdate(value(KEY_PLAYLIST_UPDATE, defaultValue(KEY_PLAYLIST_UPDATE)).toBool());
    setPlaylistUpdateUrl(value(KEY_PLAYLIST_UPDATE_URL, defaultValue(KEY_PLAYLIST_UPDATE_URL)).toString());
    setRadioCategory(value(KEY_RADIO_CATEGORY, defaultValue(KEY_RADIO_CATEGORY)).toString());
    setHdCategory(value(KEY_HD_CATEGORY, defaultValue(KEY_HD_CATEGORY)).toString());
    setUdpxy(value(KEY_UDPXY, defaultValue(KEY_UDPXY)).toBool());
    setUdpxyUrl(value(KEY_UDPXY_URL, defaultValue(KEY_UDPXY_URL)).toString());
    setUdpxyPort(value(KEY_UDPXY_PORT, defaultValue(KEY_UDPXY_PORT)).toInt());

    setWidth(value(KEY_WIDTH, defaultValue(KEY_WIDTH)).toInt());
    setHeight(value(KEY_HEIGHT, defaultValue(KEY_HEIGHT)).toInt());
    setPosX(value(KEY_POS_X, defaultValue(KEY_POS_X)).toInt());
    setPosY(value(KEY_POS_Y, defaultValue(KEY_POS_Y)).toInt());

    setOsd(value(KEY_OSD, defaultValue(KEY_OSD)).toBool());
    setTrayEnabled(value(KEY_TRAY_ENABLED, defaultValue(KEY_TRAY_ENABLED)).toBool());
    setHideToTray(value(KEY_HIDE_TO_TRAY, defaultValue(KEY_HIDE_TO_TRAY)).toBool());
    setMouseWheel(value(KEY_MOUSE_WHEEL, defaultValue(KEY_MOUSE_WHEEL)).toString());
    setRememberGuiSession(value(KEY_REMEMBER_GUI_SESSION, defaultValue(KEY_REMEMBER_GUI_SESSION)).toBool());
    setIcons(value(KEY_ICONS, defaultValue(KEY_ICONS)).toString());

    setVout(value(KEY_VOUT, defaultValue(KEY_VOUT)).toInt());
    setAout(value(KEY_AOUT, defaultValue(KEY_AOUT)).toInt());
    setYuvToRgb(value(KEY_YUV_TO_RGB, defaultValue(KEY_MUTE_ON_MINIMIZE)).toBool());
    setSpdif(value(KEY_SPDIF, defaultValue(KEY_SPDIF)).toBool());

    setRememberVideoSettings(value(KEY_REMEMBER_VIDEO_SETTINGS, defaultValue(KEY_REMEMBER_VIDEO_SETTINGS)).toBool());
    setRememberVideoPerChannel(value(KEY_REMEMBER_VIDEO_PER_CHANNEL, defaultValue(KEY_REMEMBER_VIDEO_PER_CHANNEL)).toBool());
    setAspectRatio(value(KEY_ASPECT_RATIO, defaultValue(KEY_ASPECT_RATIO)).toInt());
    setCropRatio(value(KEY_CROP_RATIO, defaultValue(KEY_CROP_RATIO)).toInt());
    setDeinterlacing(value(KEY_DEINTERLACING, defaultValue(KEY_DEINTERLACING)).toInt());
    setAudioLanguage(value(KEY_AUDIO_LANGUAGE, defaultValue(KEY_AUDIO_LANGUAGE)).toString());
    setSubtitleLanguage(value(KEY_SUBTITLE_LANGUAGE, defaultValue(KEY_SUBTITLE_LANGUAGE)).toString());

    setMuteOnMinimize(value(KEY_MUTE_ON_MINIMIZE, defaultValue(KEY_MUTE_ON_MINIMIZE)).toBool());
    setTeletext(value(KEY_TELETEXT, defaultValue(KEY_TELETEXT)).toBool());

    setRecorderDirectory(value(KEY_RECORDER_DIRECTORY, defaultValue(KEY_RECORDER_DIRECTORY)).toString());
    setSnapshotsDirectory(value(KEY_SNAPSHOTS_DIRECTORY, defaultValue(KEY_SNAPSHOTS_DIRECTORY)).toString());

    setSessionAutoplay(value(KEY_SESSION_AUTOPLAY, defaultValue(KEY_SESSION_AUTOPLAY)).toBool());
    setSessionChannel(value(KEY_SESSION_CHANNEL, defaultValue(KEY_SESSION_CHANNEL)).toInt());
    setSessionRememberVolume(value(KEY_SESSION_REMEMBER_VOLUME, defaultValue(KEY_SESSION_REMEMBER_VOLUME)).toBool());
    setSessionVolume(value(KEY_SESSION_VOLUME, defaultValue(KEY_SESSION_VOLUME)).toInt());

    setXmltvUpdate(value(KEY_XMLTV_UPDATE, defaultValue(KEY_XMLTV_UPDATE)).toBool());
    setXmltvUpdateLocation(value(KEY_XMLTV_UPDATE_LOCATION, defaultValue(KEY_XMLTV_UPDATE_LOCATION)).toString());
    setXmltvUpdateRemote(value(KEY_XMLTV_UPDATE_REMOTE, defaultValue(KEY_XMLTV_UPDATE_REMOTE)).toBool());
}
示例#2
0
void
VBIDecoder::eventHandler(vbi_event* event)
{
    vbi_page page;

    switch (event->type)
    {
        case VBI_EVENT_CLOSE:
            fprintf(fplog, "vbi_event: type=CLOSE\n");
            break;
        case VBI_EVENT_TTX_PAGE:
            // UNTESTED!
            fprintf(fplog, "vbi_event: type=TTX_PAGE pgno=%d subno=%d\n",
                event->ev.ttx_page.pgno, event->ev.ttx_page.subno);
            if (event->ev.ttx_page.pgno != pageno)
            {
                break;
            }
            if (!vbi_fetch_vt_page(decoder, &page,
                event->ev.ttx_page.pgno,
                event->ev.ttx_page.subno,
                VBI_WST_LEVEL_3p5, 25, TRUE))
                    break;
            if (checkPageSize)
                setTeletext(&page);
            checkPage(&page);
            vbi_unref_page(&page);
            break;
        case VBI_EVENT_CAPTION:
            if (event->ev.caption.pgno != pageno)
            {
                if (verbose)
                    fprintf(fplog, "vbi_event: type=CAPTION pgno=%d curr=%.4f ignored\n",
                        event->ev.caption.pgno, (double)currTimestamp);
                break;
            }
            if (!vbi_fetch_cc_page(decoder, &page, event->ev.caption.pgno, TRUE))
                break;
            if (verbose)
            {
                fprintf(fplog, "vbi_event: type=CAPTION pgno=%d curr=%.4f dirty: y=%d,%d roll=%d\n",
                    event->ev.caption.pgno, (double)currTimestamp,
                    page.dirty.y0, page.dirty.y1, page.dirty.roll);
                fflush(fplog);
            }
            if (checkPageSize)
                setCaption(&page);
            checkPage(&page);
            vbi_unref_page(&page);
            break;
        case VBI_EVENT_NETWORK:
            fprintf(fplog, "vbi_event: type=NETWORK\n");
            break;
        case VBI_EVENT_TRIGGER:
            fprintf(fplog, "vbi_event: type=TRIGGER\n");
            break;
        case VBI_EVENT_ASPECT:
            fprintf(fplog, "vbi_event: type=ASPECT\n");
            break;
        case VBI_EVENT_PROG_INFO:
            fprintf(fplog, "vbi_event: type=PROG_INFO\n");
            break;
        case VBI_EVENT_NETWORK_ID:
            fprintf(fplog, "vbi_event: type=NETWORK_ID\n");
            break;
        default:
            fprintf(fplog, "vbi_event: type=%#x\n", event->type);
            break;
    }
}