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

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

Issue 1685483002: Add stub MediaCodecAudioDecoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments, one question Created 4 years, 10 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 | « media/filters/android/media_codec_audio_decoder.h ('k') | media/media.gyp » ('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.cc
diff --git a/media/filters/android/media_codec_audio_decoder.cc b/media/filters/android/media_codec_audio_decoder.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d52577f7b379004fd661d91fcc50eb924a5427c0
--- /dev/null
+++ b/media/filters/android/media_codec_audio_decoder.cc
@@ -0,0 +1,124 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "media/filters/android/media_codec_audio_decoder.h"
+
+#include "base/logging.h"
+#include "base/thread_task_runner_handle.h"
+
+namespace media {
+
+MediaCodecAudioDecoder::MediaCodecAudioDecoder(
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
+ : task_runner_(task_runner),
+ state_(STATE_UNINITIALIZED),
+ pending_input_buf_index_(-1),
+ weak_factory_(this) {
+ DVLOG(1) << __FUNCTION__;
+}
+
+MediaCodecAudioDecoder::~MediaCodecAudioDecoder() {
+ DVLOG(1) << __FUNCTION__;
+
+ NOTIMPLEMENTED();
+}
+
+std::string MediaCodecAudioDecoder::GetDisplayName() const {
+ return "MediaCodecAudioDecoder";
+}
+
+void MediaCodecAudioDecoder::Initialize(const AudioDecoderConfig& config,
+ const SetCdmReadyCB& set_cdm_ready_cb,
+ const InitCB& init_cb,
+ const OutputCB& output_cb) {
+ DVLOG(1) << __FUNCTION__ << ": " << config.AsHumanReadableString();
+
+ NOTIMPLEMENTED();
+}
+
+void MediaCodecAudioDecoder::Decode(const scoped_refptr<DecoderBuffer>& buffer,
+ const DecodeCB& decode_cb) {
+ NOTIMPLEMENTED();
+}
+
+void MediaCodecAudioDecoder::Reset(const base::Closure& closure) {
+ DVLOG(1) << __FUNCTION__;
+
+ NOTIMPLEMENTED();
+}
+
+void MediaCodecAudioDecoder::OnKeyAdded() {
+ DVLOG(1) << __FUNCTION__;
+
+ NOTIMPLEMENTED();
+}
+
+void MediaCodecAudioDecoder::DoIOTask() {
+ NOTIMPLEMENTED();
+}
+
+bool MediaCodecAudioDecoder::QueueInput() {
+ DVLOG(2) << __FUNCTION__;
+
+ NOTIMPLEMENTED();
+ return true;
+}
+
+bool MediaCodecAudioDecoder::DequeueOutput() {
+ DVLOG(2) << __FUNCTION__;
+
+ NOTIMPLEMENTED();
+ return true;
+}
+
+void MediaCodecAudioDecoder::ManageTimer(bool start) {
+ NOTIMPLEMENTED();
+}
+
+void MediaCodecAudioDecoder::SetState(State new_state) {
+ DVLOG(1) << __FUNCTION__ << ": " << AsString(state_) << "->"
+ << AsString(new_state);
+ state_ = new_state;
+}
+
+scoped_ptr<MediaCodecBridge> MediaCodecAudioDecoder::ConfigureMediaCodec(
+ const AudioDecoderConfig& config) {
+ NOTIMPLEMENTED();
+ return nullptr;
+}
+
+void MediaCodecAudioDecoder::OnDecodedFrame(const OutputBufferInfo& out) {
+ DVLOG(2) << __FUNCTION__ << " pts:" << out.pts;
+
+ NOTIMPLEMENTED();
+}
+
+void MediaCodecAudioDecoder::OnOutputFormatChanged() {
+ DVLOG(2) << __FUNCTION__;
+
+ NOTIMPLEMENTED();
+}
+
+#undef RETURN_STRING
+#define RETURN_STRING(x) \
+ case x: \
+ return #x;
+
+// static
+const char* MediaCodecAudioDecoder::AsString(State state) {
+ switch (state) {
+ RETURN_STRING(STATE_UNINITIALIZED);
+ RETURN_STRING(STATE_READY);
+ RETURN_STRING(STATE_WAITING_FOR_KEY);
+ RETURN_STRING(STATE_DRAINING);
+ RETURN_STRING(STATE_DRAINED);
+ RETURN_STRING(STATE_ERROR);
+ }
+ NOTREACHED() << "Unknown state " << state;
+ return nullptr;
+}
+
+#undef RETURN_STRING
+
+} // namespace media
« no previous file with comments | « media/filters/android/media_codec_audio_decoder.h ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698