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

Side by Side Diff: webrtc/video_encoder.h

Issue 1371043003: Unify FrameType and VideoFrameType. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 2 months 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
« no previous file with comments | « webrtc/video/video_send_stream_tests.cc ('k') | webrtc/video_engine/vie_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // - frame_types : Frame type to be generated by the encoder. 91 // - frame_types : Frame type to be generated by the encoder.
92 // 92 //
93 // Return value : WEBRTC_VIDEO_CODEC_OK if OK 93 // Return value : WEBRTC_VIDEO_CODEC_OK if OK
94 // <0 - Errors: 94 // <0 - Errors:
95 // WEBRTC_VIDEO_CODEC_ERR_PARAMETER 95 // WEBRTC_VIDEO_CODEC_ERR_PARAMETER
96 // WEBRTC_VIDEO_CODEC_MEMORY 96 // WEBRTC_VIDEO_CODEC_MEMORY
97 // WEBRTC_VIDEO_CODEC_ERROR 97 // WEBRTC_VIDEO_CODEC_ERROR
98 // WEBRTC_VIDEO_CODEC_TIMEOUT 98 // WEBRTC_VIDEO_CODEC_TIMEOUT
99 virtual int32_t Encode(const VideoFrame& frame, 99 virtual int32_t Encode(const VideoFrame& frame,
100 const CodecSpecificInfo* codec_specific_info, 100 const CodecSpecificInfo* codec_specific_info,
101 const std::vector<VideoFrameType>* frame_types) = 0; 101 const std::vector<FrameType>* frame_types) = 0;
102 102
103 // Inform the encoder of the new packet loss rate and the round-trip time of 103 // Inform the encoder of the new packet loss rate and the round-trip time of
104 // the network. 104 // the network.
105 // 105 //
106 // Input: 106 // Input:
107 // - packet_loss : Fraction lost 107 // - packet_loss : Fraction lost
108 // (loss rate in percent = 100 * packetLoss / 255) 108 // (loss rate in percent = 100 * packetLoss / 255)
109 // - rtt : Round-trip time in milliseconds 109 // - rtt : Round-trip time in milliseconds
110 // Return value : WEBRTC_VIDEO_CODEC_OK if OK 110 // Return value : WEBRTC_VIDEO_CODEC_OK if OK
111 // <0 - Errors: WEBRTC_VIDEO_CODEC_ERROR 111 // <0 - Errors: WEBRTC_VIDEO_CODEC_ERROR
(...skipping 28 matching lines...) Expand all
140 int32_t InitEncode(const VideoCodec* codec_settings, 140 int32_t InitEncode(const VideoCodec* codec_settings,
141 int32_t number_of_cores, 141 int32_t number_of_cores,
142 size_t max_payload_size) override; 142 size_t max_payload_size) override;
143 143
144 int32_t RegisterEncodeCompleteCallback( 144 int32_t RegisterEncodeCompleteCallback(
145 EncodedImageCallback* callback) override; 145 EncodedImageCallback* callback) override;
146 146
147 int32_t Release() override; 147 int32_t Release() override;
148 int32_t Encode(const VideoFrame& frame, 148 int32_t Encode(const VideoFrame& frame,
149 const CodecSpecificInfo* codec_specific_info, 149 const CodecSpecificInfo* codec_specific_info,
150 const std::vector<VideoFrameType>* frame_types) override; 150 const std::vector<FrameType>* frame_types) override;
151 int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; 151 int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override;
152 152
153 int32_t SetRates(uint32_t bitrate, uint32_t framerate) override; 153 int32_t SetRates(uint32_t bitrate, uint32_t framerate) override;
154 void OnDroppedFrame() override; 154 void OnDroppedFrame() override;
155 int GetTargetFramerate() override; 155 int GetTargetFramerate() override;
156 bool SupportsNativeHandle() const override; 156 bool SupportsNativeHandle() const override;
157 157
158 private: 158 private:
159 const EncoderType encoder_type_; 159 const EncoderType encoder_type_;
160 webrtc::VideoEncoder* const encoder_; 160 webrtc::VideoEncoder* const encoder_;
161 161
162 rtc::scoped_ptr<webrtc::VideoEncoder> fallback_encoder_; 162 rtc::scoped_ptr<webrtc::VideoEncoder> fallback_encoder_;
163 EncodedImageCallback* callback_; 163 EncodedImageCallback* callback_;
164 }; 164 };
165 } // namespace webrtc 165 } // namespace webrtc
166 #endif // WEBRTC_VIDEO_ENCODER_H_ 166 #endif // WEBRTC_VIDEO_ENCODER_H_
OLDNEW
« no previous file with comments | « webrtc/video/video_send_stream_tests.cc ('k') | webrtc/video_engine/vie_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698