Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: media/formats/mp2t/mp2t_stream_parser.h

Issue 784493002: Encrypted Media: Rename NeedKey to EncryptedMediaInitData. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_MP2T_MP2T_STREAM_PARSER_H_ 5 #ifndef MEDIA_FORMATS_MP2T_MP2T_STREAM_PARSER_H_
6 #define MEDIA_FORMATS_MP2T_MP2T_STREAM_PARSER_H_ 6 #define MEDIA_FORMATS_MP2T_MP2T_STREAM_PARSER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 10
(...skipping 13 matching lines...) Expand all
24 namespace mp2t { 24 namespace mp2t {
25 25
26 class PidState; 26 class PidState;
27 27
28 class MEDIA_EXPORT Mp2tStreamParser : public StreamParser { 28 class MEDIA_EXPORT Mp2tStreamParser : public StreamParser {
29 public: 29 public:
30 explicit Mp2tStreamParser(bool sbr_in_mimetype); 30 explicit Mp2tStreamParser(bool sbr_in_mimetype);
31 virtual ~Mp2tStreamParser(); 31 virtual ~Mp2tStreamParser();
32 32
33 // StreamParser implementation. 33 // StreamParser implementation.
34 virtual void Init(const InitCB& init_cb, 34 virtual void Init(
35 const NewConfigCB& config_cb, 35 const InitCB& init_cb,
36 const NewBuffersCB& new_buffers_cb, 36 const NewConfigCB& config_cb,
37 bool ignore_text_tracks, 37 const NewBuffersCB& new_buffers_cb,
38 const NeedKeyCB& need_key_cb, 38 bool ignore_text_tracks,
39 const NewMediaSegmentCB& new_segment_cb, 39 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb,
40 const base::Closure& end_of_segment_cb, 40 const NewMediaSegmentCB& new_segment_cb,
41 const LogCB& log_cb) override; 41 const base::Closure& end_of_segment_cb,
42 const LogCB& log_cb) override;
42 virtual void Flush() override; 43 virtual void Flush() override;
43 virtual bool Parse(const uint8* buf, int size) override; 44 virtual bool Parse(const uint8* buf, int size) override;
44 45
45 private: 46 private:
46 typedef std::map<int, PidState*> PidMap; 47 typedef std::map<int, PidState*> PidMap;
47 48
48 struct BufferQueueWithConfig { 49 struct BufferQueueWithConfig {
49 BufferQueueWithConfig(bool is_cfg_sent, 50 BufferQueueWithConfig(bool is_cfg_sent,
50 const AudioDecoderConfig& audio_cfg, 51 const AudioDecoderConfig& audio_cfg,
51 const VideoDecoderConfig& video_cfg); 52 const VideoDecoderConfig& video_cfg);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 scoped_refptr<StreamParserBuffer> stream_parser_buffer); 91 scoped_refptr<StreamParserBuffer> stream_parser_buffer);
91 void OnEmitVideoBuffer( 92 void OnEmitVideoBuffer(
92 int pes_pid, 93 int pes_pid,
93 scoped_refptr<StreamParserBuffer> stream_parser_buffer); 94 scoped_refptr<StreamParserBuffer> stream_parser_buffer);
94 bool EmitRemainingBuffers(); 95 bool EmitRemainingBuffers();
95 96
96 // List of callbacks. 97 // List of callbacks.
97 InitCB init_cb_; 98 InitCB init_cb_;
98 NewConfigCB config_cb_; 99 NewConfigCB config_cb_;
99 NewBuffersCB new_buffers_cb_; 100 NewBuffersCB new_buffers_cb_;
100 NeedKeyCB need_key_cb_; 101 EncryptedMediaInitDataCB encrypted_media_init_data_cb_;
101 NewMediaSegmentCB new_segment_cb_; 102 NewMediaSegmentCB new_segment_cb_;
102 base::Closure end_of_segment_cb_; 103 base::Closure end_of_segment_cb_;
103 LogCB log_cb_; 104 LogCB log_cb_;
104 105
105 // True when AAC SBR extension is signalled in the mimetype 106 // True when AAC SBR extension is signalled in the mimetype
106 // (mp4a.40.5 in the codecs parameter). 107 // (mp4a.40.5 in the codecs parameter).
107 bool sbr_in_mimetype_; 108 bool sbr_in_mimetype_;
108 109
109 // Bytes of the TS stream. 110 // Bytes of the TS stream.
110 ByteQueue ts_byte_queue_; 111 ByteQueue ts_byte_queue_;
(...skipping 20 matching lines...) Expand all
131 TimestampUnroller timestamp_unroller_; 132 TimestampUnroller timestamp_unroller_;
132 133
133 DISALLOW_COPY_AND_ASSIGN(Mp2tStreamParser); 134 DISALLOW_COPY_AND_ASSIGN(Mp2tStreamParser);
134 }; 135 };
135 136
136 } // namespace mp2t 137 } // namespace mp2t
137 } // namespace media 138 } // namespace media
138 139
139 #endif 140 #endif
140 141
OLDNEW
« no previous file with comments | « media/filters/pipeline_integration_test_base.cc ('k') | media/formats/mp2t/mp2t_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698