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

Unified Diff: content/common/gpu/gpu_messages.h

Issue 1645873002: Use ParamTraits for media::BitstreamBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compiling errors on mac and address review comments 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
Index: content/common/gpu/gpu_messages.h
diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h
index a05e6c49ed08a217e560a5800a3bd46c817ffdbf..177e63c23a9d257929d9c0763d0e688983c26954 100644
--- a/content/common/gpu/gpu_messages.h
+++ b/content/common/gpu/gpu_messages.h
@@ -55,6 +55,23 @@
#define IPC_MESSAGE_START GpuMsgStart
+#ifndef CONTENT_COMMON_GPU_GPU_MESSAGES_H_
dcheng 2016/02/18 21:06:09 Often times, people just add this to a new file (s
Owen Lin 2016/02/23 03:40:11 Acknowledged.
+#define CONTENT_COMMON_GPU_GPU_MESSAGES_H_
+
+namespace IPC {
+template <>
+struct ParamTraits<media::BitstreamBuffer> {
+ using param_type = media::BitstreamBuffer;
+ static void Write(base::Pickle* m, const param_type& p);
+ static bool Read(const base::Pickle* m,
+ base::PickleIterator* iter,
+ param_type* r);
+ static void Log(const param_type& p, std::string* l);
+};
+
+} // namespace IPC
+
+#endif // CONTENT_COMMON_GPU_GPU_MESSAGES_H_
IPC_ENUM_TRAITS_MAX_VALUE(content::CauseForGpuLaunch,
content::CAUSE_FOR_GPU_LAUNCH_MAX_ENUM - 1)
IPC_ENUM_TRAITS_MAX_VALUE(gfx::GpuPreference,
@@ -136,24 +153,12 @@ IPC_STRUCT_END()
#endif
IPC_STRUCT_BEGIN(AcceleratedJpegDecoderMsg_Decode_Params)
- IPC_STRUCT_MEMBER(int32_t, input_buffer_id)
+ IPC_STRUCT_MEMBER(media::BitstreamBuffer, input_buffer)
IPC_STRUCT_MEMBER(gfx::Size, coded_size)
- IPC_STRUCT_MEMBER(base::SharedMemoryHandle, input_buffer_handle)
- IPC_STRUCT_MEMBER(uint32_t, input_buffer_size)
IPC_STRUCT_MEMBER(base::SharedMemoryHandle, output_video_frame_handle)
IPC_STRUCT_MEMBER(uint32_t, output_buffer_size)
IPC_STRUCT_END()
-IPC_STRUCT_BEGIN(AcceleratedVideoDecoderMsg_Decode_Params)
- IPC_STRUCT_MEMBER(int32_t, bitstream_buffer_id)
- IPC_STRUCT_MEMBER(base::SharedMemoryHandle, buffer_handle)
- IPC_STRUCT_MEMBER(uint32_t, size)
- IPC_STRUCT_MEMBER(base::TimeDelta, presentation_timestamp)
- IPC_STRUCT_MEMBER(std::string, key_id)
- IPC_STRUCT_MEMBER(std::string, iv)
- IPC_STRUCT_MEMBER(std::vector<media::SubsampleEntry>, subsamples)
-IPC_STRUCT_END()
-
IPC_STRUCT_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params)
IPC_STRUCT_MEMBER(int32_t, frame_id)
IPC_STRUCT_MEMBER(base::TimeDelta, timestamp)
@@ -686,8 +691,7 @@ IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_SetCdm,
int32_t) /* CDM ID */
// Send input buffer for decoding.
-IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_Decode,
- AcceleratedVideoDecoderMsg_Decode_Params)
+IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_Decode, media::BitstreamBuffer)
// Give the texture IDs for the textures the decoder will use for output.
IPC_MESSAGE_ROUTED2(AcceleratedVideoDecoderMsg_AssignPictureBuffers,

Powered by Google App Engine
This is Rietveld 408576698