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

Unified Diff: chromecast/media/cma/base/decoder_buffer_adapter.h

Issue 535563002: Add the base class for decoder buffers used in cast media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Naming: DecoderBufferAdapter. Created 6 years, 3 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 | chromecast/media/cma/base/decoder_buffer_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/base/decoder_buffer_adapter.h
diff --git a/chromecast/media/cma/base/decoder_buffer_adapter.h b/chromecast/media/cma/base/decoder_buffer_adapter.h
new file mode 100644
index 0000000000000000000000000000000000000000..9fe6da95ab7cb3208cd88a942d41252fddcc477e
--- /dev/null
+++ b/chromecast/media/cma/base/decoder_buffer_adapter.h
@@ -0,0 +1,45 @@
+// Copyright 2014 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.
+
+#ifndef CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_ADAPTER_H_
+#define CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_ADAPTER_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "chromecast/media/cma/base/decoder_buffer_base.h"
+
+namespace media {
+class DecoderBuffer;
+}
+
+namespace chromecast {
+namespace media {
+
+// DecoderBufferAdapter wraps a ::media::DecoderBuffer
+// into a DecoderBufferBase.
+class DecoderBufferAdapter : public DecoderBufferBase {
+ public:
+ explicit DecoderBufferAdapter(
+ const scoped_refptr< ::media::DecoderBuffer>& buffer);
+
+ // DecoderBufferBase implementation.
+ virtual base::TimeDelta timestamp() const OVERRIDE;
+ virtual const uint8* data() const OVERRIDE;
+ virtual uint8* writable_data() const OVERRIDE;
+ virtual int data_size() const OVERRIDE;
+ virtual const ::media::DecryptConfig* decrypt_config() const OVERRIDE;
+ virtual bool end_of_stream() const OVERRIDE;
+
+ private:
+ virtual ~DecoderBufferAdapter();
+
+ scoped_refptr< ::media::DecoderBuffer> const buffer_;
+
+ DISALLOW_COPY_AND_ASSIGN(DecoderBufferAdapter);
+};
+
+} // namespace media
+} // namespace chromecast
+
+#endif // CHROMECAST_MEDIA_CMA_BASE_DECODER_BUFFER_ADAPTER_H_
« no previous file with comments | « no previous file | chromecast/media/cma/base/decoder_buffer_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698