Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ | 5 #ifndef MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ |
| 6 #define MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ | 6 #define MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 19 #include "media/base/audio_decoder_config.h" | 19 #include "media/base/audio_decoder_config.h" |
| 20 #include "media/base/media_log.h" | 20 #include "media/base/media_log.h" |
| 21 #include "media/base/media_tracks.h" | |
| 21 #include "media/base/text_track_config.h" | 22 #include "media/base/text_track_config.h" |
| 22 #include "media/base/video_decoder_config.h" | 23 #include "media/base/video_decoder_config.h" |
| 23 #include "media/formats/webm/webm_audio_client.h" | 24 #include "media/formats/webm/webm_audio_client.h" |
| 24 #include "media/formats/webm/webm_content_encodings_client.h" | 25 #include "media/formats/webm/webm_content_encodings_client.h" |
| 25 #include "media/formats/webm/webm_parser.h" | 26 #include "media/formats/webm/webm_parser.h" |
| 26 #include "media/formats/webm/webm_video_client.h" | 27 #include "media/formats/webm/webm_video_client.h" |
| 27 | 28 |
| 28 namespace media { | 29 namespace media { |
| 29 | 30 |
| 30 // Parser for WebM Tracks element. | 31 // Parser for WebM Tracks element. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 const VideoDecoderConfig& video_decoder_config() { | 71 const VideoDecoderConfig& video_decoder_config() { |
| 71 return video_decoder_config_; | 72 return video_decoder_config_; |
| 72 } | 73 } |
| 73 | 74 |
| 74 typedef std::map<int, TextTrackConfig> TextTracks; | 75 typedef std::map<int, TextTrackConfig> TextTracks; |
| 75 | 76 |
| 76 const TextTracks& text_tracks() const { | 77 const TextTracks& text_tracks() const { |
| 77 return text_tracks_; | 78 return text_tracks_; |
| 78 } | 79 } |
| 79 | 80 |
| 81 scoped_ptr<MediaTracks> media_tracks() { return std::move(media_tracks_); } | |
|
wolenetz
2016/03/05 03:26:21
nit: Using std::move here may have unintended cons
servolk
2016/03/07 23:45:02
Well, I agree that it's not super pretty solution,
wolenetz
2016/03/10 19:53:29
I understand. Please then document in the .h for t
servolk
2016/03/10 22:25:38
Done.
Note that this method is in the WebMTracksPa
| |
| 82 | |
| 80 private: | 83 private: |
| 81 // WebMParserClient implementation. | 84 // WebMParserClient implementation. |
| 82 WebMParserClient* OnListStart(int id) override; | 85 WebMParserClient* OnListStart(int id) override; |
| 83 bool OnListEnd(int id) override; | 86 bool OnListEnd(int id) override; |
| 84 bool OnUInt(int id, int64_t val) override; | 87 bool OnUInt(int id, int64_t val) override; |
| 85 bool OnFloat(int id, double val) override; | 88 bool OnFloat(int id, double val) override; |
| 86 bool OnBinary(int id, const uint8_t* data, int size) override; | 89 bool OnBinary(int id, const uint8_t* data, int size) override; |
| 87 bool OnString(int id, const std::string& str) override; | 90 bool OnString(int id, const std::string& str) override; |
| 88 | 91 |
| 89 int64_t track_type_; | 92 int64_t track_type_; |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 107 std::string audio_encryption_key_id_; | 110 std::string audio_encryption_key_id_; |
| 108 std::string video_encryption_key_id_; | 111 std::string video_encryption_key_id_; |
| 109 scoped_refptr<MediaLog> media_log_; | 112 scoped_refptr<MediaLog> media_log_; |
| 110 | 113 |
| 111 WebMAudioClient audio_client_; | 114 WebMAudioClient audio_client_; |
| 112 AudioDecoderConfig audio_decoder_config_; | 115 AudioDecoderConfig audio_decoder_config_; |
| 113 | 116 |
| 114 WebMVideoClient video_client_; | 117 WebMVideoClient video_client_; |
| 115 VideoDecoderConfig video_decoder_config_; | 118 VideoDecoderConfig video_decoder_config_; |
| 116 | 119 |
| 120 scoped_ptr<MediaTracks> media_tracks_; | |
| 121 | |
| 117 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser); | 122 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser); |
| 118 }; | 123 }; |
| 119 | 124 |
| 120 } // namespace media | 125 } // namespace media |
| 121 | 126 |
| 122 #endif // MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ | 127 #endif // MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ |
| OLD | NEW |