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

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: Commenting public APIs reverted VideoClient ownership 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..f00ea8bc813f9dee38ac413de65644ae654a814c
--- /dev/null
+++ b/chromecast/public/media/cast_decoder_buffer.h
@@ -0,0 +1,52 @@
+// 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;
+
+// CastDecoderBuffer provides an interface for passing a single frame of audio
+// or video data to the pipeline backend. End-of-stream is indicated by passing
+// a frame where end_of_stream() returns true.
+// Buffer ownership passes to backend when they are pushed (see
+// MediaComponentDevice::PushFrame).
+class CastDecoderBuffer {
+ public:
+ virtual ~CastDecoderBuffer() {}
byungchul 2015/07/29 20:32:23 If it won't be destroyed by shlib, it should be a
gunsch-google 2015/07/29 20:48:26 This will be owned and destroyed by shlib.
halliwell 2015/07/29 22:39:27 Correct. This definitely needs to be public.
+
+ // Returns the stream id of this decoder buffer.
+ virtual StreamId stream_id() const = 0;
byungchul 2015/07/29 20:32:23 Still don't understand why these names are lower-c
gunsch-google 2015/07/29 20:48:26 I'm in favor of getters. For example, data() and d
halliwell 2015/07/29 22:39:27 After offline discussion, prefer to leave these as
byungchul 2015/07/29 23:12:29 A TODO would be appreciated to not forget re-addre
halliwell 2015/07/30 00:19:57 Ok, TODO added :)
+
+ // 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 and only if the buffer is unencrypted.
+ virtual const CastDecryptConfig* decrypt_config() const = 0;
+
+ // Indicates 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