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

Unified Diff: chromecast/public/media/cast_decoder_buffer.h

Issue 1257013003: Load CMA backend from shared library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another round of review feedback Created 5 years, 5 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
Index: chromecast/public/media/cast_decoder_buffer.h
diff --git a/chromecast/public/media/cast_decoder_buffer.h b/chromecast/public/media/cast_decoder_buffer.h
new file mode 100644
index 0000000000000000000000000000000000000000..09908aac2b9631985ccd446e0407e2010ae001b1
--- /dev/null
+++ b/chromecast/public/media/cast_decoder_buffer.h
@@ -0,0 +1,51 @@
+// Copyright 2015 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_PUBLIC_MEDIA_CAST_DECODER_BUFFER_H_
+#define CHROMECAST_PUBLIC_MEDIA_CAST_DECODER_BUFFER_H_
+
+#include <stdint.h>
+
+#include <cstddef>
+
+#include "stream_id.h"
+
+namespace chromecast {
+namespace media {
+
+class CastDecryptConfig;
+
+// DecoderBuffer exposes only the properties of an audio/video buffer.
gunsch 2015/07/29 17:04:20 Can we rewrite this description to be more a descr
halliwell 2015/07/29 19:58:20 Done. I took a swing at updating a number of othe
+// The way a DecoderBuffer is created and organized in memory
+// is left as a detail of the implementation of derived classes.
+class CastDecoderBuffer {
+ public:
+ virtual ~CastDecoderBuffer() {}
+
+ // Returns the stream id of this decoder buffer belonging to. it's optional
+ // and default value is kPrimary.
gunsch 2015/07/29 17:04:20 Can we make this not optional, and simply return k
halliwell 2015/07/29 19:58:20 I'm not quite sure what the intent of the "it's op
+ virtual StreamId stream_id() const = 0;
+
+ // Returns the PTS of the frame in microseconds.
+ virtual int64_t timestamp() const = 0;
+
+ // Gets the frame data.
+ virtual const uint8_t* data() const = 0;
+
+ // Returns the size of the frame in bytes.
+ virtual size_t data_size() const = 0;
+
+ // Returns the decrypt configuration.
+ // Returns NULL if the buffer has no decrypt info.
gunsch 2015/07/29 17:04:20 Can we strengthen this statement to "Returns NULL
halliwell 2015/07/29 19:58:20 We can, comment updated.
+ virtual const CastDecryptConfig* decrypt_config() const = 0;
+
+ // Indicate if this is a special frame that indicates the end of the stream.
+ // If true, functions to access the frame content cannot be called.
+ virtual bool end_of_stream() const = 0;
+};
+
+} // namespace media
+} // namespace chromecast
+
+#endif // CHROMECAST_PUBLIC_MEDIA_CAST_DECODER_BUFFER_H_

Powered by Google App Engine
This is Rietveld 408576698