Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: webrtc/modules/video_coding/main/source/generic_encoder.h

Issue 1424843002: Make VCMEncodedFrameCallback const. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: feedback Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 /******************************/ 81 /******************************/
82 /* VCMGenericEncoder class */ 82 /* VCMGenericEncoder class */
83 /******************************/ 83 /******************************/
84 class VCMGenericEncoder 84 class VCMGenericEncoder
85 { 85 {
86 friend class VCMCodecDataBase; 86 friend class VCMCodecDataBase;
87 public: 87 public:
88 VCMGenericEncoder(VideoEncoder* encoder, 88 VCMGenericEncoder(VideoEncoder* encoder,
89 VideoEncoderRateObserver* rate_observer, 89 VideoEncoderRateObserver* rate_observer,
90 VCMEncodedFrameCallback* encoded_frame_callback,
90 bool internalSource); 91 bool internalSource);
91 ~VCMGenericEncoder(); 92 ~VCMGenericEncoder();
92 /** 93 /**
93 * Free encoder memory 94 * Free encoder memory
94 */ 95 */
95 int32_t Release(); 96 int32_t Release();
96 /** 97 /**
97 * Initialize the encoder with the information from the VideoCodec 98 * Initialize the encoder with the information from the VideoCodec
98 */ 99 */
99 int32_t InitEncode(const VideoCodec* settings, 100 int32_t InitEncode(const VideoCodec* settings,
100 int32_t numberOfCores, 101 int32_t numberOfCores,
101 size_t maxPayloadSize); 102 size_t maxPayloadSize);
102 /** 103 /**
103 * Encode raw image 104 * Encode raw image
104 * inputFrame : Frame containing raw image 105 * inputFrame : Frame containing raw image
105 * codecSpecificInfo : Specific codec data 106 * codecSpecificInfo : Specific codec data
106 * cameraFrameRate : Request or information from the remote side 107 * cameraFrameRate : Request or information from the remote side
107 * frameType : The requested frame type to encode 108 * frameType : The requested frame type to encode
108 */ 109 */
109 int32_t Encode(const VideoFrame& inputFrame, 110 int32_t Encode(const VideoFrame& inputFrame,
110 const CodecSpecificInfo* codecSpecificInfo, 111 const CodecSpecificInfo* codecSpecificInfo,
111 const std::vector<FrameType>& frameTypes); 112 const std::vector<FrameType>& frameTypes);
112 113
113 void SetEncoderParameters(const EncoderParameters& params); 114 void SetEncoderParameters(const EncoderParameters& params);
114 /**
115 * Register a transport callback which will be called to deliver the encoded
116 * buffers
117 */
118 int32_t RegisterEncodeCallback(
119 VCMEncodedFrameCallback* VCMencodedFrameCallback);
120
121 EncoderParameters GetEncoderParameters() const; 115 EncoderParameters GetEncoderParameters() const;
122 116
123 int32_t SetPeriodicKeyFrames(bool enable); 117 int32_t SetPeriodicKeyFrames(bool enable);
124 118
125 int32_t RequestFrame(const std::vector<FrameType>& frame_types); 119 int32_t RequestFrame(const std::vector<FrameType>& frame_types);
126 120
127 bool InternalSource() const; 121 bool InternalSource() const;
128 122
129 void OnDroppedFrame(); 123 void OnDroppedFrame();
130 124
131 bool SupportsNativeHandle() const; 125 bool SupportsNativeHandle() const;
132 126
133 int GetTargetFramerate(); 127 int GetTargetFramerate();
134 128
135 private: 129 private:
136 VideoEncoder* const encoder_; 130 VideoEncoder* const encoder_;
137 VideoEncoderRateObserver* const rate_observer_; 131 VideoEncoderRateObserver* const rate_observer_;
138 VCMEncodedFrameCallback* vcm_encoded_frame_callback_; 132 VCMEncodedFrameCallback* const vcm_encoded_frame_callback_;
139 EncoderParameters encoder_params_ GUARDED_BY(params_lock_);
140 const bool internal_source_; 133 const bool internal_source_;
141 mutable rtc::CriticalSection params_lock_; 134 mutable rtc::CriticalSection params_lock_;
135 EncoderParameters encoder_params_ GUARDED_BY(params_lock_);
142 VideoRotation rotation_; 136 VideoRotation rotation_;
143 bool is_screenshare_; 137 bool is_screenshare_;
144 }; // end of VCMGenericEncoder class 138 }; // end of VCMGenericEncoder class
145 139
146 } // namespace webrtc 140 } // namespace webrtc
147 141
148 #endif // WEBRTC_MODULES_VIDEO_CODING_GENERIC_ENCODER_H_ 142 #endif // WEBRTC_MODULES_VIDEO_CODING_GENERIC_ENCODER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/main/source/codec_database.cc ('k') | webrtc/modules/video_coding/main/source/generic_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698