7 #ifndef MEDIA_BASE_AUDIO_STREAM_INFO_H_
8 #define MEDIA_BASE_AUDIO_STREAM_INFO_H_
12 #include "packager/media/base/stream_info.h"
14 namespace edash_packager {
18 kUnknownAudioCodec = 0,
50 const std::string& codec_string,
51 const std::string& language,
54 uint32_t sampling_frequency,
55 const uint8_t* extra_data,
56 size_t extra_data_size,
62 std::string
ToString()
const override;
65 AudioCodec codec()
const {
return codec_; }
66 uint8_t sample_bits()
const {
return sample_bits_; }
67 uint8_t sample_bytes()
const {
return sample_bits_ / 8; }
68 uint8_t num_channels()
const {
return num_channels_; }
69 uint32_t sampling_frequency()
const {
return sampling_frequency_; }
70 uint32_t bytes_per_frame()
const {
71 return static_cast<uint32_t
>(num_channels_) * sample_bits_ / 8;
74 void set_codec(AudioCodec codec) { codec_ = codec; }
75 void set_sampling_frequency(
const uint32_t sampling_frequency) {
76 sampling_frequency_ = sampling_frequency;
82 uint8_t audio_object_type);
89 uint8_t num_channels_;
90 uint32_t sampling_frequency_;
100 #endif // MEDIA_BASE_AUDIO_STREAM_INFO_H_