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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 class VCMCodecDataBase { | 47 class VCMCodecDataBase { |
48 public: | 48 public: |
49 VCMCodecDataBase(VideoEncoderRateObserver* encoder_rate_observer, | 49 VCMCodecDataBase(VideoEncoderRateObserver* encoder_rate_observer, |
50 VCMEncodedFrameCallback* encoded_frame_callback); | 50 VCMEncodedFrameCallback* encoded_frame_callback); |
51 ~VCMCodecDataBase(); | 51 ~VCMCodecDataBase(); |
52 | 52 |
53 // Sender Side | 53 // Sender Side |
54 // Returns the default settings for the codec with type |codec_type|. | 54 // Returns the default settings for the codec with type |codec_type|. |
55 static void Codec(VideoCodecType codec_type, VideoCodec* settings); | 55 static void Codec(VideoCodecType codec_type, VideoCodec* settings); |
56 | 56 |
57 void ResetSender(); | |
58 | |
59 // Sets the sender side codec and initiates the desired codec given the | 57 // Sets the sender side codec and initiates the desired codec given the |
60 // VideoCodec struct. | 58 // VideoCodec struct. |
61 // Returns true if the codec was successfully registered, false otherwise. | 59 // Returns true if the codec was successfully registered, false otherwise. |
62 bool SetSendCodec(const VideoCodec* send_codec, | 60 bool SetSendCodec(const VideoCodec* send_codec, |
63 int number_of_cores, | 61 int number_of_cores, |
64 size_t max_payload_size); | 62 size_t max_payload_size); |
65 | 63 |
66 // Gets the current send codec. Relevant for internal codecs only. | 64 // Gets the current send codec. Relevant for internal codecs only. |
67 // Returns true if there is a send codec, false otherwise. | 65 // Returns true if there is a send codec, false otherwise. |
68 bool SendCodec(VideoCodec* current_send_codec) const; | 66 bool SendCodec(VideoCodec* current_send_codec) const; |
(...skipping 12 matching lines...) Expand all Loading... |
81 | 79 |
82 // Deregisters an external encoder. Returns true if the encoder was | 80 // Deregisters an external encoder. Returns true if the encoder was |
83 // found and deregistered, false otherwise. |was_send_codec| is set to true | 81 // found and deregistered, false otherwise. |was_send_codec| is set to true |
84 // if the external encoder was the send codec before being deregistered. | 82 // if the external encoder was the send codec before being deregistered. |
85 bool DeregisterExternalEncoder(uint8_t payload_type, bool* was_send_codec); | 83 bool DeregisterExternalEncoder(uint8_t payload_type, bool* was_send_codec); |
86 | 84 |
87 VCMGenericEncoder* GetEncoder(); | 85 VCMGenericEncoder* GetEncoder(); |
88 | 86 |
89 bool SetPeriodicKeyFrames(bool enable); | 87 bool SetPeriodicKeyFrames(bool enable); |
90 | 88 |
91 // Receiver Side | |
92 void ResetReceiver(); | |
93 | |
94 // Deregisters an external decoder object specified by |payload_type|. | 89 // Deregisters an external decoder object specified by |payload_type|. |
95 bool DeregisterExternalDecoder(uint8_t payload_type); | 90 bool DeregisterExternalDecoder(uint8_t payload_type); |
96 | 91 |
97 // Registers an external decoder object to the payload type |payload_type|. | 92 // Registers an external decoder object to the payload type |payload_type|. |
98 // |internal_render_timing| is set to true if the |external_decoder| has | 93 // |internal_render_timing| is set to true if the |external_decoder| has |
99 // built in rendering which is able to obey the render timestamps of the | 94 // built in rendering which is able to obey the render timestamps of the |
100 // encoded frames. | 95 // encoded frames. |
101 void RegisterExternalDecoder(VideoDecoder* external_decoder, | 96 void RegisterExternalDecoder(VideoDecoder* external_decoder, |
102 uint8_t payload_type, | 97 uint8_t payload_type, |
103 bool internal_render_timing); | 98 bool internal_render_timing); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 VCMEncodedFrameCallback* const encoded_frame_callback_; | 165 VCMEncodedFrameCallback* const encoded_frame_callback_; |
171 rtc::scoped_ptr<VCMGenericEncoder> ptr_encoder_; | 166 rtc::scoped_ptr<VCMGenericEncoder> ptr_encoder_; |
172 VCMGenericDecoder* ptr_decoder_; | 167 VCMGenericDecoder* ptr_decoder_; |
173 DecoderMap dec_map_; | 168 DecoderMap dec_map_; |
174 ExternalDecoderMap dec_external_map_; | 169 ExternalDecoderMap dec_external_map_; |
175 }; // VCMCodecDataBase | 170 }; // VCMCodecDataBase |
176 | 171 |
177 } // namespace webrtc | 172 } // namespace webrtc |
178 | 173 |
179 #endif // WEBRTC_MODULES_VIDEO_CODING_CODEC_DATABASE_H_ | 174 #endif // WEBRTC_MODULES_VIDEO_CODING_CODEC_DATABASE_H_ |
OLD | NEW |