Changeset 401
- Timestamp:
- 04/04/07 10:42:56 (2 years ago)
- Files:
-
- trunk/MatroskaImport.h (modified) (1 diff)
- trunk/MatroskaImportPrivate.cpp (modified) (1 diff)
- trunk/bitstream_info.c (modified) (2 diffs)
- trunk/bitstream_info.h (modified) (1 diff)
- trunk/ff_private.c (modified) (4 diffs)
- trunk/ff_private.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/MatroskaImport.h
r400 r401 108 108 uint8 isEnabled; 109 109 uint32_t defaultDuration; 110 uint8 passthrough; 110 111 111 112 // laced tracks can have multiple frames per block, it's easier to ignore them trunk/MatroskaImportPrivate.cpp
r400 r401 848 848 switch ((*desc)->dataFormat) { 849 849 case kAudioFormatAC3: 850 replaceSoundDesc = parse_ac3_bitstream(&asbd, &acl, block.GetBuffer(0).Buffer(), block.GetFrameSize(0) );850 replaceSoundDesc = parse_ac3_bitstream(&asbd, &acl, block.GetBuffer(0).Buffer(), block.GetFrameSize(0), passthrough); 851 851 break; 852 852 } trunk/bitstream_info.c
r362 r401 64 64 */ 65 65 66 int parse_ac3_bitstream(AudioStreamBasicDescription *asbd, AudioChannelLayout *acl, uint8_t *buffer, int buff_size )66 int parse_ac3_bitstream(AudioStreamBasicDescription *asbd, AudioChannelLayout *acl, uint8_t *buffer, int buff_size, int passthrough) 67 67 { 68 68 int offset = ac3_synchronize(buffer, buff_size); … … 102 102 shift = bsid - 8; 103 103 104 if(passthrough) 105 { 106 if(acmod > 2) 107 acmod = 0; 108 lfe = 0; 109 } 104 110 /* Setup the AudioStreamBasicDescription and AudioChannelLayout */ 105 111 memset(asbd, 0, sizeof(AudioStreamBasicDescription)); trunk/bitstream_info.h
r261 r401 15 15 #endif 16 16 17 int parse_ac3_bitstream(AudioStreamBasicDescription *asbd, AudioChannelLayout *acl, uint8_t *buffer, int buff_size );17 int parse_ac3_bitstream(AudioStreamBasicDescription *asbd, AudioChannelLayout *acl, uint8_t *buffer, int buff_size, int passthrough); 18 18 19 19 #ifdef __cplusplus trunk/ff_private.c
r374 r401 106 106 initialize_video_map(map, targetTrack, dataRef, dataRefType, storage->firstFrames + st->index); 107 107 else if(st->codec->codec_type == CODEC_TYPE_AUDIO) 108 initialize_audio_map(map, targetTrack, dataRef, dataRefType, storage->firstFrames + st->index );108 initialize_audio_map(map, targetTrack, dataRef, dataRefType, storage->firstFrames + st->index, storage->passthrough); 109 109 110 110 /* return the map */ … … 179 179 180 180 /* Initializes the map & targetTrack to receive audio data */ 181 void initialize_audio_map(NCStream *map, Track targetTrack, Handle dataRef, OSType dataRefType, AVPacket *firstFrame )181 void initialize_audio_map(NCStream *map, Track targetTrack, Handle dataRef, OSType dataRefType, AVPacket *firstFrame, int passthrough) 182 182 { 183 183 Media media; … … 258 258 if(asbd.mFormatID == kAudioFormatAC3 || asbd.mFormatID == 'ms \0') 259 259 { 260 if(parse_ac3_bitstream(&asbd, &acl, firstFrame->data, firstFrame->size ))260 if(parse_ac3_bitstream(&asbd, &acl, firstFrame->data, firstFrame->size, passthrough)) 261 261 { 262 262 useDefault = 0; … … 525 525 } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) { 526 526 track = NewMovieTrack(theMovie, 0, 0, kFullVolume); 527 initialize_audio_map(&map[j], track, dataRef, dataRefType, storage->firstFrames + j );527 initialize_audio_map(&map[j], track, dataRef, dataRefType, storage->firstFrames + j, storage->passthrough); 528 528 529 529 if (first_audio_track == NULL) trunk/ff_private.h
r295 r401 78 78 int64_t header_offset; 79 79 80 int passthrough; 80 81 AVPacket firstFrames[MAX_STREAMS]; 81 82 }; … … 96 97 int prepare_movie(ff_global_ptr storage, Movie theMovie, Handle dataRef, OSType dataRefType); 97 98 void initialize_video_map(NCStream *map, Track targetTrack, Handle dataRef, OSType dataRefType, AVPacket *firstFrame); 98 void initialize_audio_map(NCStream *map, Track targetTrack, Handle dataRef, OSType dataRefType, AVPacket *firstFrame );99 void initialize_audio_map(NCStream *map, Track targetTrack, Handle dataRef, OSType dataRefType, AVPacket *firstFrame, int passthrough); 99 100 100 101 int determine_header_offset(ff_global_ptr storage);
