Changeset 3923780814004f3735687c9963b753fd751b2245
- Timestamp:
- 12/09/06 21:15:20
(2 years ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1158088520 +0000
- git-parent:
[39d0e3e076334dc371a62020fba4d30919148548]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1158088520 +0000
- Message:
Most of demux/
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2d824ac |
r3923780 |
|
| 23 | 23 | *****************************************************************************/ |
|---|
| 24 | 24 | |
|---|
| | 25 | #include <vlc/vlc.h> |
|---|
| | 26 | |
|---|
| | 27 | #include <stdio.h> |
|---|
| 25 | 28 | #include <stdlib.h> /* malloc(), free() */ |
|---|
| 26 | 29 | |
|---|
| 27 | | #include <vlc/vlc.h> |
|---|
| 28 | 30 | #include <vlc/input.h> |
|---|
| 29 | 31 | |
|---|
| r982c2c8 |
r3923780 |
|
| 21 | 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. |
|---|
| 22 | 22 | *****************************************************************************/ |
|---|
| | 23 | #include <vlc/vlc.h> |
|---|
| | 24 | |
|---|
| | 25 | #include <stdio.h> |
|---|
| 23 | 26 | #include <stdlib.h> /* malloc(), free() */ |
|---|
| 24 | 27 | |
|---|
| 25 | | #include <vlc/vlc.h> |
|---|
| 26 | 28 | #include <vlc/input.h> |
|---|
| 27 | 29 | |
|---|
| … | … | |
| 1113 | 1115 | /* SoundDescriptionV2 */ |
|---|
| 1114 | 1116 | double f_sample_rate; |
|---|
| | 1117 | int64_t dummy; |
|---|
| 1115 | 1118 | uint32_t i_channel; |
|---|
| 1116 | 1119 | |
|---|
| 1117 | 1120 | MP4_GET4BYTES( p_box->data.p_sample_soun->i_sample_per_packet ); |
|---|
| 1118 | | MP4_GET8BYTES( (*(int64_t *)&f_sample_rate) ); |
|---|
| | 1121 | MP4_GET8BYTES( dummy ); |
|---|
| | 1122 | memcpy( &f_sample_rate, &dummy, 8 ); |
|---|
| 1119 | 1123 | |
|---|
| 1120 | 1124 | msg_Dbg( p_stream, "read box: %f Hz", f_sample_rate ); |
|---|
| r2a7d4c7 |
r3923780 |
|
| 24 | 24 | * Preamble |
|---|
| 25 | 25 | *****************************************************************************/ |
|---|
| | 26 | |
|---|
| | 27 | #include <vlc/vlc.h> |
|---|
| | 28 | |
|---|
| | 29 | #include <stdio.h> |
|---|
| 26 | 30 | #include <stdlib.h> /* malloc(), free() */ |
|---|
| 27 | 31 | |
|---|
| 28 | | #include <vlc/vlc.h> |
|---|
| 29 | 32 | #include <vlc/input.h> |
|---|
| 30 | 33 | #include <vlc_playlist.h> |
|---|
| r0ade81b |
r3923780 |
|
| 148 | 148 | size_t buf16_size; |
|---|
| 149 | 149 | unsigned char *buf16; |
|---|
| 150 | | char *p_buf16; |
|---|
| | 150 | const char *p_buf16; |
|---|
| 151 | 151 | size_t buf8_size; |
|---|
| 152 | 152 | char *buf8; |
|---|
| … | … | |
| 209 | 209 | |
|---|
| 210 | 210 | buf16_size = length; |
|---|
| 211 | | buf16 = (unsigned char *)malloc( buf16_size ); |
|---|
| | 211 | buf16 = malloc( buf16_size ); |
|---|
| 212 | 212 | if( buf16 == NULL ) |
|---|
| 213 | 213 | { |
|---|
| … | … | |
| 221 | 221 | { |
|---|
| 222 | 222 | msg_Err( p_demux, "load_byte failed" ); |
|---|
| 223 | | free( (void *)buf16 ); |
|---|
| | 223 | free( buf16 ); |
|---|
| 224 | 224 | return NULL; |
|---|
| 225 | 225 | } |
|---|
| … | … | |
| 227 | 227 | |
|---|
| 228 | 228 | buf8_size = length; |
|---|
| 229 | | buf8 = (char *)malloc( buf8_size + 1 ); |
|---|
| | 229 | buf8 = malloc( buf8_size + 1 ); |
|---|
| 230 | 230 | if( buf8 == NULL ) |
|---|
| 231 | 231 | { |
|---|
| 232 | 232 | msg_Err( p_demux, "out of memory" ); |
|---|
| 233 | | free( (void *)buf16 ); |
|---|
| | 233 | free( buf16 ); |
|---|
| 234 | 234 | return NULL; |
|---|
| 235 | 235 | } |
|---|
| … | … | |
| 239 | 239 | { |
|---|
| 240 | 240 | msg_Err( p_demux, "iconv_open failed" ); |
|---|
| 241 | | free( (void *)buf16 ); |
|---|
| 242 | | free( (void *)buf8 ); |
|---|
| 243 | | return NULL; |
|---|
| 244 | | } |
|---|
| 245 | | |
|---|
| 246 | | p_buf8 = &buf8[ 0 ]; |
|---|
| 247 | | p_buf16 = (char *)&buf16[ 0 ]; |
|---|
| | 241 | free( buf16 ); |
|---|
| | 242 | free( buf8 ); |
|---|
| | 243 | return NULL; |
|---|
| | 244 | } |
|---|
| | 245 | |
|---|
| | 246 | p_buf8 = buf8; |
|---|
| | 247 | p_buf16 = (const char *)buf16; |
|---|
| 248 | 248 | |
|---|
| 249 | 249 | if( vlc_iconv( conv, &p_buf16, &buf16_size, &p_buf8, &buf8_size ) < 0 ) |
|---|
| … | … | |
| 259 | 259 | vlc_iconv_close( conv ); |
|---|
| 260 | 260 | |
|---|
| 261 | | free( (void *)buf16 ); |
|---|
| | 261 | free( buf16 ); |
|---|
| 262 | 262 | return buf8; |
|---|
| 263 | 263 | } |
|---|
| r2d824ac |
r3923780 |
|
| 46 | 46 | static int Demux( demux_t *p_demux); |
|---|
| 47 | 47 | static int Control( demux_t *p_demux, int i_query, va_list args ); |
|---|
| 48 | | static char *GetNextToken(char *psz_cur_string); |
|---|
| | 48 | //static char *GetNextToken(char *psz_cur_string); |
|---|
| 49 | 49 | static int IsWhitespace( char *psz_string ); |
|---|
| 50 | 50 | |
|---|
| … | … | |
| 299 | 299 | } |
|---|
| 300 | 300 | |
|---|
| | 301 | #if 0 |
|---|
| 301 | 302 | /** |
|---|
| 302 | 303 | * Get a in-string pointer to the start of the next token from a |
|---|
| … | … | |
| 319 | 320 | return psz_cur_string; |
|---|
| 320 | 321 | } |
|---|
| | 322 | #endif |
|---|
| 321 | 323 | |
|---|
| 322 | 324 | static int IsWhitespace( char *psz_string ) |
|---|
| r26f68e7 |
r3923780 |
|
| 25 | 25 | * Preamble |
|---|
| 26 | 26 | *****************************************************************************/ |
|---|
| | 27 | #include <vlc/vlc.h> |
|---|
| | 28 | |
|---|
| | 29 | #include <stdio.h> |
|---|
| 27 | 30 | #include <stdlib.h> /* malloc(), free() */ |
|---|
| 28 | 31 | |
|---|
| 29 | | #include <vlc/vlc.h> |
|---|
| 30 | 32 | #include <vlc/input.h> |
|---|
| 31 | 33 | #include "charset.h" |
|---|
| r16b2dec |
r3923780 |
|
| 26 | 26 | * Preamble |
|---|
| 27 | 27 | *****************************************************************************/ |
|---|
| | 28 | #include <vlc/vlc.h> |
|---|
| | 29 | |
|---|
| | 30 | #include <string.h> |
|---|
| 28 | 31 | #include <stdlib.h> |
|---|
| 29 | 32 | |
|---|
| … | … | |
| 34 | 37 | #include <ctype.h> |
|---|
| 35 | 38 | |
|---|
| 36 | | #include <vlc/vlc.h> |
|---|
| 37 | 39 | #include <vlc/input.h> |
|---|
| 38 | 40 | #include "vlc_video.h" |
|---|
| | 41 | #include "charset.h" |
|---|
| 39 | 42 | |
|---|
| 40 | 43 | /***************************************************************************** |
|---|
| rce24095 |
r3923780 |
|
| 26 | 26 | * Preamble |
|---|
| 27 | 27 | *****************************************************************************/ |
|---|
| | 28 | |
|---|
| | 29 | #include <vlc/vlc.h> |
|---|
| | 30 | |
|---|
| | 31 | #include <stdio.h> |
|---|
| 28 | 32 | #include <stdlib.h> /* malloc(), free() */ |
|---|
| 29 | 33 | #include <ctype.h> |
|---|
| 30 | 34 | |
|---|
| 31 | | #include <vlc/vlc.h> |
|---|
| 32 | 35 | #include <vlc/input.h> |
|---|
| 33 | 36 | |
|---|
| … | … | |
| 2404 | 2407 | if( p_dr->i_tag == 0x48 ) |
|---|
| 2405 | 2408 | { |
|---|
| | 2409 | #if 0 |
|---|
| 2406 | 2410 | static const char *psz_type[0x11] = { |
|---|
| 2407 | 2411 | "Reserved", |
|---|
| … | … | |
| 2423 | 2427 | "DVB MHP service" |
|---|
| 2424 | 2428 | }; |
|---|
| | 2429 | #endif |
|---|
| 2425 | 2430 | dvbpsi_service_dr_t *pD = dvbpsi_DecodeServiceDr( p_dr ); |
|---|
| 2426 | 2431 | char str1[257]; |
|---|
| r0ade81b |
r3923780 |
|
| 26 | 26 | * Preamble |
|---|
| 27 | 27 | *****************************************************************************/ |
|---|
| | 28 | #include <vlc/vlc.h> |
|---|
| | 29 | |
|---|
| 28 | 30 | #include <stdlib.h> |
|---|
| | 31 | #include <string.h> |
|---|
| 29 | 32 | #include <errno.h> |
|---|
| 30 | 33 | #include <sys/types.h> |
|---|
| 31 | 34 | |
|---|
| 32 | | #include <vlc/vlc.h> |
|---|
| 33 | 35 | #include <vlc/input.h> |
|---|
| 34 | 36 | #include "vlc_video.h" |
|---|