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

Unified Diff: media/filters/android/media_codec_audio_decoder.h

Issue 1740313002: Added unit test from MediaCodecPlayerAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@spitzer-aad-test
Patch Set: Skipped tests if MediaCodec is needed but not available on device Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/filters/android/media_codec_audio_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/android/media_codec_audio_decoder.h
diff --git a/media/filters/android/media_codec_audio_decoder.h b/media/filters/android/media_codec_audio_decoder.h
index 39aca8c30023626208beef89f3ef18dce2953e64..d306a21dd9db13e5ce9f570a9eaf652fc7e84ecd 100644
--- a/media/filters/android/media_codec_audio_decoder.h
+++ b/media/filters/android/media_codec_audio_decoder.h
@@ -15,12 +15,7 @@
#include "media/base/android/media_codec_bridge.h"
#include "media/base/audio_decoder.h"
#include "media/base/audio_decoder_config.h"
-
-namespace base {
-class SingleThreadTaskRunner;
-}
-
-namespace media {
+#include "media/base/media_export.h"
// MediaCodecAudioDecoder is based on Android's MediaCodec API.
// The MediaCodec API is required to play encrypted (as in EME) content on
@@ -97,7 +92,15 @@ namespace media {
// | | |
// [Error] [Ready] [Error]
-class MediaCodecAudioDecoder : public AudioDecoder {
+namespace base {
+class SingleThreadTaskRunner;
+}
+
+namespace media {
+
+class AudioTimestampHelper;
+
+class MEDIA_EXPORT MediaCodecAudioDecoder : public AudioDecoder {
public:
explicit MediaCodecAudioDecoder(
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
@@ -150,10 +153,15 @@ class MediaCodecAudioDecoder : public AudioDecoder {
// dequeues output buffers.
void DoIOTask();
- // Enqueues one pending input buffer into MediaCodec if MediaCodec has room.
+ // Enqueues pending input buffers into MediaCodec as long as it can happen
+ // without delay in dequeuing and enqueueing input buffers.
// Returns true if any input was processed.
bool QueueInput();
+ // Enqueues one pending input buffer into MediaCodec if MediaCodec has room.
+ // Returns true if any input was processed.
+ bool QueueOneInputBuffer();
+
// A helper method for QueueInput(). Dequeues an empty input buffer from the
// codec and returns the information about it. OutputBufferInfo.buf_index is
// the index of the dequeued buffer or -1 if the codec is busy or an error
@@ -222,6 +230,8 @@ class MediaCodecAudioDecoder : public AudioDecoder {
scoped_ptr<MediaCodecBridge> media_codec_;
+ scoped_ptr<AudioTimestampHelper> timestamp_helper_;
+
// Repeating timer that kicks MediaCodec operation.
base::RepeatingTimer io_timer_;
« no previous file with comments | « no previous file | media/filters/android/media_codec_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698