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 * WEBRTC VP8 wrapper interface | 10 * WEBRTC VP8 wrapper interface |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 const std::vector<FrameType>* frame_types); | 51 const std::vector<FrameType>* frame_types); |
52 | 52 |
53 virtual int RegisterEncodeCompleteCallback(EncodedImageCallback* callback); | 53 virtual int RegisterEncodeCompleteCallback(EncodedImageCallback* callback); |
54 | 54 |
55 virtual int SetChannelParameters(uint32_t packet_loss, int64_t rtt); | 55 virtual int SetChannelParameters(uint32_t packet_loss, int64_t rtt); |
56 | 56 |
57 virtual int SetRates(uint32_t new_bitrate_kbit, uint32_t frame_rate); | 57 virtual int SetRates(uint32_t new_bitrate_kbit, uint32_t frame_rate); |
58 | 58 |
59 void OnDroppedFrame() override {} | 59 void OnDroppedFrame() override {} |
60 | 60 |
| 61 const char* ImplementationName() const override; |
| 62 |
61 private: | 63 private: |
62 void SetupTemporalLayers(int num_streams, int num_temporal_layers, | 64 void SetupTemporalLayers(int num_streams, int num_temporal_layers, |
63 const VideoCodec& codec); | 65 const VideoCodec& codec); |
64 | 66 |
65 // Set the cpu_speed setting for encoder based on resolution and/or platform. | 67 // Set the cpu_speed setting for encoder based on resolution and/or platform. |
66 int SetCpuSpeed(int width, int height); | 68 int SetCpuSpeed(int width, int height); |
67 | 69 |
68 // Determine number of encoder threads to use. | 70 // Determine number of encoder threads to use. |
69 int NumberOfThreads(int width, int height, int number_of_cores); | 71 int NumberOfThreads(int width, int height, int number_of_cores); |
70 | 72 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 int Decode(const EncodedImage& input_image, | 130 int Decode(const EncodedImage& input_image, |
129 bool missing_frames, | 131 bool missing_frames, |
130 const RTPFragmentationHeader* fragmentation, | 132 const RTPFragmentationHeader* fragmentation, |
131 const CodecSpecificInfo* codec_specific_info, | 133 const CodecSpecificInfo* codec_specific_info, |
132 int64_t /*render_time_ms*/) override; | 134 int64_t /*render_time_ms*/) override; |
133 | 135 |
134 int RegisterDecodeCompleteCallback(DecodedImageCallback* callback) override; | 136 int RegisterDecodeCompleteCallback(DecodedImageCallback* callback) override; |
135 int Release() override; | 137 int Release() override; |
136 int Reset() override; | 138 int Reset() override; |
137 | 139 |
| 140 const char* ImplementationName() const override; |
| 141 |
138 private: | 142 private: |
139 // Copy reference image from this _decoder to the _decoder in copyTo. Set | 143 // Copy reference image from this _decoder to the _decoder in copyTo. Set |
140 // which frame type to copy in _refFrame->frame_type before the call to | 144 // which frame type to copy in _refFrame->frame_type before the call to |
141 // this function. | 145 // this function. |
142 int CopyReference(VP8DecoderImpl* copy); | 146 int CopyReference(VP8DecoderImpl* copy); |
143 | 147 |
144 int DecodePartitions(const EncodedImage& input_image, | 148 int DecodePartitions(const EncodedImage& input_image, |
145 const RTPFragmentationHeader* fragmentation); | 149 const RTPFragmentationHeader* fragmentation); |
146 | 150 |
147 int ReturnFrame(const vpx_image_t* img, | 151 int ReturnFrame(const vpx_image_t* img, |
(...skipping 11 matching lines...) Expand all Loading... |
159 vpx_ref_frame_t* ref_frame_; | 163 vpx_ref_frame_t* ref_frame_; |
160 int propagation_cnt_; | 164 int propagation_cnt_; |
161 int last_frame_width_; | 165 int last_frame_width_; |
162 int last_frame_height_; | 166 int last_frame_height_; |
163 bool key_frame_required_; | 167 bool key_frame_required_; |
164 }; // end of VP8DecoderImpl class | 168 }; // end of VP8DecoderImpl class |
165 } // namespace webrtc | 169 } // namespace webrtc |
166 | 170 |
167 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ | 171 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ |
168 | 172 |
OLD | NEW |