Ticket #8088: 8088_playgroups_v1.patch

File 8088_playgroups_v1.patch, 108.2 KB (added by Jim Stichnoth <stichnot@…>, 10 years ago)
  • libs/libmythtv/videoout_vdpau.h

     
    1616{
    1717  public:
    1818    static void GetRenderOptions(render_opts &opts);
    19     VideoOutputVDPAU(MythCodecID codec_id);
     19    VideoOutputVDPAU(PlaySettings *settings, MythCodecID codec_id);
    2020    ~VideoOutputVDPAU();
    2121    bool Init(int width, int height, float aspect, WId winid,
    2222              int winx, int winy, int winw, int winh, WId embedid = 0);
     
    4949                                    const QSize &video_dim);
    5050    static MythCodecID GetBestSupportedCodec(uint width, uint height,
    5151                                             uint stream_type,
    52                                              bool no_acceleration);
     52                                             bool no_acceleration,
     53                                             PlaySettings *settings);
    5354    DisplayInfo  GetDisplayInfo(void);
    5455    virtual bool IsPIPSupported(void) const { return true; }
    5556    virtual bool IsPBPSupported(void) const { return false; }
  • libs/libmythtv/NuppelVideoPlayer.cpp

     
    5959#include "util-osx-cocoa.h"
    6060#include "mythverbose.h"
    6161#include "myth_imgconvert.h"
     62#include "playsettings.h"
    6263
    6364extern "C" {
    6465#include "vbitext/vbi.h"
     
    231232    // Playback (output) zoom control
    232233    detect_letter_box = new DetectLetterbox(this);
    233234
    234     vbimode = VBIMode::Parse(gContext->GetSetting("VbiFormat"));
    235 
    236     commrewindamount = gContext->GetNumSetting("CommRewindAmount",0);
    237     commnotifyamount = gContext->GetNumSetting("CommNotifyAmount",0);
    238     decode_extra_audio=gContext->GetNumSetting("DecodeExtraAudio", 0);
    239     itvEnabled       = gContext->GetNumSetting("EnableMHEG", 0);
    240     db_prefer708     = gContext->GetNumSetting("Prefer708Captions", 1);
    241     autocommercialskip = (CommSkipMode)
    242         gContext->GetNumSetting("AutoCommercialSkip", kCommSkipOff);
    243 
    244235    lastIgnoredManualSkip = QDateTime::currentDateTime().addSecs(-10);
    245236
    246237    bzero(&txtbuffers, sizeof(txtbuffers));
     
    666657
    667658    if (using_null_videoout)
    668659    {
    669         videoOutput = new VideoOutputNull();
     660        videoOutput = new VideoOutputNull(GetPlaySettings());
    670661        if (!videoOutput->Init(video_disp_dim.width(), video_disp_dim.height(),
    671662                               video_aspect, 0, 0, 0, 0, 0, 0))
    672663        {
     
    715706            pipState,
    716707            video_disp_dim, video_aspect,
    717708            widget->winId(), display_rect, (video_frame_rate * play_speed),
    718             0 /*embedid*/);
     709            0 /*embedid*/, GetPlaySettings());
    719710
    720711        if (!videoOutput)
    721712        {
     
    737728        videoOutput->EmbedInWidget(embx, emby, embw, embh);
    738729    }
    739730
    740     SetCaptionsEnabled(gContext->GetNumSetting("DefaultCCMode"), false);
     731    SetCaptionsEnabled(GetPlaySettings()->GetNumSetting("DefaultCCMode", 0), false);
    741732
    742733    InitFilters();
    743734
     
    788779
    789780void NuppelVideoPlayer::ReinitVideo(void)
    790781{
    791     if (!videoOutput->IsPreferredRenderer(video_disp_dim))
     782    if (!videoOutput->IsPreferredRenderer(video_disp_dim, GetPlaySettings()))
    792783    {
    793784        VERBOSE(VB_PLAYBACK, LOC + QString("Need to switch video renderer."));
    794785        SetErrored(QObject::tr("Need to switch video renderer."));
     
    29202911    refreshrate = 0;
    29212912    lastsync = false;
    29222913
    2923     usevideotimebase = gContext->GetNumSetting("UseVideoTimebase", 0);
     2914    usevideotimebase = GetPlaySettings()->GetNumSetting("UseVideoTimebase", 0);
    29242915
    29252916    if (VERBOSE_LEVEL_CHECK(VB_PLAYBACK))
    29262917        output_jmeter = new Jitterometer("video_output", 100);
     
    29592950        m_double_process = videoOutput->IsExtraProcessingRequired();
    29602951
    29612952        videosync = VideoSync::BestMethod(
    2962             videoOutput, fr_int, rf_int, m_double_framerate);
     2953            videoOutput, GetPlaySettings(), fr_int, rf_int, m_double_framerate);
    29632954
    29642955        // Make sure video sync can do it
    29652956        if (videosync != NULL && m_double_framerate)
     
    34483439        osd->SetListener(m_tv);
    34493440
    34503441        videoOutput->GetOSDBounds(total, visible, aspect, scaling, osd->GetThemeAspect());
    3451         osd->Init(total, frame_interval, visible, aspect, scaling);
     3442        osd->Init(GetPlaySettings(), total, frame_interval, visible, aspect, scaling);
    34523443
    34533444        videoOutput->InitOSD(osd);
    34543445
     
    35223513
    35233514        GetDecoder()->setExactSeeks(seeks);
    35243515
    3525         if (gContext->GetNumSetting("ClearSavedPosition", 1) &&
     3516        if (GetPlaySettings()->GetNumSetting("ClearSavedPosition", 1) &&
    35263517            !player_ctx->IsPIP())
    35273518        {
    35283519            if (player_ctx->buffer->isDVD())
     
    37903781            ++deleteIter;
    37913782            if (deleteIter.key() == totalFrames)
    37923783            {
    3793                 if (!(gContext->GetNumSetting("EndOfRecordingExitPrompt") == 1
     3784                if (!(GetPlaySettings()->GetNumSetting("EndOfRecordingExitPrompt", 0) == 1
    37943785                      && !player_ctx->IsPIP() &&
    37953786                      player_ctx->GetState() == kState_WatchingPreRecorded))
    37963787                {
     
    39643955
    39653956    if (sim_pip_players.isEmpty())
    39663957    {
    3967         return (PIPLocation)gContext->GetNumSetting("PIPLocation", kPIPTopLeft);
     3958        return (PIPLocation)GetPlaySettings()->GetNumSetting("PIPLocation", kPIPTopLeft);
    39683959    }
    39693960
    39703961    // order of preference, could be stored in db if we want it configurable
     
    48214812    exactseeks   = frame_exact_seek;
    48224813    player_ctx   = ctx;
    48234814    livetv       = ctx->tvchain;
     4815
     4816    vbimode = VBIMode::Parse(GetPlaySettings()->GetSetting("VbiFormat", ""));
    48244817}
    48254818
    48264819void NuppelVideoPlayer::SetDeleteIter(void)
     
    74837476{
    74847477    QMutexLocker locker(&subtitleLock);
    74857478    textSubtitles.Clear();
    7486     return TextSubtitleParser::LoadSubtitles(subtitleFileName, textSubtitles);
     7479    return TextSubtitleParser::LoadSubtitles(subtitleFileName, textSubtitles,
     7480                                             GetPlaySettings());
    74877481}
    74887482
    74897483void NuppelVideoPlayer::ChangeDVDTrack(bool ffw)
  • libs/libmythtv/videooutwindow.cpp

     
    3030#include "videooutwindow.h"
    3131#include "osd.h"
    3232#include "osdsurface.h"
     33#include "playsettings.h"
    3334#include "NuppelVideoPlayer.h"
    3435#include "videodisplayprofile.h"
    3536#include "decoderbase.h"
     
    5455const float VideoOutWindow::kManualZoomMinVerticalZoom   = 0.5f;
    5556const int   VideoOutWindow::kManualZoomMaxMove           = 50;
    5657
    57 VideoOutWindow::VideoOutWindow() :
     58VideoOutWindow::VideoOutWindow(PlaySettings *_settings) :
    5859    // DB settings
    5960    db_move(0, 0), db_scale_horiz(0.0f), db_scale_vert(0.0f),
    6061    db_pip_size(26),
     
    8586
    8687    // Various state variables
    8788    embedding(false), needrepaint(false),
    88     allowpreviewepg(true), pip_state(kPIPOff)
     89    allowpreviewepg(true), pip_state(kPIPOff),
     90
     91    settings(_settings)
    8992{
    9093    db_pip_size = gContext->GetNumSetting("PIPSize", 26);
    9194
    92     db_move = QPoint(gContext->GetNumSetting("xScanDisplacement", 0),
    93                      gContext->GetNumSetting("yScanDisplacement", 0));
     95    db_move = QPoint(settings->GetNumSetting("xScanDisplacement", 0),
     96                     settings->GetNumSetting("yScanDisplacement", 0));
    9497    db_use_gui_size = gContext->GetNumSetting("GuiSizeForTV", 0);
    9598
    9699    QDesktopWidget *desktop = NULL;
     
    613616    if (change)
    614617    {
    615618        db_scale_vert =
    616             gContext->GetNumSetting("VertScanPercentage", 0) * 0.01f;
     619            settings->GetNumSetting("VertScanPercentage", 0) * 0.01f;
    617620        db_scale_horiz =
    618             gContext->GetNumSetting("HorizScanPercentage", 0) * 0.01f;
     621            settings->GetNumSetting("HorizScanPercentage", 0) * 0.01f;
    619622        db_scaling_allowed = true;
    620623    }
    621624    else
  • libs/libmythtv/videoout_d3d.cpp

     
    948948    opts.priorities->insert("direct3d", 55);
    949949}
    950950
    951 VideoOutputD3D::VideoOutputD3D(void)
    952   : VideoOutput(),         m_lock(QMutex::Recursive),
     951VideoOutputD3D::VideoOutputD3D(PlaySettings *settings)
     952  : VideoOutput(settings),         m_lock(QMutex::Recursive),
    953953    m_hWnd(NULL),          m_ctx(NULL),
    954954    m_video(NULL),         m_osd(NULL),
    955955    m_d3d_osd(false),      m_osd_ready(false),
  • libs/libmythtv/videoout_opengl.cpp

     
    3838    opts.priorities->insert("opengl", 65);
    3939}
    4040
    41 VideoOutputOpenGL::VideoOutputOpenGL(void)
    42     : VideoOutput(),
     41VideoOutputOpenGL::VideoOutputOpenGL(PlaySettings *settings)
     42    : VideoOutput(settings),
    4343    gl_context_lock(QMutex::Recursive),
    4444    gl_context(NULL), gl_videochain(NULL),
    4545    gl_osdchain(NULL), gl_pipchain_active(NULL),
  • libs/libmythtv/videoout_quartz.cpp

     
    6565#include "videodisplayprofile.h"
    6666#include "videoout_dvdv.h"
    6767
     68class PlaySettings;
     69
    6870#define LOC     QString("VideoOutputQuartz::")
    6971#define LOC_ERR QString("VideoOutputQuartz Error: ")
    7072
     
    11081110/** \class VideoOutputQuartz
    11091111 *  \brief Implementation of Quartz (Mac OS X windowing system) video output
    11101112 */
    1111 VideoOutputQuartz::VideoOutputQuartz(
     1113VideoOutputQuartz::VideoOutputQuartz(PlaySettings *settings
    11121114    MythCodecID _myth_codec_id, void *codec_priv) :
    1113     VideoOutput(), Started(false), data(new QuartzData()),
     1115    VideoOutput(settings), Started(false), data(new QuartzData()),
    11141116    myth_codec_id(_myth_codec_id)
    11151117{
    11161118    init(&pauseFrame, FMT_YV12, NULL, 0, 0, 0, 0);
     
    18151817MythCodecID VideoOutputQuartz::GetBestSupportedCodec(
    18161818    uint width, uint height,
    18171819    uint osd_width, uint osd_height,
    1818     uint stream_type, uint fourcc)
     1820    uint stream_type, uint fourcc, PlaySettings *settings)
    18191821{
    18201822    (void) osd_width;
    18211823    (void) osd_height;
    18221824
    1823     VideoDisplayProfile vdp;
     1825    VideoDisplayProfile vdp(settings);
    18241826    vdp.SetInput(QSize(width, height));
    18251827    QString dec = vdp.GetDecoder();
    18261828    if ((dec == "libmpeg2") || (dec == "ffmpeg"))
  • libs/libmythtv/avformatdecoder.cpp

     
    2828#include "videodisplayprofile.h"
    2929#include "mythuihelper.h"
    3030#include "myth_imgconvert.h"
     31#include "playsettings.h"
    3132
    3233#include "lcddevice.h"
    3334
     
    498499      allow_ac3_passthru(false),    allow_dts_passthru(false),
    499500      internal_vol(false),
    500501      disable_passthru(false),      max_channels(2),
    501       last_ac3_channels(0),         dummy_frame(NULL),
     502      last_ac3_channels(0),         dummy_frame(NULL),
    502503      // DVD
    503504      lastdvdtitle(-1),
    504505      decodeStillFrame(false),
     
    526527
    527528    cc608_build_parity_table(cc608_parity_table);
    528529
    529     if (gContext->GetNumSetting("CCBackground", 0))
     530    if (GetNVP()->GetPlaySettings()->GetNumSetting("CCBackground", 0))
    530531        CC708Window::forceWhiteOnBlackText = true;
    531532
    532533    no_dts_hack = false;
     
    13771378        codec = find_vdpau_decoder(codec, enc->codec_id);
    13781379
    13791380    if (selectedStream &&
    1380         !gContext->GetNumSetting("DecodeExtraAudio", 0) &&
     1381        !GetNVP()->GetPlaySettings()->GetNumSetting("DecodeExtraAudio", 0) &&
    13811382        !CODEC_IS_HWACCEL(codec))
    13821383    {
    13831384        SetLowBuffers(false);
     
    18121813
    18131814                if (!is_db_ignored)
    18141815                {
    1815                     VideoDisplayProfile vdp;
     1816                    VideoDisplayProfile vdp(GetNVP()->GetPlaySettings());
    18161817                    vdp.SetInput(QSize(width, height));
    18171818                    dec = vdp.GetDecoder();
    18181819                    thread_count = vdp.GetMaxCPUs();
     
    18351836                    MythCodecID vdpau_mcid;
    18361837                    vdpau_mcid = VideoOutputVDPAU::GetBestSupportedCodec(
    18371838                        width, height,
    1838                         mpeg_version(enc->codec_id), no_hardware_decoders);
     1839                        mpeg_version(enc->codec_id), no_hardware_decoders,
     1840                        GetNVP()->GetPlaySettings());
    18391841
    18401842                    if (vdpau_mcid >= video_codec_id)
    18411843                    {
     
    18671869                        /* mpeg type    */ mpeg_version(enc->codec_id),
    18681870                        /* xvmc pix fmt */ xvmc_pixel_format(enc->pix_fmt),
    18691871                        /* test surface */ codec_is_std(video_codec_id),
    1870                         /* force_xv     */ force_xv);
     1872                        /* force_xv     */ force_xv,
     1873                        GetNVP()->GetPlaySettings());
    18711874
    18721875                    if (mcid >= video_codec_id)
    18731876                    {
     
    19001903                        /* osd dim      */ 0, 0,
    19011904                        /* mpeg type    */ mpeg_version(enc->codec_id),
    19021905                        /* pixel format */
    1903                         (PIX_FMT_YUV420P == enc->pix_fmt) ? FOURCC_I420 : 0);
     1906                        (PIX_FMT_YUV420P == enc->pix_fmt) ? FOURCC_I420 : 0,
     1907                        GetNVP()->GetPlaySettings());
    19041908
    19051909                    if (quartz_mcid >= video_codec_id)
    19061910                    {
  • libs/libmythtv/osdtypes.cpp

     
    1818#include "mythcontext.h"
    1919#include "mythdialogs.h"
    2020#include "mythverbose.h"
     21#include "playsettings.h"
    2122
    2223#ifdef USING_FRIBIDI
    2324    #include "fribidi/fribidi.h"
     
    23592360//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    23602361
    23612362OSDTypeCC::OSDTypeCC(const QString &name, TTFFont *font, int xoff, int yoff,
    2362                      int dispw, int disph, float wmult, float hmult)
     2363                     int dispw, int disph, float wmult, float hmult,
     2364                     PlaySettings *settings)
    23632365         : OSDType(name)
    23642366{
    23652367    m_font = font;
     
    23732375
    23742376    QRect rect = QRect(0, 0, 0, 0);
    23752377    m_box = new OSDTypeBox("cc_background", rect, wmult, hmult);
    2376     m_ccbackground = gContext->GetNumSetting("CCBackground", 0);
     2378    m_ccbackground = settings->GetNumSetting("CCBackground", 0);
    23772379}
    23782380
    23792381OSDTypeCC::~OSDTypeCC()
     
    26032605}
    26042606
    26052607OSDType708CC::OSDType708CC(const QString &name, TTFFont *fonts[48],
    2606                            int xoff, int yoff, int dispw, int disph) :
     2608                          int xoff, int yoff, int dispw, int disph) :
    26072609    OSDType(name)
    26082610{
    26092611    xoffset = xoff;
  • libs/libmythtv/playgroup.cpp

     
    22#include "mythdb.h"
    33#include "playgroup.h"
    44#include "programinfo.h"
     5#include "playsettings.h"
    56
    67// A parameter associated with the profile itself
    78class PlayGroupDBStorage : public SimpleDBStorage
     
    211212    return res;
    212213}
    213214
    214 PlayGroupEditor::PlayGroupEditor(void) :
    215     listbox(new ListBoxSetting(this)), lastValue("Default")
     215PlayGroupEditor::PlayGroupEditor(SettingsLookup pbfunc, SettingsLookup osdfunc) :
     216    listbox(new ListBoxSetting(this)), lastValue("Default"),
     217    getPbSettings(pbfunc), getOsdSettings(osdfunc)
    216218{
    217219    listbox->setLabel(tr("Playback Groups"));
    218220    addChild(listbox);
     
    243245    }
    244246
    245247    PlayGroup group(name);
     248    if (getPbSettings || getOsdSettings)
     249    {
     250        PlaySettings *psettings = new PlaySettings(name);
     251        if (getPbSettings)
     252            getPbSettings(psettings, &group);
     253        if (getOsdSettings)
     254            getOsdSettings(psettings, &group);
     255    }
    246256    if (group.exec() == QDialog::Accepted || !created)
    247257        lastValue = name;
    248258    else
     
    277287        query.bindValue(":NAME", name);
    278288        if (!query.exec())
    279289            MythDB::DBError("PlayGroupEditor::doDelete", query);
     290        PlaySettings::deleteGroup(name);
    280291
    281292        int lastIndex = listbox->getValueIndex(name);
    282293        lastValue = "";
  • libs/libmythtv/libmythtv.pro

     
    179179SOURCES += iso639.cpp
    180180SOURCES += mythsystemevent.cpp
    181181
     182HEADERS += playsettings.h
     183SOURCES += playsettings.cpp
     184
    182185# DiSEqC
    183186HEADERS += diseqc.h                 diseqcsettings.h
    184187SOURCES += diseqc.cpp               diseqcsettings.cpp
  • libs/libmythtv/videoout_opengl.h

     
    1010{
    1111  public:
    1212    static void GetRenderOptions(render_opts &opts, QStringList &cpudeints);
    13     VideoOutputOpenGL();
     13    VideoOutputOpenGL(PlaySettings *settings);
    1414   ~VideoOutputOpenGL();
    1515
    1616    bool Init(int width, int height, float aspect, WId winid,
  • libs/libmythtv/osdtypes.h

     
    3131class OSDTypeText;
    3232class OSDSurface;
    3333class TV;
     34class PlaySettings;
    3435
    3536typedef QHash<QString,QString> InfoMap;
    3637typedef QMap<int,uint>         HotKeyMap;
     
    573574{
    574575  public:
    575576    OSDTypeCC(const QString &name, TTFFont *font, int xoff, int yoff,
    576               int dispw, int disph, float wmult, float hmult);
     577              int dispw, int disph, float wmult, float hmult,
     578              PlaySettings *settings);
    577579   ~OSDTypeCC();
    578580
    579581    void Reinit(float wmult, float hmult);
  • libs/libmythtv/tv_play.h

     
    5656class TV;
    5757class OSDListTreeItemEnteredEvent;
    5858class OSDListTreeItemSelectedEvent;
     59class PlaySettings;
    5960
    6061typedef QMap<QString,InfoMap>    DDValueMap;
    6162typedef QMap<QString,DDValueMap> DDKeyMap;
     
    179180        unsigned long seconds;
    180181    };
    181182
    182     TV(void);
     183    TV(PlaySettings *settings);
    183184   ~TV();
    184185
    185186    bool Init(bool createWindow = true);
     
    204205
    205206    // Recording commands
    206207    int  PlayFromRecorder(int recordernum);
    207     int  Playback(const ProgramInfo &rcinfo);
     208    int  Playback(const ProgramInfo &rcinfo, PlaySettings *settings);
    208209
    209210    // Commands used by frontend playback box
    210211    QString GetRecordingGroup(int player_idx) const;
     
    593594    static TVState RemoveRecording(TVState state);
    594595    void RestoreScreenSaver(const PlayerContext*);
    595596
    596     void InitUDPNotifyEvent(void);
     597    void InitUDPNotifyEvent(PlaySettings *settings);
    597598
    598599    /// true if dialog is either videoplayexit, playexit or askdelete dialog
    599600    bool IsVideoExitDialog(const QString &dialog_name);
  • libs/libmythtv/playgroup.h

     
    77#include "mythwidgets.h"
    88
    99class ProgramInfo;
     10class PlaySettings;
    1011
    1112class MPUBLIC PlayGroup: public ConfigurationWizard
    1213{
     
    2930    Q_OBJECT
    3031
    3132  public:
    32     PlayGroupEditor(void);
     33    typedef ConfigurationWizard *(*SettingsLookup)(PlaySettings *settings,
     34                                                   ConfigurationWizard *base);
     35    PlayGroupEditor(SettingsLookup pbfunc=0, SettingsLookup osdfunc=0);
    3336    virtual DialogCode exec(void);
    3437    virtual void Load(void);
    3538    virtual void Save(void) { }
     
    4447  protected:
    4548    ListBoxSetting *listbox;
    4649    QString         lastValue;
     50    SettingsLookup  getPbSettings;
     51    SettingsLookup  getOsdSettings;
    4752};
    4853
    4954#endif
  • libs/libmythtv/dbcheck.cpp

     
    35693569
    35703570            VideoDisplayProfile::CreateNewProfiles(host);
    35713571            profiles = VideoDisplayProfile::GetProfiles(host);
    3572             QString profile = VideoDisplayProfile::GetDefaultProfileName(host);
     3572            QString profile = VideoDisplayProfile::GetDefaultProfileName(host, NULL);
    35733573
    35743574            if (profiles.contains("Normal") &&
    35753575                (profile=="CPU++" || profile=="CPU+" || profile=="CPU--"))
     
    56375637"  jump int(11) NOT NULL default '0',"
    56385638"  PRIMARY KEY  (`name`)"
    56395639");",
     5640"CREATE TABLE playgroupsettings ("
     5641"  playgroupname varchar(64) NOT NULL,"
     5642"  `value` varchar(128) NOT NULL,"
     5643"  `data` text,"
     5644"  overridden tinyint(1) NOT NULL,"
     5645"  PRIMARY KEY (playgroupname, `value`)"
     5646");",
    56405647"CREATE TABLE powerpriority ("
    56415648"  priorityname varchar(64) collate utf8_bin NOT NULL,"
    56425649"  recpriority int(10) NOT NULL default '0',"
  • libs/libmythtv/videoout_vdpau.cpp

     
    4646    opts.deints->insert("vdpau", deints);
    4747}
    4848
    49 VideoOutputVDPAU::VideoOutputVDPAU(MythCodecID codec_id)
    50   : VideoOutput(),
     49VideoOutputVDPAU::VideoOutputVDPAU(PlaySettings *settings, MythCodecID codec_id)
     50  : VideoOutput(settings),
    5151    m_codec_id(codec_id),    m_win(0),         m_render(NULL),
    5252    m_buffer_size(NUM_VDPAU_BUFFERS),          m_pause_surface(0),
    5353    m_need_deintrefs(false), m_video_mixer(0), m_mixer_features(kVDPFeatNone),
     
    857857
    858858MythCodecID VideoOutputVDPAU::GetBestSupportedCodec(
    859859    uint width,       uint height,
    860     uint stream_type, bool no_acceleration)
     860    uint stream_type, bool no_acceleration, PlaySettings *settings)
    861861{
    862862    bool use_cpu = no_acceleration;
    863     VideoDisplayProfile vdp;
     863    VideoDisplayProfile vdp(settings);
    864864    vdp.SetInput(QSize(width, height));
    865865    QString dec = vdp.GetDecoder();
    866866
  • libs/libmythtv/videoout_directfb.cpp

     
    274274    opts.priorities->insert("directfb", 60);
    275275}
    276276
    277 VideoOutputDirectfb::VideoOutputDirectfb(void)
    278     : VideoOutput(), XJ_started(false), widget(NULL),
     277VideoOutputDirectfb::VideoOutputDirectfb(PlaySettings *settings)
     278    : VideoOutput(settings), XJ_started(false), widget(NULL),
    279279      data(new DirectfbData())
    280280{
    281281    init(&pauseFrame, FMT_YV12, NULL, 0, 0, 0, 0);
  • libs/libmythtv/videoout_d3d.h

     
    9393{
    9494  public:
    9595    static void GetRenderOptions(render_opts &opts, QStringList &cpudeints);
    96     VideoOutputD3D();
     96    VideoOutputD3D(PlaySettings *settings);
    9797   ~VideoOutputD3D();
    9898
    9999    bool Init(int width, int height, float aspect, WId winid,
  • libs/libmythtv/playercontext.cpp

     
    1414#include "videoouttypes.h"
    1515#include "storagegroup.h"
    1616#include "mythcontext.h"
     17#include "playsettings.h"
    1718
    1819#define LOC QString("playCtx: ")
    1920#define LOC_ERR QString("playCtx, Error: ")
     
    435436                              WId embedwinid, const QRect *embedbounds,
    436437                              bool muted)
    437438{
    438     int exact_seeking = gContext->GetNumSetting("ExactSeeking", 0);
     439    int exact_seeking = settings->GetNumSetting("ExactSeeking", 0);
    439440
    440441    if (HasNVP())
    441442    {
     
    450451        _nvp->DisableHardwareDecoders();
    451452
    452453    _nvp->SetPlayerInfo(tv, widget, exact_seeking, this);
     454    _nvp->commrewindamount = settings->GetNumSetting("CommRewindAmount", 0);
     455    _nvp->commnotifyamount = settings->GetNumSetting("CommNotifyAmount", 0);
     456    _nvp->decode_extra_audio = settings->GetNumSetting("DecodeExtraAudio", 0);
     457    _nvp->itvEnabled = settings->GetNumSetting("EnableMHEG", 0);
     458    _nvp->db_prefer708 = settings->GetNumSetting("Prefer708Captions", 1);
    453459    _nvp->SetAudioInfo(gContext->GetSetting("AudioOutputDevice"),
    454460                       gContext->GetSetting("PassThruOutputDevice"),
    455461                       gContext->GetNumSetting("AudioSampleRate", 44100));
     
    888894/**
    889895 * \brief assign programinfo to the context
    890896 */
    891 void PlayerContext::SetPlayingInfo(const ProgramInfo *info)
     897void PlayerContext::SetPlayingInfo(const ProgramInfo *info, PlaySettings *_settings)
    892898{
    893899    bool ignoreDB = gContext->IsDatabaseIgnored();
    894900
     
    900906            playingInfo->MarkAsInUse(false);
    901907        delete playingInfo;
    902908        playingInfo = NULL;
     909        // XXX delete settings?
    903910    }
    904911
    905912    if (info)
     
    908915        if (!ignoreDB)
    909916            playingInfo->MarkAsInUse(true, recUsage);
    910917        playingLen  = playingInfo->CalculateLength();
     918        settings = (_settings ? _settings : new PlaySettings(playingInfo->playgroup));
    911919    }
    912920}
    913921
  • libs/libmythtv/NuppelVideoPlayer.h

     
    196196    bool      GetAudioBufferStatus(uint &fill, uint &total) const;
    197197    PIPLocation GetNextPIPLocation(void) const;
    198198
     199    PlaySettings *GetPlaySettings(void) const {
     200        return player_ctx ? player_ctx->settings : NULL;
     201    }
     202
    199203    // Bool Gets
    200204    bool    GetRawAudioState(void) const;
    201205    bool    GetLimitKeyRepeat(void) const     { return limitKeyRepeat; }
  • libs/libmythtv/textsubtitleparser.h

     
    1717// Qt headers
    1818#include <QStringList>
    1919
     20class PlaySettings;
     21
    2022class text_subtitle_t
    2123{
    2224  public:
     
    7577class TextSubtitleParser
    7678{
    7779  public:
    78     static bool LoadSubtitles(QString fileName, TextSubtitles &target);
     80    static bool LoadSubtitles(QString fileName, TextSubtitles &target,
     81                              PlaySettings *settings);
    7982};
    8083
    8184#endif
  • libs/libmythtv/osd.h

     
    7070class TeletextViewer;
    7171class QStringList;
    7272class QDomElement;
     73class PlaySettings;
    7374
    7475class OSD : public QObject
    7576{
     
    7879    OSD();
    7980   ~OSD(void);
    8081
    81     void Init(const QRect &totalBounds,   int   frameRate,
     82    void Init(PlaySettings *settings, const QRect &totalBounds,   int   frameRate,
    8283        const QRect &visibleBounds, float visibleAspect, float fontScaling);
    8384
    8485    OSDSurface *Display(void);
     
    278279    OSDListTreeType *runningTreeMenu;
    279280    QString treeMenuContainer;
    280281
     282    PlaySettings *settings;
     283
    281284    // EIA-708 captions
    282285    QString fontname;
    283286    QString ccfontname;
  • libs/libmythtv/vsync.cpp

     
    3434#include "mythcontext.h"
    3535#include "mythverbose.h"
    3636#include "mythmainwindow.h"
     37#include "playsettings.h"
    3738
    3839#ifdef USING_XV
    3940#include "videoout_xv.h"
     
    7677 *  \brief Returns the most sophisticated video sync method available.
    7778 */
    7879VideoSync *VideoSync::BestMethod(VideoOutput *video_output,
     80                                 PlaySettings *settings,
    7981                                 uint frame_interval, uint refresh_interval,
    8082                                 bool halve_frame_interval)
    8183{
    8284    VideoSync *trial = NULL;
    8385    tryingVideoSync  = true;
    84     bool tryOpenGL   = (gContext->GetNumSetting("UseOpenGLVSync", 1) &&
     86    bool tryOpenGL   = (settings->GetNumSetting("UseOpenGLVSync", 1) &&
    8587                        (getenv("NO_OPENGL_VSYNC") == NULL));
    8688
    8789    // m_forceskip allows for skipping one sync method
  • libs/libmythtv/tv_play.cpp

     
    6060#include "tv_play_win.h"
    6161#include "recordinginfo.h"
    6262#include "mythsystemevent.h"
     63#include "playsettings.h"
    6364
    6465#if ! HAVE_ROUND
    6566#define round(x) ((int) ((x) + 0.5))
     
    190191                 bool inPlaylist, bool initByNetworkCommand)
    191192{
    192193    VERBOSE(VB_PLAYBACK, LOC + "StartTV() -- begin");
    193     TV *tv = new TV();
    194194    bool quitAll = false;
    195195    bool showDialogs = true;
    196196    bool playCompleted = false;
     
    201201    if (tvrec)
    202202        curProgram = new ProgramInfo(*tvrec);
    203203
     204    PlaySettings settings(curProgram ? curProgram->playgroup : "Default");
     205    TV *tv = new TV(&settings);
     206
    204207    // Initialize TV
    205208    if (!tv->Init())
    206209    {
     
    231234        if (curProgram)
    232235        {
    233236            VERBOSE(VB_PLAYBACK, LOC + "tv->Playback() -- begin");
    234             if (!tv->Playback(*curProgram))
     237            if (!tv->Playback(*curProgram, &settings))
    235238            {
    236239                quitAll = true;
    237240            }
     
    783786 *  \brief Performs instance initialiation not requiring access to database.
    784787 *  \sa Init(void)
    785788 */
    786 TV::TV(void)
     789TV::TV(PlaySettings *settings)
    787790    : // Configuration variables from database
    788791      baseFilters(""),
    789792      db_channel_format("<num> <sign>"),
     
    921924        kv[QString("FFRewSpeed%1").arg(i)] = QString::number(ff_rew_def[i]);
    922925
    923926    MythDB::getMythDB()->GetSettings(kv);
     927    settings->AddToMap(kv);
    924928
    925929    // convert from minutes to ms.
    926930    db_idle_timeout        = kv["LiveTVIdleTimeout"].toInt() * 60 * 1000;
     
    934938    db_use_gui_size_for_tv = kv["GuiSizeForTV"].toInt();
    935939    db_start_in_guide      = kv["WatchTVGuide"].toInt();
    936940    db_toggle_bookmark     = kv["AltClearSavedPosition"].toInt();
     941    VERBOSE(VB_GENERAL, QString("db_toggle_bookmark=%1").arg(db_toggle_bookmark));
    937942    db_run_jobs_on_remote  = kv["JobsRunOnRecordHost"].toInt();
    938943    db_use_dvd_bookmark    = kv["EnableDVDBookmark"].toInt();
    939944    db_continue_embedded   = kv["ContinueEmbeddedTVPlay"].toInt();
     
    17111716}
    17121717
    17131718
    1714 int TV::Playback(const ProgramInfo &rcinfo)
     1719int TV::Playback(const ProgramInfo &rcinfo, PlaySettings *settings)
    17151720{
    17161721    wantsToQuit   = false;
    17171722    jumpToProgram = false;
     
    17251730        return 0;
    17261731    }
    17271732
    1728     mctx->SetPlayingInfo(&rcinfo);
     1733    mctx->SetPlayingInfo(&rcinfo, settings);
    17291734    mctx->SetInitialTVState(false);
    17301735    ScheduleStateChange(mctx);
    17311736
     
    18081813
    18091814    if (fileexists)
    18101815    {
    1811         Playback(pginfo);
     1816        PlaySettings settings("Default");
     1817        Playback(pginfo, &settings);
    18121818        retval = 1;
    18131819    }
    18141820
     
    21532159        {
    21542160            OSD *osd = GetOSDLock(ctx);
    21552161            ctx->LockPlayingInfo(__FILE__, __LINE__);
    2156             if (osd && (PlayGroup::GetCount() > 0))
     2162            if (ctx->playingInfo->playgroup != "Default" && osd && (PlayGroup::GetCount() > 0))
    21572163                osd->SetSettingsText(tr("%1 Settings")
    21582164                    .arg(tv_i18n(ctx->playingInfo->playgroup)), 3);
    21592165            ctx->UnlockPlayingInfo(__FILE__, __LINE__);
     
    51655171        return false;
    51665172    }
    51675173
    5168     InitUDPNotifyEvent();
     5174    InitUDPNotifyEvent(ctx->settings);
    51695175    bool ok = false;
    51705176    if (ctx->IsNullVideoDesired())
    51715177    {
     
    1181711823        GetMythUI()->RestoreScreensaver();
    1181811824}
    1181911825
    11820 void TV::InitUDPNotifyEvent(void)
     11826void TV::InitUDPNotifyEvent(PlaySettings *settings)
    1182111827{
    1182211828    if (db_udpnotify_port && !udpnotify)
    1182311829    {
    11824         udpnotify = new UDPNotify(db_udpnotify_port);
     11830        udpnotify = new UDPNotify(db_udpnotify_port, settings);
    1182511831        connect(udpnotify,
    1182611832                SIGNAL(AddUDPNotifyEvent(
    1182711833                        const QString&,const UDPNotifyOSDSet*)),
  • libs/libmythtv/videodisplayprofile.h

     
    1313
    1414#include "mythcontext.h"
    1515
     16class PlaySettings;
     17
    1618typedef QMap<QString,QString>     pref_map_t;
    1719typedef QMap<QString,QStringList> safe_map_t;
    1820typedef QStringList               safe_list_t;
     
    8082class MPUBLIC VideoDisplayProfile
    8183{
    8284  public:
    83     VideoDisplayProfile();
     85    VideoDisplayProfile(PlaySettings *settings);
    8486    ~VideoDisplayProfile();
    8587
    8688    void SetInput(const QSize &size);
     
    121123    static QString     GetDecoderName(const QString &decoder);
    122124    static QString     GetDecoderHelp(QString decoder = QString::null);
    123125
    124     static QString     GetDefaultProfileName(const QString &hostname);
     126    static QString     GetDefaultProfileName(const QString &hostname,
     127                                             PlaySettings *settings);
    125128    static void        SetDefaultProfileName(const QString &profilename,
    126129                                             const QString &hostname);
    127130    static uint        GetProfileGroupID(const QString &profilename,
  • libs/libmythtv/videoout_null.cpp

     
    2727    opts.priorities->insert("null", 10);
    2828}
    2929
    30 VideoOutputNull::VideoOutputNull(void) :
    31     VideoOutput(), global_lock(QMutex::Recursive)
     30VideoOutputNull::VideoOutputNull(PlaySettings *settings) :
     31    VideoOutput(settings), global_lock(QMutex::Recursive)
    3232{
    3333    VERBOSE(VB_PLAYBACK, "VideoOutputNull()");
    3434    memset(&av_pause_frame, 0, sizeof(av_pause_frame));
  • libs/libmythtv/videooutbase.cpp

     
    77#include "NuppelVideoPlayer.h"
    88#include "videodisplayprofile.h"
    99#include "decoderbase.h"
     10#include "playsettings.h"
    1011
    1112#include "mythcontext.h"
    1213#include "mythverbose.h"
     
    107108        PIPState pipState,
    108109        const QSize   &video_dim, float        video_aspect,
    109110        WId            win_id,    const QRect &display_rect,
    110         float          video_prate,     WId    embed_id)
     111        float          video_prate,     WId    embed_id,
     112        PlaySettings *settings)
    111113{
    112114    (void) codec_priv;
    113115
     
    152154    QString renderer = QString::null;
    153155    if (renderers.size() > 0)
    154156    {
    155         VideoDisplayProfile vprof;
     157        VideoDisplayProfile vprof(settings);
    156158        vprof.SetInput(video_dim);
    157159
    158160        QString tmp = vprof.GetVideoRenderer();
     
    180182
    181183#ifdef USING_DIRECTFB
    182184        if (renderer == "directfb")
    183             vo = new VideoOutputDirectfb();
     185            vo = new VideoOutputDirectfb(settings);
    184186#endif // USING_DIRECTFB
    185187
    186188#ifdef USING_MINGW
    187189        if (renderer == "direct3d")
    188             vo = new VideoOutputD3D();
     190            vo = new VideoOutputD3D(settings);
    189191#endif // USING_MINGW
    190192
    191193#ifdef Q_OS_MACX
    192194        if (osxlist.contains(renderer))
    193             vo = new VideoOutputQuartz(codec_id, codec_priv);
     195            vo = new VideoOutputQuartz(settings, codec_id, codec_priv);
    194196#endif // Q_OS_MACX
    195197
    196198#ifdef USING_OPENGL_VIDEO
    197199        if (renderer == "opengl")
    198             vo = new VideoOutputOpenGL();
     200            vo = new VideoOutputOpenGL(settings);
    199201#endif // USING_OPENGL_VIDEO
    200202
    201203#ifdef USING_VDPAU
    202204        if (renderer == "vdpau")
    203             vo = new VideoOutputVDPAU(codec_id);
     205            vo = new VideoOutputVDPAU(settings, codec_id);
    204206#endif // USING_VDPAU
    205207
    206208#ifdef USING_XV
    207209        if (xvlist.contains(renderer))
    208             vo = new VideoOutputXv(codec_id);
     210            vo = new VideoOutputXv(settings, codec_id);
    209211#endif // USING_XV
    210212
    211213        if (vo)
     
    302304 * \brief This constructor for VideoOutput must be followed by an
    303305 *        Init(int,int,float,WId,int,int,int,int,WId) call.
    304306 */
    305 VideoOutput::VideoOutput() :
     307VideoOutput::VideoOutput(PlaySettings *_settings) :
    306308    // DB Settings
    307309    db_display_dim(0,0),
    308310    db_aspectoverride(kAspect_Off),     db_adjustfill(kAdjustFill_Off),
     
    336338    display_res(NULL),
    337339
    338340    // Physical display
    339     monitor_sz(640,480),                monitor_dim(400,300)
     341    monitor_sz(640,480),                monitor_dim(400,300),
    340342
     343    settings(_settings)
     344
    341345{
    342346    bzero(&pip_tmp_image, sizeof(pip_tmp_image));
    343     db_display_dim = QSize(gContext->GetNumSetting("DisplaySizeWidth",  0),
    344                            gContext->GetNumSetting("DisplaySizeHeight", 0));
     347    db_display_dim = QSize(settings->GetNumSetting("DisplaySizeWidth",  0),
     348                           settings->GetNumSetting("DisplaySizeHeight", 0));
    345349
    346350    db_pict_attr[kPictureAttribute_Brightness] =
    347         gContext->GetNumSetting("PlaybackBrightness", 50);
     351        settings->GetNumSetting("PlaybackBrightness", 50);
    348352    db_pict_attr[kPictureAttribute_Contrast] =
    349         gContext->GetNumSetting("PlaybackContrast",   50);
     353        settings->GetNumSetting("PlaybackContrast",   50);
    350354    db_pict_attr[kPictureAttribute_Colour] =
    351         gContext->GetNumSetting("PlaybackColour",     50);
     355        settings->GetNumSetting("PlaybackColour",     50);
    352356    db_pict_attr[kPictureAttribute_Hue] =
    353         gContext->GetNumSetting("PlaybackHue",         0);
     357        settings->GetNumSetting("PlaybackHue",         0);
    354358
    355359    db_aspectoverride = (AspectOverrideMode)
    356         gContext->GetNumSetting("AspectOverride",      0);
     360        settings->GetNumSetting("AspectOverride",      0);
    357361    db_adjustfill = (AdjustFillMode)
    358         gContext->GetNumSetting("AdjustFill",          0);
     362        settings->GetNumSetting("AdjustFill",          0);
    359363    db_letterbox_colour = (LetterBoxColour)
    360         gContext->GetNumSetting("LetterboxColour",     0);
     364        settings->GetNumSetting("LetterboxColour",     0);
    361365    db_use_picture_controls =
    362         gContext->GetNumSetting("UseOutputPictureControls", 0);
     366        settings->GetNumSetting("UseOutputPictureControls", 0);
    363367
    364368    if (!gContext->IsDatabaseIgnored())
    365         db_vdisp_profile = new VideoDisplayProfile();
     369        db_vdisp_profile = new VideoDisplayProfile(settings);
    366370
    367     windows.push_back(VideoOutWindow());
     371    windows.push_back(VideoOutWindow(settings));
    368372}
    369373
    370374/**
     
    433437    return QString::null;
    434438}
    435439
    436 bool VideoOutput::IsPreferredRenderer(QSize video_size)
     440bool VideoOutput::IsPreferredRenderer(QSize video_size, PlaySettings *settings)
    437441{
    438442    if (!db_vdisp_profile || (video_size == windows[0].GetVideoDispDim()))
    439443        return true;
    440444
    441     VideoDisplayProfile vdisp;
     445    VideoDisplayProfile vdisp(settings);
    442446    vdisp.SetInput(video_size);
    443447    QString new_rend = vdisp.GetVideoRenderer();
    444448    if (new_rend.isEmpty())
  • libs/libmythtv/videooutwindow.h

     
    1616#include "videoouttypes.h"
    1717
    1818class NuppelVideoPlayer;
     19class PlaySettings;
    1920
    2021class VideoOutWindow
    2122{
    2223  public:
    23     VideoOutWindow();
     24    VideoOutWindow(PlaySettings *settings);
    2425
    2526    bool Init(const QSize &new_video_dim, float aspect,
    2627              const QRect &new_display_visible_rect,
     
    162163    bool     allowpreviewepg;
    163164    PIPState pip_state;
    164165
     166    PlaySettings *settings;
     167
    165168    // Constants
    166169    static const float kManualZoomMaxHorizontalZoom;
    167170    static const float kManualZoomMaxVerticalZoom;
  • libs/libmythtv/videoout_directfb.h

     
    1212{
    1313  public:
    1414    static void GetRenderOptions(render_opts &opts, QStringList &cpudeints);
    15     VideoOutputDirectfb();
     15    VideoOutputDirectfb(PlaySettings *settings);
    1616    ~VideoOutputDirectfb();
    1717
    1818    bool Init(int width, int height, float aspect, WId winid,
  • libs/libmythtv/playercontext.h

     
    2727class LiveTVChain;
    2828class MythDialog;
    2929class QPainter;
     30class PlaySettings;
    3031
    3132typedef enum
    3233{
     
    9091    void SetRecorder(RemoteEncoder *rec);
    9192    void SetTVChain(LiveTVChain *chain);
    9293    void SetRingBuffer(RingBuffer *buf);
    93     void SetPlayingInfo(const ProgramInfo *info);
     94    void SetPlayingInfo(const ProgramInfo *info, PlaySettings *settings=NULL);
    9495    void SetPlayGroup(const QString &group);
    9596    void SetPseudoLiveTV(const ProgramInfo *pi, PseudoState new_state);
    9697    void SetPIPLocation(int loc) { pipLocation = loc; }
     
    145146    LiveTVChain        *tvchain;
    146147    RingBuffer         *buffer;
    147148    ProgramInfo        *playingInfo; ///< Currently playing info
     149    PlaySettings       *settings; // corresponding to playingInfo
    148150    long long           playingLen;  ///< Initial CalculateLength()
    149151    bool                nohardwaredecoders; // < Disable use of VDPAU decoding
    150152    bool                decoding;    ///< Video decoder thread started
  • libs/libmythtv/vsync.h

     
    101101
    102102    // documented in vsync.cpp
    103103    static VideoSync *BestMethod(VideoOutput*,
     104                                 PlaySettings *settings,
    104105                                 uint frame_interval, uint refresh_interval,
    105106                                 bool interlaced);
    106107  protected:
  • libs/libmythtv/videoout_xv.h

     
    5151    friend class XvMCOSD;
    5252  public:
    5353    static void GetRenderOptions(render_opts &opts, QStringList &cpudeints);
    54     VideoOutputXv(MythCodecID av_codec_id);
     54    VideoOutputXv(PlaySettings *settings, MythCodecID av_codec_id);
    5555   ~VideoOutputXv();
    5656
    5757    bool Init(int width, int height, float aspect, WId winid,
     
    109109    static MythCodecID GetBestSupportedCodec(uint width, uint height,
    110110                                             uint osd_width, uint osd_height,
    111111                                             uint stream_type, int xvmc_chroma,
    112                                              bool test_surface, bool force_xv);
     112                                             bool test_surface, bool force_xv,
     113                                             PlaySettings *settings);
    113114
    114115    static int GrabSuitableXvPort(MythXDisplay* disp, Window root,
     116                                  PlaySettings *settings,
    115117                                  MythCodecID type,
    116118                                  uint width, uint height,
    117119                                  bool &xvsetdefaults,
  • libs/libmythtv/videoout_xv.cpp

     
    166166 * \see VideoOutput, VideoBuffers
    167167 *
    168168 */
    169 VideoOutputXv::VideoOutputXv(MythCodecID codec_id)
    170     : VideoOutput(),
     169VideoOutputXv::VideoOutputXv(PlaySettings *settings, MythCodecID codec_id)
     170    : VideoOutput(settings),
    171171      myth_codec_id(codec_id), video_output_subtype(XVUnknown),
    172172      global_lock(QMutex::Recursive),
    173173
     
    408408 * \return port number if it succeeds, else -1.
    409409 */
    410410int VideoOutputXv::GrabSuitableXvPort(MythXDisplay* disp, Window root,
     411                                      PlaySettings *settings,
    411412                                      MythCodecID mcodecid,
    412413                                      uint width, uint height,
    413414                                      bool &xvsetdefaults,
     
    492493    }
    493494
    494495    // figure out if we want chromakeying..
    495     VideoDisplayProfile vdp;
     496    VideoDisplayProfile vdp(settings);
    496497    vdp.SetInput(QSize(width, height));
    497498    bool check_for_colorkey = (vdp.GetOSDRenderer() == "chromakey");
    498499
     
    785786    disp->StartLog();
    786787    QString adaptor_name = QString::null;
    787788    const QSize video_dim = windows[0].GetVideoDim();
    788     xv_port = GrabSuitableXvPort(disp, disp->GetRoot(), mcodecid,
     789    xv_port = GrabSuitableXvPort(disp, disp->GetRoot(), settings, mcodecid,
    789790                                 video_dim.width(), video_dim.height(),
    790791                                 xv_set_defaults,
    791792                                 xvmc_chroma, &xvmc_surf_info, &adaptor_name);
     
    864865    disp->StartLog();
    865866    QString adaptor_name = QString::null;
    866867    const QSize video_dim = windows[0].GetVideoDim();
    867     xv_port = GrabSuitableXvPort(disp, disp->GetRoot(), kCodec_MPEG2,
     868    xv_port = GrabSuitableXvPort(disp, disp->GetRoot(), settings, kCodec_MPEG2,
    868869                                 video_dim.width(), video_dim.height(),
    869870                                 xv_set_defaults, 0, NULL, &adaptor_name);
    870871    if (xv_port == -1)
     
    10181019    uint width,       uint height,
    10191020    uint osd_width,   uint osd_height,
    10201021    uint stream_type, int xvmc_chroma,
    1021     bool test_surface, bool force_xv)
     1022    bool test_surface, bool force_xv,
     1023    PlaySettings *settings)
    10221024{
    10231025    (void)width, (void)height, (void)osd_width, (void)osd_height;
    10241026    (void)stream_type, (void)xvmc_chroma, (void)test_surface;
     
    10291031        return ret;
    10301032
    10311033#ifdef USING_XVMC
    1032     VideoDisplayProfile vdp;
     1034    VideoDisplayProfile vdp(settings);
    10331035    vdp.SetInput(QSize(width, height));
    10341036    QString dec = vdp.GetDecoder();
    10351037    if ((dec == "libmpeg2") || (dec == "ffmpeg"))
     
    10791081
    10801082        ok = false;
    10811083        bool dummy;
    1082         int port = GrabSuitableXvPort(disp, disp->GetRoot(), ret, width, height,
     1084        int port = GrabSuitableXvPort(disp, disp->GetRoot(), settings, ret, width, height,
    10831085                                      dummy, xvmc_chroma, &info);
    10841086        if (port >= 0)
    10851087        {
  • libs/libmythtv/udpnotify.cpp

     
    3131#include "udpnotify.h"
    3232#include "mythcontext.h"
    3333#include "mythverbose.h"
     34#include "playsettings.h"
    3435
    3536UDPNotifyOSDSet::UDPNotifyOSDSet(const QString &name, uint timeout)
    3637    : m_name(name), m_timeout(timeout)
     
    7374
    7475/////////////////////////////////////////////////////////////////////////
    7576
    76 UDPNotify::UDPNotify(uint udp_port) :
     77UDPNotify::UDPNotify(uint udp_port, PlaySettings *settings) :
    7778    m_socket(new QUdpSocket()), m_db_osd_udpnotify_timeout(5)
    7879{
    7980    connect(m_socket, SIGNAL(readyRead()),
     
    8182
    8283    m_socket->bind(udp_port);
    8384
    84     m_db_osd_udpnotify_timeout = gContext->GetNumSetting("OSDNotifyTimeout", 5);
     85    m_db_osd_udpnotify_timeout = settings->GetNumSetting("OSDNotifyTimeout", 5);
    8586}
    8687
    8788void UDPNotify::deleteLater(void)
  • libs/libmythtv/videooutbase.h

     
    2929class FilterChain;
    3030class FilterManager;
    3131class OpenGLContextGLX;
     32class PlaySettings;
    3233
    3334typedef QMap<NuppelVideoPlayer*,PIPLocation> PIPMap;
    3435
     
    4950        PIPState       pipState,
    5051        const QSize   &video_dim, float        video_aspect,
    5152        WId            win_id,    const QRect &display_rect,
    52         float video_prate,        WId          embed_id);
     53        float video_prate,        WId          embed_id,
     54        PlaySettings *settings);
    5355
    54     VideoOutput();
     56    VideoOutput(PlaySettings *settings);
    5557    virtual ~VideoOutput();
    5658
    5759    virtual bool Init(int width, int height, float aspect,
     
    5961                      int winh, WId embedid = 0);
    6062    virtual void InitOSD(OSD *osd);
    6163    virtual void SetVideoFrameRate(float);
    62     virtual bool IsPreferredRenderer(QSize video_size);
     64    virtual bool IsPreferredRenderer(QSize video_size, PlaySettings *settings);
    6365    virtual bool SetDeinterlacingEnabled(bool);
    6466    virtual bool SetupDeinterlace(bool i, const QString& ovrf="");
    6567    virtual void FallbackDeint(void);
     
    328330    // Display information
    329331    QSize monitor_sz;
    330332    QSize monitor_dim;
     333
     334    PlaySettings *settings;
    331335};
    332336
    333337#endif
  • libs/libmythtv/textsubtitleparser.cpp

     
    2121#include "RingBuffer.h"
    2222#include "textsubtitleparser.h"
    2323#include "xine_demux_sputext.h"
     24#include "playsettings.h"
    2425
    2526bool operator<(const text_subtitle_t& left,
    2627               const text_subtitle_t& right)
     
    112113    m_subtitles.clear();
    113114}
    114115
    115 bool TextSubtitleParser::LoadSubtitles(QString fileName, TextSubtitles &target)
     116bool TextSubtitleParser::LoadSubtitles(QString fileName, TextSubtitles &target,
     117                                       PlaySettings *settings)
    116118{
    117119    demux_sputext_t sub_data;
    118120    sub_data.rbuffer = new RingBuffer(fileName, 0, false);
     
    130132    target.SetFrameBasedTiming(!sub_data.uses_time);
    131133
    132134    QTextCodec *textCodec = NULL;
    133     QString codec = gContext->GetSetting("SubtitleCodec", "");
     135    QString codec = settings->GetSetting("SubtitleCodec", "");
    134136    if (!codec.isEmpty())
    135137        textCodec = QTextCodec::codecForName(codec.toLatin1());
    136138    if (!textCodec)
  • libs/libmythtv/osd.cpp

     
    3232#include "mythverbose.h"
    3333#include "util.h"
    3434#include "channelutil.h"
     35#include "playsettings.h"
    3536
    3637#include "x11colors.h"
    3738#include "mythdirs.h"
     
    4243static char  *cc708_default_font_names[16];
    4344static bool   cc708_defaults_initialized = false;
    4445static QMutex cc708_init_lock;
    45 static void initialize_osd_fonts(void);
     46static void initialize_osd_fonts(PlaySettings *settings);
    4647
    4748#define LOC QString("OSD: ")
    4849#define LOC_ERR QString("OSD, Error: ")
     
    7677    editarrowRect(),                    drawSurface(NULL),
    7778    changed(false),                     runningTreeMenu(NULL),
    7879    treeMenuContainer(""),
     80    settings(NULL),
    7981    // EIA-608 captions
    8082    fontname(""),                       ccfontname(""),
    8183    fontSizeType(""),
     
    155157    }
    156158}
    157159
    158 void OSD::Init(const QRect &osd_bounds, int   frameRate,
     160void OSD::Init(PlaySettings *_settings, const QRect &osd_bounds, int   frameRate,
    159161         const QRect &vis_bounds, float visibleAspect, float fontScaling)
    160162{
     163    settings = _settings;
    161164    removeHTML.setMinimal(true);
    162165
    163166    fscale = fontScaling;
     
    172175    drawSurface = new OSDSurface(osd_bounds.width(), osd_bounds.height());
    173176
    174177    if (!cc708_defaults_initialized)
    175         initialize_osd_fonts();
     178        initialize_osd_fonts(settings);
    176179
    177180    for (uint i = 0; i < 16; i++)
    178181        cc708fontnames[i] = cc708_default_font_names[i];
     
    238241        QString name = "cc_font";
    239242        int fontsize = m_themeinfo->BaseRes()->height() / 27;
    240243
    241         ccfont = LoadFont(gContext->GetSetting("OSDCCFont"), fontsize);
     244        ccfont = LoadFont(settings->GetSetting("OSDCCFont", ""), fontsize);
    242245
    243246        if (ccfont)
    244247            fontMap[name] = ccfont;
     
    274277
    275278    OSDTypeCC *ccpage =
    276279        new OSDTypeCC(name, ccfont, sub_xoff, sub_yoff,
    277                       sub_dispw, sub_disph, wmult, hmult);
     280                      sub_dispw, sub_disph, wmult, hmult, settings);
    278281    container->AddType(ccpage);
    279282    return true;
    280283}
     
    293296
    294297    // Create fonts...
    295298    TTFFont* ccfonts[48];
    296     uint z = gContext->GetNumSetting("OSDCC708TextZoom", 100) *
     299    uint z = settings->GetNumSetting("OSDCC708TextZoom", 100) *
    297300                    m_themeinfo->BaseRes()->height();
    298301    uint fontsizes[3] = { z / 3600, z / 2900, z / 2200 };
    299302    for (uint i = 0; i < 48; i++)
     
    356359    if (!font)
    357360    {
    358361        int fontsize = 440 / 26;
    359         font = LoadFont(gContext->GetSetting("OSDCCFont"), fontsize);
     362        font = LoadFont(settings->GetSetting("OSDCCFont", ""), fontsize);
    360363
    361364        if (font)
    362365            fontMap[fontname] = font;
     
    464467    TTFFont *font = GetFont(fontname);
    465468    if (!font)
    466469    {
    467         font = LoadFont(gContext->GetSetting("OSDCCFont"), SUBTITLE_FONT_SIZE);
     470        font = LoadFont(settings->GetSetting("OSDCCFont", ""), SUBTITLE_FONT_SIZE);
    468471
    469472        if (font)
    470473        {
     
    532535
    533536    if (!actfont)
    534537    {
    535         actfont = LoadFont(gContext->GetSetting("OSDFont"), 16);
     538        actfont = LoadFont(settings->GetSetting("OSDFont", ""), 16);
    536539
    537540        if (actfont)
    538541            fontMap["treemenulistfont"] = actfont;
     
    848851void OSD::parseFont(QDomElement &element)
    849852{
    850853    QString name;
    851     QString fontfile = gContext->GetSetting("OSDFont");
     854    QString fontfile = settings->GetSetting("OSDFont", "");
    852855    int size = -1;
    853856    int sizeSmall = -1;
    854857    int sizeBig = -1;   
     
    926929        return;
    927930    }
    928931
    929     QString fontSizeType = gContext->GetSetting("OSDThemeFontSizeType",
     932    QString fontSizeType = settings->GetSetting("OSDThemeFontSizeType",
    930933                                                "default");
    931934    if (fontSizeType == "small")
    932935    {
     
    31073110    return QRect(xoffset, yoffset, displaywidth, displayheight);
    31083111}
    31093112
    3110 #define OSD_STRDUP(X) strdup(gContext->GetSetting(X).toLocal8Bit().constData())
     3113#define OSD_STRDUP(X) strdup(settings->GetSetting(X, "").toLocal8Bit().constData())
    31113114
    3112 static void initialize_osd_fonts(void)
     3115static void initialize_osd_fonts(PlaySettings *settings)
    31133116{
    31143117    QMutexLocker locker(&cc708_init_lock);
    31153118    if (cc708_defaults_initialized)
    31163119        return;
    31173120    cc708_defaults_initialized = true;
    31183121
    3119     QString default_font_type = gContext->GetSetting(
     3122    QString default_font_type = settings->GetSetting(
    31203123        "OSDCC708DefaultFontType", "MonoSerif");
    31213124
    31223125    // 0
  • libs/libmythtv/videoout_quartz.h

     
    33
    44class DVDV;
    55struct QuartzData;
     6class PlaySettings;
    67
    78#include "videooutbase.h"
    89
     
    1011{
    1112  public:
    1213    static void GetRenderOptions(render_opts &opts, QStringList &cpudeints);
    13     VideoOutputQuartz(MythCodecID av_codec_id, void *codec_priv);
     14    VideoOutputQuartz(PlaySettings *settings, MythCodecID av_codec_id, void *codec_priv);
    1415   ~VideoOutputQuartz();
    1516
    1617    bool Init(int width, int height, float aspect, WId winid,
     
    5152    static MythCodecID GetBestSupportedCodec(
    5253        uint width, uint height,
    5354        uint osd_width, uint osd_height,
    54         uint stream_type, uint fourcc);
     55        uint stream_type, uint fourcc, PlaySettings *settings);
    5556    virtual bool NeedExtraAudioDecode(void) const
    5657        { return !codec_is_std(myth_codec_id); }
    5758
  • libs/libmythtv/videodisplayprofile.cpp

     
    88#include "mythverbose.h"
    99#include "videooutbase.h"
    1010#include "avformatdecoder.h"
     11#include "playsettings.h"
    1112
    1213bool ProfileItem::IsMatch(const QSize &size, float rate) const
    1314{
     
    211212pref_map_t  VideoDisplayProfile::dec_name;
    212213safe_list_t VideoDisplayProfile::safe_decoders;
    213214
    214 VideoDisplayProfile::VideoDisplayProfile()
     215VideoDisplayProfile::VideoDisplayProfile(PlaySettings *settings)
    215216    : lock(QMutex::Recursive), last_size(0,0), last_rate(0.0f),
    216217      last_video_renderer(QString::null)
    217218{
     
    219220    init_statics();
    220221
    221222    QString hostname    = gContext->GetHostName();
    222     QString cur_profile = GetDefaultProfileName(hostname);
     223    QString cur_profile = GetDefaultProfileName(hostname, settings);
    223224    uint    groupid     = GetProfileGroupID(cur_profile, hostname);
    224225
    225226    item_list_t items = LoadDB(groupid);
     
    771772    return list;
    772773}
    773774
    774 QString VideoDisplayProfile::GetDefaultProfileName(const QString &hostname)
     775QString VideoDisplayProfile::GetDefaultProfileName(const QString &hostname, PlaySettings *settings)
    775776{
    776     QString tmp =
     777    QString tmp = settings ? settings->GetSetting("DefaultVideoPlaybackProfile", "") :
    777778        gContext->GetSettingOnHost("DefaultVideoPlaybackProfile", hostname);
    778779
    779780    QStringList profiles = GetProfiles(hostname);
  • libs/libmythtv/udpnotify.h

     
    2020class QByteArray;
    2121class QUdpSocket;
    2222class QDomElement;
     23class PlaySettings;
    2324
    2425class UDPNotifyOSDSet
    2526{
     
    5455    Q_OBJECT
    5556
    5657  public:
    57     UDPNotify(uint udp_port);
     58    UDPNotify(uint udp_port, PlaySettings *settings);
    5859
    5960  signals:
    6061    void AddUDPNotifyEvent(const QString &name, const UDPNotifyOSDSet*);
  • libs/libmythtv/videoout_null.h

     
    99{
    1010  public:
    1111    static void GetRenderOptions(render_opts &opts, QStringList &cpudeints);
    12     VideoOutputNull();
     12    VideoOutputNull(PlaySettings *settings);
    1313   ~VideoOutputNull();
    1414
    1515    bool Init(int width, int height, float aspect, WId winid,
  • libs/libmyth/settings.cpp

     
    235235    return -1;
    236236}
    237237
     238QString SelectSetting::getValueLabel(const QString &value)
     239{
     240    selectionList::const_iterator iterValues = values.begin();
     241    selectionList::const_iterator iterLabels = labels.begin();
     242    for (; iterValues != values.end() && iterLabels != labels.end(); ++iterValues, ++iterLabels)
     243    {
     244        if (*iterValues == value)
     245            return *iterLabels;
     246    }
     247
     248    return "???";
     249}
     250
    238251bool SelectSetting::ReplaceLabel(const QString &new_label, const QString &value)
    239252{
    240253    int i = getValueIndex(value);
  • libs/libmyth/settings.h

     
    290290
    291291    virtual QString getSelectionLabel(void) const;
    292292    virtual int getValueIndex(QString value);
     293    virtual QString getValueLabel(const QString &value);
    293294
    294295protected:
    295296    virtual bool ReplaceLabel(
  • programs/mythfrontend/globalsettings.cpp

     
    3737#include "mythconfig.h"
    3838#include "mythdirs.h"
    3939#include "mythuihelper.h"
     40#include "playsettings.h"
    4041
     42// This macro is for type={CheckBox,ComboBox}
     43#define CREATE_SETTING(var, type, name, settings) \
     44    type##Setting *var; \
     45    if ((settings))                                       \
     46        var = new PlaySettings##type((name), (settings)); \
     47    else \
     48        var = new Host##type((name))
     49
     50#define CREATE_SPINBOX_SETTING(var, name, settings, arg1, arg2, arg3, arg4) \
     51    SpinBoxSetting *var; \
     52    if ((settings))                                                     \
     53        var = new PlaySettingsSpinBox((name), (settings), (arg1), (arg2), (arg3), (arg4)); \
     54    else \
     55        var = new HostSpinBox((name), (arg1), (arg2), (arg3), (arg4))
     56
     57static Configurable *wrap(Configurable *obj, PlaySettings *settings,
     58                          bool twoLineLabel=false)
     59{
     60    if (!settings)
     61        return obj;
     62    const QString &name = dynamic_cast<PlaySettingsStorage *>(obj)->getName();
     63    TriggeredConfigurationGroup *box = new TriggeredConfigurationGroup(false, false, true, true/*, false, false, true, true*/);
     64    box->SetVertical(false);
     65    PlaySettingsCheckBox *override = new PlaySettingsCheckBox(name, settings, true);
     66    // Get the label for the default value, which requires some lookup for a ComboBox.
     67    QString defaultLabel = settings->GetSetting(name, "", true);
     68    ComboBoxSetting *cb = dynamic_cast<ComboBoxSetting *>(obj);
     69    if (cb)
     70        defaultLabel = cb->getValueLabel(defaultLabel);
     71    // Pretty-print the 0/1 value for a checkbox.
     72    if (dynamic_cast<CheckBoxSetting *>(obj))
     73        defaultLabel = (defaultLabel == "0" || defaultLabel == "" ?
     74                        QObject::tr("disabled") : QObject::tr("enabled"));
     75    if (dynamic_cast<SpinBoxSetting *>(obj) && defaultLabel == "")
     76        defaultLabel = "0";
     77    override->setLabel(obj->getLabel() + //"\n " +
     78                       //QObject::tr("Change default") +
     79                       (twoLineLabel ? "\n" : "") +
     80                       " (" + defaultLabel + ")");
     81    obj->setLabel("");
     82    override->setHelpText(QObject::tr("Check the box to override default value")
     83                          + " (" + defaultLabel + "). " + obj->getHelpText());
     84    box->addChild(override);
     85    box->setTrigger(override);
     86    box->addTarget("1", obj);
     87    box->addTarget("0", new HorizontalConfigurationGroup(true));
     88    return box;
     89}
     90
    4191static HostComboBox *AudioOutputDevice()
    4292{
    4393    HostComboBox *gc = new HostComboBox("AudioOutputDevice", true);
     
    309359    return gc;
    310360}
    311361
    312 static HostCheckBox *DecodeExtraAudio()
     362static Configurable *DecodeExtraAudio(PlaySettings *settings)
    313363{
    314     HostCheckBox *gc = new HostCheckBox("DecodeExtraAudio");
     364    CREATE_SETTING(gc, CheckBox, "DecodeExtraAudio", settings);
    315365    gc->setLabel(QObject::tr("Extra audio buffering"));
    316366    gc->setValue(true);
    317367    gc->setHelpText(QObject::tr("Enable this setting if MythTV is playing "
     
    320370                    "effect on framegrabbers (MPEG-4/RTJPEG).  MythTV will "
    321371                    "keep extra audio data in its internal buffers to workaround "
    322372                    "this bug."));
    323     return gc;
     373    return wrap(gc, settings);
    324374}
    325375
    326 static HostComboBox *PIPLocationComboBox()
     376static Configurable *PIPLocationComboBox(PlaySettings *settings)
    327377{
    328     HostComboBox *gc = new HostComboBox("PIPLocation");
     378    CREATE_SETTING(gc, ComboBox, "PIPLocation", settings);
    329379    gc->setLabel(QObject::tr("PIP Video Location"));
    330380    for (uint loc = 0; loc < kPIP_END; ++loc)
    331381        gc->addSelection(toString((PIPLocation) loc), QString::number(loc));
    332382    gc->setHelpText(QObject::tr("Location of PIP Video window."));
    333     return gc;
     383    return wrap(gc, settings);
    334384}
    335385
    336386static GlobalLineEdit *AllRecGroupPassword()
     
    427477    return gc;
    428478}
    429479
    430 static HostCheckBox *SmartForward()
     480static Configurable *SmartForward(PlaySettings *settings)
    431481{
    432     HostCheckBox *gc = new HostCheckBox("SmartForward");
     482    CREATE_SETTING(gc, CheckBox, "SmartForward", settings);
    433483    gc->setLabel(QObject::tr("Smart Fast Forwarding"));
    434484    gc->setValue(false);
    435485    gc->setHelpText(QObject::tr("If enabled, then immediately after "
    436486                    "rewinding, only skip forward the same amount as "
    437487                    "skipping backwards."));
    438     return gc;
     488    return wrap(gc, settings);
    439489}
    440490
    441 static HostCheckBox *ExactSeeking()
     491static Configurable *ExactSeeking(PlaySettings *settings)
    442492{
    443     HostCheckBox *gc = new HostCheckBox("ExactSeeking");
     493    CREATE_SETTING(gc, CheckBox, "ExactSeeking", settings);
    444494    gc->setLabel(QObject::tr("Seek to exact frame"));
    445495    gc->setValue(false);
    446496    gc->setHelpText(QObject::tr("If enabled, seeking is frame exact, but "
    447497                    "slower."));
    448     return gc;
     498    return wrap(gc, settings);
    449499}
    450500
    451501static GlobalComboBox *CommercialSkipMethod()
     
    463513    return bc;
    464514}
    465515
    466 static HostComboBox *AutoCommercialSkip()
     516static Configurable *AutoCommercialSkip(PlaySettings *settings)
    467517{
    468     HostComboBox *gc = new HostComboBox("AutoCommercialSkip");
     518    CREATE_SETTING(gc, ComboBox, "AutoCommercialSkip", settings);
    469519    gc->setLabel(QObject::tr("Automatically Skip Commercials"));
    470520    gc->addSelection(QObject::tr("Off"), "0");
    471521    gc->addSelection(QObject::tr("Notify, but do not skip"), "2");
     
    474524                    "have been flagged during Automatic Commercial Flagging "
    475525                    "or by the mythcommflag program, or just notify that a "
    476526                    "commercial has been detected."));
    477     return gc;
     527    return wrap(gc, settings);
    478528}
    479529
    480530static GlobalCheckBox *AutoCommercialFlag()
     
    559609    return bc;
    560610}
    561611
    562 static HostSpinBox *CommRewindAmount()
     612static Configurable *CommRewindAmount(PlaySettings *settings)
    563613{
    564     HostSpinBox *gs = new HostSpinBox("CommRewindAmount", 0, 10, 1);
     614    CREATE_SPINBOX_SETTING(gs, "CommRewindAmount", settings, 0, 10, 1, false);
    565615    gs->setLabel(QObject::tr("Commercial Skip Auto-Rewind Amount"));
    566616    gs->setHelpText(QObject::tr("If set, MythTV will automatically rewind "
    567617                    "this many seconds after performing a commercial skip."));
    568618    gs->setValue(0);
    569     return gs;
     619    return wrap(gs, settings);
    570620}
    571621
    572 static HostSpinBox *CommNotifyAmount()
     622static Configurable *CommNotifyAmount(PlaySettings *settings)
    573623{
    574     HostSpinBox *gs = new HostSpinBox("CommNotifyAmount", 0, 10, 1);
     624    CREATE_SPINBOX_SETTING(gs, "CommNotifyAmount", settings, 0, 10, 1, false);
    575625    gs->setLabel(QObject::tr("Commercial Skip Notify Amount"));
    576626    gs->setHelpText(QObject::tr("If set, MythTV will act like a commercial "
    577627                    "begins this many seconds early.  This can be useful "
    578628                    "when commercial notification is used in place of "
    579629                    "automatic skipping."));
    580630    gs->setValue(0);
    581     return gs;
     631    return wrap(gs, settings);
    582632}
    583633
    584634static GlobalSpinBox *MaximumCommercialSkip()
     
    13681418    labels[j]->setValue(label_i);
    13691419}
    13701420
    1371 PlaybackProfileConfigs::PlaybackProfileConfigs(const QString &str) :
     1421PlaybackProfileConfigs::PlaybackProfileConfigs(const QString &str, PlaySettings *settings) :
    13721422    TriggeredConfigurationGroup(false, true,  true, true,
    13731423                                false, false, true, true), grouptrigger(NULL)
    13741424{
    13751425    setLabel(QObject::tr("Playback Profiles") + str);
     1426    if (settings)
     1427        setLabel(QObject::tr("Playback group settings for ") +
     1428                 settings->mGroupName + " - " +
     1429                 getLabel());
    13761430
    13771431    QString host = gContext->GetHostName();
    13781432    QStringList profiles = VideoDisplayProfile::GetProfiles(host);
     
    14001454        profiles = VideoDisplayProfile::GetProfiles(host);
    14011455    }
    14021456
    1403     QString profile = VideoDisplayProfile::GetDefaultProfileName(host);
     1457    QString profile = VideoDisplayProfile::GetDefaultProfileName(host, settings);
    14041458    if (!profiles.contains(profile))
    14051459    {
    14061460        profile = (profiles.contains("Normal")) ? "Normal" : profiles[0];
    14071461        VideoDisplayProfile::SetDefaultProfileName(profile, host);
    14081462    }
    14091463
    1410     grouptrigger = new HostComboBox("DefaultVideoPlaybackProfile");
     1464    CREATE_SETTING(gs, ComboBox, "DefaultVideoPlaybackProfile", settings);
     1465    grouptrigger = gs;
    14111466    grouptrigger->setLabel(QObject::tr("Current Video Playback Profile"));
    14121467    QStringList::const_iterator it;
    14131468    for (it = profiles.begin(); it != profiles.end(); ++it)
    14141469        grouptrigger->addSelection(ProgramInfo::i18n(*it), *it);
     1470    if (settings)
     1471    {
     1472        addChild(wrap(grouptrigger, settings));
     1473        return;
     1474    }
    14151475
    14161476    HorizontalConfigurationGroup *grp =
    14171477        new HorizontalConfigurationGroup(false, false, true, true);
     
    15441604    return gc;
    15451605}
    15461606
    1547 static HostSpinBox *FFRewReposTime()
     1607static Configurable *FFRewReposTime(PlaySettings *settings)
    15481608{
    1549     HostSpinBox *gs = new HostSpinBox("FFRewReposTime", 0, 200, 5);
     1609    CREATE_SPINBOX_SETTING(gs, "FFRewReposTime", settings, 0, 200, 5, false);
    15501610    gs->setLabel(QObject::tr("Fast forward/rewind reposition amount"));
    15511611    gs->setValue(100);
    15521612    gs->setHelpText(QObject::tr("When exiting sticky keys fast forward/rewind "
     
    15541614                    "resuming normal playback. This "
    15551615                    "compensates for the reaction time between seeing "
    15561616                    "where to resume playback and actually exiting seeking."));
    1557     return gs;
     1617    return wrap(gs, settings);
    15581618}
    15591619
    1560 static HostCheckBox *FFRewReverse()
     1620static Configurable *FFRewReverse(PlaySettings *settings)
    15611621{
    1562     HostCheckBox *gc = new HostCheckBox("FFRewReverse");
     1622    CREATE_SETTING(gc, CheckBox, "FFRewReverse", settings);
    15631623    gc->setLabel(QObject::tr("Reverse direction in fast forward/rewind"));
    15641624    gc->setValue(true);
    15651625    gc->setHelpText(QObject::tr("If enabled, pressing the sticky rewind key "
     
    15671627                    "vice versa.  If disabled, it will decrease the "
    15681628                    "current speed or switch to play mode if "
    15691629                    "the speed can't be decreased further."));
    1570     return gc;
     1630    return wrap(gc, settings);
    15711631}
    15721632
    1573 static HostSpinBox *OSDGeneralTimeout()
     1633static Configurable *OSDGeneralTimeout(PlaySettings *settings)
    15741634{
    1575     HostSpinBox *gs = new HostSpinBox("OSDGeneralTimeout", 1, 30, 1);
     1635    CREATE_SPINBOX_SETTING(gs, "OSDGeneralTimeout", settings, 1, 30, 1, false);
    15761636    gs->setLabel(QObject::tr("General OSD time-out (sec)"));
    15771637    gs->setValue(2);
    15781638    gs->setHelpText(QObject::tr("Length of time an on-screen display "
    15791639                    "window will be visible."));
    1580     return gs;
     1640    return wrap(gs, settings);
    15811641}
    15821642
    1583 static HostSpinBox *OSDProgramInfoTimeout()
     1643static Configurable *OSDProgramInfoTimeout(PlaySettings *settings)
    15841644{
    1585     HostSpinBox *gs = new HostSpinBox("OSDProgramInfoTimeout", 1, 30, 1);
     1645    CREATE_SPINBOX_SETTING(gs, "OSDProgramInfoTimeout", settings, 1, 30, 1, false);
    15861646    gs->setLabel(QObject::tr("Program Info OSD time-out"));
    15871647    gs->setValue(3);
    15881648    gs->setHelpText(QObject::tr("Length of time the on-screen display "
    15891649                    "will display program information."));
    1590     return gs;
     1650    return wrap(gs, settings);
    15911651}
    15921652
    1593 static HostSpinBox *OSDNotifyTimeout()
     1653static Configurable *OSDNotifyTimeout(PlaySettings *settings)
    15941654{
    1595     HostSpinBox *gs = new HostSpinBox("OSDNotifyTimeout", 1, 30, 1);
     1655    CREATE_SPINBOX_SETTING(gs, "OSDNotifyTimeout", settings, 1, 30, 1, false);
    15961656    gs->setLabel(QObject::tr("UDP Notify OSD time-out"));
    15971657    gs->setValue(5);
    15981658    gs->setHelpText(QObject::tr("How many seconds an on-screen display "
    15991659                    "will be active for UDP Notify events."));
    1600     return gs;
     1660    return wrap(gs, settings);
    16011661}
    16021662
    16031663static HostSpinBox *ThemeCacheSize()
     
    16411701    return gc;
    16421702}
    16431703
    1644 static HostComboBox *OSDFont()
     1704static Configurable *OSDFont(PlaySettings *settings)
    16451705{
    1646     HostComboBox *gc = new HostComboBox("OSDFont");
     1706    CREATE_SETTING(gc, ComboBox, "OSDFont", settings);
    16471707    gc->setLabel(QObject::tr("OSD font"));
    16481708    QDir ttf(GetFontsDir(), GetFontsNameFilter());
    16491709    gc->fillSelectionsFromDir(ttf, false);
     
    16511711    if (gc->findSelection(defaultOSDFont) > -1)
    16521712        gc->setValue(defaultOSDFont);
    16531713
    1654     return gc;
     1714    return wrap(gc, settings);
    16551715}
    16561716
    1657 static HostComboBox *OSDCCFont()
     1717static Configurable *OSDCCFont(PlaySettings *settings)
    16581718{
    1659     HostComboBox *gc = new HostComboBox("OSDCCFont");
     1719    CREATE_SETTING(gc, ComboBox, "OSDCCFont", settings);
    16601720    gc->setLabel(QObject::tr("CC font"));
    16611721    QDir ttf(GetFontsDir(), GetFontsNameFilter());
    16621722    gc->fillSelectionsFromDir(ttf, false);
    16631723    gc->setHelpText(QObject::tr("Closed Caption font"));
    16641724
    1665     return gc;
     1725    return wrap(gc, settings);
    16661726}
    16671727
    16681728static HostComboBox __attribute__ ((unused)) *DecodeVBIFormat()
     
    16831743    return gc;
    16841744}
    16851745
    1686 static HostSpinBox *OSDCC708TextZoomPercentage(void)
     1746static Configurable *OSDCC708TextZoomPercentage(PlaySettings *settings)
    16871747{
    1688     HostSpinBox *gs = new HostSpinBox("OSDCC708TextZoom", 50, 200, 5);
     1748    CREATE_SPINBOX_SETTING(gs, "OSDCC708TextZoom", settings, 50, 200, 5, false);
    16891749    gs->setLabel(QObject::tr("Text zoom percentage"));
    16901750    gs->setValue(100);
    16911751    gs->setHelpText(QObject::tr("Use this to enlarge or shrink captions."));
    16921752
    1693     return gs;
     1753    return wrap(gs, settings);
    16941754}
    16951755
    1696 static HostComboBox *OSDCC708DefaultFontType(void)
     1756static Configurable *OSDCC708DefaultFontType(PlaySettings *settings)
    16971757{
    1698     HostComboBox *hc = new HostComboBox("OSDCC708DefaultFontType");
     1758    CREATE_SETTING(hc, ComboBox, "OSDCC708DefaultFontType", settings);
    16991759    hc->setLabel(QObject::tr("Default Caption Font Type"));
    17001760    hc->setHelpText(
    17011761        QObject::tr("This allows you to set which font type to use "
     
    17181778    };
    17191779    for (uint i = 0; i < 7; ++i)
    17201780        hc->addSelection(typeNames[i], types[i]);
    1721     return hc;
     1781    return wrap(hc, settings);
    17221782}
    17231783
    1724 static VerticalConfigurationGroup *OSDCC708Settings(void)
     1784static VerticalConfigurationGroup *OSDCC708Settings(PlaySettings *settings)
    17251785{
    17261786    VerticalConfigurationGroup *grp =
    17271787        new VerticalConfigurationGroup(false, true, true, true);
    17281788    grp->setLabel(QObject::tr("ATSC Caption Settings"));
     1789    if (settings)
     1790        grp->setLabel(QObject::tr("Playback group settings for ") +
     1791                      settings->mGroupName + " - " +
     1792                      grp->getLabel());
    17291793
    17301794// default text zoom 1.0
    1731     grp->addChild(OSDCC708TextZoomPercentage());
     1795    grp->addChild(OSDCC708TextZoomPercentage(settings));
    17321796
    17331797// force X lines of captions
    17341798// force caption character color
     
    17371801// force background opacity
    17381802
    17391803// set default font type
    1740     grp->addChild(OSDCC708DefaultFontType());
     1804    grp->addChild(OSDCC708DefaultFontType(settings));
    17411805
    17421806    return grp;
    17431807}
    17441808
    1745 static HostComboBox *OSDCC708Font(
     1809static Configurable *OSDCC708Font(
    17461810    const QString &subtype, const QString &subtypeName,
    1747     const QString &subtypeNameForHelp)
     1811    const QString &subtypeNameForHelp, PlaySettings *settings)
    17481812{
    1749     HostComboBox *gc = new HostComboBox(
    1750         QString("OSDCC708%1Font").arg(subtype));
     1813    CREATE_SETTING(gc, ComboBox, QString("OSDCC708%1Font").arg(subtype), settings);
    17511814
    17521815    gc->setLabel(subtypeName);
    17531816    QDir ttf(GetFontsDir(), GetFontsNameFilter());
     
    17551818    gc->setHelpText(
    17561819        QObject::tr("ATSC %1 closed caption font.").arg(subtypeNameForHelp));
    17571820
    1758     return gc;
     1821    return wrap(gc, settings, (subtypeName.length() > 10));
    17591822}
    17601823
    1761 static HorizontalConfigurationGroup *OSDCC708Fonts(void)
     1824static HorizontalConfigurationGroup *OSDCC708Fonts(PlaySettings *settings)
    17621825{
    17631826    HorizontalConfigurationGroup *grpmain =
    17641827        new HorizontalConfigurationGroup(false, true, true, true);
    17651828    grpmain->setLabel(QObject::tr("ATSC Caption Fonts"));
     1829    if (settings)
     1830        grpmain->setLabel(QObject::tr("Playback group settings for ") +
     1831                          settings->mGroupName + " - " +
     1832                          grpmain->getLabel());
    17661833    VerticalConfigurationGroup *col[] =
    17671834    {
    17681835        new VerticalConfigurationGroup(false, false, true, true),
     
    17981865    for (uint j = 0; j < 7; ++j)
    17991866    {
    18001867        col[i]->addChild(OSDCC708Font(subtypes[i].arg(types[j]),
    1801                                       typeNames[j], typeNames[j]));
     1868                                      typeNames[j], typeNames[j],
     1869                                      settings));
    18021870    }
    18031871    grpmain->addChild(col[i]);
    18041872
     
    18061874    for (uint j = 0; j < 7; ++j)
    18071875    {
    18081876        col[i]->addChild(OSDCC708Font(
    1809                              subtypes[i].arg(types[j]), "",
    1810                              QObject::tr("Italic") + ' ' + typeNames[j]));
     1877                                      subtypes[i].arg(types[j]), (settings ? typeNames[j] : ""),
     1878                             QObject::tr("Italic") + ' ' + typeNames[j],
     1879                                      settings));
    18111880    }
    18121881
    18131882    grpmain->addChild(col[i]);
     
    18151884    return grpmain;
    18161885}
    18171886
    1818 static HostComboBox *SubtitleCodec()
     1887static Configurable *SubtitleCodec(PlaySettings *settings)
    18191888{
    1820     HostComboBox *gc = new HostComboBox("SubtitleCodec");
     1889    CREATE_SETTING(gc, ComboBox, "SubtitleCodec", settings);
    18211890
    18221891    gc->setLabel(QObject::tr("Subtitle Codec"));
    18231892    QList<QByteArray> list = QTextCodec::availableCodecs();
     
    18271896        gc->addSelection(val, val, val.toLower() == "utf-8");
    18281897    }
    18291898
    1830     return gc;
     1899    return wrap(gc, settings);
    18311900}
    18321901
    1833 static HorizontalConfigurationGroup *ExternalSubtitleSettings()
     1902static HorizontalConfigurationGroup *ExternalSubtitleSettings(PlaySettings *settings)
    18341903{
    18351904    HorizontalConfigurationGroup *grpmain =
    18361905        new HorizontalConfigurationGroup(false, true, true, true);
    18371906
    18381907    grpmain->setLabel(QObject::tr("External Subtitle Settings"));
    18391908
    1840     grpmain->addChild(SubtitleCodec());
     1909    grpmain->addChild(SubtitleCodec(settings));
    18411910
    18421911    return grpmain;
    18431912}
    18441913
    1845 static HostComboBox *OSDThemeFontSizeType()
     1914static Configurable *OSDThemeFontSizeType(PlaySettings *settings)
    18461915{
    1847     HostComboBox *gc = new HostComboBox("OSDThemeFontSizeType");
     1916    CREATE_SETTING(gc, ComboBox, "OSDThemeFontSizeType", settings);
    18481917    gc->setLabel(QObject::tr("Font size"));
    18491918    gc->addSelection(QObject::tr("default"), "default");
    18501919    gc->addSelection(QObject::tr("small"), "small");
    18511920    gc->addSelection(QObject::tr("big"), "big");
    18521921    gc->setHelpText(QObject::tr("default: TV, small: monitor, big:"));
    1853     return gc;
     1922    return wrap(gc, settings);
    18541923}
    18551924
    18561925static HostComboBox *ChannelOrdering()
     
    18621931    return gc;
    18631932}
    18641933
    1865 static HostSpinBox *VertScanPercentage()
     1934static Configurable *VertScanPercentage(PlaySettings *settings)
    18661935{
    1867     HostSpinBox *gs = new HostSpinBox("VertScanPercentage", -100, 100, 1);
     1936    CREATE_SPINBOX_SETTING(gs, "VertScanPercentage", settings, -100, 100, 1, false);
    18681937    gs->setLabel(QObject::tr("Vertical scaling"));
    18691938    gs->setValue(0);
    18701939    gs->setHelpText(QObject::tr(
    18711940                        "Adjust this if the image does not fill your "
    18721941                        "screen vertically. Range -100% to 100%"));
    1873     return gs;
     1942    return wrap(gs, settings);
    18741943}
    18751944
    1876 static HostSpinBox *HorizScanPercentage()
     1945static Configurable *HorizScanPercentage(PlaySettings *settings)
    18771946{
    1878     HostSpinBox *gs = new HostSpinBox("HorizScanPercentage", -100, 100, 1);
     1947    CREATE_SPINBOX_SETTING(gs, "HorizScanPercentage", settings, -100, 100, 1, false);
    18791948    gs->setLabel(QObject::tr("Horizontal scaling"));
    18801949    gs->setValue(0);
    18811950    gs->setHelpText(QObject::tr(
    18821951                        "Adjust this if the image does not fill your "
    18831952                        "screen horizontally. Range -100% to 100%"));
    1884     return gs;
     1953    return wrap(gs, settings);
    18851954};
    18861955
    1887 static HostSpinBox *XScanDisplacement()
     1956static Configurable *XScanDisplacement(PlaySettings *settings)
    18881957{
    1889     HostSpinBox *gs = new HostSpinBox("XScanDisplacement", -50, 50, 1);
     1958    CREATE_SPINBOX_SETTING(gs, "XScanDisplacement", settings, -50, 50, 1, false);
    18901959    gs->setLabel(QObject::tr("Scan displacement (X)"));
    18911960    gs->setValue(0);
    18921961    gs->setHelpText(QObject::tr("Adjust this to move the image horizontally."));
    1893     return gs;
     1962    return wrap(gs, settings);
    18941963}
    18951964
    1896 static HostSpinBox *YScanDisplacement()
     1965static Configurable *YScanDisplacement(PlaySettings *settings)
    18971966{
    1898     HostSpinBox *gs = new HostSpinBox("YScanDisplacement", -50, 50, 1);
     1967    CREATE_SPINBOX_SETTING(gs, "YScanDisplacement", settings, -50, 50, 1, false);
    18991968    gs->setLabel(QObject::tr("Scan displacement (Y)"));
    19001969    gs->setValue(0);
    19011970    gs->setHelpText(QObject::tr("Adjust this to move the image vertically."));
    1902     return gs;
     1971    return wrap(gs, settings);
    19031972};
    19041973
    19051974static HostCheckBox *AlwaysStreamFiles()
     
    19151984    return gc;
    19161985}
    19171986
    1918 static HostCheckBox *UseVideoTimebase()
     1987static Configurable *UseVideoTimebase(PlaySettings *settings)
    19191988{
    1920     HostCheckBox *gc = new HostCheckBox("UseVideoTimebase");
     1989    CREATE_SETTING(gc, CheckBox, "UseVideoTimebase", settings);
    19211990    gc->setLabel(QObject::tr("Use video as timebase"));
    19221991    gc->setValue(false);
    19231992    gc->setHelpText(QObject::tr("Use the video as the timebase and warp "
    19241993                    "the audio to keep it in sync. (Experimental)"));
    1925     return gc;
     1994    return wrap(gc, settings);
    19261995}
    19271996
    1928 static HostCheckBox *CCBackground()
     1997static Configurable *CCBackground(PlaySettings *settings)
    19291998{
    1930     HostCheckBox *gc = new HostCheckBox("CCBackground");
     1999    CREATE_SETTING(gc, CheckBox, "CCBackground", settings);
    19312000    gc->setLabel(QObject::tr("Black background for closed captioning"));
    19322001    gc->setValue(false);
    19332002    gc->setHelpText(QObject::tr(
    19342003                        "If enabled, captions will be displayed "
    19352004                        "as white text over a black background "
    19362005                        "for better contrast."));
    1937     return gc;
     2006    return wrap(gc, settings);
    19382007}
    19392008
    1940 static HostCheckBox *DefaultCCMode()
     2009static Configurable *DefaultCCMode(PlaySettings *settings)
    19412010{
    1942     HostCheckBox *gc = new HostCheckBox("DefaultCCMode");
     2011    CREATE_SETTING(gc, CheckBox, "DefaultCCMode", settings);
    19432012    gc->setLabel(QObject::tr("Always display closed captioning or subtitles"));
    19442013    gc->setValue(false);
    19452014    gc->setHelpText(QObject::tr(
     
    19472016                        "when playing back recordings or watching "
    19482017                        "live TV.  Closed Captioning can be turned on or off "
    19492018                        "by pressing \"T\" during playback."));
    1950     return gc;
     2019    return wrap(gc, settings);
    19512020}
    19522021
    1953 static HostCheckBox *PreferCC708()
     2022static Configurable *PreferCC708(PlaySettings *settings)
    19542023{
    1955     HostCheckBox *gc = new HostCheckBox("Prefer708Captions");
     2024    CREATE_SETTING(gc, CheckBox, "Prefer708Captions", settings);
    19562025    gc->setLabel(QObject::tr("Prefer EIA-708 over EIA-608 captions"));
    19572026    gc->setValue(true);
    19582027    gc->setHelpText(
     
    19602029            "When enabled the new EIA-708 captions will be preferred over "
    19612030            "the old EIA-608 captions in ATSC streams."));
    19622031
    1963     return gc;
     2032    return wrap(gc, settings);
    19642033}
    19652034
    1966 static HostCheckBox *EnableMHEG()
     2035static Configurable *EnableMHEG(PlaySettings *settings)
    19672036{
    1968     HostCheckBox *gc = new HostCheckBox("EnableMHEG");
     2037    CREATE_SETTING(gc, CheckBox, "EnableMHEG", settings);
    19692038    gc->setLabel(QObject::tr("Enable Interactive TV"));
    19702039    gc->setValue(false);
    19712040    gc->setHelpText(QObject::tr(
    19722041                        "If enabled, interactive TV applications (MHEG) will "
    19732042                        "be activated.  This is used for teletext and logos for "
    19742043                        "radio and channels that are currently off-air."));
    1975     return gc;
     2044    return wrap(gc, settings);
    19762045}
    19772046
    1978 static HostCheckBox *PersistentBrowseMode()
     2047static Configurable *PersistentBrowseMode(PlaySettings *settings)
    19792048{
    1980     HostCheckBox *gc = new HostCheckBox("PersistentBrowseMode");
     2049    CREATE_SETTING(gc, CheckBox, "PersistentBrowseMode", settings);
    19812050    gc->setLabel(QObject::tr("Always use Browse mode in LiveTV"));
    19822051    gc->setValue(true);
    19832052    gc->setHelpText(
    19842053        QObject::tr(
    19852054            "If enabled, Browse mode will automatically be activated "
    19862055            "whenever you use Channel UP/DOWN while watching Live TV."));
    1987     return gc;
     2056    return wrap(gc, settings);
    19882057}
    19892058
    1990 static HostCheckBox *BrowseAllTuners()
     2059static Configurable *BrowseAllTuners(PlaySettings *settings)
    19912060{
    1992     HostCheckBox *gc = new HostCheckBox("BrowseAllTuners");
     2061    CREATE_SETTING(gc, CheckBox, "BrowseAllTuners", settings);
    19932062    gc->setLabel(QObject::tr("Browse all channels"));
    19942063    gc->setValue(false);
    19952064    gc->setHelpText(
     
    19972066            "If enabled, browse mode will shows channels on all "
    19982067            "available recording devices, instead of showing "
    19992068            "channels on just the current recorder."));
    2000     return gc;
     2069    return wrap(gc, settings);
    20012070}
    20022071
    2003 static HostCheckBox *ClearSavedPosition()
     2072static Configurable *ClearSavedPosition(PlaySettings *settings)
    20042073{
    2005     HostCheckBox *gc = new HostCheckBox("ClearSavedPosition");
     2074    CREATE_SETTING(gc, CheckBox, "ClearSavedPosition", settings);
    20062075    gc->setLabel(QObject::tr("Clear bookmark on playback"));
    20072076    gc->setValue(true);
    20082077    gc->setHelpText(QObject::tr("Automatically clear the bookmark on a "
    20092078                    "recording when the recording is played back.  If "
    20102079                    "disabled, you can mark the beginning with rewind "
    20112080                    "then save position."));
    2012     return gc;
     2081    return wrap(gc, settings);
    20132082}
    20142083
    2015 static HostCheckBox *AltClearSavedPosition()
     2084static Configurable *AltClearSavedPosition(PlaySettings *settings)
    20162085{
    2017     HostCheckBox *gc = new HostCheckBox("AltClearSavedPosition");
     2086    CREATE_SETTING(gc, CheckBox, "AltClearSavedPosition", settings);
    20182087    gc->setLabel(QObject::tr("Alternate clear and save bookmark"));
    20192088    gc->setValue(true);
    20202089    gc->setHelpText(QObject::tr("During playback the Select key "
     
    20222091                    "Saved\" and \"Bookmark Cleared\". If disabled, the "
    20232092                    "Select key will save the current position for each "
    20242093                    "keypress."));
    2025     return gc;
     2094    return wrap(gc, settings);
    20262095}
    20272096
    20282097#if defined(USING_XV) || defined(USING_OPENGL_VIDEO) || defined(USING_VDPAU)
    2029 static HostCheckBox *UsePicControls()
     2098static Configurable *UsePicControls(PlaySettings *settings)
    20302099{
    2031     HostCheckBox *gc = new HostCheckBox("UseOutputPictureControls");
     2100    CREATE_SETTING(gc, CheckBox, "UseOutputPictureControls", settings);
    20322101    gc->setLabel(QObject::tr("Enable picture controls"));
    20332102    gc->setValue(false);
    20342103    gc->setHelpText(
    20352104        QObject::tr(
    20362105            "If enabled, MythTV attempts to initialize picture controls "
    20372106            "(brightness, contrast, etc.) that are applied during playback."));
    2038     return gc;
     2107    return wrap(gc, settings);
    20392108}
    20402109#endif
    20412110
    2042 static HostLineEdit *UDPNotifyPort()
     2111static Configurable *UDPNotifyPort(PlaySettings *settings)
    20432112{
    2044     HostLineEdit *ge = new HostLineEdit("UDPNotifyPort");
     2113    CREATE_SETTING(ge, LineEdit, "UDPNotifyPort", settings);
    20452114    ge->setLabel(QObject::tr("UDP Notify Port"));
    20462115    ge->setValue("6948");
    20472116    ge->setHelpText(QObject::tr("During playback, MythTV will listen for "
    20482117                    "connections from the \"mythtvosd\" or \"mythudprelay\" "
    20492118                    "programs on this port.  See the README in "
    20502119                    "contrib/mythnotify/ for additional information."));
    2051     return ge;
     2120    return wrap(ge, settings);
    20522121}
    20532122
    2054 static HostComboBox *PlaybackExitPrompt()
     2123static Configurable *PlaybackExitPrompt(PlaySettings *settings)
    20552124{
    2056     HostComboBox *gc = new HostComboBox("PlaybackExitPrompt");
     2125    CREATE_SETTING(gc, ComboBox, "PlaybackExitPrompt", settings);
    20572126    gc->setLabel(QObject::tr("Action on playback exit"));
    20582127    gc->addSelection(QObject::tr("Just exit"), "0");
    20592128    gc->addSelection(QObject::tr("Save position and exit"), "2");
     
    20642133                    "when you exit playback mode.  The options available will "
    20652134                    "allow you to save your position, delete the "
    20662135                    "recording, or continue watching."));
    2067     return gc;
     2136    return wrap(gc, settings);
    20682137}
    20692138
    2070 static HostCheckBox *EndOfRecordingExitPrompt()
     2139static Configurable *EndOfRecordingExitPrompt(PlaySettings *settings)
    20712140{
    2072     HostCheckBox *gc = new HostCheckBox("EndOfRecordingExitPrompt");
     2141    CREATE_SETTING(gc, CheckBox, "EndOfRecordingExitPrompt", settings);
    20732142    gc->setLabel(QObject::tr("Prompt at end of recording"));
    20742143    gc->setValue(false);
    20752144    gc->setHelpText(QObject::tr("If set, a menu will be displayed allowing "
    20762145                    "you to delete the recording when it has finished "
    20772146                    "playing."));
    2078     return gc;
     2147    return wrap(gc, settings);
    20792148}
    20802149
    2081 static HostCheckBox *JumpToProgramOSD()
     2150static Configurable *JumpToProgramOSD(PlaySettings *settings)
    20822151{
    2083     HostCheckBox *gc = new HostCheckBox("JumpToProgramOSD");
     2152    CREATE_SETTING(gc, CheckBox, "JumpToProgramOSD", settings);
    20842153    gc->setLabel(QObject::tr("Jump to Program OSD"));
    20852154    gc->setValue(true);
    20862155    gc->setHelpText(QObject::tr(
     
    20892158                        "'Watch Recording' screen when 'Jump to Program' "
    20902159                        "is activated. If set, the recordings are shown "
    20912160                        "in the OSD"));
    2092     return gc;
     2161    return wrap(gc, settings);
    20932162}
    20942163
    2095 static HostCheckBox *ContinueEmbeddedTVPlay()
     2164static Configurable *ContinueEmbeddedTVPlay(PlaySettings *settings)
    20962165{
    2097     HostCheckBox *gc = new HostCheckBox("ContinueEmbeddedTVPlay");
     2166    CREATE_SETTING(gc, CheckBox, "ContinueEmbeddedTVPlay", settings);
    20982167    gc->setLabel(QObject::tr("Continue Playback When Embedded"));
    20992168    gc->setValue(false);
    21002169    gc->setHelpText(QObject::tr(
     
    21022171                    "is embedded in the upcoming program list or recorded "
    21032172                    "list. The default is to pause the recorded show when "
    21042173                    "embedded."));
    2105     return gc;
     2174    return wrap(gc, settings);
    21062175}
    21072176
    2108 static HostCheckBox *AutomaticSetWatched()
     2177static Configurable *AutomaticSetWatched(PlaySettings *settings)
    21092178{
    2110     HostCheckBox *gc = new HostCheckBox("AutomaticSetWatched");
     2179    CREATE_SETTING(gc, CheckBox, "AutomaticSetWatched", settings);
    21112180    gc->setLabel(QObject::tr("Automatically mark a recording as watched"));
    21122181    gc->setValue(false);
    21132182    gc->setHelpText(QObject::tr("If set, when you exit near the end of a "
     
    21152184                    "detection is not foolproof, so do not enable this "
    21162185                    "setting if you don't want an unwatched recording marked "
    21172186                    "as watched."));
    2118     return gc;
     2187    return wrap(gc, settings);
    21192188}
    21202189
    21212190static HostSpinBox *LiveTVIdleTimeout()
     
    23802449    return gc;
    23812450}
    23822451
    2383 static HostComboBox *LetterboxingColour()
     2452static Configurable *LetterboxingColour(PlaySettings *settings)
    23842453{
    2385     HostComboBox *gc = new HostComboBox("LetterboxColour");
     2454    CREATE_SETTING(gc, ComboBox, "LetterboxColour", settings);
    23862455    gc->setLabel(QObject::tr("Letterboxing Color"));
    23872456    for (int m = kLetterBoxColour_Black; m < kLetterBoxColour_END; ++m)
    23882457        gc->addSelection(toString((LetterBoxColour)m), QString::number(m));
     
    23922461            "letterboxing, but those with plasma screens may prefer gray "
    23932462            "to minimize burn-in.") + " " +
    23942463        QObject::tr("Currently only works with XVideo video renderer."));
    2395     return gc;
     2464    return wrap(gc, settings);
    23962465}
    23972466
    2398 static HostComboBox *AspectOverride()
     2467static Configurable *AspectOverride(PlaySettings *settings)
    23992468{
    2400     HostComboBox *gc = new HostComboBox("AspectOverride");
     2469    CREATE_SETTING(gc, ComboBox, "AspectOverride", settings);
    24012470    gc->setLabel(QObject::tr("Video Aspect Override"));
    24022471    for (int m = kAspect_Off; m < kAspect_END; ++m)
    24032472        gc->addSelection(toString((AspectOverrideMode)m), QString::number(m));
     
    24052474                        "When enabled, these will override the aspect "
    24062475                        "ratio specified by any broadcaster for all "
    24072476                        "video streams."));
    2408     return gc;
     2477    return wrap(gc, settings);
    24092478}
    24102479
    2411 static HostComboBox *AdjustFill()
     2480static Configurable *AdjustFill(PlaySettings *settings)
    24122481{
    2413     HostComboBox *gc = new HostComboBox("AdjustFill");
     2482    CREATE_SETTING(gc, ComboBox, "AdjustFill", settings);
    24142483    gc->setLabel(QObject::tr("Zoom"));
    24152484    gc->addSelection(toString(kAdjustFill_AutoDetect_DefaultOff),
    24162485                     QString::number(kAdjustFill_AutoDetect_DefaultOff));
     
    24212490    gc->setHelpText(QObject::tr(
    24222491                        "When enabled, these will apply a predefined "
    24232492                        "zoom to all video playback in MythTV."));
    2424     return gc;
     2493    return wrap(gc, settings);
    24252494}
    24262495
    24272496// Theme settings
     
    36033672    return gs;
    36043673}
    36053674
    3606 static HostCheckBox *RealtimePriority()
     3675static Configurable *RealtimePriority(PlaySettings *settings)
    36073676{
    3608     HostCheckBox *gc = new HostCheckBox("RealtimePriority");
     3677    CREATE_SETTING(gc, CheckBox, "RealtimePriority", settings);
    36093678    gc->setLabel(QObject::tr("Enable realtime priority threads"));
    36103679    gc->setHelpText(QObject::tr("When running mythfrontend with root "
    36113680                    "privileges, some threads can be given enhanced priority. "
    36123681                    "Disable this if mythfrontend freezes during video "
    36133682                    "playback."));
    36143683    gc->setValue(true);
    3615     return gc;
     3684    return wrap(gc, settings);
    36163685}
    36173686
    36183687static HostCheckBox *EnableMediaMon()
     
    37683837};
    37693838
    37703839#ifdef USING_OPENGL_VSYNC
    3771 static HostCheckBox *UseOpenGLVSync()
     3840static Configurable *UseOpenGLVSync(PlaySettings *settings)
    37723841{
    3773     HostCheckBox *gc = new HostCheckBox("UseOpenGLVSync");
     3842    CREATE_SETTING(gc, CheckBox, "UseOpenGLVSync", settings);
    37743843    gc->setLabel(QObject::tr("Enable OpenGL vertical sync for timing"));
    37753844    gc->setValue(false);
    37763845    gc->setHelpText(QObject::tr(
    37773846                        "If it is supported by your hardware/drivers, "
    37783847                        "MythTV will use OpenGL vertical syncing for "
    37793848                        "video timing, reducing frame jitter."));
    3780     return gc;
     3849    return wrap(gc, settings);
    37813850}
    37823851#endif
    37833852
     
    42594328    addChild(remotecontrol);
    42604329}
    42614330
    4262 PlaybackSettings::PlaybackSettings()
     4331PlaybackSettings::PlaybackSettings(PlaySettings *settings,
     4332                                   ConfigurationWizard *base)
    42634333{
    42644334    uint i = 0, total = 8;
    42654335#if CONFIG_DARWIN
    42664336    total += 2;
    42674337#endif // USING_DARWIN
     4338    if (settings)
     4339        total -= 3;
    42684340
    42694341
    42704342    VerticalConfigurationGroup* general1 =
    42714343        new VerticalConfigurationGroup(false);
    42724344    general1->setLabel(QObject::tr("General Playback") +
    42734345                      QString(" (%1/%2)").arg(++i).arg(total));
     4346    if (settings)
     4347        general1->setLabel(QObject::tr("Playback group settings for ") +
     4348                           settings->mGroupName + " - " +
     4349                           general1->getLabel());
    42744350
    42754351    HorizontalConfigurationGroup *columns =
    42764352        new HorizontalConfigurationGroup(false, false, true, true);
    42774353
    42784354    VerticalConfigurationGroup *column1 =
    42794355        new VerticalConfigurationGroup(false, false, true, true);
    4280     column1->addChild(RealtimePriority());
    4281     column1->addChild(DecodeExtraAudio());
    4282     column1->addChild(UseVideoTimebase());
    4283     column1->addChild(JumpToProgramOSD());
     4356    if (!settings)
     4357        column1->addChild(RealtimePriority(settings));
     4358    column1->addChild(DecodeExtraAudio(settings));
     4359    column1->addChild(UseVideoTimebase(settings));
     4360    column1->addChild(JumpToProgramOSD(settings));
    42844361    columns->addChild(column1);
    42854362
    42864363    VerticalConfigurationGroup *column2 =
    42874364        new VerticalConfigurationGroup(false, false, true, true);
    4288     column2->addChild(ClearSavedPosition());
    4289     column2->addChild(AltClearSavedPosition());
    4290     column2->addChild(AutomaticSetWatched());
    4291     column2->addChild(ContinueEmbeddedTVPlay());
     4365    column2->addChild(ClearSavedPosition(settings));
     4366    column2->addChild(AltClearSavedPosition(settings));
     4367    column2->addChild(AutomaticSetWatched(settings));
     4368    column2->addChild(ContinueEmbeddedTVPlay(settings));
    42924369    columns->addChild(column2);
    42934370
    42944371    general1->addChild(columns);
    4295     general1->addChild(LiveTVIdleTimeout());
    4296     general1->addChild(AlwaysStreamFiles());
     4372    if (!settings)
     4373        general1->addChild(LiveTVIdleTimeout());
     4374    if (!settings)
     4375        general1->addChild(AlwaysStreamFiles());
    42974376#ifdef USING_OPENGL_VSYNC
    4298     general1->addChild(UseOpenGLVSync());
     4377    general1->addChild(UseOpenGLVSync(settings));
    42994378#endif // USING_OPENGL_VSYNC
    43004379#if defined(USING_XV) || defined(USING_OPENGL_VIDEO) || defined(USING_VDPAU)
    4301     general1->addChild(UsePicControls());
     4380    general1->addChild(UsePicControls(settings));
    43024381#endif // USING_XV
    4303     addChild(general1);
     4382    if (base)
     4383        base->addChild(general1);
     4384    else
     4385        addChild(general1);
    43044386
    43054387    VerticalConfigurationGroup* general2 =
    43064388        new VerticalConfigurationGroup(false);
    43074389    general2->setLabel(QObject::tr("General Playback") +
    43084390                      QString(" (%1/%2)").arg(++i).arg(total));
     4391    if (settings)
     4392        general2->setLabel(QObject::tr("Playback group settings for ") +
     4393                           settings->mGroupName + " - " +
     4394                           general2->getLabel());
    43094395
    43104396    HorizontalConfigurationGroup* oscan =
    43114397        new HorizontalConfigurationGroup(false, false, true, true);
     
    43134399        new VerticalConfigurationGroup(false, false, true, true);
    43144400    VerticalConfigurationGroup *ocol2 =
    43154401        new VerticalConfigurationGroup(false, false, true, true);
    4316     ocol1->addChild(VertScanPercentage());
    4317     ocol1->addChild(YScanDisplacement());
    4318     ocol2->addChild(HorizScanPercentage());
    4319     ocol2->addChild(XScanDisplacement());
     4402    ocol1->addChild(VertScanPercentage(settings));
     4403    ocol1->addChild(YScanDisplacement(settings));
     4404    ocol2->addChild(HorizScanPercentage(settings));
     4405    ocol2->addChild(XScanDisplacement(settings));
    43204406    oscan->addChild(ocol1);
    43214407    oscan->addChild(ocol2);
    43224408
    43234409    HorizontalConfigurationGroup* aspect_fill =
    43244410        new HorizontalConfigurationGroup(false, false, true, true);
    4325     aspect_fill->addChild(AspectOverride());
    4326     aspect_fill->addChild(AdjustFill());
     4411    aspect_fill->addChild(AspectOverride(settings));
     4412    aspect_fill->addChild(AdjustFill(settings));
    43274413
    43284414    general2->addChild(oscan);
    43294415    general2->addChild(aspect_fill);
    4330     general2->addChild(LetterboxingColour());
    4331     general2->addChild(PIPLocationComboBox());
    4332     general2->addChild(PlaybackExitPrompt());
    4333     general2->addChild(EndOfRecordingExitPrompt());
    4334     addChild(general2);
     4416    general2->addChild(LetterboxingColour(settings));
     4417    general2->addChild(PIPLocationComboBox(settings));
     4418    general2->addChild(PlaybackExitPrompt(settings));
     4419    general2->addChild(EndOfRecordingExitPrompt(settings));
     4420    if (base)
     4421        base->addChild(general2);
     4422    else
     4423        addChild(general2);
    43354424
    43364425    QString tmp = QString(" (%1/%2)").arg(++i).arg(total);
    4337     addChild(new PlaybackProfileConfigs(tmp));
     4426    if (base)
     4427        base->addChild(new PlaybackProfileConfigs(tmp, settings));
     4428    else
     4429        addChild(new PlaybackProfileConfigs(tmp, settings));
    43384430
     4431    if (!settings)
     4432    {
    43394433    VerticalConfigurationGroup* pbox = new VerticalConfigurationGroup(false);
    43404434    pbox->setLabel(QObject::tr("View Recordings") +
    43414435                   QString(" (%1/%2)").arg(++i).arg(total));
     
    43644458    pbox3->addChild(DisplayGroupTitleSort());
    43654459    pbox3->addChild(new WatchListSettings());
    43664460    addChild(pbox3);
     4461    }
    43674462
    43684463    VerticalConfigurationGroup* seek = new VerticalConfigurationGroup(false);
    43694464    seek->setLabel(QObject::tr("Seeking") +
    43704465                   QString(" (%1/%2)").arg(++i).arg(total));
    4371     seek->addChild(SmartForward());
    4372     seek->addChild(FFRewReposTime());
    4373     seek->addChild(FFRewReverse());
    4374     seek->addChild(ExactSeeking());
    4375     addChild(seek);
     4466    if (settings)
     4467        seek->setLabel(QObject::tr("Playback group settings for ") +
     4468                       settings->mGroupName + " - " +
     4469                       seek->getLabel());
     4470    seek->addChild(SmartForward(settings));
     4471    seek->addChild(FFRewReposTime(settings));
     4472    seek->addChild(FFRewReverse(settings));
     4473    seek->addChild(ExactSeeking(settings));
     4474    if (base)
     4475        base->addChild(seek);
     4476    else
     4477        addChild(seek);
    43764478
    43774479    VerticalConfigurationGroup* comms = new VerticalConfigurationGroup(false);
    43784480    comms->setLabel(QObject::tr("Commercial Skip") +
    43794481                    QString(" (%1/%2)").arg(++i).arg(total));
    4380     comms->addChild(AutoCommercialSkip());
    4381     comms->addChild(CommRewindAmount());
    4382     comms->addChild(CommNotifyAmount());
     4482    if (settings)
     4483        comms->setLabel(QObject::tr("Playback group settings for ") +
     4484                        settings->mGroupName + " - " +
     4485                        comms->getLabel());
     4486    comms->addChild(AutoCommercialSkip(settings));
     4487    comms->addChild(CommRewindAmount(settings));
     4488    comms->addChild(CommNotifyAmount(settings));
     4489    if (!settings) // these are global settings, not host-specific
     4490    {
    43834491    comms->addChild(MaximumCommercialSkip());
    43844492    comms->addChild(MergeShortCommBreaks());
    43854493    comms->addChild(CommSkipAllBlanks());
    4386     addChild(comms);
     4494    }
     4495    if (base)
     4496        base->addChild(comms);
     4497    else
     4498        addChild(comms);
    43874499
    43884500#if CONFIG_DARWIN
    43894501    VerticalConfigurationGroup* mac1 = new VerticalConfigurationGroup(false);
    43904502    mac1->setLabel(QObject::tr("Mac OS X video settings") +
    43914503                   QString(" (%1/%2)").arg(++i).arg(total));
     4504    if (settings)
     4505        mac1->setLabel(QObject::tr("Playback group settings for ") +
     4506                       settings->mGroupName + " - " +
     4507                       mac1->getLabel());
     4508    if (!settings)
     4509    {
    43924510    mac1->addChild(MacGammaCorrect());
    43934511    mac1->addChild(MacScaleUp());
    43944512    mac1->addChild(MacFullSkip());
    4395     addChild(mac1);
     4513    }
     4514    if (base)
     4515        base->addChild(mac1);
     4516    else
     4517        addChild(mac1);
    43964518
    43974519    VerticalConfigurationGroup* mac2 = new VerticalConfigurationGroup(false);
    43984520    mac2->setLabel(QObject::tr("Mac OS X video settings") +
    43994521                   QString(" (%1/%2)").arg(++i).arg(total));
     4522    if (settings)
     4523        mac2->setLabel(QObject::tr("Playback group settings for ") +
     4524                       settings->mGroupName + " - " +
     4525                       mac2->getLabel());
     4526    if (!setings)
     4527    {
    44004528    mac2->addChild(new MacMainSettings());
    44014529    mac2->addChild(new MacFloatSettings());
    44024530
     
    44054533    row->addChild(new MacDockSettings());
    44064534    row->addChild(new MacDesktopSettings());
    44074535    mac2->addChild(row);
     4536    }
    44084537
    4409     addChild(mac2);
     4538    if (base)
     4539        base->addChild(mac2);
     4540    else
     4541        addChild(mac2);
    44104542#endif
    44114543}
    44124544
    4413 OSDSettings::OSDSettings()
     4545OSDSettings::OSDSettings(PlaySettings *settings,
     4546                         ConfigurationWizard *base)
    44144547{
    44154548    VerticalConfigurationGroup* osd = new VerticalConfigurationGroup(false);
    44164549    osd->setLabel(QObject::tr("On-screen display"));
     4550    if (settings)
     4551        osd->setLabel(QObject::tr("Playback group settings for ") +
     4552                      settings->mGroupName + " - " +
     4553                      osd->getLabel());
    44174554
     4555    if (!settings)
    44184556    osd->addChild(new ThemeSelector("OSDTheme"));
    4419     osd->addChild(OSDGeneralTimeout());
    4420     osd->addChild(OSDProgramInfoTimeout());
    4421     osd->addChild(OSDFont());
    4422     osd->addChild(OSDThemeFontSizeType());
    4423     osd->addChild(EnableMHEG());
    4424     osd->addChild(PersistentBrowseMode());
    4425     osd->addChild(BrowseAllTuners());
    4426     addChild(osd);
     4557    osd->addChild(OSDGeneralTimeout(settings));
     4558    osd->addChild(OSDProgramInfoTimeout(settings));
     4559    osd->addChild(OSDFont(settings));
     4560    osd->addChild(OSDThemeFontSizeType(settings));
     4561    osd->addChild(EnableMHEG(settings));
     4562    if (!settings)
     4563    {
     4564    osd->addChild(PersistentBrowseMode(settings));
     4565    osd->addChild(BrowseAllTuners(settings));
     4566    }
     4567    if (base)
     4568        base->addChild(osd);
     4569    else
     4570        addChild(osd);
    44274571
    44284572    VerticalConfigurationGroup *udp = new VerticalConfigurationGroup(false);
    44294573    udp->setLabel(QObject::tr("UDP OSD Notifications"));
    4430     udp->addChild(OSDNotifyTimeout());
    4431     udp->addChild(UDPNotifyPort());
    4432     addChild(udp);
     4574    if (settings)
     4575        udp->setLabel(QObject::tr("Playback group settings for ") +
     4576                      settings->mGroupName + " - " +
     4577                      udp->getLabel());
     4578    udp->addChild(OSDNotifyTimeout(settings));
     4579    udp->addChild(UDPNotifyPort(settings));
     4580    if (base)
     4581        base->addChild(udp);
     4582    else
     4583        addChild(udp);
    44334584
    44344585    VerticalConfigurationGroup *cc = new VerticalConfigurationGroup(false);
    44354586    cc->setLabel(QObject::tr("Analog Closed Captions"));
    4436     cc->addChild(OSDCCFont());
     4587    if (settings)
     4588        cc->setLabel(QObject::tr("Playback group settings for ") +
     4589                     settings->mGroupName + " - " +
     4590                     cc->getLabel());
     4591    cc->addChild(OSDCCFont(settings));
    44374592    //cc->addChild(DecodeVBIFormat());
    4438     cc->addChild(CCBackground());
    4439     cc->addChild(DefaultCCMode());
    4440     cc->addChild(PreferCC708());
    4441     addChild(cc);
     4593    cc->addChild(CCBackground(settings));
     4594    cc->addChild(DefaultCCMode(settings));
     4595    cc->addChild(PreferCC708(settings));
     4596    if (base)
     4597        base->addChild(cc);
     4598    else
     4599        addChild(cc);
    44424600
    4443     addChild(OSDCC708Settings());
    4444     addChild(OSDCC708Fonts());
    4445     addChild(ExternalSubtitleSettings());
     4601    if (base)
     4602    {
     4603        base->addChild(OSDCC708Settings(settings));
     4604        base->addChild(OSDCC708Fonts(settings));
     4605        base->addChild(ExternalSubtitleSettings(settings));
     4606    }
     4607    else
     4608    {
     4609        addChild(OSDCC708Settings(settings));
     4610        addChild(OSDCC708Fonts(settings));
     4611        addChild(ExternalSubtitleSettings(settings));
     4612    }
    44464613
    44474614#if CONFIG_DARWIN
    44484615    // Any Mac OS-specific OSD stuff would go here.
  • programs/mythfrontend/main.cpp

     
    3434#include "globalsettings.h"
    3535#include "profilegroup.h"
    3636#include "playgroup.h"
     37#include "playsettings.h"
    3738#include "networkcontrol.h"
    3839#include "DVDRingBuffer.h"
    3940#include "scheduledrecording.h"
     
    485486        delete statusbox;
    486487}
    487488
     489ConfigurationWizard *createPlaybackSettingsForPlaybackGroup(PlaySettings *settings, ConfigurationWizard *base)
     490{
     491    return new PlaybackSettings(settings, base);
     492}
     493
     494ConfigurationWizard *createOSDSettingsForPlaybackGroup(PlaySettings *settings, ConfigurationWizard *base)
     495{
     496    return new OSDSettings(settings, base);
     497}
     498
    488499void TVMenuCallback(void *data, QString &selection)
    489500{
    490501    (void)data;
     
    577588    }
    578589    else if (sel == "settings playgroup")
    579590    {
    580         PlayGroupEditor editor;
     591        PlayGroupEditor editor(createPlaybackSettingsForPlaybackGroup,
     592                               createOSDSettingsForPlaybackGroup);
    581593        editor.exec();
    582594    }
    583595    else if (sel == "settings general")
  • programs/mythfrontend/globalsettings.h

     
    1010#include "themeinfo.h"
    1111
    1212class QFileInfo;
     13class PlaySettings;
    1314
    1415class ThemeSelector : public HostImageSelect
    1516{
     
    2324class PlaybackSettings : public ConfigurationWizard
    2425{
    2526  public:
    26     PlaybackSettings();
     27    PlaybackSettings(PlaySettings *settings=NULL,
     28                     ConfigurationWizard *base=NULL);
    2729};
    2830
    2931class OSDSettings: virtual public ConfigurationWizard
    3032{
    3133  public:
    32     OSDSettings();
     34    OSDSettings(PlaySettings *settings=NULL,
     35                ConfigurationWizard *base=NULL);
    3336};
    3437
    3538class GeneralSettings : public ConfigurationWizard
     
    140143    Q_OBJECT
    141144
    142145  public:
    143     PlaybackProfileConfigs(const QString &str);
     146    PlaybackProfileConfigs(const QString &str, PlaySettings *settings);
    144147    virtual ~PlaybackProfileConfigs();
    145148
    146149  private:
     
    152155
    153156  private:
    154157    QStringList   profiles;
    155     HostComboBox *grouptrigger;
     158    ComboBoxSetting *grouptrigger;
    156159};
    157160
    158161#endif
  • programs/mythavtest/main.cpp

     
    2222#include "dbcheck.h"
    2323#include "myththemebase.h"
    2424#include "audiopulseutil.h"
     25#include "playsettings.h"
    2526
    2627
    2728static void *run_priv_thread(void *data)
     
    215216        return GENERIC_EXIT_DB_OUTOFDATE;
    216217    }
    217218
    218     TV *tv = new TV();
    219     if (!tv->Init())
    220     {
    221         VERBOSE(VB_IMPORTANT, "Fatal Error: Could not initialize TV class.");
    222         return TV_EXIT_NO_TV;
    223     }
    224 
    225219    ProgramInfo *pginfo = NULL;
    226220
    227221    if (!filename.isEmpty() &&
     
    240234
    241235    }
    242236
     237    PlaySettings settings(pginfo->playgroup);
     238    TV *tv = new TV(&settings);
     239    if (!tv->Init())
     240    {
     241        VERBOSE(VB_IMPORTANT, "Fatal Error: Could not initialize TV class.");
     242        return TV_EXIT_NO_TV;
     243    }
     244
    243245    TV::StartTV(pginfo, false);
    244246
    245247    if (pginfo)