Ticket #1043: mythdvd_v5.patch
File mythdvd_v5.patch, 24.9 KB (added by , 20 years ago) |
---|
-
libs/libmythtv/NuppelVideoPlayer.h
319 319 void ActivateDVDButton(void); 320 320 void GoToDVDMenu(QString str); 321 321 void GoToDVDProgram(bool direction); 322 void HideDVDButton(bool hide) { hidedvdbutton = hide; } 322 323 323 324 protected: 324 325 void DisplayPauseFrame(void); … … 666 667 667 668 // DVD 668 669 bool indvdstillframe; 670 bool hidedvdbutton; 669 671 670 672 // Debugging variables 671 673 Jitterometer *output_jmeter; -
libs/libmythtv/NuppelVideoPlayer.cpp
175 175 // LiveTVChain stuff 176 176 livetvchain(NULL), m_tv(NULL), 177 177 // DVD stuff 178 indvdstillframe(false), 178 indvdstillframe(false), hidedvdbutton(true), 179 179 // Debugging variables 180 180 output_jmeter(NULL) 181 181 { … … 509 509 510 510 ClearAfterSeek(); 511 511 512 if (ringBuffer-> InDVDMenuOrStillFrame())512 if (ringBuffer->isDVD()) 513 513 ringBuffer->Seek(ringBuffer->DVD()->GetCellStartPos(), SEEK_SET); 514 514 } 515 515 … … 1954 1954 video_actually_paused = false; 1955 1955 resetvideo = false; 1956 1956 1957 if (!ringBuffer-> isDVD())1957 if (!ringBuffer->InDVDMenuOrStillFrame()) 1958 1958 { 1959 1959 if (!PrebufferEnoughFrames()) 1960 1960 return; … … 2104 2104 if (ringBuffer->DVD()->IsWaiting()) 2105 2105 { 2106 2106 ringBuffer->DVD()->WaitSkip(); 2107 usleep(100000);2108 2107 continue; 2109 2108 } 2109 2110 2110 if (ringBuffer->InDVDMenuOrStillFrame()) 2111 2111 { 2112 2112 if (nbframes == 0) 2113 2113 { 2114 // wait to confirm there is no other frames been decoded. 2115 usleep(100000); 2116 nbframes = videoOutput->ValidVideoFrames(); 2117 if (nbframes == 0) 2118 { 2119 ringBuffer->Seek(ringBuffer->DVD()->GetCellStartPos(),SEEK_SET); 2120 continue; 2121 } 2114 if (pausevideo) 2115 UnpauseVideo(); 2116 continue; 2122 2117 } 2123 indvdstillframe = true;2124 2118 if (!pausevideo && nbframes == 1) 2119 { 2120 indvdstillframe = true; 2125 2121 PauseVideo(false); 2122 } 2126 2123 } 2127 2124 } 2128 2125 2129 // restart playing after skipping still frame2130 2126 if (indvdstillframe && nbframes > 1) 2131 2127 { 2132 2128 UnpauseVideo(); 2133 2129 indvdstillframe = false; 2130 continue; 2134 2131 } 2135 2132 } 2136 2133 … … 2925 2922 2926 2923 int samples = len / samplesize; 2927 2924 2928 if (ringBuffer-> isDVD())2925 if (ringBuffer->InDVDMenuOrStillFrame()) 2929 2926 { 2930 2927 audioOutput->Pause(false); 2931 2928 audioOutput->Drain(); 2932 } 2929 } 2933 2930 2934 2931 // If there is no warping, just send it to the audioOutput. 2935 2932 if (!usevideotimebase) … … 5321 5318 if (!ringBuffer->InDVDMenuOrStillFrame()) 5322 5319 return; 5323 5320 5324 long long spupts = ringBuffer->DVD()->MenuSpuPts();5325 long long ptslow = spupts - 1000;5326 long long ptshigh = spupts + 1000;5327 5321 VideoFrame *buffer = videoOutput->GetLastShownFrame(); 5328 5329 if (!osd->IsSetDisplaying("subtitles") && 5330 (buffer->timecode > 0) && 5331 ((buffer->timecode < ptslow) || 5332 (buffer->timecode > ptshigh))) 5322 int numbuttons = ringBuffer->DVD()->NumMenuButtons(); 5323 bool osdshown = osd->IsSetDisplaying("subtitles"); 5324 long long menupktpts = ringBuffer->DVD()->GetMenuPktPts(); 5325 5326 if ((numbuttons == 0) || 5327 (osdshown) || 5328 ((!osdshown) && (hidedvdbutton) && 5329 (buffer->timecode > 0) && (menupktpts != buffer->timecode))) 5333 5330 { 5334 return; 5331 return; 5335 5332 } 5336 5333 5334 hidedvdbutton = false; 5337 5335 AVSubtitleRect *highlightButton; 5338 5336 OSDSet *subtitleOSD = NULL; 5339 5337 highlightButton = ringBuffer->DVD()->GetMenuButton(); … … 5383 5381 if (!ringBuffer->isDVD()) 5384 5382 return; 5385 5383 5386 if (videoOutput->ValidVideoFrames() > 20)5387 DiscardVideoFrames(true);5388 5384 ringBuffer->DVD()->ActivateButton(); 5389 ringBuffer->DVD()->HideMenuButton(true);5390 5385 } 5391 5386 5392 5387 void NuppelVideoPlayer::GoToDVDMenu(QString str) … … 5394 5389 if (!ringBuffer->isDVD()) 5395 5390 return; 5396 5391 5397 if (videoOutput->ValidVideoFrames() > 20) 5398 DiscardVideoFrames(true); 5392 subtitlesOn = false; 5399 5393 ringBuffer->DVD()->GoToMenu(str); 5400 5394 } 5401 5395 … … 5406 5400 { 5407 5401 if (!ringBuffer->isDVD()) 5408 5402 return; 5409 5410 if (videoOutput->ValidVideoFrames() > 20) 5411 DiscardVideoFrames(true); 5403 5412 5404 if (direction == 0) 5413 5405 ringBuffer->DVD()->GoToPreviousProgram(); 5414 5406 else -
libs/libmythtv/DVDRingBuffer.h
45 45 bool InStillFrame(void) { return cellHasStillFrame; } 46 46 bool IsWaiting(void) { return dvdWaiting; } 47 47 int NumPartsInTitle(void) { return titleParts; } 48 void GetMenuSPUPkt(uint8_t *buf, int buf_size,long long pts);48 void GetMenuSPUPkt(uint8_t *buf, int len, int stream_id); 49 49 AVSubtitleRect *GetMenuButton(void); 50 50 bool IgnoringStillorWait(void) { return skipstillorwait; } 51 long long GetCellStartPos(void) { return cellstartPos; } 52 void HideMenuButton(bool hide); 51 long long GetCellStartPos(void); 53 52 uint ButtonPosX(void) { return hl_startx; } 54 53 uint ButtonPosY(void) { return hl_starty; } 55 54 uint GetAudioLanguage(int id); 56 55 uint GetSubtitleLanguage(int id); 57 long long MenuSpuPts(void) { return menuspupts; } 58 56 void SetMenuPktPts(long long pts) { menupktpts = pts; } 57 long long GetMenuPktPts(void) { return menupktpts; } 58 59 59 // commands 60 60 bool OpenFile(const QString &filename); 61 61 void close(void); … … 76 76 int NumMenuButtons(void); 77 77 void IgnoreStillOrWait(bool skip) { skipstillorwait = skip; } 78 78 uint GetCurrentTime(void); 79 int SelectedAudioTrack(void); 80 uint8_t GetNumAudioChannels(int id); 79 81 80 82 void SetParent(NuppelVideoPlayer *p) { parent = p; } 81 83 … … 111 113 int menuBuflength; 112 114 uint8_t *buttonBitmap; 113 115 AVSubtitleRect *dvdMenuButton; 114 int buttonCoords;115 116 bool skipstillorwait; 116 117 bool spuStreamLetterbox; 117 118 long long cellstartPos; 118 119 bool buttonSelected; 119 120 bool buttonExists; 120 long long menuspupts; 121 121 int cellid; 122 int lastcellid; 123 int vobid; 124 int lastvobid; 125 bool cellRepeated; 126 int buttonstreamid; 127 bool gotoCellStart; 128 long long menupktpts; 129 122 130 NuppelVideoPlayer *parent; 123 131 124 132 bool DrawMenuButton(uint8_t *spu_pkt, int buf_size); … … 126 134 void ClearMenuSPUParameters(void); 127 135 bool MenuButtonChanged(void); 128 136 uint ConvertLangCode(uint16_t code); // converts 2char key to 3char key 137 void SelectDefaultButton(void); 138 void ClearSubtitlesOSD(void); 129 139 130 140 /* copied from dvdsub.c from ffmpeg */ 131 141 int get_nibble(const uint8_t *buf, int nibble_offset); -
libs/libmythtv/avformatdecoder.cpp
278 278 // language preference 279 279 languagePreference(iso639_get_language_key_list()), 280 280 // DVD 281 lastdvdtitle(0) 281 lastdvdtitle(0), dvdmenupktseen(false) 282 282 { 283 283 bzero(¶ms, sizeof(AVFormatParameters)); 284 284 bzero(prvpkt, 3 * sizeof(char)); … … 431 431 void AvFormatDecoder::SeekReset(long long newKey, uint skipFrames, 432 432 bool doflush, bool discardFrames) 433 433 { 434 if (ringBuffer->isDVD()) 435 { 436 int totaltime = ringBuffer->DVD()->GetTotalTimeOfTitle(); 437 if (totaltime < 30 || ringBuffer->InDVDMenuOrStillFrame()) 438 return; 439 } 440 434 if (ringBuffer->InDVDMenuOrStillFrame()) 435 return; 436 441 437 VERBOSE(VB_PLAYBACK, LOC + 442 438 QString("SeekReset(%1, %2, %3 flush, %4 discard)") 443 439 .arg(newKey).arg(skipFrames) … … 1194 1190 lang_indx = lang_sub_cnt[lang]; 1195 1191 lang_sub_cnt[lang]++; 1196 1192 } 1197 subtitleStreams.push_back(StreamInfo(i, lang, lang_indx ));1193 subtitleStreams.push_back(StreamInfo(i, lang, lang_indx,ic->streams[i]->id)); 1198 1194 1199 1195 VERBOSE(VB_PLAYBACK, LOC + QString( 1200 1196 "Subtitle track #%1 is A/V stream #%2 " … … 1213 1209 lang_indx = lang_aud_cnt[lang]; 1214 1210 lang_aud_cnt[lang]++; 1215 1211 } 1216 audioStreams.push_back(StreamInfo(i, lang, lang_indx)); 1217 1212 audioStreams.push_back(StreamInfo(i, lang, lang_indx,ic->streams[i]->id)); 1218 1213 VERBOSE(VB_AUDIO, LOC + QString( 1219 1214 "Audio Track #%1 is A/V stream #%2 " 1220 1215 "and has %3 channels in the %4 language(%5).") … … 1235 1230 currentAudioTrack = -1; 1236 1231 currentSubtitleTrack = -1; 1237 1232 1233 if (ringBuffer->isDVD()) 1234 { 1235 if (audioStreams.size() > 1) 1236 { 1237 qBubbleSort(audioStreams); 1238 setCurrentAudioTrack(ringBuffer->DVD()->SelectedAudioTrack()); 1239 } 1240 if (subtitleStreams.size() > 1) 1241 qBubbleSort(subtitleStreams); 1242 } 1243 1238 1244 // We have to do this here to avoid the NVP getting stuck 1239 1245 // waiting on audio. 1240 1246 if (GetNVP()->HasAudioIn() && audioStreams.empty()) … … 1914 1920 else 1915 1921 msg += QString(" %1").arg(s->codec->codec->name).upper(); 1916 1922 1917 if (!s->codec->channels) 1918 msg += QString(" ?ch"); 1919 else if ((s->codec->channels > 4) && !(s->codec->channels & 1)) 1920 msg += QString(" %1.1ch").arg(s->codec->channels - 1); 1923 int channels = 0; 1924 if (ringBuffer->isDVD()) 1925 channels = ringBuffer->DVD()->GetNumAudioChannels(i); 1926 else if (s->codec->channels) 1927 channels = s->codec->channels; 1928 1929 if (channels == 0) 1930 msg+= QString(" ?ch"); 1931 else if((channels > 4) && !(channels & 1)) 1932 msg += QString(" %1.1ch").arg(channels - 1); 1921 1933 else 1922 msg += QString(" %1ch").arg( s->codec->channels);1923 } 1934 msg += QString(" %1ch").arg(channels); 1935 } 1924 1936 list += QString("%1: %2").arg(i+1).arg(msg); 1925 1937 } 1926 1938 … … 2301 2313 VERBOSE(VB_PLAYBACK, 2302 2314 QString(LOC + "DVD Title Changed. Update framesPlayed: %1 ") 2303 2315 .arg(framesPlayed)); 2316 setCurrentAudioTrack(ringBuffer->DVD()->SelectedAudioTrack()); 2304 2317 } 2305 2318 lastdvdtitle = dvdtitle; 2306 2319 … … 2313 2326 if (gotvideo) 2314 2327 { 2315 2328 if (lowbuffers && onlyvideo == 0 && lastapts < lastvpts + 100 && 2316 lastapts > lastvpts - 10000 && !ringBuffer-> isDVD())2329 lastapts > lastvpts - 10000 && !ringBuffer->InDVDMenuOrStillFrame()) 2317 2330 { 2318 2331 //cout << "behind: " << lastapts << " " << lastvpts << endl; 2319 2332 storevideoframes = true; … … 2325 2338 } 2326 2339 } 2327 2340 2328 if (ringBuffer->isDVD() && ringBuffer->DVD()->InStillFrame() &&2329 storedPackets.count() > 0)2341 if (ringBuffer->isDVD() && 2342 ringBuffer->DVD()->InStillFrame()) 2330 2343 { 2331 2344 storevideoframes = false; 2332 2345 dvdvideopause = true; … … 2720 2733 gotvideo = 1; 2721 2734 framesPlayed++; 2722 2735 2736 if (dvdmenupktseen) 2737 { 2738 ringBuffer->DVD()->SetMenuPktPts(pts); 2739 dvdmenupktseen = false; 2740 } 2741 2723 2742 lastvpts = temppts; 2724 2743 break; 2725 2744 } … … 2729 2748 AVSubtitle subtitle; 2730 2749 2731 2750 if (ringBuffer->isDVD() && ringBuffer->DVD()->IsInMenu()) 2732 ringBuffer->DVD()->GetMenuSPUPkt(ptr,len,pts); 2751 { 2752 dvdmenupktseen = true; 2753 ringBuffer->DVD()->GetMenuSPUPkt(ptr,len,curstream->id); 2754 } 2733 2755 else if (pkt->stream_index == subIdx) 2734 2756 { 2735 2757 QMutexLocker locker(&avcodeclock); -
libs/libmythtv/tv_play.cpp
2311 2311 if (prbuffer->isDVD()) 2312 2312 { 2313 2313 if (prbuffer->InDVDMenuOrStillFrame()) 2314 UpdateOSDSeekMessage(tr("Skip pingBack Not Allowed"),2314 UpdateOSDSeekMessage(tr("Skip Back Not Allowed"), 2315 2315 osd_general_timeout); 2316 2316 else if (prbuffer->DVD()->NumPartsInTitle() < 2) 2317 2317 { -
libs/libmythtv/DVDRingBuffer.cpp
30 30 title(0), gotStop(false), 31 31 cellHasStillFrame(false), dvdWaiting(false), 32 32 titleLength(0), spuchanged(false), 33 menuBuflength(0), buttonCoords(0),34 s kipstillorwait(true), spuStreamLetterbox(false),33 menuBuflength(0), skipstillorwait(true), 34 spuStreamLetterbox(false), 35 35 cellstartPos(0), buttonSelected(false), 36 buttonExists(false), menuspupts(0), 37 parent(0) 36 buttonExists(false), cellid(0), 37 lastcellid(0), vobid(0), 38 lastvobid(0), cellRepeated(false), 39 buttonstreamid(0), gotoCellStart(false), 40 menupktpts(0), parent(0) 38 41 { 39 42 dvdMenuButton = (AVSubtitleRect*)av_mallocz(sizeof(AVSubtitleRect)); 40 43 } … … 119 122 { 120 123 dvdnav_get_number_of_parts(dvdnav, curTitle, &titleParts); 121 124 VERBOSE(VB_IMPORTANT, 122 QString("T here are title %1 has %2 parts.")125 QString("Title %1 has %2 parts.") 123 126 .arg(curTitle).arg(titleParts)); 124 127 } 125 128 } … … 222 225 dvdnav_get_position(dvdnav, &pos, &length); 223 226 titleLength = length *DVD_BLOCK_SIZE; 224 227 cellstartPos = GetReadPosition(); 225 buttonSelected = false; 226 227 if (parent && parent->GetOSD()) 228 buttonSelected = false; 229 if (gotoCellStart) 228 230 { 229 parent->GetOSD()->HideSet("subtitles");230 parent->GetOSD()->ClearAll("subtitles");231 lastvobid = lastcellid = 0; 232 gotoCellStart = false; 231 233 } 234 else 235 { 236 lastvobid = vobid; 237 lastcellid = cellid; 238 } 239 vobid = 0; 240 cellid = 0; 241 cellRepeated = false; 242 menupktpts = 0; 243 244 if (parent) 245 parent->HideDVDButton(true); 232 246 233 247 if (blockBuf != dvdBlockWriteBuf) 234 248 { … … 259 273 spuStreamLetterbox = false; 260 274 spuchanged = true; 261 275 ClearMenuSPUParameters(); 262 276 ClearSubtitlesOSD(); 277 263 278 if (blockBuf != dvdBlockWriteBuf) 264 279 { 265 280 dvdnav_free_cache_block(dvdnav, blockBuf); … … 284 299 case DVDNAV_NAV_PACKET: 285 300 { 286 301 lastNav = (dvdnav_t *)blockBuf; 287 if (IsInMenu() && NumMenuButtons() > 0 && 288 !buttonSelected) 302 if (vobid == 0 && cellid == 0) 289 303 { 290 pci_t *pci = dvdnav_get_current_nav_pci(dvdnav); 291 292 uint8_t button = pci->hli.hl_gi.fosl_btnn; 293 if (button > 0) 294 dvdnav_button_select(dvdnav,pci,button); 295 else 296 dvdnav_button_select(dvdnav,pci,1); 297 298 buttonSelected = true; 299 spuchanged = false; 304 dsi_t *dsi = dvdnav_get_current_nav_dsi(dvdnav); 305 vobid = dsi->dsi_gi.vobu_vob_idn; 306 cellid = dsi->dsi_gi.vobu_c_idn; 307 if ((lastvobid == vobid) && (lastcellid == cellid) 308 && IsInMenu()) 309 { 310 cellRepeated = true; 311 } 300 312 } 301 313 if (blockBuf != dvdBlockWriteBuf) 302 314 { … … 348 360 349 361 if (DVDButtonUpdate(false)) 350 362 buttonExists = DrawMenuButton(menuSpuPkt,menuBuflength); 351 363 ClearSubtitlesOSD(); 352 364 if (blockBuf != dvdBlockWriteBuf) 353 365 { 354 366 dvdnav_free_cache_block(dvdnav, blockBuf); … … 521 533 } 522 534 } 523 535 524 void DVDRingBufferPriv::GetMenuSPUPkt(uint8_t *buf, int buf_size, long long pts)525 { 536 void DVDRingBufferPriv::GetMenuSPUPkt(uint8_t *buf, int buf_size, int stream_id) 537 { 526 538 if (buf_size < 4) 527 539 return; 528 540 529 menuspupts = pts; 530 if (buf_size == menuBuflength) 541 542 if ((buttonstreamid < stream_id) && 543 (buttonstreamid > 0)) 531 544 return; 532 else if (spuStreamLetterbox) 533 { 534 if ((buf_size < menuBuflength) && menuBuflength > 0) 535 return; 536 } 537 else 538 { 539 if ((buf_size > menuBuflength) && (menuBuflength > 0)) 540 return; 541 } 545 546 buttonstreamid = stream_id; 542 547 ClearMenuSPUParameters(); 543 548 uint8_t *spu_pkt; 544 549 spu_pkt = (uint8_t*)av_malloc(buf_size); 545 550 memcpy(spu_pkt, buf, buf_size); 546 551 menuSpuPkt = spu_pkt; 547 552 menuBuflength = buf_size; 548 buttonCoords = 0; 553 if (!buttonSelected) 554 { 555 SelectDefaultButton(); 556 buttonSelected = true; 557 spuchanged = false; 558 } 549 559 if (DVDButtonUpdate(false)) 550 560 buttonExists = DrawMenuButton(menuSpuPkt,menuBuflength); 561 551 562 } 552 563 553 564 AVSubtitleRect *DVDRingBufferPriv::GetMenuButton(void) 554 565 { 555 if ( MenuButtonChanged() && buttonExists)566 if ((menuBuflength > 4) && buttonExists) 556 567 return dvdMenuButton; 557 568 558 569 return NULL; … … 684 695 685 696 bool DVDRingBufferPriv::DVDButtonUpdate(bool b_mode) 686 697 { 698 if (!parent) 699 return false; 700 int videoheight = parent->GetVideoHeight(); 701 int videowidth = parent->GetVideoWidth(); 687 702 int32_t button; 688 703 pci_t *pci; 689 704 dvdnav_highlight_area_t hl; … … 702 717 hl_starty = hl.sy; 703 718 hl_height = hl.ey - hl.sy; 704 719 705 i nt total_start_pos = hl.sx + hl.sy;706 if ( total_start_pos == 0 || total_start_pos > (720 + 576))707 return false;720 if (((hl.sx + hl.sy) > 0) && 721 (hl.sx < videowidth && hl.sy < videoheight)) 722 return true; 708 723 709 return true;724 return false; 710 725 } 711 726 712 727 void DVDRingBufferPriv::ClearMenuSPUParameters(void) … … 727 742 dvdMenuButton->y = 0; 728 743 hl_startx = hl_starty = 0; 729 744 hl_width = hl_height = 0; 730 buttonCoords = (720+480+100);731 745 } 732 746 733 bool DVDRingBufferPriv::MenuButtonChanged(void)734 {735 if (menuBuflength < 4 || buttonCoords > (720+576))736 return false;737 738 int x = hl_startx;739 int y = hl_starty;740 if (buttonCoords != (x+y))741 {742 buttonCoords = (x+y);743 return true;744 }745 return false;746 }747 748 747 int DVDRingBufferPriv::NumMenuButtons(void) 749 748 { 750 749 pci_t *pci = dvdnav_get_current_nav_pci(dvdnav); … … 755 754 return 0; 756 755 } 757 756 758 void DVDRingBufferPriv::HideMenuButton(bool hide)759 {760 if (hide)761 buttonCoords = (720+480+100);762 else763 buttonCoords = 0;764 }765 766 757 uint DVDRingBufferPriv::GetCurrentTime(void) 767 758 { 768 759 // Macro to convert Binary Coded Decimal to Decimal … … 778 769 return currentTime; 779 770 } 780 771 772 long long DVDRingBufferPriv::GetCellStartPos(void) 773 { 774 gotoCellStart = true; 775 return cellstartPos; 776 } 777 781 778 uint DVDRingBufferPriv::GetAudioLanguage(int id) 782 779 { 783 780 int8_t channel = dvdnav_get_audio_logical_stream(dvdnav,id); … … 810 807 return 0; 811 808 } 812 809 810 void DVDRingBufferPriv::SelectDefaultButton(void) 811 { 812 pci_t *pci = dvdnav_get_current_nav_pci(dvdnav); 813 int button = pci->hli.hl_gi.fosl_btnn; 814 if (button > 0 && !cellRepeated) 815 { 816 dvdnav_button_select(dvdnav,pci,button); 817 return; 818 } 819 dvdnav_get_current_highlight(dvdnav,&button); 820 if (button > 0 && button <= NumMenuButtons()) 821 dvdnav_button_select(dvdnav,pci,button); 822 else 823 dvdnav_button_select(dvdnav,pci,1); 824 } 825 826 int DVDRingBufferPriv::SelectedAudioTrack(void) 827 { 828 return dvdnav_get_active_audio_stream(dvdnav); 829 } 830 831 uint8_t DVDRingBufferPriv::GetNumAudioChannels(int id) 832 { 833 unsigned char channels = dvdnav_audio_get_channels(dvdnav,id); 834 if (channels == 0xff) 835 return 0; 836 return (uint8_t)channels + 1; 837 } 838 839 void DVDRingBufferPriv::ClearSubtitlesOSD(void) 840 { 841 if (parent && parent->GetOSD()) 842 { 843 parent->GetOSD()->HideSet("subtitles"); 844 parent->GetOSD()->ClearAll("subtitles"); 845 } 846 } 847 813 848 void DVDRingBufferPriv::guess_palette(uint32_t *rgba_palette,uint8_t *palette, 814 849 uint8_t *alpha) 815 850 { -
libs/libmythtv/avformatdecoder.h
27 27 { 28 28 public: 29 29 StreamInfo() : av_stream_index(-1), language(-2), language_index(0) {} 30 StreamInfo(int a, int b, uint c )31 : av_stream_index(a), language(b), language_index(c) {}30 StreamInfo(int a, int b, uint c, int d) 31 : av_stream_index(a), language(b), language_index(c), stream_id(d) {} 32 32 public: 33 33 int av_stream_index; 34 34 int language; ///< ISO639 canonical language key 35 35 uint language_index; 36 int stream_id; 37 bool operator<(const StreamInfo& b) { return (this->stream_id < b.stream_id) ; } 36 38 }; 37 39 typedef vector<StreamInfo> sinfo_vec_t; 38 40 … … 266 268 267 269 // DVD 268 270 int lastdvdtitle; 271 bool dvdmenupktseen; 269 272 }; 270 273 271 274 #endif -
libs/libavcodec/mpeg12.c
3033 3033 } 3034 3034 } 3035 3035 3036 /* look for SEQ_END_CODE at the last data in this buffer*/ 3037 /* dvd's won't send the next frame start on still images*/ 3038 /* state should hold the last startcode if one was found above*/ 3039 /* i will point to the position after that startcode */ 3040 if(!pc->frame_start_found){ 3041 if(state == SEQ_END_CODE){ 3042 pc->state=-1; 3043 return i; 3044 } 3045 } 3046 3036 3047 if(pc->frame_start_found){ 3037 3048 /* EOF considered as end of frame */ 3038 3049 if (buf_size == 0) -
libs/libmythdvdnav/dvdnav.c
877 877 return attr.lang_code; 878 878 } 879 879 880 unsigned char dvdnav_audio_get_channels(dvdnav_t *this, uint8_t stream){ 881 audio_attr_t attr; 882 883 if(!this) { 884 printerr("Passed a NULL pointer."); 885 return 0xff; 886 } 887 if(!this->started) { 888 printerr("Virtual DVD machine not started."); 889 return 0xff; 890 } 891 892 pthread_mutex_lock(&this->vm_lock); 893 attr = vm_get_audio_attr(this->vm, stream); 894 pthread_mutex_unlock(&this->vm_lock); 895 896 return attr.channels; 897 898 } 899 880 900 uint16_t dvdnav_spu_stream_to_lang(dvdnav_t *this, uint8_t stream) { 881 901 subp_attr_t attr; 882 902 -
libs/libmythdvdnav/dvdnav.h
550 550 uint16_t dvdnav_audio_stream_to_lang(dvdnav_t *self, uint8_t stream); 551 551 552 552 /* 553 * Get number of audio channels. 554 * (1 -> 2 channels , 5 -> 6 channels) 555 * (returns 0xff if no such stream). 556 */ 557 unsigned char dvdnav_audio_get_channels(dvdnav_t *self, uint8_t stream); 558 559 /* 553 560 * Converts a *logical* subpicture stream id into country code 554 561 * (returns 0xffff if no such stream). 555 562 */