OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 // Implements EncodedImageCallback. | 41 // Implements EncodedImageCallback. |
42 int32_t Encoded(const EncodedImage& encoded_image, | 42 int32_t Encoded(const EncodedImage& encoded_image, |
43 const CodecSpecificInfo* codec_specific, | 43 const CodecSpecificInfo* codec_specific, |
44 const RTPFragmentationHeader* fragmentation_header) override; | 44 const RTPFragmentationHeader* fragmentation_header) override; |
45 int32_t SetTransportCallback(VCMPacketizationCallback* transport); | 45 int32_t SetTransportCallback(VCMPacketizationCallback* transport); |
46 void SetMediaOpt(media_optimization::MediaOptimization* media_opt); | 46 void SetMediaOpt(media_optimization::MediaOptimization* media_opt); |
47 void SetPayloadType(uint8_t payload_type) { payload_type_ = payload_type; } | 47 void SetPayloadType(uint8_t payload_type) { payload_type_ = payload_type; } |
48 void SetInternalSource(bool internal_source) { | 48 void SetInternalSource(bool internal_source) { |
49 internal_source_ = internal_source; | 49 internal_source_ = internal_source; |
50 } | 50 } |
51 void SetRotation(VideoRotation rotation) { rotation_ = rotation; } | |
52 void SignalLastEncoderImplementationUsed( | 51 void SignalLastEncoderImplementationUsed( |
53 const char* encoder_implementation_name); | 52 const char* encoder_implementation_name); |
54 | 53 |
55 private: | 54 private: |
56 VCMPacketizationCallback* send_callback_; | 55 VCMPacketizationCallback* send_callback_; |
57 media_optimization::MediaOptimization* media_opt_; | 56 media_optimization::MediaOptimization* media_opt_; |
58 uint8_t payload_type_; | 57 uint8_t payload_type_; |
59 bool internal_source_; | 58 bool internal_source_; |
60 VideoRotation rotation_; | |
61 | 59 |
62 EncodedImageCallback* post_encode_callback_; | 60 EncodedImageCallback* post_encode_callback_; |
63 }; | 61 }; |
64 | 62 |
65 class VCMGenericEncoder { | 63 class VCMGenericEncoder { |
66 friend class VCMCodecDataBase; | 64 friend class VCMCodecDataBase; |
67 | 65 |
68 public: | 66 public: |
69 VCMGenericEncoder(VideoEncoder* encoder, | 67 VCMGenericEncoder(VideoEncoder* encoder, |
70 VideoEncoderRateObserver* rate_observer, | 68 VideoEncoderRateObserver* rate_observer, |
(...skipping 18 matching lines...) Expand all Loading... |
89 bool SupportsNativeHandle() const; | 87 bool SupportsNativeHandle() const; |
90 int GetTargetFramerate(); | 88 int GetTargetFramerate(); |
91 | 89 |
92 private: | 90 private: |
93 VideoEncoder* const encoder_; | 91 VideoEncoder* const encoder_; |
94 VideoEncoderRateObserver* const rate_observer_; | 92 VideoEncoderRateObserver* const rate_observer_; |
95 VCMEncodedFrameCallback* const vcm_encoded_frame_callback_; | 93 VCMEncodedFrameCallback* const vcm_encoded_frame_callback_; |
96 const bool internal_source_; | 94 const bool internal_source_; |
97 rtc::CriticalSection params_lock_; | 95 rtc::CriticalSection params_lock_; |
98 EncoderParameters encoder_params_ GUARDED_BY(params_lock_); | 96 EncoderParameters encoder_params_ GUARDED_BY(params_lock_); |
99 VideoRotation rotation_; | |
100 bool is_screenshare_; | 97 bool is_screenshare_; |
101 }; | 98 }; |
102 | 99 |
103 } // namespace webrtc | 100 } // namespace webrtc |
104 | 101 |
105 #endif // WEBRTC_MODULES_VIDEO_CODING_GENERIC_ENCODER_H_ | 102 #endif // WEBRTC_MODULES_VIDEO_CODING_GENERIC_ENCODER_H_ |
OLD | NEW |