Ticket #8658: BD_title.2.diff

File BD_title.2.diff, 26.1 KB (added by stuartm, 14 years ago)

Updated patch

  • mythtv/libs/libmythtv/mythbdplayer.cpp

     
    5353    for (uint i = 0; i < total; i++)
    5454        times.push_back(player_ctx->buffer->BD()->GetChapterStartTime(i));
    5555}
     56
     57int MythBDPlayer::GetNumTitles(void) const
     58{
     59    if (player_ctx->buffer->BD() && player_ctx->buffer->BD()->IsOpen())
     60        return player_ctx->buffer->BD()->GetNumTitles();
     61    return 0;
     62}
     63
     64int MythBDPlayer::GetCurrentTitle(void) const
     65{
     66    if (player_ctx->buffer->BD() && player_ctx->buffer->BD()->IsOpen())
     67        return player_ctx->buffer->BD()->GetCurrentTitle();
     68    return -1;
     69}
     70
     71int MythBDPlayer::GetTitleDuration(int title) const
     72{
     73    if (player_ctx->buffer->BD() && player_ctx->buffer->BD()->IsOpen() &&
     74        title >= 0 && title < GetNumTitles())
     75    {
     76        return player_ctx->buffer->BD()->GetTitleDuration(title);
     77    }
     78    return 0;
     79}
     80
     81QString MythBDPlayer::GetTitleName(int title) const
     82{
     83    if (title >= 0 && title < GetNumTitles())
     84    {
     85        int secs = GetTitleDuration(title);
     86        // BD doesn't provide title names, so show title number and duration
     87        int hours = secs / 60 / 60;
     88        int minutes = (secs / 60) - (hours * 60);
     89        secs = secs % 60;
     90        QString name = QString("%1 (%2:%3:%4)").arg(title)
     91                .arg(hours, 2, 10, QChar(48)).arg(minutes, 2, 10, QChar(48))
     92                .arg(secs, 2, 10, QChar(48));
     93        return name;
     94    }
     95    return QString();
     96}
     97
     98bool MythBDPlayer::SwitchTitle(int title)
     99{
     100    uint total = GetNumTitles();
     101    if (!total)
     102        return false;
     103
     104    bool ok = static_cast<bool>(player_ctx->buffer->BD()->SwitchTitle(title));
     105
     106    if (ok)
     107        forcePositionMapSync = true;
     108
     109    return ok;
     110}
     111
     112bool MythBDPlayer::NextTitle(void)
     113{
     114    return (bool)player_ctx->buffer->BD()->NextTitle();
     115}
     116
     117bool MythBDPlayer::PrevTitle(void)
     118{
     119    return (bool)player_ctx->buffer->BD()->PrevTitle();
     120}
  • mythtv/libs/libmythtv/mythbdplayer.h

     
    1111    virtual int     GetCurrentChapter(void);
    1212    virtual void    GetChapterTimes(QList<long long> &times);
    1313    virtual int64_t GetChapter(int chapter);
     14
     15    virtual int GetNumTitles(void) const;
     16    virtual int GetCurrentTitle(void) const;
     17    virtual int GetTitleDuration(int title) const;
     18    virtual QString GetTitleName(int title) const;
     19    virtual bool SwitchTitle(int title);
     20    virtual bool PrevTitle(void);
     21    virtual bool NextTitle(void);
    1422};
    1523
    1624#endif // MYTHBDPLAYER_H
  • mythtv/libs/libmythtv/decoderbase.cpp

     
    125125           keyframedist = 12;
    126126        totframes = (long long)(ringBuffer->BD()->GetTotalTimeOfTitle() * fps);
    127127        posMap[totframes] = ringBuffer->BD()->GetTotalReadPosition();
    128 //        VERBOSE(VB_PLAYBACK, QString("%1 TotalTimeOfTitle() in ticks, %2 TotalReadPosition() in bytes, %3 is fps")
    129 //                .arg(ringBuffer->BD()->GetTotalTimeOfTitle()).arg(ringBuffer->BD()->GetTotalReadPosition()).arg(fps));
     128        VERBOSE(VB_IMPORTANT, QString("%1 TotalTimeOfTitle() in ticks, %2 TotalReadPosition() in bytes, %3 is fps")
     129                .arg(ringBuffer->BD()->GetTotalTimeOfTitle()).arg(ringBuffer->BD()->GetTotalReadPosition()).arg(fps));
    130130    }
    131131    else if ((positionMapType == MARK_UNSET) ||
    132132        (keyframedist == -1))
     
    276276 *   watching prerecorded:
    277277 *   1. initial fill from db is all that's needed
    278278 */
    279 bool DecoderBase::SyncPositionMap(void)
     279bool DecoderBase::SyncPositionMap(bool force)
    280280{
     281    if (!force && dontSyncPositionMap)
     282        return false;
     283
    281284    VERBOSE(VB_PLAYBACK, LOC + "Resyncing position map. posmapStarted = "
    282285            << (int) posmapStarted << " livetv(" << livetv << ") "
    283286            << "watchingRec(" << watchingrecording << ")");
    284287
    285     if (dontSyncPositionMap)
    286         return false;
    287 
    288288    unsigned long old_posmap_size = GetPositionMapSize();
    289289    unsigned long new_posmap_size = old_posmap_size;
     290    long long oldTotFrames = m_positionMap.size() ? m_positionMap.back().index : 0;
    290291
    291292    if (livetv || watchingrecording)
    292293    {
     
    317318    else
    318319    {
    319320        // watching prerecorded ... just get from db
    320         if (!posmapStarted)
     321        if (force || !posmapStarted)
    321322        {
    322323            PosMapFromDb();
    323324
     
    328329        }
    329330    }
    330331
    331     bool ret_val = new_posmap_size > old_posmap_size;
     332    bool ret_val = (((ringBuffer->isDVD() || ringBuffer->isBD()) &&
     333                      new_posmap_size &&
     334                      oldTotFrames != m_positionMap.back().index)
     335                    || new_posmap_size > old_posmap_size);
    332336
    333337    if (ret_val && keyframedist > 0)
    334338    {
  • mythtv/libs/libmythtv/decoderbase.h

     
    141141    virtual MythCodecID GetVideoCodecID(void) const = 0;
    142142    virtual void *GetVideoCodecPrivate(void) { return NULL; }
    143143
    144     virtual bool SyncPositionMap(void);
     144    virtual bool SyncPositionMap(bool force = false);
    145145    virtual bool PosMapFromDb(void);
    146146    virtual bool PosMapFromEnc(void);
    147147
  • mythtv/libs/libmythtv/BDRingBuffer.cpp

     
    11
    22#include <cstring>
     3#include "iso639.h"
    34
    45#include "bdnav/mpls_parse.h"
    56#include "bdnav/navigation.h"
     
    1415#define LOC     QString("BDRingBuffer: ")
    1516
    1617BDRingBufferPriv::BDRingBufferPriv()
    17     : bdnav(NULL)
     18    : bdnav(NULL), m_numTitles(0)
    1819{
    1920}
    2021
     
    6667            return false;
    6768
    6869        // Return an index of relevant titles (excludes dupe clips + titles)
    69         uint32_t numTitles = bd_get_titles(bdnav, TITLES_RELEVANT);
     70        m_numTitles = bd_get_titles(bdnav, TITLES_RELEVANT);
    7071        m_mainTitle = 0;
    71         m_mainTitleLength = 0;
     72        m_currentTitleLength = 0;
    7273        m_titlesize = 0;
    7374        m_currentTime = 0;
     75        m_currentTitleInfo = NULL;
    7476
    7577        VERBOSE(VB_IMPORTANT, LOC + QString("Found %1 relevant titles.")
    76                 .arg(numTitles));
     78                .arg(m_numTitles));
    7779
    7880        // Loop through the relevant titles and find the longest
    79         for( unsigned i=0; i < numTitles; ++i)
     81        uint64_t titleLength = 0;
     82        BLURAY_TITLE_INFO *titleInfo = NULL;
     83        for( unsigned i=0; i < m_numTitles; ++i)
    8084        {
    81             m_currentTitleInfo = bd_get_title_info(bdnav, i);
    82             if (m_mainTitleLength == 0 ||
    83                 m_currentTitleInfo->duration > m_mainTitleLength)
     85            titleInfo = bd_get_title_info(bdnav, i);
     86            if (titleLength == 0 || titleInfo->duration > titleLength)
    8487            {
    85                 m_mainTitle = m_currentTitleInfo->idx;
    86                 m_mainTitleLength = m_currentTitleInfo->duration;
     88                m_mainTitle = titleInfo->idx;
     89                titleLength = titleInfo->duration;
    8790            }
    8891        }
    8992
    9093        // Now that we've settled on which index the main title is, get info.
    91         m_currentTitleInfo = bd_get_title_info(bdnav, m_mainTitle);
    92         bd_select_title(bdnav, m_mainTitle);
    93         uint32_t chapter_count = m_currentTitleInfo->chapter_count;
    94         VERBOSE(VB_IMPORTANT, LOC + QString("Longest title: index %1. "
    95                                             "Duration: %2 (%3 mins) "
    96                                             "Number of Chapters: %4")
    97                                             .arg(m_mainTitle)
    98                                             .arg(m_mainTitleLength)
    99                                             .arg(m_mainTitleLength / (90000 * 60))
    100                                             .arg(chapter_count));
    101         VERBOSE(VB_PLAYBACK, LOC + QString("Frame Rate: %1").arg(GetFrameRate()));
    102         if (chapter_count)
    103         {
    104             for (uint i = 0; i < chapter_count; i++)
    105             {
    106                 uint64_t total_secs = GetChapterStartTime(i);
    107                 uint64_t framenum   = GetChapterStartFrame(i);
    108                 int hours = (int)total_secs / 60 / 60;
    109                 int minutes = ((int)total_secs / 60) - (hours * 60);
    110                 double secs = (double)total_secs - (double)(hours * 60 * 60 + minutes * 60);
    111                 VERBOSE(VB_PLAYBACK, LOC + QString("Chapter %1 found @ [%2:%3:%4]->%5")
    112                         .arg(QString().sprintf("%02d", i + 1))
    113                         .arg(QString().sprintf("%02d", hours))
    114                         .arg(QString().sprintf("%02d", minutes))
    115                         .arg(QString().sprintf("%06.3f", secs))
    116                         .arg(framenum));
    117             }
    118         }
    119         m_titlesize = bd_get_title_size(bdnav);
     94        SwitchTitle(m_mainTitle);
    12095
    12196        return true;
    12297}
     
    152127                                    GetFrameRate()) / 90000.0f);
    153128}
    154129
     130int BDRingBufferPriv::GetCurrentTitle(void) const
     131{
     132    if (m_currentTitleInfo)
     133        return m_currentTitleInfo->idx;
     134    else
     135        return -1;
     136}
     137
     138int BDRingBufferPriv::GetTitleDuration(int title) const
     139{
     140    int numTitles = GetNumTitles();
     141
     142    if (numTitles > 0 && title >= 0 && title < numTitles)
     143    {
     144        BLURAY_TITLE_INFO *info = bd_get_title_info(bdnav, title);
     145        if (!info)
     146            return 0;
     147        int duration = ((info->duration) / 90000.0f);
     148        VERBOSE(VB_IMPORTANT, QString("Title: %1 Duration: %2 Duration (Min): %3").arg(title).arg(duration).arg(duration / 60));
     149        bd_free_title_info(info);
     150        return duration;
     151    }
     152    else
     153        return 0;
     154}
     155
     156bool BDRingBufferPriv::SwitchTitle(uint title)
     157{
     158    if (bdnav)
     159    {
     160        if (m_currentTitleInfo)
     161            bd_free_title_info(m_currentTitleInfo);
     162
     163        m_currentTitleInfo = bd_get_title_info(bdnav, title);
     164
     165        if (!m_currentTitleInfo)
     166            return false;
     167
     168        m_currentTitleLength = m_currentTitleInfo->duration;
     169        bd_select_title(bdnav, title);
     170        uint32_t chapter_count = m_currentTitleInfo->chapter_count;
     171        VERBOSE(VB_IMPORTANT, LOC + QString("Selected title: index %1. "
     172                                            "Duration: %2 (%3 mins) "
     173                                            "Number of Chapters: %4")
     174                                            .arg(title)
     175                                            .arg(m_currentTitleLength)
     176                                            .arg(m_currentTitleLength / (90000 * 60))
     177                                            .arg(chapter_count));
     178        VERBOSE(VB_PLAYBACK, LOC + QString("Frame Rate: %1").arg(GetFrameRate()));
     179        if (chapter_count)
     180        {
     181            for (uint i = 0; i < chapter_count; i++)
     182            {
     183                uint64_t total_secs = GetChapterStartTime(i);
     184                uint64_t framenum   = GetChapterStartFrame(i);
     185                int hours = (int)total_secs / 60 / 60;
     186                int minutes = ((int)total_secs / 60) - (hours * 60);
     187                double secs = (double)total_secs - (double)(hours * 60 * 60 + minutes * 60);
     188                VERBOSE(VB_PLAYBACK, LOC + QString("Chapter %1 found @ [%2:%3:%4]->%5")
     189                        .arg(QString().sprintf("%02d", i + 1))
     190                        .arg(QString().sprintf("%02d", hours))
     191                        .arg(QString().sprintf("%02d", minutes))
     192                        .arg(QString().sprintf("%06.3f", secs))
     193                        .arg(framenum));
     194            }
     195        }
     196        m_titlesize = bd_get_title_size(bdnav);
     197        return true;
     198    }
     199    else
     200        return false;
     201}
     202
     203bool BDRingBufferPriv::NextTitle(void)
     204{
     205    if (!m_currentTitleInfo || !bdnav)
     206        return false;
     207
     208    uint32_t nextTitle = m_currentTitleInfo->idx + 1;
     209
     210    if (nextTitle < GetNumTitles())
     211        return (bool)bd_select_title(bdnav, nextTitle);
     212
     213    return false;
     214}
     215
     216bool BDRingBufferPriv::PrevTitle(void)
     217{
     218    if (!m_currentTitleInfo || !bdnav || (m_currentTitleInfo->idx <= 0))
     219        return false;
     220
     221    uint32_t prevTitle = m_currentTitleInfo->idx - 1;
     222
     223    return (bool)bd_select_title(bdnav, prevTitle);
     224}
     225
    155226uint64_t BDRingBufferPriv::GetTotalReadPosition(void)
    156227{
    157228    if (bdnav)
  • mythtv/libs/libmythtv/BDRingBuffer.h

     
    2323    BDRingBufferPriv();
    2424    virtual ~BDRingBufferPriv();
    2525
     26    uint32_t GetNumTitles(void) const { return m_numTitles; }
     27    int      GetCurrentTitle(void) const;
     28    int      GetTitleDuration(int title) const;
    2629    // Get the size in bytes of the current title (playlist item).
    2730    uint64_t GetTitleSize(void) const { return m_titlesize; }
    2831    // Get The total duration of the current title in 90Khz ticks.
    29     uint64_t GetTotalTimeOfTitle(void) const { return (m_mainTitleLength / 90000); }
     32    uint64_t GetTotalTimeOfTitle(void) const { return (m_currentTitleLength / 90000); }
    3033    uint64_t GetCurrentTime(void) { return (m_currentTime / 90000); }
    3134    uint64_t GetReadPosition(void);
    3235    uint64_t GetTotalReadPosition(void);
     
    4548    bool OpenFile(const QString &filename);
    4649    void close(void);
    4750
    48 //    void nextTrack(void);
    49 //    void prevTrack(void);
     51    bool SwitchTitle(uint title);
     52    bool NextTitle(void);
     53    bool PrevTitle(void);
    5054
    5155    int  safe_read(void *data, unsigned sz);
    5256    uint64_t Seek(uint64_t pos);
    5357
    5458  protected:
    5559    BLURAY            *bdnav;
     60    uint32_t           m_numTitles;
    5661    uint32_t           m_mainTitle; // Index number of main title
    57     uint64_t           m_mainTitleLength; // Main title's duration, in ticks (90Khz)
     62    uint64_t           m_currentTitleLength; // Selected title's duration, in ticks (90Khz)
    5863    BLURAY_TITLE_INFO *m_currentTitleInfo; // Selected title info from struct in bluray.h
    5964    uint64_t           m_titlesize;
    6065    uint64_t           m_currentTime;
  • mythtv/libs/libmythtv/tv_play.cpp

     
    59825982    ctx->UnlockDeleteNVP(__FILE__, __LINE__);
    59835983}
    59845984
     5985int TV::GetNumTitles(const PlayerContext *ctx) const
     5986{
     5987    int num_titles = 0;
     5988    ctx->LockDeleteNVP(__FILE__, __LINE__);
     5989    if (ctx->nvp)
     5990        num_titles = ctx->nvp->GetNumTitles();
     5991    ctx->UnlockDeleteNVP(__FILE__, __LINE__);
     5992    return num_titles;
     5993}
     5994
     5995int TV::GetCurrentTitle(const PlayerContext *ctx) const
     5996{
     5997    int currentTitle = 0;
     5998    ctx->LockDeleteNVP(__FILE__, __LINE__);
     5999    if (ctx->nvp)
     6000        currentTitle = ctx->nvp->GetCurrentTitle();
     6001    ctx->UnlockDeleteNVP(__FILE__, __LINE__);
     6002    return currentTitle;
     6003}
     6004
     6005int TV::GetTitleDuration(const PlayerContext *ctx, int title) const
     6006{
     6007    int seconds = 0;
     6008    ctx->LockDeleteNVP(__FILE__, __LINE__);
     6009    if (ctx->nvp)
     6010        seconds = ctx->nvp->GetTitleDuration(title);
     6011    ctx->UnlockDeleteNVP(__FILE__, __LINE__);
     6012    return seconds;
     6013}
     6014
     6015
     6016QString TV::GetTitleName(const PlayerContext *ctx, int title) const
     6017{
     6018    QString name;
     6019    ctx->LockDeleteNVP(__FILE__, __LINE__);
     6020    if (ctx->nvp)
     6021        name = ctx->nvp->GetTitleName(title);
     6022    ctx->UnlockDeleteNVP(__FILE__, __LINE__);
     6023    return name;
     6024}
     6025
     6026void TV::DoSwitchTitle(PlayerContext *ctx, int title)
     6027{
     6028    NormalSpeed(ctx);
     6029    StopFFRew(ctx);
     6030
     6031    PauseAudioUntilBuffered(ctx);
     6032
     6033    osdInfo info;
     6034    ctx->CalcNVPSliderPosition(info);
     6035    info.text["description"] = tr("Jump Title");
     6036    info.text["title"] = tr("Searching");
     6037    UpdateOSDStatus(ctx, info, kOSDFunctionalType_Default);
     6038
     6039    ctx->LockDeleteNVP(__FILE__, __LINE__);
     6040    if (ctx->nvp)
     6041        ctx->nvp->SwitchTitle(title);
     6042    ctx->UnlockDeleteNVP(__FILE__, __LINE__);
     6043}
     6044
    59856045void TV::DoSkipCommercials(PlayerContext *ctx, int direction)
    59866046{
    59876047    NormalSpeed(ctx);
     
    98639923            int chapter = action.right(3).toInt();
    98649924            DoJumpChapter(actx, chapter);
    98659925        }
     9926        else if (action.left(11) == "JUMPTOTITLE")
     9927        {
     9928            int title = action.right(3).toInt();
     9929            DoSwitchTitle(actx, title);
     9930        }
    98669931        else if (action == "EDIT")
    98679932            StartProgramEditMode(actx);
    98689933        else if (action == "TOGGLEAUTOEXPIRE")
     
    999510060    else if (category == "SCHEDULERECORDING")
    999610061        title = FillOSDMenuSchedule(ctx, osd, select, level);
    999710062    else if (category == "AVCHAPTER")
     10063    {
    999810064        title = FillOSDMenuAVChapter(ctx, osd, select, level);
     10065    }
     10066    else if (category == "AVTITLE")
     10067    {
     10068        title = FillOSDMenuAVTitle(ctx, osd, select, level);
     10069    }
    999910070    else if (category ==  "PIP")
    1000010071        title = FillOSDMenuPxP(ctx, osd, select, level);
    1000110072    else if (category == "INPUTSWITCHING")
     
    1020710278    return result;
    1020810279}
    1020910280
     10281QString TV::FillOSDMenuAVTitle(const PlayerContext *ctx, OSD *osd,
     10282                               bool select, int level) const
     10283{
     10284    QString result = QString();
     10285    QString title  = tr("Title");
     10286    int num_titles = GetNumTitles(ctx);
     10287    if (!num_titles)
     10288        return result;
     10289
     10290    if (level == 0)
     10291    {
     10292        osd->DialogAddButton(title , "DIALOG_MENU_AVTITLE_1", true, select);
     10293    }
     10294    else if (level == 1)
     10295    {
     10296        result = title;
     10297        int current_title = GetCurrentTitle(ctx);
     10298
     10299        for (int i = 0; i < num_titles; i++)
     10300        {
     10301            QString titleIdx = QString("%1").arg(i, 3, 10, QChar(48));
     10302            QString desc = GetTitleName(ctx, i);
     10303            osd->DialogAddButton(desc, QString("JUMPTOTITLE%1").arg(titleIdx),
     10304                                 false, current_title == (i + 1));
     10305        }
     10306    }
     10307    return result;
     10308}
     10309
    1021010310QString TV::FillOSDMenuJumpRec(const PlayerContext *ctx, OSD *osd, bool select,
    1021110311                               int level)
    1021210312{
  • mythtv/libs/libmythtv/tv_play.h

     
    443443    int  GetNumChapters(const PlayerContext*) const;
    444444    void GetChapterTimes(const PlayerContext*, QList<long long> &times) const;
    445445    int  GetCurrentChapter(const PlayerContext*) const;
     446    int  GetNumTitles(const PlayerContext *ctx) const;
     447    int  GetCurrentTitle(const PlayerContext *ctx) const;
     448    int  GetTitleDuration(const PlayerContext *ctx, int title) const;
     449    QString GetTitleName(const PlayerContext *ctx, int title) const;
     450    void DoSwitchTitle(PlayerContext*, int title);
    446451    void DoJumpChapter(PlayerContext*, int direction);
    447452    void DoSkipCommercials(PlayerContext*, int direction);
    448453
    449     void DoQueueTranscode(PlayerContext*,QString profile);
     454    void DoQueueTranscode(PlayerContext*, QString profile);
    450455
    451456    void SetAutoCommercialSkip(const PlayerContext*,
    452457                               CommSkipMode skipMode = kCommSkipOff);
     
    585590                                   bool select, int level) const;
    586591    QString FillOSDMenuAVChapter(  const PlayerContext*, OSD *osd,
    587592                                   bool select, int level) const;
     593    QString FillOSDMenuAVTitle(    const PlayerContext *, OSD *osd,
     594                                   bool select, int level) const;
    588595    QString FillOSDMenuPxP(        const PlayerContext*, OSD *osd,
    589596                                   bool select, int level) const;
    590597    QString FillOSDMenuSwitchInput(const PlayerContext*, OSD *osd,
  • mythtv/libs/libmythtv/NuppelVideoPlayer.cpp

     
    367367        VERBOSE(VB_PLAYBACK, LOC + "Waited 100ms to get pause lock.");
    368368        DecoderPauseCheck();
    369369    }
    370    
     370
    371371    next_play_speed   = 0.0;
    372372    next_normal_speed = false;
    373373    PauseDecoder();
     
    874874
    875875void NuppelVideoPlayer::SetFileLength(int total, int frames)
    876876{
     877    VERBOSE(VB_IMPORTANT, QString("SET FILE LENGTH %1 FRAMES %2").arg(total).arg(frames));
    877878    totalLength = total;
    878879    totalFrames = frames;
    879880}
     
    990991    }
    991992
    992993    audio.CheckFormat();
    993    
     994
    994995    if (ret > 0)
    995996    {
    996997        hasFullPositionMap = true;
     
    26562657    while (!killdecoder && !IsErrored())
    26572658    {
    26582659        DecoderPauseCheck();
    2659        
     2660
    26602661        if (forcePositionMapSync)
    26612662        {
    26622663            forcePositionMapSync = false;
    2663             GetDecoder()->SyncPositionMap();
     2664            GetDecoder()->SyncPositionMap(true);
    26642665        }
    26652666
    26662667        if (decoderSeek >= 0)
     
    27262727    bool ret = false;
    27272728    if (!videoOutput)
    27282729        return false;
    2729    
     2730
    27302731    // Wait for frames to be available for decoding onto
    27312732    if (!videoOutput->EnoughFreeFrames() && !unsafe && !killdecoder)
    27322733    {
     
    41134114    VERBOSE(VB_PLAYBACK, LOC +
    41144115            QString("DoJumpChapter: current %1 want %2 (frame %3)")
    41154116            .arg(current).arg(chapter).arg(desiredFrame));
    4116                                        
     4117
    41174118    if (desiredFrame < 0)
    41184119    {
    41194120        VERBOSE(VB_PLAYBACK, LOC_ERR + QString("DoJumpChapter failed."));
  • mythtv/libs/libmythtv/NuppelVideoPlayer.h

     
    165165    virtual void SetBookmark(void);
    166166    void SetKeyframeDistance(int keyframedistance);
    167167    void SetVideoParams(int w, int h, double fps, int keydist,
    168                         float a = 1.33333, FrameScanType scan = kScan_Ignore, 
     168                        float a = 1.33333, FrameScanType scan = kScan_Ignore,
    169169                        bool video_codec_changed = false);
    170170    void SetFileLength(int total, int frames);
    171171    void Zoom(ZoomDirection direction);
     
    255255    bool PauseDecoder(void);
    256256    void UnpauseDecoder(void);
    257257    void Pause(void);
    258     bool Play(float speed = 1.0, bool normal = true,
    259               bool unpauseaudio = true);
     258    bool Play(float speed = 1.0, bool normal = true, bool unpauseaudio = true);
    260259
    261260    // Seek stuff
    262261    virtual bool FastForward(float seconds);
     
    266265    // Chapter stuff
    267266    void JumpChapter(int chapter);
    268267
     268    // Title stuff
     269    virtual bool SwitchTitle(int title) { return false; }
     270    virtual bool NextTitle(void) { return false; }
     271    virtual bool PrevTitle(void) { return false; }
     272
    269273    // Commercial stuff
    270274    void SetAutoCommercialSkip(CommSkipMode autoskip)
    271275        { commBreakMap.SetAutoCommercialSkip(autoskip, framesPlayed); }
     
    365369        { tc_wrap[TC_AUDIO] = 0LL; return tc_wrap[TC_AUDIO]; }
    366370    long long ResyncAudioTimecodeOffset(void)
    367371        { tc_wrap[TC_AUDIO] = LONG_LONG_MIN; return 0L; }
    368     long long GetAudioTimecodeOffset(void) const 
     372    long long GetAudioTimecodeOffset(void) const
    369373        { return tc_wrap[TC_AUDIO]; }
    370374    void SaveAudioTimecodeOffset(long long v)
    371375        { savedAudioTimecodeOffset = v; }
     
    379383    virtual int  GetCurrentChapter(void);
    380384    virtual void GetChapterTimes(QList<long long> &times);
    381385
     386    // Title public stuff
     387    virtual int GetNumTitles(void) const { return 0; }
     388    virtual int GetCurrentTitle(void) const { return 0; }
     389    virtual int GetTitleDuration(int title) const { return 0; }
     390    virtual QString GetTitleName(int title) const { return QString(); }
     391
    382392    // DVD public stuff
    383393    virtual void ChangeDVDTrack(bool ffw)       { (void) ffw;       }
    384394    virtual bool GoToDVDMenu(QString str)       { return false;     }
     
    551561    long long totalLength;
    552562    long long rewindtime;
    553563
    554     // -- end state stuff -- 
     564    // -- end state stuff --
    555565
    556566
    557567    // Input Video Attributes
     
    559569    QSize    video_dim;       ///< Video (input) buffer width & height
    560570    double   video_frame_rate;///< Video (input) Frame Rate (often inaccurate)
    561571    float    video_aspect;    ///< Video (input) Apect Ratio
    562     float    forced_video_aspect; 
     572    float    forced_video_aspect;
    563573    /// Video (input) Scan Type (interlaced, progressive, detect, ignore...)
    564574    FrameScanType m_scan;
    565575    /// Set when the user selects a scan type, overriding the detected one
     
    632642    float      next_play_speed;
    633643    bool       next_normal_speed;
    634644
    635     float      play_speed;   
    636     bool       normal_speed; 
     645    float      play_speed;
     646    bool       normal_speed;
    637647    int        frame_interval;///< always adjusted for play_speed
    638648    int        m_frame_interval;///< used to detect changes to frame_interval
    639649
    640     int        ffrew_skip;   
     650    int        ffrew_skip;
    641651
    642652    // Audio and video synchronization stuff
    643653    VideoSync *videosync;
     
    648658    bool       lastsync;
    649659    bool       decode_extra_audio;
    650660    int        repeat_delay;
    651  
     661
    652662    // Time Code stuff
    653663    int        prevtc;        ///< 32 bit timecode if last VideoFrame shown
    654664    int        prevrp;        ///< repeat_pict of last frame
  • mythtv/libs/libmythtv/tvosdmenuentry.cpp

     
    194194    curMenuEntries.append(new TVOSDMenuEntry(
    195195        "AVCHAPTER",         -1,  0,  1,  0, "Chapter"));
    196196    curMenuEntries.append(new TVOSDMenuEntry(
     197        "AVTITLE",           -1,  0,  1,  0, "Title"));
     198    curMenuEntries.append(new TVOSDMenuEntry(
    197199        "GUIDE",              1,  1,  0,  0, "Program Guide"));
    198200    curMenuEntries.append(new TVOSDMenuEntry(
    199201        "PIP",                1,  1,  1, -1, "Picture-in-Picture"));