# HG changeset patch # User bertrand # Date 1011850241 0 # Node ID c67d50d4a889d95904595213be8f45cba318cd07 # Parent ae889abf93cd3d8896a6830fc33c9668680ca6b1 Add a parser for the "ASF group stream object" and display the bitrate values of all the streams. diff -r ae889abf93cd -r c67d50d4a889 libmpdemux/asfheader.c --- a/libmpdemux/asfheader.c Thu Jan 24 05:20:19 2002 +0000 +++ b/libmpdemux/asfheader.c Thu Jan 24 05:30:41 2002 +0000 @@ -34,6 +34,7 @@ #define ASF_GUID_PREFIX_header_2_0 0xD6E229D1 #define ASF_GUID_PREFIX_file_header 0x8CABDCA1 #define ASF_GUID_PREFIX_content_desc 0x75b22633 +#define ASF_GUID_PREFIX_stream_group 0x7bf875ce static ASF_header_t asfh; @@ -270,6 +271,35 @@ free(string); break; } + case ASF_GUID_PREFIX_stream_group: { + uint16_t stream_count, stream_id, i; + uint32_t max_bitrate; + char *object=NULL, *ptr=NULL; + printf("============ ASF Stream group == START ===\n"); + printf(" object size = %d\n", objh.size); + object = (char*)malloc(objh.size); + if( object==NULL ) { + printf("Memory allocation failed\n"); + return 0; + } + stream_read( demuxer->stream, object, objh.size ); + // FIXME: We need some endian handling below... + ptr = object; + stream_count = *(uint16_t*)ptr; + ptr += sizeof(uint16_t); + printf(" stream count=[0x%x][%u]\n", stream_count, stream_count ); + for( i=0 ; i