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 |
(...skipping 28 matching lines...) Expand all Loading... |
39 uint8_t payload_type, | 39 uint8_t payload_type, |
40 bool internal_render_timing); | 40 bool internal_render_timing); |
41 | 41 |
42 uint8_t payload_type; | 42 uint8_t payload_type; |
43 VideoDecoder* external_decoder_instance; | 43 VideoDecoder* external_decoder_instance; |
44 bool internal_render_timing; | 44 bool internal_render_timing; |
45 }; | 45 }; |
46 | 46 |
47 class VCMCodecDataBase { | 47 class VCMCodecDataBase { |
48 public: | 48 public: |
49 explicit VCMCodecDataBase(VideoEncoderRateObserver* encoder_rate_observer); | 49 VCMCodecDataBase(VideoEncoderRateObserver* encoder_rate_observer, |
| 50 VCMEncodedFrameCallback* encoded_frame_callback); |
50 ~VCMCodecDataBase(); | 51 ~VCMCodecDataBase(); |
51 | 52 |
52 // Sender Side | 53 // Sender Side |
53 // Returns the number of supported codecs (or -1 in case of error). | 54 // Returns the number of supported codecs (or -1 in case of error). |
54 static int NumberOfCodecs(); | 55 static int NumberOfCodecs(); |
55 | 56 |
56 // Returns the default settings for the codec with id |list_id|. | 57 // Returns the default settings for the codec with id |list_id|. |
57 static bool Codec(int list_id, VideoCodec* settings); | 58 static bool Codec(int list_id, VideoCodec* settings); |
58 | 59 |
59 // Returns the default settings for the codec with type |codec_type|. | 60 // Returns the default settings for the codec with type |codec_type|. |
60 static bool Codec(VideoCodecType codec_type, VideoCodec* settings); | 61 static bool Codec(VideoCodecType codec_type, VideoCodec* settings); |
61 | 62 |
62 void ResetSender(); | 63 void ResetSender(); |
63 | 64 |
64 // Sets the sender side codec and initiates the desired codec given the | 65 // Sets the sender side codec and initiates the desired codec given the |
65 // VideoCodec struct. | 66 // VideoCodec struct. |
66 // Returns true if the codec was successfully registered, false otherwise. | 67 // Returns true if the codec was successfully registered, false otherwise. |
67 bool SetSendCodec(const VideoCodec* send_codec, | 68 bool SetSendCodec(const VideoCodec* send_codec, |
68 int number_of_cores, | 69 int number_of_cores, |
69 size_t max_payload_size, | 70 size_t max_payload_size); |
70 VCMEncodedFrameCallback* encoded_frame_callback); | |
71 | 71 |
72 // Gets the current send codec. Relevant for internal codecs only. | 72 // Gets the current send codec. Relevant for internal codecs only. |
73 // Returns true if there is a send codec, false otherwise. | 73 // Returns true if there is a send codec, false otherwise. |
74 bool SendCodec(VideoCodec* current_send_codec) const; | 74 bool SendCodec(VideoCodec* current_send_codec) const; |
75 | 75 |
76 // Gets current send side codec type. Relevant for internal codecs only. | 76 // Gets current send side codec type. Relevant for internal codecs only. |
77 // Returns kVideoCodecUnknown if there is no send codec. | 77 // Returns kVideoCodecUnknown if there is no send codec. |
78 VideoCodecType SendCodec() const; | 78 VideoCodecType SendCodec() const; |
79 | 79 |
80 // Registers and initializes an external encoder object. | 80 // Registers and initializes an external encoder object. |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 int number_of_cores_; | 165 int number_of_cores_; |
166 size_t max_payload_size_; | 166 size_t max_payload_size_; |
167 bool periodic_key_frames_; | 167 bool periodic_key_frames_; |
168 bool pending_encoder_reset_; | 168 bool pending_encoder_reset_; |
169 VideoCodec send_codec_; | 169 VideoCodec send_codec_; |
170 VideoCodec receive_codec_; | 170 VideoCodec receive_codec_; |
171 uint8_t encoder_payload_type_; | 171 uint8_t encoder_payload_type_; |
172 VideoEncoder* external_encoder_; | 172 VideoEncoder* external_encoder_; |
173 bool internal_source_; | 173 bool internal_source_; |
174 VideoEncoderRateObserver* const encoder_rate_observer_; | 174 VideoEncoderRateObserver* const encoder_rate_observer_; |
| 175 VCMEncodedFrameCallback* const encoded_frame_callback_; |
175 rtc::scoped_ptr<VCMGenericEncoder> ptr_encoder_; | 176 rtc::scoped_ptr<VCMGenericEncoder> ptr_encoder_; |
176 VCMGenericDecoder* ptr_decoder_; | 177 VCMGenericDecoder* ptr_decoder_; |
177 DecoderMap dec_map_; | 178 DecoderMap dec_map_; |
178 ExternalDecoderMap dec_external_map_; | 179 ExternalDecoderMap dec_external_map_; |
179 }; // VCMCodecDataBase | 180 }; // VCMCodecDataBase |
180 | 181 |
181 } // namespace webrtc | 182 } // namespace webrtc |
182 | 183 |
183 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_CODEC_DATABASE_H_ | 184 #endif // WEBRTC_MODULES_VIDEO_CODING_MAIN_SOURCE_CODEC_DATABASE_H_ |
OLD | NEW |