| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 private: | 61 private: |
| 62 void SetupTemporalLayers(int num_streams, int num_temporal_layers, | 62 void SetupTemporalLayers(int num_streams, |
| 63 int num_temporal_layers, |
| 63 const VideoCodec& codec); | 64 const VideoCodec& codec); |
| 64 | 65 |
| 65 // Set the cpu_speed setting for encoder based on resolution and/or platform. | 66 // Set the cpu_speed setting for encoder based on resolution and/or platform. |
| 66 int SetCpuSpeed(int width, int height); | 67 int SetCpuSpeed(int width, int height); |
| 67 | 68 |
| 68 // Determine number of encoder threads to use. | 69 // Determine number of encoder threads to use. |
| 69 int NumberOfThreads(int width, int height, int number_of_cores); | 70 int NumberOfThreads(int width, int height, int number_of_cores); |
| 70 | 71 |
| 71 // Call encoder initialize function and set control settings. | 72 // Call encoder initialize function and set control settings. |
| 72 int InitAndSetControlSettings(); | 73 int InitAndSetControlSettings(); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 120 |
| 120 class VP8DecoderImpl : public VP8Decoder { | 121 class VP8DecoderImpl : public VP8Decoder { |
| 121 public: | 122 public: |
| 122 VP8DecoderImpl(); | 123 VP8DecoderImpl(); |
| 123 | 124 |
| 124 virtual ~VP8DecoderImpl(); | 125 virtual ~VP8DecoderImpl(); |
| 125 | 126 |
| 126 int InitDecode(const VideoCodec* inst, int number_of_cores) override; | 127 int InitDecode(const VideoCodec* inst, int number_of_cores) override; |
| 127 | 128 |
| 128 int Decode(const EncodedImage& input_image, | 129 int Decode(const EncodedImage& input_image, |
| 129 bool missing_frames, | 130 bool missing_frames, |
| 130 const RTPFragmentationHeader* fragmentation, | 131 const RTPFragmentationHeader* fragmentation, |
| 131 const CodecSpecificInfo* codec_specific_info, | 132 const CodecSpecificInfo* codec_specific_info, |
| 132 int64_t /*render_time_ms*/) override; | 133 int64_t /*render_time_ms*/) override; |
| 133 | 134 |
| 134 int RegisterDecodeCompleteCallback(DecodedImageCallback* callback) override; | 135 int RegisterDecodeCompleteCallback(DecodedImageCallback* callback) override; |
| 135 int Release() override; | 136 int Release() override; |
| 136 int Reset() override; | 137 int Reset() override; |
| 137 | 138 |
| 138 private: | 139 private: |
| 139 // Copy reference image from this _decoder to the _decoder in copyTo. Set | 140 // 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 | 141 // which frame type to copy in _refFrame->frame_type before the call to |
| 141 // this function. | 142 // this function. |
| 142 int CopyReference(VP8DecoderImpl* copy); | 143 int CopyReference(VP8DecoderImpl* copy); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 158 int image_format_; | 159 int image_format_; |
| 159 vpx_ref_frame_t* ref_frame_; | 160 vpx_ref_frame_t* ref_frame_; |
| 160 int propagation_cnt_; | 161 int propagation_cnt_; |
| 161 int last_frame_width_; | 162 int last_frame_width_; |
| 162 int last_frame_height_; | 163 int last_frame_height_; |
| 163 bool key_frame_required_; | 164 bool key_frame_required_; |
| 164 }; // end of VP8DecoderImpl class | 165 }; // end of VP8DecoderImpl class |
| 165 } // namespace webrtc | 166 } // namespace webrtc |
| 166 | 167 |
| 167 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ | 168 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ |
| 168 | |
| OLD | NEW |