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,
42 const std::string& codec_string,
43 const std::string& language,
46 uint32_t sampling_frequency,
49 const uint8_t* extra_data,
50 size_t extra_data_size,
56 std::string
ToString()
const override;
59 AudioCodec codec()
const {
return codec_; }
60 uint8_t sample_bits()
const {
return sample_bits_; }
61 uint8_t sample_bytes()
const {
return sample_bits_ / 8; }
62 uint8_t num_channels()
const {
return num_channels_; }
63 uint32_t sampling_frequency()
const {
return sampling_frequency_; }
64 uint32_t bytes_per_frame()
const {
65 return static_cast<uint32_t
>(num_channels_) * sample_bits_ / 8;
67 uint32_t max_bitrate()
const {
return max_bitrate_; }
68 uint32_t avg_bitrate()
const {
return avg_bitrate_; }
70 void set_codec(AudioCodec codec) { codec_ = codec; }
71 void set_sampling_frequency(
const uint32_t sampling_frequency) {
72 sampling_frequency_ = sampling_frequency;
78 uint8_t audio_object_type);
85 uint8_t num_channels_;
86 uint32_t sampling_frequency_;
87 uint32_t max_bitrate_;
88 uint32_t avg_bitrate_;
98 #endif // MEDIA_BASE_AUDIO_STREAM_INFO_H_