Mercurial > mplayer.hg
comparison libmpdemux/demux_ty.c @ 24482:e5eb9ccd6679
Remove some commented-out debugging code
author | reimar |
---|---|
date | Fri, 14 Sep 2007 20:18:00 +0000 |
parents | 61222a7b1dbd |
children | e24dd407fb58 |
comparison
equal
deleted
inserted
replaced
24481:61222a7b1dbd | 24482:e5eb9ccd6679 |
---|---|
338 } | 338 } |
339 | 339 |
340 static void demux_ty_CopyToDemuxPacket( int type, TiVoInfo *tivo, demux_stream_t *ds, | 340 static void demux_ty_CopyToDemuxPacket( int type, TiVoInfo *tivo, demux_stream_t *ds, |
341 unsigned char *buffer, int size, off_t pos, float pts ) | 341 unsigned char *buffer, int size, off_t pos, float pts ) |
342 { | 342 { |
343 demux_packet_t *dp; | 343 demux_packet_t *dp = new_demux_packet( size ); |
344 | |
345 // mp_msg( MSGT_DEMUX, MSGL_DBG3, "ty:Calling ds_add_packet() %7.1f\n", pts ); | |
346 // printf( "%x %x %x %x\n", | |
347 // buffer[ 0 ], buffer[ 1 ], buffer[ 2 ], buffer[ 3 ] ); | |
348 | |
349 dp = new_demux_packet( size ); | |
350 memcpy( dp->buffer, buffer, size ); | 344 memcpy( dp->buffer, buffer, size ); |
351 if (pts != MP_NOPTS_VALUE) | 345 if (pts != MP_NOPTS_VALUE) |
352 dp->pts = pts / 90000.0; | 346 dp->pts = pts / 90000.0; |
353 dp->pos = pos; | 347 dp->pos = pos; |
354 dp->flags = 0; | 348 dp->flags = 0; |
443 tivo->readHeader = 1; | 437 tivo->readHeader = 1; |
444 tivo->size = demux->stream->end_pos; | 438 tivo->size = demux->stream->end_pos; |
445 | 439 |
446 filePos = demux->filepos; | 440 filePos = demux->filepos; |
447 stream_seek( demux->stream, 0 ); | 441 stream_seek( demux->stream, 0 ); |
448 | |
449 // mp_msg( MSGT_DEMUX, MSGL_DBG3, | |
450 // "ty:Reading a chunk %d\n", __LINE__ ); | |
451 | 442 |
452 readSize = stream_read( demux->stream, chunk, CHUNKSIZE ); | 443 readSize = stream_read( demux->stream, chunk, CHUNKSIZE ); |
453 | 444 |
454 if ( memcmp( chunk, TMF_SIG, sizeof( TMF_SIG ) ) == 0 ) | 445 if ( memcmp( chunk, TMF_SIG, sizeof( TMF_SIG ) ) == 0 ) |
455 { | 446 { |
614 // ================================================================ | 605 // ================================================================ |
615 if ( type == 0xe0 ) | 606 if ( type == 0xe0 ) |
616 { | 607 { |
617 if ( size > 0 && size + offset <= CHUNKSIZE ) | 608 if ( size > 0 && size + offset <= CHUNKSIZE ) |
618 { | 609 { |
619 int esOffset1; | 610 int esOffset1 = demux_ty_FindESHeader( ty_VideoPacket, &chunk[ offset ], |
620 #if 0 | |
621 printf( "Video Chunk Header " ); | |
622 for( count = 0 ; count < 24 ; count++ ) | |
623 { | |
624 printf( "%2.2x ", chunk[ offset + count ] ); | |
625 } | |
626 printf( "\n" ); | |
627 #endif | |
628 esOffset1 = demux_ty_FindESHeader( ty_VideoPacket, &chunk[ offset ], | |
629 size); | 611 size); |
630 if ( esOffset1 != -1 ) | 612 if ( esOffset1 != -1 ) |
631 tivo->lastVideoPTS = get_ty_pts( | 613 tivo->lastVideoPTS = get_ty_pts( |
632 &chunk[ offset + esOffset1 + 9 ] ); | 614 &chunk[ offset + esOffset1 + 9 ] ); |
633 | 615 |
646 // ================================================================ | 628 // ================================================================ |
647 else if ( type == 0xc0 ) | 629 else if ( type == 0xc0 ) |
648 { | 630 { |
649 if ( size > 0 && size + offset <= CHUNKSIZE ) | 631 if ( size > 0 && size + offset <= CHUNKSIZE ) |
650 { | 632 { |
651 #if 0 | |
652 printf( "Audio Chunk Header " ); | |
653 for( count = 0 ; count < 24 ; count++ ) | |
654 { | |
655 printf( "%2.2x ", chunk[ offset + count ] ); | |
656 } | |
657 printf( "\n" ); | |
658 #endif | |
659 | |
660 if( demux->audio->id == -1 ) | 633 if( demux->audio->id == -1 ) |
661 { | 634 { |
662 if ( nybbleType == 0x02 ) | 635 if ( nybbleType == 0x02 ) |
663 continue; // DTiVo inconclusive, wait for more | 636 continue; // DTiVo inconclusive, wait for more |
664 else if ( nybbleType == 0x09 ) | 637 else if ( nybbleType == 0x09 ) |