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 |
11 #include "base/memory/shared_memory.h" | 11 #include "base/memory/shared_memory.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/common/content_param_traits.h" | 13 #include "content/common/content_param_traits.h" |
14 #include "content/common/gpu/gpu_memory_uma_stats.h" | 14 #include "content/common/gpu/gpu_memory_uma_stats.h" |
15 #include "content/common/gpu/gpu_process_launch_causes.h" | 15 #include "content/common/gpu/gpu_process_launch_causes.h" |
16 #include "content/common/gpu/gpu_result_codes.h" | 16 #include "content/common/gpu/gpu_result_codes.h" |
17 #include "content/public/common/common_param_traits.h" | 17 #include "content/public/common/common_param_traits.h" |
18 #include "content/public/common/gpu_memory_stats.h" | 18 #include "content/public/common/gpu_memory_stats.h" |
19 #include "gpu/command_buffer/common/capabilities.h" | 19 #include "gpu/command_buffer/common/capabilities.h" |
20 #include "gpu/command_buffer/common/command_buffer.h" | 20 #include "gpu/command_buffer/common/command_buffer.h" |
21 #include "gpu/command_buffer/common/constants.h" | 21 #include "gpu/command_buffer/common/constants.h" |
22 #include "gpu/command_buffer/common/gpu_memory_allocation.h" | 22 #include "gpu/command_buffer/common/gpu_memory_allocation.h" |
23 #include "gpu/command_buffer/common/mailbox.h" | 23 #include "gpu/command_buffer/common/mailbox.h" |
| 24 #include "gpu/command_buffer/common/mailbox_holder.h" |
24 #include "gpu/command_buffer/common/value_state.h" | 25 #include "gpu/command_buffer/common/value_state.h" |
25 #include "gpu/config/gpu_info.h" | 26 #include "gpu/config/gpu_info.h" |
26 #include "gpu/ipc/gpu_command_buffer_traits.h" | 27 #include "gpu/ipc/gpu_command_buffer_traits.h" |
27 #include "ipc/ipc_channel_handle.h" | 28 #include "ipc/ipc_channel_handle.h" |
28 #include "ipc/ipc_message_macros.h" | 29 #include "ipc/ipc_message_macros.h" |
29 #include "media/base/video_frame.h" | 30 #include "media/base/video_frame.h" |
30 #include "media/video/video_decode_accelerator.h" | 31 #include "media/video/video_decode_accelerator.h" |
31 #include "media/video/video_encode_accelerator.h" | 32 #include "media/video/video_encode_accelerator.h" |
32 #include "ui/events/latency_info.h" | 33 #include "ui/events/latency_info.h" |
33 #include "ui/gfx/geometry/size.h" | 34 #include "ui/gfx/geometry/size.h" |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 // Video decoder has encountered an error. | 700 // Video decoder has encountered an error. |
700 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 701 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
701 uint32) /* Error ID */ | 702 uint32) /* Error ID */ |
702 | 703 |
703 //------------------------------------------------------------------------------ | 704 //------------------------------------------------------------------------------ |
704 // Accelerated Video Encoder Messages | 705 // Accelerated Video Encoder Messages |
705 // These messages are sent from the Renderer process to GPU process. | 706 // These messages are sent from the Renderer process to GPU process. |
706 | 707 |
707 // Queue a input buffer to the encoder to encode. |frame_id| will be returned by | 708 // Queue a input buffer to the encoder to encode. |frame_id| will be returned by |
708 // AcceleratedVideoEncoderHostMsg_NotifyInputDone. | 709 // AcceleratedVideoEncoderHostMsg_NotifyInputDone. |
709 IPC_MESSAGE_ROUTED5(AcceleratedVideoEncoderMsg_Encode, | 710 IPC_MESSAGE_ROUTED5(AcceleratedVideoEncoderMsg_EncodeSharedMemory, |
710 int32 /* frame_id */, | 711 int32 /* frame_id */, |
711 base::SharedMemoryHandle /* buffer_handle */, | 712 base::SharedMemoryHandle /* buffer_handle */, |
712 uint32 /* buffer_offset */, | 713 uint32 /* buffer_offset */, |
713 uint32 /* buffer_size */, | 714 uint32 /* buffer_size */, |
714 bool /* force_keyframe */) | 715 bool /* force_keyframe */) |
715 | 716 |
| 717 // Queue a native texture to the encoder to encode. |frame_id| will be returned |
| 718 // by AcceleratedVideoEncoderHostMsg_NotifyInputDone. |
| 719 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderMsg_EncodeNativeTexture, |
| 720 int32 /* frame_id */, |
| 721 gpu::MailboxHolder /* mailbox_holder */, |
| 722 bool /* force_keyframe */) |
| 723 |
716 // Queue a buffer to the encoder for use in returning output. |buffer_id| will | 724 // Queue a buffer to the encoder for use in returning output. |buffer_id| will |
717 // be returned by AcceleratedVideoEncoderHostMsg_BitstreamBufferReady. | 725 // be returned by AcceleratedVideoEncoderHostMsg_BitstreamBufferReady. |
718 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderMsg_UseOutputBitstreamBuffer, | 726 IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderMsg_UseOutputBitstreamBuffer, |
719 int32 /* buffer_id */, | 727 int32 /* buffer_id */, |
720 base::SharedMemoryHandle /* buffer_handle */, | 728 base::SharedMemoryHandle /* buffer_handle */, |
721 uint32 /* buffer_size */) | 729 uint32 /* buffer_size */) |
722 | 730 |
723 // Request a runtime encoding parameter change. | 731 // Request a runtime encoding parameter change. |
724 IPC_MESSAGE_ROUTED2(AcceleratedVideoEncoderMsg_RequestEncodingParametersChange, | 732 IPC_MESSAGE_ROUTED2(AcceleratedVideoEncoderMsg_RequestEncodingParametersChange, |
725 uint32 /* bitrate */, | 733 uint32 /* bitrate */, |
(...skipping 21 matching lines...) Expand all Loading... |
747 int32 /* bitstream_buffer_id */, | 755 int32 /* bitstream_buffer_id */, |
748 uint32 /* payload_size */, | 756 uint32 /* payload_size */, |
749 bool /* key_frame */) | 757 bool /* key_frame */) |
750 | 758 |
751 // Report error condition. | 759 // Report error condition. |
752 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError, | 760 IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError, |
753 media::VideoEncodeAccelerator::Error /* error */) | 761 media::VideoEncodeAccelerator::Error /* error */) |
754 | 762 |
755 // Send destroy request to the encoder. | 763 // Send destroy request to the encoder. |
756 IPC_MESSAGE_ROUTED0(AcceleratedVideoEncoderMsg_Destroy) | 764 IPC_MESSAGE_ROUTED0(AcceleratedVideoEncoderMsg_Destroy) |
OLD | NEW |