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