[MPlayer-dev-eng] [PATCH] reduce ASF demuxer verbosity
Bertrand Baudet
bertrand_baudet at yahoo.com
Sat Apr 17 10:09:14 CEST 2004
I did add these printfs and I agree with you.
So go for it and commit your patch
Bertrand
On Saturday 17 April 2004 03:17, Diego Biurrun wrote:
> Diego Biurrun writes:
>
>
> Hmm, this didn't quite come out right.. This patch changes a few
> printfs to mp_msg calls in libmpdemux/asfheader.c and moves the
> following output into verbose mode:
>
> ============ ASF Stream group == START ===
> object size = 38
> stream count=[0x2][2]
> stream id=[0x1][1]
> max bitrate=[0x43f2][17394]
> stream id=[0x2][2]
> max bitrate=[0x15e9b][89755]
> ============ ASF Stream group == END ===
>
> I doubt this is useful outside of debugging.
>
> OK to commit?
>
> Diego
>
>
> --- libmpdemux/asfheader.c 17 May 2003 12:24:01 -0000 1.38
> +++ libmpdemux/asfheader.c 16 Apr 2004 00:27:51 -0000
> @@ -288,11 +288,11 @@
> uint16_t stream_id, i;
> uint32_t max_bitrate;
> char *object=NULL, *ptr=NULL;
> - printf("============ ASF Stream group == START ===\n");
> - printf(" object size = %d\n", (int)objh.size);
> + mp_msg(MSGT_HEADER,MSGL_V,"============ ASF Stream group == START
> ===\n"); + mp_msg(MSGT_HEADER,MSGL_V," object size = %d\n",
> (int)objh.size); object = (char*)malloc(objh.size);
> if( object==NULL ) {
> - printf("Memory allocation failed\n");
> + mp_msg(MSGT_HEADER,MSGL_V,"Memory allocation failed\n");
> return 0;
> }
> stream_read( demuxer->stream, object, objh.size );
> @@ -302,19 +302,19 @@
> ptr += sizeof(uint16_t);
> if(stream_count > 0)
> streams =
> (uint32_t*)malloc(2*stream_count*sizeof(uint32_t)); - printf("
> stream count=[0x%x][%u]\n", stream_count, stream_count ); +
> mp_msg(MSGT_HEADER,MSGL_V," stream count=[0x%x][%u]\n", stream_count,
> stream_count ); for( i=0 ; i<stream_count && ptr<((char*)object+objh.size)
> ; i++ ) { stream_id = le2me_16(*(uint16_t*)ptr);
> ptr += sizeof(uint16_t);
> memcpy(&max_bitrate, ptr, sizeof(uint32_t));// workaround
> unaligment bug on sparc max_bitrate = le2me_32(max_bitrate);
> ptr += sizeof(uint32_t);
> - printf(" stream id=[0x%x][%u]\n", stream_id, stream_id );
> - printf(" max bitrate=[0x%x][%u]\n", max_bitrate, max_bitrate
> ); + mp_msg(MSGT_HEADER,MSGL_V," stream id=[0x%x][%u]\n",
> stream_id, stream_id ); + mp_msg(MSGT_HEADER,MSGL_V," max
> bitrate=[0x%x][%u]\n", max_bitrate, max_bitrate ); streams[2*i] =
> stream_id;
> streams[2*i+1] = max_bitrate;
> }
> - printf("============ ASF Stream group == END ===\n");
> + mp_msg(MSGT_HEADER,MSGL_V,"============ ASF Stream group == END
> ===\n"); free( object );
> break;
> }
>
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
More information about the MPlayer-dev-eng
mailing list