Changeset 2004c8ba498700ca9f6fe616a3d076ff9a5d59ee
- Timestamp:
- 10/18/07 20:18:09
(11 months ago)
- Author:
- Laurent Aimar <fenrir@videolan.org>
- git-committer:
- Laurent Aimar <fenrir@videolan.org> 1192731489 +0000
- git-parent:
[fc5954abbb4cb84a170ff960e88f90a60a4d1794]
- git-author:
- Laurent Aimar <fenrir@videolan.org> 1192731489 +0000
- Message:
Fixed closed captions channel >= 2
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| ra0429d0 |
r2004c8b |
|
| 149 | 149 | static char *EsOutProgramGetMetaName( es_out_pgrm_t *p_pgrm ); |
|---|
| 150 | 150 | |
|---|
| | 151 | static const vlc_fourcc_t EsOutFourccClosedCaptions[4] = { |
|---|
| | 152 | VLC_FOURCC('c', 'c', '1', ' '), |
|---|
| | 153 | VLC_FOURCC('c', 'c', '2', ' '), |
|---|
| | 154 | VLC_FOURCC('c', 'c', '3', ' '), |
|---|
| | 155 | VLC_FOURCC('c', 'c', '4', ' '), |
|---|
| | 156 | }; |
|---|
| | 157 | static inline int EsOutGetClosedCaptionsChannel( vlc_fourcc_t fcc ) |
|---|
| | 158 | { |
|---|
| | 159 | int i; |
|---|
| | 160 | for( i = 0; i < 4; i++ ) |
|---|
| | 161 | { |
|---|
| | 162 | if( fcc == EsOutFourccClosedCaptions[i] ) |
|---|
| | 163 | return i; |
|---|
| | 164 | } |
|---|
| | 165 | return -1; |
|---|
| | 166 | } |
|---|
| | 167 | |
|---|
| | 168 | |
|---|
| 151 | 169 | /***************************************************************************** |
|---|
| 152 | 170 | * input_EsOutNew: |
|---|
| … | … | |
| 658 | 676 | !vlc_meta_Get( p_meta, vlc_meta_Publisher) && |
|---|
| 659 | 677 | vlc_dictionary_keys_count( &p_meta->extra_tags ) <= 0 ) |
|---|
| 660 | | return; |
|---|
| | 678 | { |
|---|
| | 679 | return; |
|---|
| | 680 | } |
|---|
| 661 | 681 | /* Find program */ |
|---|
| 662 | 682 | for( i = 0; i < p_sys->i_pgrm; i++ ) |
|---|
| … | … | |
| 985 | 1005 | vlc_bool_t b_decode = VLC_FALSE; |
|---|
| 986 | 1006 | if( es->p_master->p_dec ) |
|---|
| 987 | | input_DecoderGetCcState( es->p_master->p_dec, &b_decode, |
|---|
| 988 | | es->fmt.i_codec == VLC_FOURCC('c','c','1',' ') ? 0 : 1 ); |
|---|
| | 1007 | { |
|---|
| | 1008 | int i_channel = EsOutGetClosedCaptionsChannel( es->fmt.i_codec ); |
|---|
| | 1009 | if( i_channel != -1 ) |
|---|
| | 1010 | input_DecoderGetCcState( es->p_master->p_dec, &b_decode, i_channel ); |
|---|
| | 1011 | } |
|---|
| 989 | 1012 | return b_decode; |
|---|
| 990 | 1013 | } |
|---|
| … | … | |
| 1009 | 1032 | if( es->p_master ) |
|---|
| 1010 | 1033 | { |
|---|
| | 1034 | int i_channel; |
|---|
| 1011 | 1035 | if( !es->p_master->p_dec ) |
|---|
| 1012 | 1036 | return; |
|---|
| 1013 | 1037 | |
|---|
| 1014 | | if( input_DecoderSetCcState( es->p_master->p_dec, VLC_TRUE, |
|---|
| 1015 | | es->fmt.i_codec == VLC_FOURCC('c','c','1',' ') ? 0 : 1 ) ) |
|---|
| | 1038 | i_channel = EsOutGetClosedCaptionsChannel( es->fmt.i_codec ); |
|---|
| | 1039 | if( i_channel == -1 || input_DecoderSetCcState( es->p_master->p_dec, VLC_TRUE, i_channel ) ) |
|---|
| 1016 | 1040 | return; |
|---|
| 1017 | 1041 | } |
|---|
| … | … | |
| 1089 | 1113 | { |
|---|
| 1090 | 1114 | if( es->p_master->p_dec ) |
|---|
| 1091 | | input_DecoderSetCcState( es->p_master->p_dec, VLC_FALSE, es->fmt.i_codec == VLC_FOURCC('c','c','1',' ') ? 0 : 1 ); |
|---|
| | 1115 | { |
|---|
| | 1116 | int i_channel = EsOutGetClosedCaptionsChannel( es->fmt.i_codec ); |
|---|
| | 1117 | if( i_channel != -1 ) |
|---|
| | 1118 | input_DecoderSetCcState( es->p_master->p_dec, VLC_FALSE, i_channel ); |
|---|
| | 1119 | } |
|---|
| 1092 | 1120 | } |
|---|
| 1093 | 1121 | else |
|---|