* GetFifoForId *********************************************************************** * **********************************************************************/
| 667 | * |
| 668 | **********************************************************************/ |
| 669 | static hb_fifo_t ** GetFifoForId( hb_work_private_t * r, int id ) |
| 670 | { |
| 671 | hb_job_t * job = r->job; |
| 672 | hb_title_t * title = job->title; |
| 673 | hb_audio_t * audio; |
| 674 | hb_subtitle_t * subtitle; |
| 675 | int i, n; |
| 676 | |
| 677 | if (id == title->video_id) |
| 678 | { |
| 679 | if (job->indepth_scan && r->start_found) |
| 680 | { |
| 681 | /* |
| 682 | * Ditch the video here during the indepth scan until |
| 683 | * we can improve the MPEG2 decode performance. |
| 684 | * |
| 685 | * But if we specify a stop frame, we must decode the |
| 686 | * frames in order to count them. |
| 687 | */ |
| 688 | return NULL; |
| 689 | } |
| 690 | else |
| 691 | { |
| 692 | r->fifos[0] = job->fifo_in; |
| 693 | r->fifos[1] = NULL; |
| 694 | return r->fifos; |
| 695 | } |
| 696 | } |
| 697 | |
| 698 | for (i = n = 0; i < hb_list_count( job->list_subtitle ); i++) |
| 699 | { |
| 700 | subtitle = hb_list_item( job->list_subtitle, i ); |
| 701 | if (id == subtitle->id) |
| 702 | { |
| 703 | /* pass the subtitles to be processed */ |
| 704 | r->fifos[n++] = subtitle->fifo_in; |
| 705 | } |
| 706 | } |
| 707 | if (n != 0) |
| 708 | { |
| 709 | r->fifos[n] = NULL; |
| 710 | return r->fifos; |
| 711 | } |
| 712 | |
| 713 | if (!job->indepth_scan) |
| 714 | { |
| 715 | for (i = n = 0; i < hb_list_count( job->list_audio ); i++) |
| 716 | { |
| 717 | audio = hb_list_item( job->list_audio, i ); |
| 718 | if (id == audio->id) |
| 719 | { |
| 720 | r->fifos[n++] = audio->priv.fifo_in; |
| 721 | } |
| 722 | } |
| 723 | |
| 724 | if (n != 0) |
| 725 | { |
| 726 | r->fifos[n] = NULL; |
no test coverage detected