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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 int32_t SetTransportCallback(VCMPacketizationCallback* transport); | 48 int32_t SetTransportCallback(VCMPacketizationCallback* transport); |
49 /** | 49 /** |
50 * Set media Optimization | 50 * Set media Optimization |
51 */ | 51 */ |
52 void SetMediaOpt (media_optimization::MediaOptimization* mediaOpt); | 52 void SetMediaOpt (media_optimization::MediaOptimization* mediaOpt); |
53 | 53 |
54 void SetPayloadType(uint8_t payloadType) { _payloadType = payloadType; }; | 54 void SetPayloadType(uint8_t payloadType) { _payloadType = payloadType; }; |
55 void SetInternalSource(bool internalSource) { _internalSource = internalSour
ce; }; | 55 void SetInternalSource(bool internalSource) { _internalSource = internalSour
ce; }; |
56 | 56 |
57 void SetRotation(VideoRotation rotation) { _rotation = rotation; } | 57 void SetRotation(VideoRotation rotation) { _rotation = rotation; } |
| 58 bool GetAndResetFrameProduced(); |
58 | 59 |
59 private: | 60 private: |
60 VCMPacketizationCallback* _sendCallback; | 61 VCMPacketizationCallback* _sendCallback; |
61 media_optimization::MediaOptimization* _mediaOpt; | 62 media_optimization::MediaOptimization* _mediaOpt; |
62 uint8_t _payloadType; | 63 uint8_t _payloadType; |
63 bool _internalSource; | 64 bool _internalSource; |
64 VideoRotation _rotation; | 65 VideoRotation _rotation; |
65 | 66 |
66 EncodedImageCallback* post_encode_callback_; | 67 EncodedImageCallback* post_encode_callback_; |
67 | 68 |
| 69 bool frame_produced_; |
| 70 |
68 #ifdef DEBUG_ENCODER_BIT_STREAM | 71 #ifdef DEBUG_ENCODER_BIT_STREAM |
69 FILE* _bitStreamAfterEncoder; | 72 FILE* _bitStreamAfterEncoder; |
70 #endif | 73 #endif |
71 };// end of VCMEncodeFrameCallback class | 74 };// end of VCMEncodeFrameCallback class |
72 | 75 |
73 | 76 |
74 /******************************/ | 77 /******************************/ |
75 /* VCMGenericEncoder class */ | 78 /* VCMGenericEncoder class */ |
76 /******************************/ | 79 /******************************/ |
77 class VCMGenericEncoder | 80 class VCMGenericEncoder |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 145 |
143 private: | 146 private: |
144 VideoEncoder* const encoder_; | 147 VideoEncoder* const encoder_; |
145 VideoEncoderRateObserver* const rate_observer_; | 148 VideoEncoderRateObserver* const rate_observer_; |
146 VCMEncodedFrameCallback* vcm_encoded_frame_callback_; | 149 VCMEncodedFrameCallback* vcm_encoded_frame_callback_; |
147 uint32_t bit_rate_; | 150 uint32_t bit_rate_; |
148 uint32_t frame_rate_; | 151 uint32_t frame_rate_; |
149 const bool internal_source_; | 152 const bool internal_source_; |
150 mutable rtc::CriticalSection rates_lock_; | 153 mutable rtc::CriticalSection rates_lock_; |
151 VideoRotation rotation_; | 154 VideoRotation rotation_; |
| 155 bool is_screenshare_; |
152 }; // end of VCMGenericEncoder class | 156 }; // end of VCMGenericEncoder class |
153 | 157 |
154 } // namespace webrtc | 158 } // namespace webrtc |
155 | 159 |
156 #endif // WEBRTC_MODULES_VIDEO_CODING_GENERIC_ENCODER_H_ | 160 #endif // WEBRTC_MODULES_VIDEO_CODING_GENERIC_ENCODER_H_ |
OLD | NEW |