DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerator
webm_video_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_VIDEO_CLIENT_H_
6 #define MEDIA_FORMATS_WEBM_WEBM_VIDEO_CLIENT_H_
7 
8 #include <string>
9 #include <vector>
10 
11 #include "packager/base/memory/scoped_ptr.h"
12 #include "packager/media/base/video_stream_info.h"
13 #include "packager/media/formats/webm/webm_parser.h"
14 
15 namespace edash_packager {
16 namespace media {
17 class VideoDecoderConfig;
18 
21  public:
23  ~WebMVideoClient() override;
24 
26  void Reset();
27 
34  scoped_refptr<VideoStreamInfo> GetVideoStreamInfo(
35  int64_t track_num,
36  const std::string& codec_id,
37  const std::vector<uint8_t>& codec_private,
38  bool is_encrypted);
39 
40  private:
41  // WebMParserClient implementation.
42  bool OnUInt(int id, int64_t val) override;
43  bool OnBinary(int id, const uint8_t* data, int size) override;
44  bool OnFloat(int id, double val) override;
45 
46  int64_t pixel_width_;
47  int64_t pixel_height_;
48  int64_t crop_bottom_;
49  int64_t crop_top_;
50  int64_t crop_left_;
51  int64_t crop_right_;
52  int64_t display_width_;
53  int64_t display_height_;
54  int64_t display_unit_;
55  int64_t alpha_mode_;
56 
57  DISALLOW_COPY_AND_ASSIGN(WebMVideoClient);
58 };
59 
60 } // namespace media
61 } // namespace edash_packager
62 
63 #endif // MEDIA_FORMATS_WEBM_WEBM_VIDEO_CLIENT_H_
Helper class used to parse a Video element inside a TrackEntry element.
scoped_refptr< VideoStreamInfo > GetVideoStreamInfo(int64_t track_num, const std::string &codec_id, const std::vector< uint8_t > &codec_private, bool is_encrypted)
void Reset()
Reset this object's state so it can process a new video track element.