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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 | 559 |
560 // Destroy a previously created transfer buffer. | 560 // Destroy a previously created transfer buffer. |
561 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyTransferBuffer, | 561 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyTransferBuffer, |
562 int32 /* id */) | 562 int32 /* id */) |
563 | 563 |
564 // Create and initialize a hardware video decoder, returning its new route_id. | 564 // Create and initialize a hardware video decoder, returning its new route_id. |
565 // Created decoders should be freed with AcceleratedVideoDecoderMsg_Destroy when | 565 // Created decoders should be freed with AcceleratedVideoDecoderMsg_Destroy when |
566 // no longer needed. | 566 // no longer needed. |
567 IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateVideoDecoder, | 567 IPC_SYNC_MESSAGE_ROUTED1_1(GpuCommandBufferMsg_CreateVideoDecoder, |
568 media::VideoCodecProfile /* profile */, | 568 media::VideoCodecProfile /* profile */, |
569 int /* route_id */) | 569 int32 /* route_id */) |
| 570 |
| 571 // Create and initialize a hardware video encoder, returning its new route_id. |
| 572 // Created encoders should be freed with AcceleratedVideoEncoderMsg_Destroy when |
| 573 // no longer needed. |
| 574 IPC_SYNC_MESSAGE_ROUTED4_1(GpuCommandBufferMsg_CreateVideoEncoder, |
| 575 media::VideoFrame::Format /* input_format */, |
| 576 gfx::Size /* input_visible_size */, |
| 577 media::VideoCodecProfile /* output_profile */, |
| 578 uint32 /* initial_bitrate */, |
| 579 int32 /* route_id */) |
570 | 580 |
571 // Tells the proxy that there was an error and the command buffer had to be | 581 // Tells the proxy that there was an error and the command buffer had to be |
572 // destroyed for some reason. | 582 // destroyed for some reason. |
573 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Destroyed, | 583 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Destroyed, |
574 gpu::error::ContextLostReason /* reason */) | 584 gpu::error::ContextLostReason /* reason */) |
575 | 585 |
576 // Request that the GPU process reply with the given message. Reply may be | 586 // Request that the GPU process reply with the given message. Reply may be |
577 // delayed. | 587 // delayed. |
578 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Echo, | 588 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_Echo, |
579 IPC::Message /* reply */) | 589 IPC::Message /* reply */) |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) | 720 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) |
711 | 721 |
712 // Video decoder has encountered an error. | 722 // Video decoder has encountered an error. |
713 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 723 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
714 uint32) /* Error ID */ | 724 uint32) /* Error ID */ |
715 | 725 |
716 //------------------------------------------------------------------------------ | 726 //------------------------------------------------------------------------------ |
717 // Accelerated Video Encoder Messages | 727 // Accelerated Video Encoder Messages |
718 // These messages are sent from the Renderer process to GPU process. | 728 // These messages are sent from the Renderer process to GPU process. |
719 | 729 |
720 // Initialize the accelerated encoder. | |
721 IPC_MESSAGE_ROUTED4(AcceleratedVideoEncoderMsg_Initialize, | |
722 media::VideoFrame::Format /* input_format */, | |
723 gfx::Size /* input_visible_size */, | |
724 media::VideoCodecProfile /* output_profile */, | |
725 uint32 /* initial_bitrate */) | |
726 | |
727 // Queue a input buffer to the encoder to encode. |frame_id| will be returned by | 730 // Queue a input buffer to the encoder to encode. |frame_id| will be returned by |
728 // AcceleratedVideoEncoderHostMsg_NotifyEncodeDone. | 731 // AcceleratedVideoEncoderHostMsg_NotifyEncodeDone. |
729 IPC_MESSAGE_ROUTED4(AcceleratedVideoEncoderMsg_Encode, | 732 IPC_MESSAGE_ROUTED4(AcceleratedVideoEncoderMsg_Encode, |
730 int32 /* frame_id */, | 733 int32 /* frame_id */, |
731 base::SharedMemoryHandle /* buffer_handle */, | 734 base::SharedMemoryHandle /* buffer_handle */, |
732 uint32 /* buffer_size */, | 735 uint32 /* buffer_size */, |
733 bool /* force_keyframe */) | 736 bool /* force_keyframe */) |
734 | 737 |
735 // Queue a buffer to the encoder for use in returning output. |buffer_id| will | 738 // Queue a buffer to the encoder for use in returning output. |buffer_id| will |
736 // be returned by AcceleratedVideoEncoderHostMsg_BitstreamBufferReady. | 739 // be returned by AcceleratedVideoEncoderHostMsg_BitstreamBufferReady. |
737 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderMsg_UseOutputBitstreamBuffer, | 740 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderMsg_UseOutputBitstreamBuffer, |
738 int32 /* buffer_id */, | 741 int32 /* buffer_id */, |
739 base::SharedMemoryHandle /* buffer_handle */, | 742 base::SharedMemoryHandle /* buffer_handle */, |
740 uint32 /* buffer_size */) | 743 uint32 /* buffer_size */) |
741 | 744 |
742 // Request a runtime encoding parameter change. | 745 // Request a runtime encoding parameter change. |
743 IPC_MESSAGE_ROUTED2(AcceleratedVideoEncoderMsg_RequestEncodingParametersChange, | 746 IPC_MESSAGE_ROUTED2(AcceleratedVideoEncoderMsg_RequestEncodingParametersChange, |
744 uint32 /* bitrate */, | 747 uint32 /* bitrate */, |
745 uint32 /* framerate */) | 748 uint32 /* framerate */) |
746 | 749 |
747 //------------------------------------------------------------------------------ | 750 //------------------------------------------------------------------------------ |
748 // Accelerated Video Encoder Host Messages | 751 // Accelerated Video Encoder Host Messages |
749 // These messages are sent from GPU process to Renderer process. | 752 // These messages are sent from GPU process to Renderer process. |
750 | 753 |
751 // Notify of the completion of initialization. | |
752 IPC_MESSAGE_ROUTED0(AcceleratedVideoEncoderHostMsg_NotifyInitializeDone) | |
753 | |
754 // Notify renderer of the input/output buffer requirements of the encoder. | 754 // Notify renderer of the input/output buffer requirements of the encoder. |
755 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_RequireBitstreamBuffers, | 755 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_RequireBitstreamBuffers, |
756 uint32 /* input_count */, | 756 uint32 /* input_count */, |
757 gfx::Size /* input_coded_size */, | 757 gfx::Size /* input_coded_size */, |
758 uint32 /* output_buffer_size */) | 758 uint32 /* output_buffer_size */) |
759 | 759 |
760 // Notify the renderer that the encoder has finished using an input buffer. | 760 // Notify the renderer that the encoder has finished using an input buffer. |
761 // There is no congruent entry point in the media::VideoEncodeAccelerator | 761 // There is no congruent entry point in the media::VideoEncodeAccelerator |
762 // interface, in VEA this same done condition is indicated by dropping the | 762 // interface, in VEA this same done condition is indicated by dropping the |
763 // reference to the media::VideoFrame passed to VEA::Encode(). | 763 // reference to the media::VideoFrame passed to VEA::Encode(). |
764 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyInputDone, | 764 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyInputDone, |
765 int32 /* frame_id */) | 765 int32 /* frame_id */) |
766 | 766 |
767 // Notify the renderer that an output buffer has been filled with encoded data. | 767 // Notify the renderer that an output buffer has been filled with encoded data. |
768 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_BitstreamBufferReady, | 768 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_BitstreamBufferReady, |
769 int32 /* bitstream_buffer_id */, | 769 int32 /* bitstream_buffer_id */, |
770 uint32 /* payload_size */, | 770 uint32 /* payload_size */, |
771 bool /* key_frame */) | 771 bool /* key_frame */) |
772 | 772 |
773 // Report error condition. | 773 // Report error condition. |
774 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError, | 774 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError, |
775 media::VideoEncodeAccelerator::Error /* error */) | 775 media::VideoEncodeAccelerator::Error /* error */) |
| 776 |
| 777 // Send destroy request to the encoder. |
| 778 IPC_MESSAGE_ROUTED0(AcceleratedVideoEncoderMsg_Destroy) |
OLD | NEW |