| 1107 | | |
|---|
| 1108 | | p[0] = 0x10; /* textFormat, 0x10 for 3GPP TS 26.245 */ |
|---|
| 1109 | | p[1] = 0x00; /* flags: 1b: associated video info flag |
|---|
| 1110 | | 3b: reserved |
|---|
| 1111 | | 1b: duration flag |
|---|
| 1112 | | 3b: reserved */ |
|---|
| 1113 | | p[2] = 52; /* remaining size */ |
|---|
| 1114 | | |
|---|
| 1115 | | p += 3; |
|---|
| 1116 | | |
|---|
| 1117 | | p[0] = p[1] = p[2] = p[3] = 0; p+=4; /* display flags */ |
|---|
| 1118 | | *p++ = 0; /* horizontal justification (-1: left, 0 center, 1 right) */ |
|---|
| 1119 | | *p++ = 1; /* vertical justification (-1: top, 0 center, 1 bottom) */ |
|---|
| 1120 | | |
|---|
| 1121 | | p[0] = p[1] = p[2] = 0x00; p+=3;/* background rgb */ |
|---|
| 1122 | | *p++ = 0xff; /* background a */ |
|---|
| 1123 | | |
|---|
| 1124 | | p[0] = p[1] = 0; p += 2; /* text box top */ |
|---|
| 1125 | | p[0] = p[1] = 0; p += 2; /* text box left */ |
|---|
| 1126 | | p[0] = p[1] = 0; p += 2; /* text box bottom */ |
|---|
| 1127 | | p[0] = p[1] = 0; p += 2; /* text box right */ |
|---|
| 1128 | | |
|---|
| 1129 | | p[0] = p[1] = 0; p += 2; /* start char */ |
|---|
| 1130 | | p[0] = p[1] = 0; p += 2; /* end char */ |
|---|
| 1131 | | p[0] = p[1] = 0; p += 2; /* default font id */ |
|---|
| 1132 | | |
|---|
| 1133 | | *p++ = 0; /* font style flags */ |
|---|
| 1134 | | *p++ = 12; /* font size */ |
|---|
| 1135 | | |
|---|
| 1136 | | p[0] = p[1] = p[2] = 0x00; p+=3;/* foreground rgb */ |
|---|
| 1137 | | *p++ = 0x00; /* foreground a */ |
|---|
| 1138 | | |
|---|
| 1139 | | p[0] = p[1] = p[2] = 0; p[3] = 22; p += 4; |
|---|
| 1140 | | memcpy( p, "ftab", 4 ); p += 4; |
|---|
| 1141 | | *p++ = 0; *p++ = 1; /* entry count */ |
|---|
| 1142 | | p[0] = p[1] = 0; p += 2; /* font id */ |
|---|
| 1143 | | *p++ = 9; /* font name length */ |
|---|
| 1144 | | memcpy( p, "Helvetica", 9 ); /* font name */ |
|---|
| | 1105 | if( p ) |
|---|
| | 1106 | { |
|---|
| | 1107 | p[0] = 0x10; /* textFormat, 0x10 for 3GPP TS 26.245 */ |
|---|
| | 1108 | p[1] = 0x00; /* flags: 1b: associated video info flag |
|---|
| | 1109 | 3b: reserved |
|---|
| | 1110 | 1b: duration flag |
|---|
| | 1111 | 3b: reserved */ |
|---|
| | 1112 | p[2] = 52; /* remaining size */ |
|---|
| | 1113 | |
|---|
| | 1114 | p += 3; |
|---|
| | 1115 | |
|---|
| | 1116 | p[0] = p[1] = p[2] = p[3] = 0; p+=4; /* display flags */ |
|---|
| | 1117 | *p++ = 0; /* horizontal justification (-1: left, 0 center, 1 right) */ |
|---|
| | 1118 | *p++ = 1; /* vertical justification (-1: top, 0 center, 1 bottom) */ |
|---|
| | 1119 | |
|---|
| | 1120 | p[0] = p[1] = p[2] = 0x00; p+=3;/* background rgb */ |
|---|
| | 1121 | *p++ = 0xff; /* background a */ |
|---|
| | 1122 | |
|---|
| | 1123 | p[0] = p[1] = 0; p += 2; /* text box top */ |
|---|
| | 1124 | p[0] = p[1] = 0; p += 2; /* text box left */ |
|---|
| | 1125 | p[0] = p[1] = 0; p += 2; /* text box bottom */ |
|---|
| | 1126 | p[0] = p[1] = 0; p += 2; /* text box right */ |
|---|
| | 1127 | |
|---|
| | 1128 | p[0] = p[1] = 0; p += 2; /* start char */ |
|---|
| | 1129 | p[0] = p[1] = 0; p += 2; /* end char */ |
|---|
| | 1130 | p[0] = p[1] = 0; p += 2; /* default font id */ |
|---|
| | 1131 | |
|---|
| | 1132 | *p++ = 0; /* font style flags */ |
|---|
| | 1133 | *p++ = 12; /* font size */ |
|---|
| | 1134 | |
|---|
| | 1135 | p[0] = p[1] = p[2] = 0x00; p+=3;/* foreground rgb */ |
|---|
| | 1136 | *p++ = 0x00; /* foreground a */ |
|---|
| | 1137 | |
|---|
| | 1138 | p[0] = p[1] = p[2] = 0; p[3] = 22; p += 4; |
|---|
| | 1139 | memcpy( p, "ftab", 4 ); p += 4; |
|---|
| | 1140 | *p++ = 0; *p++ = 1; /* entry count */ |
|---|
| | 1141 | p[0] = p[1] = 0; p += 2; /* font id */ |
|---|
| | 1142 | *p++ = 9; /* font name length */ |
|---|
| | 1143 | memcpy( p, "Helvetica", 9 ); /* font name */ |
|---|
| | 1144 | } |
|---|
| | 1145 | else p_stream->i_decoder_specific_info = 0; |
|---|
| | 1146 | } |
|---|
| | 1147 | else |
|---|
| | 1148 | { |
|---|
| | 1149 | /* Copy extra data (VOL for MPEG-4 and extra BitMapInfoHeader for VFW */ |
|---|
| | 1150 | p_stream->i_decoder_specific_info = p_input->p_fmt->i_extra; |
|---|
| | 1151 | if( p_stream->i_decoder_specific_info > 0 ) |
|---|
| | 1152 | { |
|---|
| | 1153 | p_stream->p_decoder_specific_info = |
|---|
| | 1154 | malloc( p_stream->i_decoder_specific_info ); |
|---|
| | 1155 | if( p_stream->p_decoder_specific_info ) |
|---|
| | 1156 | { |
|---|
| | 1157 | memcpy( p_stream->p_decoder_specific_info, |
|---|
| | 1158 | p_input->p_fmt->p_extra, |
|---|
| | 1159 | p_input->p_fmt->i_extra ); |
|---|
| | 1160 | } |
|---|
| | 1161 | else p_stream->i_decoder_specific_info = 0; |
|---|
| | 1162 | } |
|---|