| 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 |
| 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_I420_INCLUDE_I420_H_ | 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_I420_INCLUDE_I420_H_ |
| 12 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_I420_INCLUDE_I420_H_ | 12 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_I420_INCLUDE_I420_H_ |
| 13 | 13 |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "webrtc/base/checks.h" | |
| 17 #include "webrtc/modules/video_coding/include/video_codec_interface.h" | 16 #include "webrtc/modules/video_coding/include/video_codec_interface.h" |
| 18 #include "webrtc/typedefs.h" | 17 #include "webrtc/typedefs.h" |
| 19 | 18 |
| 20 namespace webrtc { | 19 namespace webrtc { |
| 21 | 20 |
| 22 class I420Encoder : public VideoEncoder { | 21 class I420Encoder : public VideoEncoder { |
| 23 public: | 22 public: |
| 24 I420Encoder(); | 23 I420Encoder(); |
| 25 | 24 |
| 26 virtual ~I420Encoder(); | 25 virtual ~I420Encoder(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // - callback : Callback object which handles encoded images. | 58 // - callback : Callback object which handles encoded images. |
| 60 // | 59 // |
| 61 // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise. | 60 // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise. |
| 62 int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override; | 61 int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override; |
| 63 | 62 |
| 64 // Free encoder memory. | 63 // Free encoder memory. |
| 65 // | 64 // |
| 66 // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise. | 65 // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise. |
| 67 int Release() override; | 66 int Release() override; |
| 68 | 67 |
| 68 int SetRates(uint32_t /*newBitRate*/, uint32_t /*frameRate*/) override { |
| 69 return WEBRTC_VIDEO_CODEC_OK; |
| 70 } |
| 71 |
| 69 int SetChannelParameters(uint32_t /*packetLoss*/, int64_t /*rtt*/) override { | 72 int SetChannelParameters(uint32_t /*packetLoss*/, int64_t /*rtt*/) override { |
| 70 return WEBRTC_VIDEO_CODEC_OK; | 73 return WEBRTC_VIDEO_CODEC_OK; |
| 71 } | 74 } |
| 72 | 75 |
| 73 void OnDroppedFrame() override {} | 76 void OnDroppedFrame() override {} |
| 74 | 77 |
| 75 private: | 78 private: |
| 76 static uint8_t* InsertHeader(uint8_t* buffer, | 79 static uint8_t* InsertHeader(uint8_t* buffer, |
| 77 uint16_t width, | 80 uint16_t width, |
| 78 uint16_t height); | 81 uint16_t height); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 VideoFrame _decodedImage; | 139 VideoFrame _decodedImage; |
| 137 int _width; | 140 int _width; |
| 138 int _height; | 141 int _height; |
| 139 bool _inited; | 142 bool _inited; |
| 140 DecodedImageCallback* _decodeCompleteCallback; | 143 DecodedImageCallback* _decodeCompleteCallback; |
| 141 }; // class I420Decoder | 144 }; // class I420Decoder |
| 142 | 145 |
| 143 } // namespace webrtc | 146 } // namespace webrtc |
| 144 | 147 |
| 145 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_I420_INCLUDE_I420_H_ | 148 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_I420_INCLUDE_I420_H_ |
| OLD | NEW |