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

Side by Side Diff: media/filters/android/media_codec_audio_decoder.h

Issue 1834303005: Refactor audio and video decoder status into common file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Created 4 years, 8 months 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_FILTERS_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_
6 #define MEDIA_FILTERS_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_ 6 #define MEDIA_FILTERS_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 InputBufferInfo DequeueInputBuffer(); 183 InputBufferInfo DequeueInputBuffer();
184 184
185 // A helper method for QueueInput(). Fills an input buffer referred to by 185 // A helper method for QueueInput(). Fills an input buffer referred to by
186 // |input_info| with data and enqueues it to the codec. Returns true if 186 // |input_info| with data and enqueues it to the codec. Returns true if
187 // succeeded or false if an error occurs or there is no good CDM key. 187 // succeeded or false if an error occurs or there is no good CDM key.
188 // May set STATE_DRAINING, STATE_WAITING_FOR_KEY or STATE_ERROR. 188 // May set STATE_DRAINING, STATE_WAITING_FOR_KEY or STATE_ERROR.
189 bool EnqueueInputBuffer(const InputBufferInfo& input_info); 189 bool EnqueueInputBuffer(const InputBufferInfo& input_info);
190 190
191 // Calls DecodeCB with |decode_status| for every frame in |input_queue| and 191 // Calls DecodeCB with |decode_status| for every frame in |input_queue| and
192 // then clears it. 192 // then clears it.
193 void ClearInputQueue(Status decode_status); 193 void ClearInputQueue(DecodeStatus decode_status);
194 194
195 // Dequeues all output buffers from MediaCodec that are immediately available. 195 // Dequeues all output buffers from MediaCodec that are immediately available.
196 // Returns true if any output buffer was received from MediaCodec. 196 // Returns true if any output buffer was received from MediaCodec.
197 bool DequeueOutput(); 197 bool DequeueOutput();
198 198
199 // Start the timer immediately if |start| is true or stop it based on elapsed 199 // Start the timer immediately if |start| is true or stop it based on elapsed
200 // idle time if |start| is false. 200 // idle time if |start| is false.
201 void ManageTimer(bool start); 201 void ManageTimer(bool start);
202 202
203 // Helper method to change the state. 203 // Helper method to change the state.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 media::MediaDrmBridgeCdmContext::JavaObjectPtr media_crypto_; 270 media::MediaDrmBridgeCdmContext::JavaObjectPtr media_crypto_;
271 271
272 base::WeakPtrFactory<MediaCodecAudioDecoder> weak_factory_; 272 base::WeakPtrFactory<MediaCodecAudioDecoder> weak_factory_;
273 273
274 DISALLOW_COPY_AND_ASSIGN(MediaCodecAudioDecoder); 274 DISALLOW_COPY_AND_ASSIGN(MediaCodecAudioDecoder);
275 }; 275 };
276 276
277 } // namespace media 277 } // namespace media
278 278
279 #endif // MEDIA_FILTERS_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_ 279 #endif // MEDIA_FILTERS_ANDROID_MEDIA_CODEC_AUDIO_DECODER_H_
OLDNEW
« no previous file with comments | « media/cast/sender/h264_vt_encoder_unittest.cc ('k') | media/filters/android/media_codec_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698