| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_ENCODER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_ENCODER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_ENCODER_H_ | 6 #define CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_ENCODER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 size_t max_payload_size) override; | 52 size_t max_payload_size) override; |
| 53 int32_t Encode( | 53 int32_t Encode( |
| 54 const webrtc::VideoFrame& input_image, | 54 const webrtc::VideoFrame& input_image, |
| 55 const webrtc::CodecSpecificInfo* codec_specific_info, | 55 const webrtc::CodecSpecificInfo* codec_specific_info, |
| 56 const std::vector<webrtc::FrameType>* frame_types) override; | 56 const std::vector<webrtc::FrameType>* frame_types) override; |
| 57 int32_t RegisterEncodeCompleteCallback( | 57 int32_t RegisterEncodeCompleteCallback( |
| 58 webrtc::EncodedImageCallback* callback) override; | 58 webrtc::EncodedImageCallback* callback) override; |
| 59 int32_t Release() override; | 59 int32_t Release() override; |
| 60 int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; | 60 int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; |
| 61 int32_t SetRates(uint32_t new_bit_rate, uint32_t frame_rate) override; | 61 int32_t SetRates(uint32_t new_bit_rate, uint32_t frame_rate) override; |
| 62 bool SupportsNativeHandle() const override; |
| 62 | 63 |
| 63 private: | 64 private: |
| 64 class Impl; | 65 class Impl; |
| 65 friend class RTCVideoEncoder::Impl; | 66 friend class RTCVideoEncoder::Impl; |
| 66 | 67 |
| 67 void RecordInitEncodeUMA(int32_t init_retval, | 68 void RecordInitEncodeUMA(int32_t init_retval, |
| 68 media::VideoCodecProfile profile); | 69 media::VideoCodecProfile profile); |
| 69 | 70 |
| 70 // The video codec type, as reported to WebRTC. | 71 // The video codec type, as reported to WebRTC. |
| 71 const webrtc::VideoCodecType video_codec_type_; | 72 const webrtc::VideoCodecType video_codec_type_; |
| 72 | 73 |
| 73 // Factory for creating VEAs, shared memory buffers, etc. | 74 // Factory for creating VEAs, shared memory buffers, etc. |
| 74 media::GpuVideoAcceleratorFactories* gpu_factories_; | 75 media::GpuVideoAcceleratorFactories* gpu_factories_; |
| 75 | 76 |
| 76 // Task runner that the video accelerator runs on. | 77 // Task runner that the video accelerator runs on. |
| 77 const scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner_; | 78 const scoped_refptr<base::SingleThreadTaskRunner> gpu_task_runner_; |
| 78 | 79 |
| 79 // The RTCVideoEncoder::Impl that does all the work. | 80 // The RTCVideoEncoder::Impl that does all the work. |
| 80 scoped_refptr<Impl> impl_; | 81 scoped_refptr<Impl> impl_; |
| 81 | 82 |
| 82 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoder); | 83 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoder); |
| 83 }; | 84 }; |
| 84 | 85 |
| 85 } // namespace content | 86 } // namespace content |
| 86 | 87 |
| 87 #endif // CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_ENCODER_H_ | 88 #endif // CONTENT_RENDERER_MEDIA_GPU_RTC_VIDEO_ENCODER_H_ |
| OLD | NEW |