OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BASE_ANDROID_MEDIA_DECODER_JOB_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ |
6 #define MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "media/base/android/demuxer_stream_player_params.h" | 11 #include "media/base/android/demuxer_stream_player_params.h" |
12 #include "media/base/android/media_codec_bridge.h" | 12 #include "media/base/android/media_codec_bridge.h" |
13 #include "ui/gl/android/scoped_java_surface.h" | |
13 | 14 |
14 namespace base { | 15 namespace base { |
15 class SingleThreadTaskRunner; | 16 class SingleThreadTaskRunner; |
16 } | 17 } |
17 | 18 |
18 namespace media { | 19 namespace media { |
19 | 20 |
21 class MediaDrmBridge; | |
22 | |
20 // Class for managing all the decoding tasks. Each decoding task will be posted | 23 // Class for managing all the decoding tasks. Each decoding task will be posted |
21 // onto the same thread. The thread will be stopped once Stop() is called. | 24 // onto the same thread. The thread will be stopped once Stop() is called. |
22 // Data is stored in 2 chunks. When new data arrives, it is always stored in | 25 // Data is stored in 2 chunks. When new data arrives, it is always stored in |
23 // an inactive chunk. And when the current active chunk becomes empty, a new | 26 // an inactive chunk. And when the current active chunk becomes empty, a new |
24 // data request will be sent to the renderer. | 27 // data request will be sent to the renderer. |
25 class MediaDecoderJob { | 28 class MediaDecoderJob { |
26 public: | 29 public: |
27 struct Deleter { | 30 struct Deleter { |
28 inline void operator()(MediaDecoderJob* ptr) const { ptr->Release(); } | 31 inline void operator()(MediaDecoderJob* ptr) const { ptr->Release(); } |
29 }; | 32 }; |
(...skipping 17 matching lines...) Expand all Loading... | |
47 // Called by MediaSourcePlayer when more data for this object has arrived. | 50 // Called by MediaSourcePlayer when more data for this object has arrived. |
48 void OnDataReceived(const DemuxerData& data); | 51 void OnDataReceived(const DemuxerData& data); |
49 | 52 |
50 // Prefetch so we know the decoder job has data when we call Decode(). | 53 // Prefetch so we know the decoder job has data when we call Decode(). |
51 // |prefetch_cb| - Run when prefetching has completed. | 54 // |prefetch_cb| - Run when prefetching has completed. |
52 void Prefetch(const base::Closure& prefetch_cb); | 55 void Prefetch(const base::Closure& prefetch_cb); |
53 | 56 |
54 // Called by MediaSourcePlayer to decode some data. | 57 // Called by MediaSourcePlayer to decode some data. |
55 // |callback| - Run when decode operation has completed. | 58 // |callback| - Run when decode operation has completed. |
56 // | 59 // |
57 // Returns a scoped pointer to a DemuxerConfig if a config change is detected, | 60 // Returns true if the next decode was started and |callback| will be |
58 // or an empty scoped pointer otherwise. In the case of requiring further data | 61 // called when the decode operation is complete. |
59 // before commencing decode, an empty scoped pointer will also be returned | 62 // Returns false if |media_codec_bridge_| cannot be created; |callback| is |
60 // although config change may be the next received access unit. |callback| | 63 // ignored and will not be called. |
61 // will be called when the decode operation is complete. If a config change | 64 bool Decode(base::TimeTicks start_time_ticks, |
62 // is detected, |callback| is ignored and will not be called. | 65 base::TimeDelta start_presentation_timestamp, |
63 scoped_ptr<DemuxerConfigs> Decode( | 66 const DecoderCallback& callback); |
64 base::TimeTicks start_time_ticks, | |
65 base::TimeDelta start_presentation_timestamp, | |
66 const DecoderCallback& callback); | |
67 | 67 |
68 // Called to stop the last Decode() early. | 68 // Called to stop the last Decode() early. |
69 // If the decoder is in the process of decoding the next frame, then | 69 // If the decoder is in the process of decoding the next frame, then |
70 // this method will just allow the decode to complete as normal. If | 70 // this method will just allow the decode to complete as normal. If |
71 // this object is waiting for a data request to complete, then this method | 71 // this object is waiting for a data request to complete, then this method |
72 // will wait for the data to arrive and then call the |callback| | 72 // will wait for the data to arrive and then call the |callback| |
73 // passed to Decode() with a status of MEDIA_CODEC_STOPPED. This ensures that | 73 // passed to Decode() with a status of MEDIA_CODEC_STOPPED. This ensures that |
74 // the |callback| passed to Decode() is always called and the status | 74 // the |callback| passed to Decode() is always called and the status |
75 // reflects whether data was actually decoded or the decode terminated early. | 75 // reflects whether data was actually decoded or the decode terminated early. |
76 void StopDecode(); | 76 void StopDecode(); |
77 | 77 |
78 // Flush the decoder. | 78 // Flushes the decoder and abandons all the data that is being decoded. |
79 void Flush(); | 79 void Flush(); |
80 | 80 |
81 // Enter prerolling state. The job must not currently be decoding. | 81 // Enter prerolling state. The job must not currently be decoding. |
82 void BeginPrerolling(base::TimeDelta preroll_timestamp); | 82 void BeginPrerolling(base::TimeDelta preroll_timestamp); |
83 | 83 |
84 bool prerolling() const { return prerolling_; } | 84 // Releases all the decoder resources as the current tab is going background. |
85 virtual void ReleaseDecoderResources(); | |
86 | |
87 // Sets the demuxer configs. Returns true if configs has changed, or false | |
88 // otherwise. | |
89 bool SetDemuxerConfigs(const DemuxerConfigs& configs); | |
90 | |
91 // Returns whether the decoder has finished decoding all the data. | |
92 bool OutputEOSReached() const; | |
93 | |
94 // Returns true if the audio/video stream is available, implemented by child | |
95 // classes. | |
96 virtual bool HasStream() const = 0; | |
85 | 97 |
86 bool is_decoding() const { return !decode_cb_.is_null(); } | 98 bool is_decoding() const { return !decode_cb_.is_null(); } |
87 | 99 |
88 bool is_requesting_demuxer_data() const { | 100 void set_drm_bridge(MediaDrmBridge* drm_bridge) { drm_bridge_ = drm_bridge; } |
89 return is_requesting_demuxer_data_; | 101 |
90 } | 102 bool is_content_encrypted() const { return is_content_encrypted_; } |
91 | 103 |
92 protected: | 104 protected: |
105 // Creates a new MediaDecoderJob instance. | |
106 // |decoder_task_runner| - Thread on which the decoder task will run. | |
107 // |request_data_cb| - Callback to request more data for the decoder. | |
108 // |on_demuxer_config_changed_cb| - Callback to inform the caller that | |
109 // demuxer config has changed. | |
93 MediaDecoderJob( | 110 MediaDecoderJob( |
94 const scoped_refptr<base::SingleThreadTaskRunner>& decoder_task_runner, | 111 const scoped_refptr<base::SingleThreadTaskRunner>& decoder_task_runner, |
95 MediaCodecBridge* media_codec_bridge, | 112 const base::Closure& request_data_cb, |
96 const base::Closure& request_data_cb); | 113 const base::Closure& on_demuxer_config_changed_cb); |
97 | 114 |
98 // Release the output buffer at index |output_buffer_index| and render it if | 115 // Release the output buffer at index |output_buffer_index| and render it if |
99 // |render_output| is true. Upon completion, |callback| will be called. | 116 // |render_output| is true. Upon completion, |callback| will be called. |
100 virtual void ReleaseOutputBuffer( | 117 virtual void ReleaseOutputBuffer( |
101 int output_buffer_index, | 118 int output_buffer_index, |
102 size_t size, | 119 size_t size, |
103 bool render_output, | 120 bool render_output, |
104 base::TimeDelta current_presentation_timestamp, | 121 base::TimeDelta current_presentation_timestamp, |
105 const ReleaseOutputCompletionCallback& callback) = 0; | 122 const ReleaseOutputCompletionCallback& callback) = 0; |
106 | 123 |
107 // Returns true if the "time to render" needs to be computed for frames in | 124 // Returns true if the "time to render" needs to be computed for frames in |
108 // this decoder job. | 125 // this decoder job. |
109 virtual bool ComputeTimeToRender() const = 0; | 126 virtual bool ComputeTimeToRender() const = 0; |
110 | 127 |
128 // Gets MediaCrypto object from |drm_bridge_|. | |
129 base::android::ScopedJavaLocalRef<jobject> GetMediaCrypto(); | |
130 | |
131 // Releases the |media_codec_bridge_|. | |
132 void ReleaseMediaCodecBridge(); | |
133 | |
134 MediaDrmBridge* drm_bridge() { return drm_bridge_; } | |
135 | |
136 void set_is_content_encrypted(bool is_content_encrypted) { | |
137 is_content_encrypted_ = is_content_encrypted; | |
138 } | |
139 | |
140 bool need_to_reconfig_decoder_job_; | |
141 | |
142 scoped_ptr<MediaCodecBridge> media_codec_bridge_; | |
143 | |
111 private: | 144 private: |
112 friend class MediaSourcePlayerTest; | 145 friend class MediaSourcePlayerTest; |
113 | 146 |
114 // Causes this instance to be deleted on the thread it is bound to. | 147 // Causes this instance to be deleted on the thread it is bound to. |
115 void Release(); | 148 void Release(); |
116 | 149 |
117 MediaCodecStatus QueueInputBuffer(const AccessUnit& unit); | 150 // Queues an access unit into |media_codec_bridge_|'s input buffer. If |
151 // |drain_decoder| is true, the access unit is replaced with an EOS unit so | |
152 // that we can drain the current buffer in |media_codec_bridge_|. | |
153 MediaCodecStatus QueueInputBuffer(const AccessUnit& unit, bool drain_decoder); | |
xhwang
2014/05/30 21:58:07
AccessUnit has "bool end_of_stream". Can we just u
qinmin
2014/05/30 23:43:33
We might still need to differentiate between real
xhwang
2014/06/02 23:07:11
Hmm, what's the difference? On desktop, we use the
qinmin
2014/06/03 00:41:03
I thought the return status to OnDecodeCompleted()
| |
118 | 154 |
119 // Returns true if this object has data to decode. | 155 // Returns true if this object has data to decode. |
120 bool HasData() const; | 156 bool HasData() const; |
121 | 157 |
122 // Initiates a request for more data. | 158 // Initiates a request for more data. |
123 // |done_cb| is called when more data is available in |received_data_|. | 159 // |done_cb| is called when more data is available in |received_data_|. |
124 void RequestData(const base::Closure& done_cb); | 160 void RequestData(const base::Closure& done_cb); |
125 | 161 |
126 // Posts a task to start decoding the current access unit in |received_data_|. | 162 // Posts a task to start decoding the current access unit in |received_data_|. |
127 void DecodeCurrentAccessUnit( | 163 void DecodeCurrentAccessUnit( |
128 base::TimeTicks start_time_ticks, | 164 base::TimeTicks start_time_ticks, |
129 base::TimeDelta start_presentation_timestamp); | 165 base::TimeDelta start_presentation_timestamp); |
130 | 166 |
131 // Helper function to decoder data on |thread_|. |unit| contains all the data | 167 // Helper function to decode data on |decoder_task_runner_|. |unit| contains |
132 // to be decoded. |start_time_ticks| and |start_presentation_timestamp| | 168 // all the data to be decoded. |start_time_ticks| and |
xhwang
2014/05/30 21:58:07
One AccessUnit is just one buffer to be decoded. "
qinmin
2014/05/30 23:43:33
Done.
| |
133 // represent the system time and the presentation timestamp when the first | 169 // |start_presentation_timestamp| represent the system time and the |
134 // frame is rendered. We use these information to estimate when the current | 170 // presentation timestamp when the first frame is rendered. We use these |
135 // frame should be rendered. If |needs_flush| is true, codec needs to be | 171 // information to estimate when the current frame should be rendered. |
136 // flushed at the beginning of this call. | 172 // If |needs_flush| is true, codec needs to be flushed at the beginning of |
173 // this call. If |drain_decoder| is true, an EOS frame will be fed to the | |
xhwang
2014/05/30 21:58:07
ditto. AccessUnit has "bool end_of_stream". Can't
qinmin
2014/05/30 23:43:33
same reason above, we want to differentiate betwee
| |
174 // codec instead of |unit|. That allows us to render all the data that is | |
175 // buffered inside the codec. |needs_flush| and |drain_decoder| cannot be | |
176 // both true at the same time. | |
177 // It is possible that |stop_decode_pending_| or |release_resources_pending_| | |
178 // becomes true while DecodeInternal() is called. However, they should have | |
179 // no impact on DecodeInternal(). They will be handled after DecoderInternal() | |
180 // finishes and OnDecodeCompleted() is posted on the UI thread. | |
137 void DecodeInternal(const AccessUnit& unit, | 181 void DecodeInternal(const AccessUnit& unit, |
138 base::TimeTicks start_time_ticks, | 182 base::TimeTicks start_time_ticks, |
139 base::TimeDelta start_presentation_timestamp, | 183 base::TimeDelta start_presentation_timestamp, |
140 bool needs_flush, | 184 bool needs_flush, |
185 bool drain_decoder, | |
141 const DecoderCallback& callback); | 186 const DecoderCallback& callback); |
142 | 187 |
143 // Called on the UI thread to indicate that one decode cycle has completed. | 188 // Called on the UI thread to indicate that one decode cycle has completed. |
144 // Completes any pending job destruction or any pending decode stop. If | 189 // Completes any pending job destruction or any pending decode stop. If |
145 // destruction was not pending, passes its arguments to |decode_cb_|. | 190 // destruction was not pending, passes its arguments to |decode_cb_|. |
146 void OnDecodeCompleted(MediaCodecStatus status, | 191 void OnDecodeCompleted(MediaCodecStatus status, |
147 base::TimeDelta current_presentation_timestamp, | 192 base::TimeDelta current_presentation_timestamp, |
148 base::TimeDelta max_presentation_timestamp); | 193 base::TimeDelta max_presentation_timestamp); |
149 | 194 |
150 // Helper function to get the current access unit that is being decoded. | 195 // Helper function to get the current access unit that is being decoded. |
151 const AccessUnit& CurrentAccessUnit() const; | 196 const AccessUnit& CurrentAccessUnit() const; |
152 | 197 |
153 // Helper function to get the current data chunk index that is being decoded. | 198 // Helper function to get the current data chunk index that is being decoded. |
154 size_t CurrentReceivedDataChunkIndex() const; | 199 size_t CurrentReceivedDataChunkIndex() const; |
155 | 200 |
156 // Check whether a chunk has no remaining access units to decode. If | 201 // Check whether a chunk has no remaining access units to decode. If |
157 // |is_active_chunk| is true, this function returns whether decoder has | 202 // |is_active_chunk| is true, this function returns whether decoder has |
158 // consumed all data in |received_data_[current_demuxer_data_index_]|. | 203 // consumed all data in |received_data_[current_demuxer_data_index_]|. |
159 // Otherwise, it returns whether decoder has consumed all data in the inactive | 204 // Otherwise, it returns whether decoder has consumed all data in the inactive |
160 // chunk. | 205 // chunk. |
161 bool NoAccessUnitsRemainingInChunk(bool is_active_chunk) const; | 206 bool NoAccessUnitsRemainingInChunk(bool is_active_chunk) const; |
162 | 207 |
163 // Clearn all the received data. | 208 // Requests new data for the current chunk if it runs out of data. |
164 void ClearData(); | |
165 | |
166 // Request new data for the current chunk if it runs out of data. | |
167 void RequestCurrentChunkIfEmpty(); | 209 void RequestCurrentChunkIfEmpty(); |
168 | 210 |
169 // Initialize |received_data_| and |access_unit_index_|. | 211 // Initializes |received_data_| and |access_unit_index_|. |
170 void InitializeReceivedData(); | 212 void InitializeReceivedData(); |
171 | 213 |
214 // Called when the decoder is completely drained and is ready to be released. | |
215 void OnDecoderDrained(); | |
216 | |
217 // Creates |media_codec_bridge_| for decoding purpose. Returns true if it is | |
218 // created, or false otherwise. | |
219 bool CreateMediaCodecBridge(); | |
220 | |
221 // Called when an access unit is consumed by the decoder. |is_config_change| | |
222 // indicates whether the current access unit is a config change. If it is | |
223 // true, the next access unit is guarateed to be an I-frame. | |
224 virtual void CurrentDataConsumed(bool is_config_change) {} | |
225 | |
226 // Called when |media_codec_bridge_| is released | |
227 virtual void OnMediaCodecBridgeReleased() {} | |
228 | |
229 // Implemented by the child class to create |media_codec_bridge_| for a | |
230 // particular stream. Returns true if it is created, or false otherwise. | |
231 virtual bool CreateMediaCodecBridgeInternal() = 0; | |
232 | |
233 // Returns true if the |configs| doesn't match the current demuxer configs | |
234 // the decoder job has. | |
235 virtual bool IsDemuxerConfigChanged(const DemuxerConfigs& configs) const = 0; | |
xhwang
2014/05/30 21:58:07
ditto, we are mixing "Configs" and "Config". Let's
qinmin
2014/05/30 23:43:33
Done.
| |
236 | |
237 // Update the demuxer configs. | |
238 virtual void UpdateDemuxerConfigs(const DemuxerConfigs& configs) = 0; | |
239 | |
172 // Return the index to |received_data_| that is not currently being decoded. | 240 // Return the index to |received_data_| that is not currently being decoded. |
173 size_t inactive_demuxer_data_index() const { | 241 size_t inactive_demuxer_data_index() const { |
174 return 1 - current_demuxer_data_index_; | 242 return 1 - current_demuxer_data_index_; |
175 } | 243 } |
176 | 244 |
177 // The UI message loop where callbacks should be dispatched. | 245 // The UI message loop where callbacks should be dispatched. |
178 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; | 246 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; |
179 | 247 |
180 // The task runner that decoder job runs on. | 248 // The task runner that decoder job runs on. |
181 scoped_refptr<base::SingleThreadTaskRunner> decoder_task_runner_; | 249 scoped_refptr<base::SingleThreadTaskRunner> decoder_task_runner_; |
182 | 250 |
183 // The media codec bridge used for decoding. Owned by derived class. | |
184 // NOTE: This MUST NOT be accessed in the destructor. | |
185 MediaCodecBridge* media_codec_bridge_; | |
186 | |
187 // Whether the decoder needs to be flushed. | 251 // Whether the decoder needs to be flushed. |
188 bool needs_flush_; | 252 bool needs_flush_; |
189 | 253 |
190 // Whether input EOS is encountered. | 254 // Whether input EOS is encountered. |
191 // TODO(wolenetz/qinmin): Protect with a lock. See http://crbug.com/320043. | 255 // TODO(wolenetz/qinmin): Protect with a lock. See http://crbug.com/320043. |
192 bool input_eos_encountered_; | 256 bool input_eos_encountered_; |
193 | 257 |
194 // Whether output EOS is encountered. | 258 // Whether output EOS is encountered. |
195 bool output_eos_encountered_; | 259 bool output_eos_encountered_; |
196 | 260 |
(...skipping 12 matching lines...) Expand all Loading... | |
209 // Indicates prerolling state. If true, this job has not yet decoded output | 273 // Indicates prerolling state. If true, this job has not yet decoded output |
210 // that it will render, since the most recent of job construction or | 274 // that it will render, since the most recent of job construction or |
211 // BeginPrerolling(). If false, |preroll_timestamp_| has been reached. | 275 // BeginPrerolling(). If false, |preroll_timestamp_| has been reached. |
212 // TODO(qinmin): Comparing access unit's timestamp with |preroll_timestamp_| | 276 // TODO(qinmin): Comparing access unit's timestamp with |preroll_timestamp_| |
213 // is not very accurate. | 277 // is not very accurate. |
214 bool prerolling_; | 278 bool prerolling_; |
215 | 279 |
216 // Callback used to request more data. | 280 // Callback used to request more data. |
217 base::Closure request_data_cb_; | 281 base::Closure request_data_cb_; |
218 | 282 |
283 // Callback to notify the caller config has changed. | |
284 base::Closure on_demuxer_config_changed_cb_; | |
xhwang
2014/05/30 21:58:07
usually we use OnFoo() as the name of a function t
qinmin
2014/05/30 23:43:33
Done.
| |
285 | |
219 // Callback to run when new data has been received. | 286 // Callback to run when new data has been received. |
220 base::Closure on_data_received_cb_; | 287 base::Closure on_data_received_cb_; |
221 | 288 |
222 // Callback to run when the current Decode() operation completes. | 289 // Callback to run when the current Decode() operation completes. |
223 DecoderCallback decode_cb_; | 290 DecoderCallback decode_cb_; |
224 | 291 |
225 // Data received over IPC from last RequestData() operation. | 292 // Data received over IPC from last RequestData() operation. |
226 // We keep 2 chunks at the same time to reduce the IPC latency between chunks. | 293 // We keep 2 chunks at the same time to reduce the IPC latency between chunks. |
227 // If data inside the current chunk are all decoded, we will request a new | 294 // If data inside the current chunk are all decoded, we will request a new |
228 // chunk from the demuxer and swap the current chunk with the other one. | 295 // chunk from the demuxer and swap the current chunk with the other one. |
229 // New data will always be stored in the other chunk since the current | 296 // New data will always be stored in the other chunk since the current |
230 // one may be still in use. | 297 // one may be still in use. |
231 DemuxerData received_data_[2]; | 298 DemuxerData received_data_[2]; |
232 | 299 |
233 // Index to the current data chunk that is being decoded. | 300 // Index to the current data chunk that is being decoded. |
234 size_t current_demuxer_data_index_; | 301 size_t current_demuxer_data_index_; |
235 | 302 |
236 // Index to the access unit inside each data chunk that is being decoded. | 303 // Index to the access unit inside each data chunk that is being decoded. |
237 size_t access_unit_index_[2]; | 304 size_t access_unit_index_[2]; |
238 | 305 |
239 // The index of input buffer that can be used by QueueInputBuffer(). | 306 // The index of input buffer that can be used by QueueInputBuffer(). |
240 // If the index is uninitialized or invalid, it must be -1. | 307 // If the index is uninitialized or invalid, it must be -1. |
241 int input_buf_index_; | 308 int input_buf_index_; |
242 | 309 |
310 // Indicates whether content is encrypted. | |
311 bool is_content_encrypted_; | |
312 | |
313 // Indicates the decoder job should stop after decoding the current access | |
314 // unit. | |
243 bool stop_decode_pending_; | 315 bool stop_decode_pending_; |
244 | 316 |
245 // Indicates that this object should be destroyed once the current | 317 // Indicates that this object should be destroyed once the current |
246 // Decode() has completed. This gets set when Release() gets called | 318 // Decode() has completed. This gets set when Release() gets called |
247 // while there is a decode in progress. | 319 // while there is a decode in progress. |
248 bool destroy_pending_; | 320 bool destroy_pending_; |
249 | 321 |
250 // Indicates whether the decoder is in the middle of requesting new data. | 322 // Indicates whether the decoder is in the middle of requesting new data. |
251 bool is_requesting_demuxer_data_; | 323 bool is_requesting_demuxer_data_; |
252 | 324 |
253 // Indicates whether the incoming data should be ignored. | 325 // Indicates whether the incoming data should be ignored. |
254 bool is_incoming_data_invalid_; | 326 bool is_incoming_data_invalid_; |
255 | 327 |
256 // Weak pointer passed to media decoder jobs for callbacks. It is bounded to | 328 // Indicates that |media_codec_bridge_| should be released once the current |
257 // the decoder thread. | 329 // Decode() has completed. This gets set when ReleaseDecoderResources() gets |
258 // NOTE: Weak pointers must be invalidated before all other member variables. | 330 // called while there is a decode in progress. |
259 base::WeakPtrFactory<MediaDecoderJob> weak_factory_; | 331 bool release_resources_pending_; |
332 | |
333 // Pointer to a DRM object that will be used for encrypted streams. | |
334 MediaDrmBridge* drm_bridge_; | |
335 | |
336 // Indicates whether |media_codec_bridge_| is in the middle of being drained | |
337 // due to a config change. | |
338 bool drain_decoder_; | |
260 | 339 |
261 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); | 340 DISALLOW_IMPLICIT_CONSTRUCTORS(MediaDecoderJob); |
262 }; | 341 }; |
263 | 342 |
264 } // namespace media | 343 } // namespace media |
265 | 344 |
266 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ | 345 #endif // MEDIA_BASE_ANDROID_MEDIA_DECODER_JOB_H_ |
OLD | NEW |