DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
webm_audio_client.h
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef MEDIA_FORMATS_WEBM_WEBM_AUDIO_CLIENT_H_
6 #define MEDIA_FORMATS_WEBM_WEBM_AUDIO_CLIENT_H_
7 
8 #include <string>
9 #include <vector>
10 
11 #include "packager/base/memory/scoped_ptr.h"
12 #include "packager/media/base/audio_stream_info.h"
13 #include "packager/media/formats/webm/webm_parser.h"
14 
15 namespace edash_packager {
16 namespace media {
17 class AudioDecoderConfig;
18 
21  public:
23  ~WebMAudioClient() override;
24 
26  void Reset();
27 
34  scoped_refptr<AudioStreamInfo> GetAudioStreamInfo(
35  int64_t track_num,
36  const std::string& codec_id,
37  const std::vector<uint8_t>& codec_private,
38  const std::string& language,
39  bool is_encrypted);
40 
41  private:
42  // WebMParserClient implementation.
43  bool OnUInt(int id, int64_t val) override;
44  bool OnFloat(int id, double val) override;
45 
46  int channels_;
47  double samples_per_second_;
48  double output_samples_per_second_;
49 
50  DISALLOW_COPY_AND_ASSIGN(WebMAudioClient);
51 };
52 
53 } // namespace media
54 } // namespace edash_packager
55 
56 #endif // MEDIA_FORMATS_WEBM_WEBM_AUDIO_CLIENT_H_
void Reset()
Reset this object's state so it can process a new audio track element.
Helper class used to parse an Audio element inside a TrackEntry element.
scoped_refptr< AudioStreamInfo > GetAudioStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, const std::string &language, bool is_encrypted)