forked from shaka-project/shaka-packager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Parse MPEG-TS PMT ES language and maximum bitrate descriptors (s…
…haka-project#369) (shaka-project#1311) Part of shaka-project#369 This adds read support for some MPEG-TS PMT elementary stream descriptors: - ISO639 Language Descriptor providing language code and audio type - Maximum Bitrate Descriptor providing peak stream bandwidth Those metadata are propagated to StreamInfo structures: - StreamInfo.language field - AudioStreamMetadata.max_bitrate field for audio streams - audio type is currently not propagated - corresponding field has to be added to AudioStreamMetadata Test vector file containing those descriptors is provided.
- Loading branch information
1 parent
2ba67bc
commit c09eb83
Showing
11 changed files
with
179 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2023 Google LLC. All rights reserved. | ||
// | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file or at | ||
// https://developers.google.com/open-source/licenses/bsd | ||
|
||
#ifndef PACKAGER_MEDIA_FORMATS_MP2T_TS_AUDIO_TYPE_H | ||
#define PACKAGER_MEDIA_FORMATS_MP2T_TS_AUDIO_TYPE_H | ||
|
||
#include <stdint.h> | ||
|
||
namespace shaka { | ||
namespace media { | ||
namespace mp2t { | ||
|
||
enum class TsAudioType : uint8_t { | ||
// ISO-13818.1 / ITU H.222 Table 2-60 "Audio type values" | ||
kUndefined = 0x00, | ||
kCleanEffects = 0x01, | ||
kHearingImpaired = 0x02, | ||
kVisualyImpairedCommentary = 0x03, | ||
// 0x04-0x7F - user private | ||
// 0x80-0xFF - reserved | ||
}; | ||
|
||
} // namespace mp2t | ||
} // namespace media | ||
} // namespace shaka | ||
|
||
#endif // PACKAGER_MEDIA_FORMATS_MP2T_TS_AUDIO_TYPE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
packager/media/test/data/bear-visualy-impaired-eng-audio-pmt.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<tsduck> | ||
<PMT version="0" current="true" service_id="0x0001" PCR_PID="0x0100"> | ||
<metadata PID="4,096"/> | ||
<component elementary_PID="0x0101" stream_type="0x0F"> | ||
<ISO_639_language_descriptor> | ||
<language code="eng" audio_type="0x03"/> | ||
</ISO_639_language_descriptor> | ||
<maximum_bitrate_descriptor maximum_bitrate="131,600"/> | ||
</component> | ||
</PMT> | ||
</tsduck> |
Binary file not shown.