| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Multiply-included message file, hence no include guard here, but see below | 5 // Multiply-included message file, hence no include guard here, but see below |
| 6 // for a much smaller-than-usual include guard section. | 6 // for a much smaller-than-usual include guard section. |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 IPC_SYNC_MESSAGE_ROUTED1_2(GpuCommandBufferMsg_GetTransferBuffer, | 564 IPC_SYNC_MESSAGE_ROUTED1_2(GpuCommandBufferMsg_GetTransferBuffer, |
| 565 int32 /* id */, | 565 int32 /* id */, |
| 566 base::SharedMemoryHandle /* transfer_buffer */, | 566 base::SharedMemoryHandle /* transfer_buffer */, |
| 567 uint32 /* size */) | 567 uint32 /* size */) |
| 568 | 568 |
| 569 // Create and initialize a hardware video decoder, returning its new route_id. | 569 // Create and initialize a hardware video decoder, returning its new route_id. |
| 570 // Created decoders should be freed with AcceleratedVideoDecoderMsg_Destroy when | 570 // Created decoders should be freed with AcceleratedVideoDecoderMsg_Destroy when |
| 571 // no longer needed. | 571 // no longer needed. |
| 572 IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateVideoDecoder, | 572 IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateVideoDecoder, |
| 573 media::VideoCodecProfile /* profile */, | 573 media::VideoCodecProfile /* profile */, |
| 574 int /* route_id */) | 574 int32 /* route_id */) |
| 575 |
| 576 // Create and initialize a hardware video encoder, returning its new route_id. |
| 577 // Created encoders should be freed with AcceleratedVideoEncoderMsg_Destroy when |
| 578 // no longer needed. |
| 579 IPC_SYNC_MESSAGE_ROUTED4_1(GpuCommandBufferMsg_CreateVideoEncoder, |
| 580 media::VideoFrame::Format /* input_format */, |
| 581 gfx::Size /* input_visible_size */, |
| 582 media::VideoCodecProfile /* output_profile */, |
| 583 uint32 /* initial_bitrate */, |
| 584 int32 /* route_id */) |
| 575 | 585 |
| 576 // Tells the proxy that there was an error and the command buffer had to be | 586 // Tells the proxy that there was an error and the command buffer had to be |
| 577 // destroyed for some reason. | 587 // destroyed for some reason. |
| 578 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Destroyed, | 588 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Destroyed, |
| 579 gpu::error::ContextLostReason /* reason */) | 589 gpu::error::ContextLostReason /* reason */) |
| 580 | 590 |
| 581 // Request that the GPU process reply with the given message. Reply may be | 591 // Request that the GPU process reply with the given message. Reply may be |
| 582 // delayed. | 592 // delayed. |
| 583 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Echo, | 593 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Echo, |
| 584 IPC::Message /* reply */) | 594 IPC::Message /* reply */) |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) | 725 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) |
| 716 | 726 |
| 717 // Video decoder has encountered an error. | 727 // Video decoder has encountered an error. |
| 718 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 728 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
| 719 uint32) /* Error ID */ | 729 uint32) /* Error ID */ |
| 720 | 730 |
| 721 //------------------------------------------------------------------------------ | 731 //------------------------------------------------------------------------------ |
| 722 // Accelerated Video Encoder Messages | 732 // Accelerated Video Encoder Messages |
| 723 // These messages are sent from the Renderer process to GPU process. | 733 // These messages are sent from the Renderer process to GPU process. |
| 724 | 734 |
| 725 // Initialize the accelerated encoder. | |
| 726 IPC_MESSAGE_ROUTED4(AcceleratedVideoEncoderMsg_Initialize, | |
| 727 media::VideoFrame::Format /* input_format */, | |
| 728 gfx::Size /* input_visible_size */, | |
| 729 media::VideoCodecProfile /* output_profile */, | |
| 730 uint32 /* initial_bitrate */) | |
| 731 | |
| 732 // Queue a input buffer to the encoder to encode. |frame_id| will be returned by | 735 // Queue a input buffer to the encoder to encode. |frame_id| will be returned by |
| 733 // AcceleratedVideoEncoderHostMsg_NotifyEncodeDone. | 736 // AcceleratedVideoEncoderHostMsg_NotifyEncodeDone. |
| 734 IPC_MESSAGE_ROUTED4(AcceleratedVideoEncoderMsg_Encode, | 737 IPC_MESSAGE_ROUTED4(AcceleratedVideoEncoderMsg_Encode, |
| 735 int32 /* frame_id */, | 738 int32 /* frame_id */, |
| 736 base::SharedMemoryHandle /* buffer_handle */, | 739 base::SharedMemoryHandle /* buffer_handle */, |
| 737 uint32 /* buffer_size */, | 740 uint32 /* buffer_size */, |
| 738 bool /* force_keyframe */) | 741 bool /* force_keyframe */) |
| 739 | 742 |
| 740 // Queue a buffer to the encoder for use in returning output. |buffer_id| will | 743 // Queue a buffer to the encoder for use in returning output. |buffer_id| will |
| 741 // be returned by AcceleratedVideoEncoderHostMsg_BitstreamBufferReady. | 744 // be returned by AcceleratedVideoEncoderHostMsg_BitstreamBufferReady. |
| 742 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderMsg_UseOutputBitstreamBuffer, | 745 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderMsg_UseOutputBitstreamBuffer, |
| 743 int32 /* buffer_id */, | 746 int32 /* buffer_id */, |
| 744 base::SharedMemoryHandle /* buffer_handle */, | 747 base::SharedMemoryHandle /* buffer_handle */, |
| 745 uint32 /* buffer_size */) | 748 uint32 /* buffer_size */) |
| 746 | 749 |
| 747 // Request a runtime encoding parameter change. | 750 // Request a runtime encoding parameter change. |
| 748 IPC_MESSAGE_ROUTED2(AcceleratedVideoEncoderMsg_RequestEncodingParametersChange, | 751 IPC_MESSAGE_ROUTED2(AcceleratedVideoEncoderMsg_RequestEncodingParametersChange, |
| 749 uint32 /* bitrate */, | 752 uint32 /* bitrate */, |
| 750 uint32 /* framerate */) | 753 uint32 /* framerate */) |
| 751 | 754 |
| 752 //------------------------------------------------------------------------------ | 755 //------------------------------------------------------------------------------ |
| 753 // Accelerated Video Encoder Host Messages | 756 // Accelerated Video Encoder Host Messages |
| 754 // These messages are sent from GPU process to Renderer process. | 757 // These messages are sent from GPU process to Renderer process. |
| 755 | 758 |
| 756 // Notify of the completion of initialization. | |
| 757 IPC_MESSAGE_ROUTED0(AcceleratedVideoEncoderHostMsg_NotifyInitializeDone) | |
| 758 | |
| 759 // Notify renderer of the input/output buffer requirements of the encoder. | 759 // Notify renderer of the input/output buffer requirements of the encoder. |
| 760 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_RequireBitstreamBuffers, | 760 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_RequireBitstreamBuffers, |
| 761 uint32 /* input_count */, | 761 uint32 /* input_count */, |
| 762 gfx::Size /* input_coded_size */, | 762 gfx::Size /* input_coded_size */, |
| 763 uint32 /* output_buffer_size */) | 763 uint32 /* output_buffer_size */) |
| 764 | 764 |
| 765 // Notify the renderer that the encoder has finished using an input buffer. | 765 // Notify the renderer that the encoder has finished using an input buffer. |
| 766 // There is no congruent entry point in the media::VideoEncodeAccelerator | 766 // There is no congruent entry point in the media::VideoEncodeAccelerator |
| 767 // interface, in VEA this same done condition is indicated by dropping the | 767 // interface, in VEA this same done condition is indicated by dropping the |
| 768 // reference to the media::VideoFrame passed to VEA::Encode(). | 768 // reference to the media::VideoFrame passed to VEA::Encode(). |
| 769 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyInputDone, | 769 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyInputDone, |
| 770 int32 /* frame_id */) | 770 int32 /* frame_id */) |
| 771 | 771 |
| 772 // Notify the renderer that an output buffer has been filled with encoded data. | 772 // Notify the renderer that an output buffer has been filled with encoded data. |
| 773 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_BitstreamBufferReady, | 773 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_BitstreamBufferReady, |
| 774 int32 /* bitstream_buffer_id */, | 774 int32 /* bitstream_buffer_id */, |
| 775 uint32 /* payload_size */, | 775 uint32 /* payload_size */, |
| 776 bool /* key_frame */) | 776 bool /* key_frame */) |
| 777 | 777 |
| 778 // Report error condition. | 778 // Report error condition. |
| 779 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError, | 779 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError, |
| 780 media::VideoEncodeAccelerator::Error /* error */) | 780 media::VideoEncodeAccelerator::Error /* error */) |
| 781 |
| 782 // Send destroy request to the encoder. |
| 783 IPC_MESSAGE_ROUTED0(AcceleratedVideoEncoderMsg_Destroy) |
| OLD | NEW |