-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dtsx and udts boxes handled for MP4 files. DASH MPD uses DTS tags.
- Loading branch information
1 parent
7ef5167
commit 778fa65
Showing
11 changed files
with
124 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,7 @@ enum Codec { | |
kCodecDTSL, | ||
kCodecDTSM, | ||
kCodecDTSP, | ||
kCodecDTSX, | ||
kCodecEAC3, | ||
kCodecFlac, | ||
kCodecOpus, | ||
|
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,29 @@ | ||
// Copyright (c) 2023 Xperi Inc. All Rights Reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "packager/media/codecs/dts_audio_specific_config.h" | ||
|
||
|
||
#include "packager/base/logging.h" | ||
#include "packager/media/base/bit_reader.h" | ||
#include "packager/media/base/rcheck.h" | ||
|
||
namespace shaka { | ||
namespace media { | ||
|
||
bool GetDTSXChannelMask(const std::vector<uint8_t> &udts, uint32_t &mask) { | ||
// udts is the DTS-UHD Specific Box: ETSI TS 103 491 V1.2.1 Table B-2 | ||
// DecoderProfileCode(6 bits) | ||
// FrameDurationCode(2 bits) | ||
// MaxPayloadCode(3 bits) | ||
// NumPresentationsCode(5 bits) | ||
// ChannelMask (32 bits) | ||
BitReader bit_reader(udts.data(), udts.size()); | ||
RCHECK(bit_reader.SkipBits(16)); | ||
RCHECK(bit_reader.ReadBits(32, &mask)); | ||
return true; | ||
} | ||
|
||
} // namespace media | ||
} // namespace shaka |
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,23 @@ | ||
// Copyright (c) 2023 Xperi Inc. All Rights Reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef PACKAGER_MEDIA_CODECS_DTS_AUDIO_SPECIFIC_CONFIG_H_ | ||
#define PACKAGER_MEDIA_CODECS_DTS_AUDIO_SPECIFIC_CONFIG_H_ | ||
|
||
#include <stddef.h> | ||
#include <stdint.h> | ||
|
||
#include <vector> | ||
|
||
namespace shaka { | ||
namespace media { | ||
|
||
class BitReader; | ||
|
||
bool GetDTSXChannelMask(const std::vector<uint8_t> &udts, uint32_t &mask); | ||
|
||
} // namespace media | ||
} // namespace shaka | ||
|
||
#endif // PACKAGER_MEDIA_CODECS_DTS_AUDIO_SPECIFIC_CONFIG_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
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