| 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_RTC_VIDEO_ENCODER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ | 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 void NotifyError(int32_t error); | 78 void NotifyError(int32_t error); |
| 79 | 79 |
| 80 void RecordInitEncodeUMA(int32_t init_retval); | 80 void RecordInitEncodeUMA(int32_t init_retval); |
| 81 | 81 |
| 82 base::ThreadChecker thread_checker_; | 82 base::ThreadChecker thread_checker_; |
| 83 | 83 |
| 84 // The video codec type, as reported to WebRTC. | 84 // The video codec type, as reported to WebRTC. |
| 85 const webrtc::VideoCodecType video_codec_type_; | 85 const webrtc::VideoCodecType video_codec_type_; |
| 86 | 86 |
| 87 // The video codec profile, to configure the encoder to encode to. | 87 // The video codec profile, to configure the encoder to encode to. |
| 88 const media::VideoCodecProfile video_codec_profile_; | 88 media::VideoCodecProfile video_codec_profile_; |
| 89 | 89 |
| 90 // Factory for creating VEAs, shared memory buffers, etc. | 90 // Factory for creating VEAs, shared memory buffers, etc. |
| 91 scoped_refptr<media::GpuVideoAcceleratorFactories> gpu_factories_; | 91 scoped_refptr<media::GpuVideoAcceleratorFactories> gpu_factories_; |
| 92 | 92 |
| 93 // webrtc::VideoEncoder encode complete callback. | 93 // webrtc::VideoEncoder encode complete callback. |
| 94 webrtc::EncodedImageCallback* encoded_image_callback_; | 94 webrtc::EncodedImageCallback* encoded_image_callback_; |
| 95 | 95 |
| 96 // The RTCVideoEncoder::Impl that does all the work. | 96 // The RTCVideoEncoder::Impl that does all the work. |
| 97 scoped_refptr<Impl> impl_; | 97 scoped_refptr<Impl> impl_; |
| 98 | 98 |
| 99 // We cannot immediately return error conditions to the WebRTC user of this | 99 // We cannot immediately return error conditions to the WebRTC user of this |
| 100 // class, as there is no error callback in the webrtc::VideoEncoder interface. | 100 // class, as there is no error callback in the webrtc::VideoEncoder interface. |
| 101 // Instead, we cache an error status here and return it the next time an | 101 // Instead, we cache an error status here and return it the next time an |
| 102 // interface entry point is called. | 102 // interface entry point is called. |
| 103 int32_t impl_status_; | 103 int32_t impl_status_; |
| 104 | 104 |
| 105 // Weak pointer factory for posting back VEA::Client notifications to | 105 // Weak pointer factory for posting back VEA::Client notifications to |
| 106 // RTCVideoEncoder. | 106 // RTCVideoEncoder. |
| 107 // NOTE: Weak pointers must be invalidated before all other member variables. | 107 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 108 base::WeakPtrFactory<RTCVideoEncoder> weak_factory_; | 108 base::WeakPtrFactory<RTCVideoEncoder> weak_factory_; |
| 109 | 109 |
| 110 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoder); | 110 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoder); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace content | 113 } // namespace content |
| 114 | 114 |
| 115 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ | 115 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ |
| OLD | NEW |