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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 bool internal_source_; | 52 bool internal_source_; |
53 EncodedImageCallback* const post_encode_callback_; | 53 EncodedImageCallback* const post_encode_callback_; |
54 media_optimization::MediaOptimization* const media_opt_; | 54 media_optimization::MediaOptimization* const media_opt_; |
55 }; | 55 }; |
56 | 56 |
57 class VCMGenericEncoder { | 57 class VCMGenericEncoder { |
58 friend class VCMCodecDataBase; | 58 friend class VCMCodecDataBase; |
59 | 59 |
60 public: | 60 public: |
61 VCMGenericEncoder(VideoEncoder* encoder, | 61 VCMGenericEncoder(VideoEncoder* encoder, |
62 VideoEncoderRateObserver* rate_observer, | |
63 VCMEncodedFrameCallback* encoded_frame_callback, | 62 VCMEncodedFrameCallback* encoded_frame_callback, |
64 bool internal_source); | 63 bool internal_source); |
65 ~VCMGenericEncoder(); | 64 ~VCMGenericEncoder(); |
66 int32_t Release(); | 65 int32_t Release(); |
67 int32_t InitEncode(const VideoCodec* settings, | 66 int32_t InitEncode(const VideoCodec* settings, |
68 int32_t number_of_cores, | 67 int32_t number_of_cores, |
69 size_t max_payload_size); | 68 size_t max_payload_size); |
70 int32_t Encode(const VideoFrame& frame, | 69 int32_t Encode(const VideoFrame& frame, |
71 const CodecSpecificInfo* codec_specific, | 70 const CodecSpecificInfo* codec_specific, |
72 const std::vector<FrameType>& frame_types); | 71 const std::vector<FrameType>& frame_types); |
73 | 72 |
74 const char* ImplementationName() const; | 73 const char* ImplementationName() const; |
75 | 74 |
76 void SetEncoderParameters(const EncoderParameters& params); | 75 void SetEncoderParameters(const EncoderParameters& params); |
77 EncoderParameters GetEncoderParameters() const; | 76 EncoderParameters GetEncoderParameters() const; |
78 | 77 |
79 int32_t SetPeriodicKeyFrames(bool enable); | 78 int32_t SetPeriodicKeyFrames(bool enable); |
80 int32_t RequestFrame(const std::vector<FrameType>& frame_types); | 79 int32_t RequestFrame(const std::vector<FrameType>& frame_types); |
81 bool InternalSource() const; | 80 bool InternalSource() const; |
82 void OnDroppedFrame(); | 81 void OnDroppedFrame(); |
83 bool SupportsNativeHandle() const; | 82 bool SupportsNativeHandle() const; |
84 | 83 |
85 private: | 84 private: |
86 rtc::RaceChecker race_checker_; | 85 rtc::RaceChecker race_checker_; |
87 | 86 |
88 VideoEncoder* const encoder_ GUARDED_BY(race_checker_); | 87 VideoEncoder* const encoder_ GUARDED_BY(race_checker_); |
89 VideoEncoderRateObserver* const rate_observer_; | |
90 VCMEncodedFrameCallback* const vcm_encoded_frame_callback_; | 88 VCMEncodedFrameCallback* const vcm_encoded_frame_callback_; |
91 const bool internal_source_; | 89 const bool internal_source_; |
92 rtc::CriticalSection params_lock_; | 90 rtc::CriticalSection params_lock_; |
93 EncoderParameters encoder_params_ GUARDED_BY(params_lock_); | 91 EncoderParameters encoder_params_ GUARDED_BY(params_lock_); |
94 bool is_screenshare_; | 92 bool is_screenshare_; |
95 }; | 93 }; |
96 | 94 |
97 } // namespace webrtc | 95 } // namespace webrtc |
98 | 96 |
99 #endif // WEBRTC_MODULES_VIDEO_CODING_GENERIC_ENCODER_H_ | 97 #endif // WEBRTC_MODULES_VIDEO_CODING_GENERIC_ENCODER_H_ |
OLD | NEW |