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

Unified Diff: ppapi/shared_impl/media_stream_buffer.h

Issue 1348563003: ppapi: implement PPB_AudioEncoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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: ppapi/shared_impl/media_stream_buffer.h
diff --git a/ppapi/shared_impl/media_stream_buffer.h b/ppapi/shared_impl/media_stream_buffer.h
index 8b0ebe1cc40bec8f45ac007415a994e210d68634..ddb67295c346a293e62d4436bcbc98bab84415f3 100644
--- a/ppapi/shared_impl/media_stream_buffer.h
+++ b/ppapi/shared_impl/media_stream_buffer.h
@@ -11,7 +11,12 @@
namespace ppapi {
union MediaStreamBuffer {
- enum Type { TYPE_UNKNOWN = 0, TYPE_AUDIO = 1, TYPE_VIDEO = 2, };
+ enum Type {
+ TYPE_UNKNOWN = 0,
+ TYPE_AUDIO = 1,
+ TYPE_VIDEO = 2,
+ TYPE_BITSTREAM = 3
+ };
struct Header {
Type type;
@@ -41,16 +46,26 @@ union MediaStreamBuffer {
uint8_t data[8];
};
+ struct Bitstream {
+ Header header;
+ uint32_t data_size;
+ // Uses 8 bytes to make sure the Bitstream struct has consistent size
+ // between NaCl code and renderer code.
+ uint8_t data[8];
+ };
+
// Because these structs are written and read in shared memory, we need
// the size and alighment to be consistent between NaCl and its host trusted
// platform.
PP_COMPILE_ASSERT_SIZE_IN_BYTES(Header, 8);
PP_COMPILE_ASSERT_SIZE_IN_BYTES(Audio, 40);
PP_COMPILE_ASSERT_SIZE_IN_BYTES(Video, 40);
+ PP_COMPILE_ASSERT_SIZE_IN_BYTES(Bitstream, 20);
Header header;
Video video;
Audio audio;
+ Bitstream bitstream;
};
} // namespace ppapi

Powered by Google App Engine
This is Rietveld 408576698