Use default audio and video PES stream IDs (0xc0 and 0xe0 respectively)

if not specified in the WVM metadata.

BUG=24753064

Change-Id: I4c4cd0b30f0e153d46639382682da13b127dd305
This commit is contained in:
Thomas Inskip 2015-10-08 11:20:53 -07:00 committed by KongQun Yang
parent 25cac4aa12
commit 9ba1c1ebfd
1 changed files with 63 additions and 56 deletions

View File

@ -63,6 +63,9 @@ namespace {
kEcmCCIFlagsSizeBytes + kEcmDCPFlagsSizeBytes; kEcmCCIFlagsSizeBytes + kEcmDCPFlagsSizeBytes;
const uint32_t kEcmPaddingSizeBytes = 12; const uint32_t kEcmPaddingSizeBytes = 12;
const uint32_t kAssetKeySizeBytes = 16; const uint32_t kAssetKeySizeBytes = 16;
// Default audio and video PES stream IDs.
const uint8_t kDefaultAudioStreamId = kPesStreamIdAudio;
const uint8_t kDefaultVideoStreamId = kPesStreamIdVideo;
enum Type { enum Type {
Type_void = 0, Type_void = 0,
@ -722,7 +725,9 @@ bool WvmMediaParser::ParseIndexEntry() {
pixel_width, pixel_height, trick_play_rate, nalu_length_size, NULL, 0, pixel_width, pixel_height, trick_play_rate, nalu_length_size, NULL, 0,
true)); true));
program_demux_stream_map_[base::UintToString(index_program_id_) + ":" + program_demux_stream_map_[base::UintToString(index_program_id_) + ":" +
base::UintToString(video_pes_stream_id)] = base::UintToString(video_pes_stream_id ?
video_pes_stream_id :
kDefaultVideoStreamId)] =
stream_id_count_++; stream_id_count_++;
} }
if (has_audio) { if (has_audio) {
@ -732,7 +737,9 @@ bool WvmMediaParser::ParseIndexEntry() {
audio_codec_string, std::string(), kAacSampleSizeBits, num_channels, audio_codec_string, std::string(), kAacSampleSizeBits, num_channels,
sampling_frequency, NULL, 0, true)); sampling_frequency, NULL, 0, true));
program_demux_stream_map_[base::UintToString(index_program_id_) + ":" + program_demux_stream_map_[base::UintToString(index_program_id_) + ":" +
base::UintToString(audio_pes_stream_id)] = base::UintToString(audio_pes_stream_id ?
audio_pes_stream_id :
kDefaultAudioStreamId)] =
stream_id_count_++; stream_id_count_++;
} }
} }