Ticket #3928: 1.diff

File 1.diff, 23.1 KB (added by skamithi, 17 years ago)

patch against latest rev

  • libs/libmythtv/avformatdecoder.cpp

     
    11711171    const PESPacket pes = PESPacket::ViewData(ic->cur_pmt_sect);
    11721172    const PSIPTable psip(pes);
    11731173    const ProgramMapTable pmt(psip);
    1174    
     1174
    11751175    for (uint i = 0; i < pmt.StreamCount(); i++)
    11761176    {
    11771177        if (pmt.StreamType(i) != 6)
     
    12271227    const PESPacket pes = PESPacket::ViewData(ic->cur_pmt_sect);
    12281228    const PSIPTable psip(pes);
    12291229    const ProgramMapTable pmt(psip);
    1230    
     1230
    12311231    for (uint i = 0; i < pmt.StreamCount(); i++)
    12321232    {
    12331233        if (! StreamID::IsObjectCarousel(pmt.StreamType(i)))
     
    15661566        {
    15671567            qBubbleSort(tracks[kTrackTypeAudio]);
    15681568            sinfo_vec_t::iterator it = tracks[kTrackTypeAudio].begin();
    1569             int count = 0;
    15701569            for (; it != tracks[kTrackTypeAudio].end(); ++it)
    15711570            {
    1572                 it->dvd_track_num = ringBuffer->DVD()->GetAudioTrackNum(count);
     1571                it->dvd_track_num =
     1572                        ringBuffer->DVD()->GetAudioTrackNum(it->stream_id);
    15731573                VERBOSE(VB_PLAYBACK, LOC +
    15741574                            QString("DVD Audio Track Map "
    15751575                                    "Stream id #%1 track #%2 ")
    15761576                            .arg(it->stream_id).arg(it->dvd_track_num));
    1577                 count++;
    15781577            }
    15791578            qBubbleSort(tracks[kTrackTypeAudio]);
    15801579            int trackNo = ringBuffer->DVD()->GetTrack(kTrackTypeAudio);
     
    15851584        if (tracks[kTrackTypeSubtitle].size() > 0)
    15861585        {
    15871586            qBubbleSort(tracks[kTrackTypeSubtitle]);
     1587            sinfo_vec_t::iterator it = tracks[kTrackTypeSubtitle].begin();
     1588            for(; it != tracks[kTrackTypeSubtitle].end(); ++it)
     1589            {
     1590                it->dvd_track_num =
     1591                        ringBuffer->DVD()->GetSubTrackNum(it->stream_id);
     1592                VERBOSE(VB_PLAYBACK, LOC +
     1593                        QString("DVD Subtitle Track Map "
     1594                                "Stream id #%1 track #%2 ")
     1595                        .arg(it->stream_id).arg(it->dvd_track_num));
     1596            }
     1597            qBubbleSort(tracks[kTrackTypeSubtitle]);
    15881598            int trackNo = ringBuffer->DVD()->GetTrack(kTrackTypeSubtitle);
    15891599            uint captionmode = GetNVP()->GetCaptionMode();
    15901600            int trackcount = (int)GetTrackCount(kTrackTypeSubtitle);
  • libs/libmythtv/DVDRingBuffer.cpp

     
    7171        SetDVDSpeed(-1);
    7272        dvdnav_close(dvdnav);
    7373        dvdnav = NULL;
    74     }           
     74    }
    7575}
    7676
    7777bool DVDRingBufferPriv::IsInMenu(void) const
     
    9696    int ffrewSkip = 1;
    9797    if (parent)
    9898        ffrewSkip = parent->GetFFRewSkip();
    99    
     99
    100100    if (ffrewSkip != 1 && time != 0)
    101101    {
    102102        QMapConstIterator<uint, uint> it = seekSpeedMap.find(labs(time));
     
    122122        if (time > 0 && ffrewSkip == 1)
    123123            seeking = true;
    124124    }
    125    
     125
    126126    return currentpos;
    127127}
    128            
     128
    129129void DVDRingBufferPriv::GetDescForPos(QString &desc) const
    130130{
    131131    if (IsInMenu())
     
    170170            safe_read(buf, DVD_BLOCK_SIZE * 5);
    171171            dvdRet = dvdnav_get_number_of_titles(dvdnav, &numTitles);
    172172        }
    173                
     173
    174174        if ( dvdRet == DVDNAV_STATUS_ERR)
    175175        {
    176176            VERBOSE(VB_IMPORTANT,
     
    189189                        .arg(curTitle).arg(titleParts));
    190190            }
    191191        }
    192        
     192
    193193        const char *name;
    194194        const char *serialnum;
    195195        dvdnav_current_title_info(dvdnav, &title, &part);
     
    258258                    memcpy(dest + offset, blockBuf, DVD_BLOCK_SIZE);
    259259                    tot += DVD_BLOCK_SIZE;
    260260                }
    261                
     261
    262262                if (blockBuf != dvdBlockWriteBuf)
    263263                {
    264264                    dvdnav_free_cache_block(dvdnav, blockBuf);
    265265                }
    266              
     266
    267267                break;
    268268            case DVDNAV_CELL_CHANGE:
    269269            {
     
    300300                            .arg(pgLength).arg(pgcLength)
    301301                            .arg(cellStart).arg(pgStart)
    302302                            .arg(title).arg(part).arg(titleParts));
    303                                
     303
    304304                buttonSelected = false;
    305305                if (gotoCellStart)
    306306                {
     
    336336                memcpy(clut, blockBuf, 16 * sizeof(uint32_t));
    337337                VERBOSE(VB_PLAYBACK, "DVDNAV_SPU_CLUT_CHANGE happened.");
    338338            }
    339             break; 
     339            break;
    340340            case DVDNAV_SPU_STREAM_CHANGE:
    341341            {
    342342                dvdnav_spu_stream_change_event_t* spu =
     
    345345                if (autoselectsubtitle)
    346346                    curSubtitleTrack = dvdnav_get_active_spu_stream(dvdnav);
    347347
     348                subTrackMap.clear();
     349                uint count = dvdnav_subp_get_stream_count(dvdnav);
     350
    348351                VERBOSE(VB_PLAYBACK,
    349352                        QString("DVDNAV_SPU_STREAM_CHANGE: "
    350353                                "physical_wide==%1, physical_letterbox==%2, "
    351                                 "physical_pan_scan==%3, current_track==%4")
     354                                "physical_pan_scan==%3, current_track==%4, "
     355                                "total count %5")
    352356                        .arg(spu->physical_wide).arg(spu->physical_letterbox)
    353                         .arg(spu->physical_pan_scan).arg(curSubtitleTrack));
     357                        .arg(spu->physical_pan_scan).arg(curSubtitleTrack)
     358                        .arg(count));
    354359
    355360                ClearMenuSPUParameters();
    356361                ClearSubtitlesOSD();
     
    359364                {
    360365                    buttonstreamid = 32;
    361366                    int aspect = dvdnav_get_video_aspect(dvdnav);
    362                     if (aspect != 0)                           
     367                    if (aspect != 0)
    363368                        buttonstreamid = spu->physical_wide + buttonstreamid;
    364369                }
     370                else
     371                {
     372                    int8_t id = 0;
    365373
     374                    for (uint i = 0; i < count; i++)
     375                    {
     376                        id =  dvdnav_get_spu_logical_stream(dvdnav, i);
     377                        if (id == -1)
     378                            continue;
     379                        id = 32 + id;
     380                        subTrackMap.insert(id, i);
     381                    }
     382                }
     383
    366384                if (parent)
    367385                {
    368386                    if (IsInMenu() && parent->GetCaptionMode())
     
    372390                if (blockBuf != dvdBlockWriteBuf)
    373391                {
    374392                    dvdnav_free_cache_block(dvdnav, blockBuf);
    375                 }                                                   
     393                }
    376394            }
    377395            break;
    378396            case DVDNAV_AUDIO_STREAM_CHANGE:
     
    392410                        "Current Active Stream %1 Track Count %2")
    393411                        .arg(curAudioTrack).arg(count));
    394412
     413                int8_t audio_format, id;
    395414                for (uint i = 0; i < count; i++)
    396415                {
    397                     int audio_format = dvdnav_audio_get_format(dvdnav, i);
     416                    audio_format = dvdnav_audio_get_format(dvdnav, i);
     417                    id = dvdnav_get_audio_logical_stream(dvdnav, i);
     418                    if (id == -1)
     419                        continue;
    398420                    switch (audio_format)
    399421                    {
    400422                        case 0:
    401                             audioTrackMap.insert(ac3StreamId, i);
    402                             ac3StreamId++;
     423                            audioTrackMap.insert(ac3StreamId + id, i);
    403424                            break;
    404425                        case 2:
    405                             audioTrackMap.insert(mp2StreamId, i);
    406                             mp2StreamId++;
     426                            audioTrackMap.insert(mp2StreamId + id, i);
    407427                            break;
    408428                        case 4:
    409                             audioTrackMap.insert(lpcmStreamId, i);
    410                             lpcmStreamId++;
     429                            audioTrackMap.insert(lpcmStreamId + id, i);
    411430                            break;
    412431                        case 6:
    413                             audioTrackMap.insert(dtsStreamId, i);
    414                             dtsStreamId++;
     432                            audioTrackMap.insert(dtsStreamId + id, i);
    415433                            break;
    416434                        default:
    417435                            VERBOSE(VB_PLAYBACK, LOC_ERR +
    418                                 QString("AUDIO_STREAM_CHANGE: Unhandled audio format %1")
    419                                 .arg(i));
     436                                QString("AUDIO_STREAM_CHANGE: "
     437                                        "Unhandled audio format %1")
     438                                        .arg(i));
    420439                            break;
    421440                    }
    422441                }
    423                
     442
    424443                if (blockBuf != dvdBlockWriteBuf)
    425444                {
    426445                    dvdnav_free_cache_block(dvdnav, blockBuf);
    427                 }                                                   
     446                }
    428447            }
    429448            break;
    430449            case DVDNAV_NAV_PACKET:
     
    468487            break;
    469488            case DVDNAV_HOP_CHANNEL:
    470489                VERBOSE(VB_PLAYBACK, "DVDNAV_HOP_CHANNEL happened.");
    471                 break;                       
     490                break;
    472491            case DVDNAV_NOP:
    473492                break;
    474493            case DVDNAV_VTS_CHANGE:
     
    491510                if (blockBuf != dvdBlockWriteBuf)
    492511                {
    493512                    dvdnav_free_cache_block(dvdnav, blockBuf);
    494                 }                                                   
     513                }
    495514            }
    496515            break;
    497516            case DVDNAV_HIGHLIGHT:
     
    522541                if (blockBuf != dvdBlockWriteBuf)
    523542                {
    524543                    dvdnav_free_cache_block(dvdnav, blockBuf);
    525                 }         
     544                }
    526545            }
    527546            break;
    528547            case DVDNAV_STILL_FRAME:
     
    793812            dvdMenuButton.rects[0].y = 0;
    794813        return true;
    795814    }
    796     return false;       
     815    return false;
    797816}
    798817
    799818/** \brief generate dvd subtitle bitmap or dvd menu bitmap.
     
    956975                            }
    957976                        }
    958977                    }
    959                    
     978
    960979                    int newh = h - sy;
    961980                    tmp_bitmap = (uint8_t*) av_malloc(w * newh);
    962981                    memcpy(tmp_bitmap, bitmap + (w * sy), (w * newh));
     
    10811100 */
    10821101uint DVDRingBufferPriv::GetAudioLanguage(int id)
    10831102{
    1084     int8_t channel = dvdnav_get_audio_logical_stream(dvdnav, id);
    1085     uint16_t lang = 0;
    1086     if (channel != -1)
    1087         lang = dvdnav_audio_stream_to_lang(dvdnav,channel);
     1103    uint16_t lang = dvdnav_audio_stream_to_lang(dvdnav, id);
    10881104    return ConvertLangCode(lang);
    10891105}
    10901106
     1107/** \brief get real dvd track subtitle number
     1108 *  \param stream_id stream_id of dvd track.
     1109 *  \return 33 (max track num is 31) if track number not found
     1110 */
     1111int DVDRingBufferPriv::GetSubTrackNum(uint stream_id)
     1112{
     1113    if (subTrackMap.empty())
     1114        return -1;
     1115    QMapConstIterator<uint, uint> it = subTrackMap.begin();
     1116    for (; it != subTrackMap.end(); ++it)
     1117    {
     1118        if (it.key() == stream_id)
     1119            return (int)it.data();
     1120    }
     1121    return 33;
     1122}
     1123
    10911124/** \brief get real dvd track audio number
    1092  *  \param key position in audioTrackMap.
    1093  *  \return -1 if track number not found
     1125 *  \param key stream_id of dvd track audioTrackMap.
     1126 *  \return 10 (max track is 7) if track number not found
    10941127 */
    1095 int DVDRingBufferPriv::GetAudioTrackNum(uint key)
     1128int DVDRingBufferPriv::GetAudioTrackNum(uint stream_id)
    10961129{
    10971130    if (audioTrackMap.empty())
    10981131        return -1;
    1099     uint count = 0;
    11001132    QMapConstIterator<uint, uint> it = audioTrackMap.begin();
    11011133    for (; it != audioTrackMap.end(); ++it)
    11021134    {
    1103         if (count == key)
    1104             break;
    1105         ++count;
     1135        if (it.key() == stream_id)
     1136            return (int)it.data();
    11061137    }
    1107     return (int)it.data();
     1138    return 10;
    11081139}
    11091140
    11101141/** \brief get the subtitle language from the dvd
    11111142 */
    11121143uint DVDRingBufferPriv::GetSubtitleLanguage(int id)
    11131144{
    1114     int8_t channel = dvdnav_get_spu_logical_stream(dvdnav,id);
    1115     uint16_t lang = 0;
    1116     if (channel != -1)
    1117         lang = dvdnav_spu_stream_to_lang(dvdnav,channel);
     1145    uint16_t lang = dvdnav_spu_stream_to_lang(dvdnav, id);
    11181146    return ConvertLangCode(lang);
    11191147}
    11201148
     
    11281156    QChar str2[2];
    11291157    str2[0] = QChar(code >> 8);
    11301158    str2[1] = QChar(code & 0xff);
    1131     QString str3 = iso639_str2_to_str3(QString(str2,2));
     1159    QString str3 = iso639_str2_to_str3(QString(str2, 2));
    11321160    if (str3)
    11331161        return iso639_str3_to_key(str3);
    11341162    return 0;
  • libs/libmythtv/DVDRingBuffer.h

     
    5757    uint ButtonWidth(void)  { return hl_width; }
    5858    uint ButtonHeight(void) { return hl_height; }
    5959    uint GetAudioLanguage(int id);
     60    int  GetSubTrackNum(uint key);
    6061    int  GetAudioTrackNum(uint key);
    6162    uint GetSubtitleLanguage(int key);
    6263    void SetMenuPktPts(long long pts) { menupktpts = pts; }
     
    7374    int GetCellID(void) { return cellid; }
    7475    int GetVobID(void)  { return vobid; }
    7576    bool IsSameChapter(int tmpcellid, int tmpvobid);
    76    
     77
    7778    // commands
    7879    bool OpenFile(const QString &filename);
    7980    void PlayTitleAndPart(int _title, int _part)
     
    109110    void SetParent(NuppelVideoPlayer *p) { parent = p; }
    110111
    111112
    112    
    113113  protected:
    114114    dvdnav_t      *dvdnav;
    115115    unsigned char  dvdBlockWriteBuf[DVD_BLOCK_SIZE];
     
    169169    uint           currentTime;
    170170    QMap<uint, uint> seekSpeedMap;
    171171    QMap<uint, uint> audioTrackMap;
     172    QMap<uint, uint> subTrackMap;
    172173
    173174    NuppelVideoPlayer *parent;
    174175
     
    184185    uint ConvertLangCode(uint16_t code);
    185186    void SelectDefaultButton(void);
    186187    void ClearSubtitlesOSD(void);
    187    
     188
    188189    int get_nibble(const uint8_t *buf, int nibble_offset);
    189190    int decode_rle(uint8_t *bitmap, int linesize, int w, int h,
    190191                    const uint8_t *buf, int nibble_offset, int buf_size);
  • libs/libmythdvdnav/ifo_types.h

     
    394394} ATTRIBUTE_PACKED user_ops_t;
    395395
    396396/**
     397 * Subpicture stream mapping for a subtitle
     398 * (obtained from the mplayer project)
     399 */
     400typedef struct {
     401#ifdef WORDS_BIGENDIAN
     402  unsigned int present   : 1;
     403  unsigned int zero1     : 2;
     404  unsigned int s_4p3     : 5; /* stream for 4:3 on any display */
     405
     406  unsigned int zero2     : 3;
     407  unsigned int s_wide    : 5; /* stream for 16:9 on widescreen display */
     408
     409  unsigned int zero3     : 3;
     410  unsigned int s_lbox    : 5; /* stream for 16:9 on letterboxed 4:3 display */
     411
     412  unsigned int zero4     : 3;
     413  unsigned int s_panscan : 5; /* stream for 16:9 with pan&scan data on 4:3 display */
     414#else
     415  unsigned int s_4p3     : 5; /* stream for 4:3 on any display */
     416  unsigned int zero1     : 2;
     417  unsigned int present   : 1;
     418
     419  unsigned int s_wide    : 5; /* stream for 16:9 on widescreen display */
     420  unsigned int zero2     : 3;
     421
     422  unsigned int s_lbox    : 5; /* stream for 16:9 on letterboxed 4:3 display */
     423  unsigned int zero3     : 3;
     424
     425  unsigned int s_panscan : 5; /* stream for 16:9 with pan&scan data on 4:3 display */
     426  unsigned int zero4     : 3;
     427#endif
     428} ATTRIBUTE_PACKED subp_mapping_t;
     429
     430/**
     431 * Audio stream mapping for a soundtrack (obtained from mplayer project)
     432 */
     433typedef struct {
     434#ifdef WORDS_BIGENDIAN
     435  unsigned int present : 1;
     436  unsigned int zero1   : 4;
     437  unsigned int s_audio : 3;
     438#else
     439  unsigned int s_audio : 3;
     440  unsigned int zero1   : 4;
     441  unsigned int present : 1;
     442#endif
     443  uint8_t zero2;
     444} ATTRIBUTE_PACKED audio_mapping_t;
     445
     446/**
    397447 * Program Chain Information.
    398448 */
    399449typedef struct {
     
    402452  uint8_t  nr_of_cells;
    403453  dvd_time_t playback_time;
    404454  user_ops_t prohibited_ops;
    405   uint16_t audio_control[8]; /* New type? */
    406   uint32_t subp_control[32]; /* New type? */
     455  audio_mapping_t audio_control[8];
     456  subp_mapping_t subp_control[32];
    407457  uint16_t next_pgc_nr;
    408458  uint16_t prev_pgc_nr;
    409459  uint16_t goup_pgc_nr;
  • libs/libmythdvdnav/ifo_read.c

     
    638638  B2N_16(pgc->cell_playback_offset);
    639639  B2N_16(pgc->cell_position_offset);
    640640
    641   for(i = 0; i < 8; i++)
    642     B2N_16(pgc->audio_control[i]);
    643   for(i = 0; i < 32; i++)
    644     B2N_32(pgc->subp_control[i]);
    645641  for(i = 0; i < 16; i++)
    646642    B2N_32(pgc->palette[i]);
    647  
     643
    648644  CHECK_ZERO(pgc->zero_1);
    649645  CHECK_VALUE(pgc->nr_of_programs <= pgc->nr_of_cells);
    650646
    651647  /* verify time (look at print_time) */
    652648  for(i = 0; i < 8; i++)
    653     if(!pgc->audio_control[i] & 0x8000) /* The 'is present' bit */
     649    if(!pgc->audio_control[i].present)
    654650      CHECK_ZERO(pgc->audio_control[i]);
    655651  for(i = 0; i < 32; i++)
    656     if(!pgc->subp_control[i] & 0x80000000) /* The 'is present' bit */
     652    if(!pgc->subp_control[i].present)
    657653      CHECK_ZERO(pgc->subp_control[i]);
    658654 
    659655  /* Check that time is 0:0:0:0 also if nr_of_programs == 0 */
  • libs/libmythdvdnav/dvdnav.c

     
    951951}
    952952
    953953/*
     954 * \brief get total dvd subtitle stream count
     955 */
     956int dvdnav_subp_get_stream_count(dvdnav_t *this) {
     957  int count = 0;
     958  if (!this) {
     959    printerr("Passed a NULL pointer.");
     960    return 0;
     961  }
     962  if(!this->started) {
     963    printerr("Virtual DVD machine not started.");
     964    return 0;
     965  }
     966
     967  pthread_mutex_lock(&this->vm_lock);
     968  count = vm_get_subp_stream_count(this->vm);
     969  pthread_mutex_unlock(&this->vm_lock);
     970
     971  return count;
     972}
     973
     974/*
    954975 * \brief get total dvd audio stream count
    955976 */
    956977int dvdnav_audio_get_stream_count(dvdnav_t *this) {
  • libs/libmythdvdnav/vm.c

     
    699699    audioN = 0;
    700700 
    701701  if(audioN < 8) {
    702     /* Is there any control info for this logical stream */
    703     if((vm->state).pgc->audio_control[audioN] & (1<<15)) {
    704       streamN = ((vm->state).pgc->audio_control[audioN] >> 8) & 0x07; 
    705     }
     702    /* Is there any control info for this logical stream */
     703    if ((vm->state).pgc->audio_control[audioN].present)
     704      streamN = (vm->state).pgc->audio_control[audioN].s_audio;
    706705  }
    707706 
    708707  if((vm->state).domain != VTS_DOMAIN && streamN == -1)
    709708    streamN = 0;
    710   
     709 
    711710  /* FIXME: Should also check in vtsi/vmgi status what kind of stream
    712711   * it is (ac3/lpcm/dts/sdds...) to find the right (sub)stream id */
    713712  return streamN;
     
    728727 
    729728  if(subpN < 32) { /* a valid logical stream */
    730729    /* Is this logical stream present */
    731     if((vm->state).pgc->subp_control[subpN] & (1<<31)) {
     730    if((vm->state).pgc->subp_control[subpN].present) {
    732731      if(source_aspect == 0) /* 4:3 */       
    733         streamN = ((vm->state).pgc->subp_control[subpN] >> 24) & 0x1f
    734       if(source_aspect == 3) /* 16:9 */
     732            streamN = (vm->state).pgc->subp_control[subpN].s_4p3
     733      if(source_aspect == 3) { /* 16:9 */
    735734        switch (mode) {
    736         case 0:
    737           streamN = ((vm->state).pgc->subp_control[subpN] >> 16) & 0x1f;
    738           break;
    739         case 1:
    740           streamN = ((vm->state).pgc->subp_control[subpN] >> 8) & 0x1f;
    741           break;
    742         case 2:
    743           streamN = (vm->state).pgc->subp_control[subpN] & 0x1f;
    744         }
     735              case 0:
     736                streamN = (vm->state).pgc->subp_control[subpN].s_wide;
     737                break;
     738              case 1:
     739                streamN = (vm->state).pgc->subp_control[subpN].s_lbox;
     740                break;
     741              case 2:
     742                streamN = (vm->state).pgc->subp_control[subpN].s_panscan;
     743                break;
     744        }
     745      }
    745746    }
    746   }
    747  
     747  } 
    748748  if((vm->state).domain != VTS_DOMAIN && streamN == -1)
    749749    streamN = 0;
    750750
     
    761761  /* If no such stream, then select the first one that exists. */
    762762  if(streamN == -1) {
    763763    for(audioN = 0; audioN < 8; audioN++) {
    764       if((vm->state).pgc->audio_control[audioN] & (1<<15)) {
     764      if((vm->state).pgc->audio_control[audioN].present) {
    765765        if ((streamN = vm_get_audio_stream(vm, audioN)) >= 0)
    766766          break;
    767767      }
     
    780780  /* If no such stream, then select the first one that exists. */
    781781  if(streamN == -1) {
    782782    for(subpN = 0; subpN < 32; subpN++) {
    783       if((vm->state).pgc->subp_control[subpN] & (1<<31)) {
     783      if((vm->state).pgc->subp_control[subpN].present) {
    784784        if ((streamN = vm_get_subp_stream(vm, subpN, mode)) >= 0)
    785785          break;
    786786      }
     
    829829  return count;
    830830}
    831831
    832 #if 0
    833 /* currently unused */
    834 void vm_get_subp_info(vm_t *vm, int *current, int *num_avail) {
     832int vm_get_subp_stream_count(vm_t *vm) {
     833  int count = 0;
    835834  switch ((vm->state).domain) {
    836835  case VTS_DOMAIN:
    837     *num_avail = vm->vtsi->vtsi_mat->nr_of_vts_subp_streams;
    838     *current = (vm->state).SPST_REG;
     836    count = vm->vtsi->vtsi_mat->nr_of_vts_subp_streams;
    839837    break;
    840838  case VTSM_DOMAIN:
    841     *num_avail = vm->vtsi->vtsi_mat->nr_of_vtsm_subp_streams; /*  1 */
    842     *current = 0x41;
     839    count = vm->vtsi->vtsi_mat->nr_of_vtsm_subp_streams; /*  1 */
    843840    break;
    844841  case VMGM_DOMAIN:
    845842  case FP_DOMAIN:
    846     *num_avail = vm->vmgi->vmgi_mat->nr_of_vmgm_subp_streams; /*  1 */
    847     *current = 0x41;
     843    count = vm->vmgi->vmgi_mat->nr_of_vmgm_subp_streams; /*  1 */
    848844    break;
    849845  }
     846  return count;
    850847}
    851848
    852849/* currently unused */
     
    873870    break;
    874871  }
    875872}
    876 #endif
    877873
    878874int vm_get_video_aspect(vm_t *vm) {
    879875  int aspect = vm_get_video_attr(vm).display_aspect_ratio;
  • libs/libmythdvdnav/dvdnav.h

     
    576576unsigned char dvdnav_audio_get_format(dvdnav_t *self, uint8_t stream);
    577577
    578578int dvdnav_audio_get_stream_count(dvdnav_t *self);
     579
     580int dvdnav_subp_get_stream_count(dvdnav_t *self);
    579581/*
    580582 * Converts a *logical* subpicture stream id into country code
    581583 * (returns 0xffff if no such stream).
  • libs/libmythdvdnav/vm.h

     
    163163int vm_get_subp_active_stream(vm_t *vm, int mode);
    164164void vm_get_angle_info(vm_t *vm, int *current, int *num_avail);
    165165int vm_get_audio_stream_count(vm_t *vm);
     166int vm_get_subp_stream_count(vm_t *vm);
    166167#if 0
    167168/* currently unused */
    168169void vm_get_subp_info(vm_t *vm, int *current, int *num_avail);