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

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

Issue 1645873002: Use ParamTraits for media::BitstreamBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.cc ('k') | content/common/gpu/media_messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media_messages.h
diff --git a/content/common/gpu/media_messages.h b/content/common/gpu/media_messages.h
index a73c5a8b0db43f39e519570c34390b4aed0e2f8a..de0affbb3ee64ee39b98b91730a241f831add9e6 100644
--- a/content/common/gpu/media_messages.h
+++ b/content/common/gpu/media_messages.h
@@ -5,9 +5,11 @@
// Multiply-included message file, hence no include guard here, but see below
// for a much smaller-than-usual include guard section.
+#include "content/common/content_export.h"
#include "gpu/config/gpu_info.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/param_traits_macros.h"
+#include "media/base/bitstream_buffer.h"
#include "media/base/decrypt_config.h"
#include "media/base/video_types.h"
#include "media/video/jpeg_decode_accelerator.h"
@@ -19,6 +21,24 @@
#define IPC_MESSAGE_START MediaMsgStart
+#ifndef CONTENT_COMMON_GPU_MEDIA_MESSAGES_H_
+#define CONTENT_COMMON_GPU_MEDIA_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_MEDIA_MESSAGES_H_
+
IPC_ENUM_TRAITS_MAX_VALUE(media::JpegDecodeAccelerator::Error,
media::JpegDecodeAccelerator::LARGEST_ERROR_ENUM)
IPC_ENUM_TRAITS_MAX_VALUE(media::VideoEncodeAccelerator::Error,
@@ -28,24 +48,12 @@ IPC_ENUM_TRAITS_MIN_MAX_VALUE(media::VideoCodecProfile,
media::VIDEO_CODEC_PROFILE_MAX)
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)
@@ -120,8 +128,7 @@ IPC_SYNC_MESSAGE_ROUTED5_1(GpuCommandBufferMsg_CreateVideoEncoder,
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,
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.cc ('k') | content/common/gpu/media_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698