Ticket #7638: dvd-audio-stream-ordering-v3.patch

File dvd-audio-stream-ordering-v3.patch, 2.1 KB (added by skamithi, 14 years ago)

use logical stream id in streaminfo for audio tracks. not sure if this will break anything. then my proposal is to go into dvdnav and fix its physical -> logical conversion code.

  • libs/libmythtv/avformatdecoder.cpp

     
    19921992        {
    19931993            int lang = get_canonical_lang(ic->streams[i]->language);
    19941994            int lang_indx = lang_aud_cnt[lang];
     1995            int stream_id;
    19951996            lang_aud_cnt[lang]++;
    19961997
    19971998            if (ic->streams[i]->codec->avcodec_dual_language)
     
    20032004            }
    20042005            else
    20052006            {
     2007                if (ringBuffer && ringBuffer->isDVD())
     2008                    stream_id = ringBuffer->DVD()->GetAudioTrackNum(ic->streams[i]->id);
     2009                else
     2010                    stream_id = ic->streams[i]->id;
     2011
     2012
    20062013                tracks[kTrackTypeAudio].push_back(
    2007                     StreamInfo(i, lang, lang_indx, ic->streams[i]->id));
     2014                    StreamInfo(i, lang, lang_indx, stream_id));
    20082015            }
    20092016
    20102017            VERBOSE(VB_AUDIO, LOC + QString(
  • libs/libmythtv/DVDRingBuffer.cpp

     
    11011101    return ConvertLangCode(lang);
    11021102}
    11031103
     1104/** \brief get real dvd track audio number
     1105  * \param key stream_id
     1106*/
     1107int DVDRingBufferPriv::GetAudioTrackNum(uint stream_id)
     1108{
     1109    return dvdnav_get_audio_logical_stream(m_dvdnav, stream_id);
     1110}
     1111
    11041112/** \brief get the subtitle language from the dvd
    11051113 */
    11061114uint DVDRingBufferPriv::GetSubtitleLanguage(int id)
  • libs/libmythtv/DVDRingBuffer.h

     
    5858
    5959    bool IgnoringStillorWait(void) { return m_skipstillorwait; }
    6060    uint GetAudioLanguage(int id);
     61    int  GetAudioTrackNum(uint key);
    6162    uint GetSubtitleLanguage(int key);
    6263    void SetMenuPktPts(long long pts) { m_menupktpts = pts; }
    6364    long long GetMenuPktPts(void) { return m_menupktpts; }