diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-14 22:53:39 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-14 22:53:39 +0000 |
commit | ef932ed16a50a6fa0adb801c32f3d4860e880bc9 (patch) | |
tree | 76ada28fef125550a957fc868d5cb2a4013b8f93 /content/common | |
parent | 5b8149fa24feeeab86de1b86ee1da6abe68165f4 (diff) | |
download | chromium_src-ef932ed16a50a6fa0adb801c32f3d4860e880bc9.zip chromium_src-ef932ed16a50a6fa0adb801c32f3d4860e880bc9.tar.gz chromium_src-ef932ed16a50a6fa0adb801c32f3d4860e880bc9.tar.bz2 |
Draft version of the HW video decode tester and few other changes.
Intention is that this tester can be used to decouple HW decode accelerator
integration from running the whole Chrome browser.
Features:
- Independent GUnit executable, which should be possible to use in autotests.
- Mimics Renderer process from Gpu video pipeline perspective.
* Test bench contains implementation of FakeClient which essentially mimics
Renderer process from the GpuVideoDecodeAccelerator's point of view.
* FakeClient runs on it's own thread and will communicate with using the IPC
messages that are used also within the real use case.
* FakeClient will allocate memories using same SharedMemory stuff as the
real Renderer code.
* Currently reads H.264 Annex B bitstream from file and parses it to NAL
units before feeding to the decoder
* TODO: Polish and improving the features and configurability.
* TODO: GLES texture allocation for textures.
- Allows building various test cases and error behaviour as well both on
AcceleratedVideoDecoder interface as well as erroneous behaviour from the
client.
- Allows also checking expected order of calls if we want to enforce certain
behaviour across various implementations.
Patch by vmr@chromium.org:
http://codereview.chromium.org/6720040/
BUG=none
TEST=none
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81663 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r-- | content/common/gpu_messages.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/content/common/gpu_messages.h b/content/common/gpu_messages.h index 4e4d5c7..9ea9beb 100644 --- a/content/common/gpu_messages.h +++ b/content/common/gpu_messages.h @@ -65,13 +65,6 @@ IPC_STRUCT_BEGIN(GpuVideoDecoderFormatChangeParam) IPC_STRUCT_MEMBER(base::SharedMemoryHandle, input_buffer_handle) IPC_STRUCT_END() -IPC_STRUCT_BEGIN(AcceleratedVideoDecoderDecodeParam) - IPC_STRUCT_MEMBER(base::SharedMemoryHandle, input_buffer_handle) - IPC_STRUCT_MEMBER(int32, offset) - IPC_STRUCT_MEMBER(int32, size) - IPC_STRUCT_MEMBER(int32, flags) // Miscellaneous flag bit mask. -IPC_STRUCT_END() - #if defined(OS_MACOSX) IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params) IPC_STRUCT_MEMBER(int32, renderer_id) @@ -535,27 +528,31 @@ IPC_SYNC_MESSAGE_CONTROL1_1(AcceleratedVideoDecoderMsg_GetConfigs, // Message to create the accelerated video decoder. IPC_SYNC_MESSAGE_CONTROL1_1(AcceleratedVideoDecoderMsg_Create, std::vector<uint32>, /* Config */ - int32) /* Decoder ID, 0 equals failure */ + int32) /* Decoder ID, -1 equals failure */ // Send input buffer for decoding. -IPC_MESSAGE_ROUTED4(AcceleratedVideoDecoderMsg_Decode, +IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderMsg_Decode, base::SharedMemoryHandle, /* input_buffer_handle */ int32, /* offset */ - int32, /* size */ - int32) /* flags */ + int32) /* size */ // Sent from Renderer process to the GPU process to give the texture IDs for // generated GL textures. -IPC_MESSAGE_ROUTED2(AcceleratedVideoDecoderMsg_AssignPictureBuffer, +IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderMsg_AssignPictureBuffer, int32, /* Picture buffer ID */ + base::SharedMemoryHandle, /* Pointer to sysmem output */ std::vector<uint32>) /* TextureIDs for pictures */ +// Send from Renderer process to the GPU process to recycle the given picture +// buffer for further decoding. IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_ReusePictureBuffer, int32) /* Picture buffer ID */ // Send flush request to the decoder. -IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_Flush, - int32) /* 0 for normal flush, 1 for abort flush */ +IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderMsg_Flush) + +// Send abort request to the decoder. +IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderMsg_Abort) // Destroy and release decoder asynchronously. IPC_SYNC_MESSAGE_CONTROL0_0(AcceleratedVideoDecoderMsg_Destroy) @@ -563,14 +560,16 @@ IPC_SYNC_MESSAGE_CONTROL0_0(AcceleratedVideoDecoderMsg_Destroy) //------------------------------------------------------------------------------ // Accelerated Video Decoder Host Messages // These messages are sent from GPU process to Renderer process. +// Inform AcceleratedVideoDecoderHost that AcceleratedVideoDecoder has been +// created. + // Accelerated video decoder has consumed input buffer from transfer buffer. -IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed) +IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed, + base::SharedMemoryHandle) /* Processed buffer handle */ // Allocate video frames for output of the hardware video decoder. -IPC_MESSAGE_ROUTED4(AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers, +IPC_MESSAGE_ROUTED2(AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers, int32, /* Number of video frames to generate */ - uint32, /* Width of the video frame */ - uint32, /* Height of the video frame */ std::vector<uint32>) /* Vector containing the dictionary for buffer config */ @@ -586,6 +585,9 @@ IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_PictureReady, // Confirm decoder has been flushed. IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) +// Confirm decoder has been aborted. +IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_AbortDone) + // Decoder has faced end of stream marker in the stream. IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream) |