Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: webrtc/modules/video_coding/codec_database.h

Issue 1474193002: Call InitDecode with proper resolution. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: best-effort width/height setting Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 // Get current receive side codec type. Relevant for internal codecs only. 116 // Get current receive side codec type. Relevant for internal codecs only.
117 VideoCodecType ReceiveCodec() const; 117 VideoCodecType ReceiveCodec() const;
118 118
119 // Returns a decoder specified by |payload_type|. The decoded frame callback 119 // Returns a decoder specified by |payload_type|. The decoded frame callback
120 // of the encoder is set to |decoded_frame_callback|. If no such decoder 120 // of the encoder is set to |decoded_frame_callback|. If no such decoder
121 // already exists an instance will be created and initialized. 121 // already exists an instance will be created and initialized.
122 // NULL is returned if no encoder with the specified payload type was found 122 // NULL is returned if no encoder with the specified payload type was found
123 // and the function failed to create one. 123 // and the function failed to create one.
124 VCMGenericDecoder* GetDecoder( 124 VCMGenericDecoder* GetDecoder(
125 uint8_t payload_type, VCMDecodedFrameCallback* decoded_frame_callback); 125 const VCMEncodedFrame& frame,
126 VCMDecodedFrameCallback* decoded_frame_callback);
126 127
127 // Deletes the memory of the decoder instance |decoder|. Used to delete 128 // Deletes the memory of the decoder instance |decoder|. Used to delete
128 // deep copies returned by CreateDecoderCopy(). 129 // deep copies returned by CreateDecoderCopy().
129 void ReleaseDecoder(VCMGenericDecoder* decoder) const; 130 void ReleaseDecoder(VCMGenericDecoder* decoder) const;
130 131
131 // Returns true if the currently active decoder supports render scheduling, 132 // Returns true if the currently active decoder supports render scheduling,
132 // that is, it is able to render frames according to the render timestamp of 133 // that is, it is able to render frames according to the render timestamp of
133 // the encoded frames. 134 // the encoded frames.
134 bool SupportsRenderScheduling() const; 135 bool SupportsRenderScheduling() const;
135 136
136 bool MatchesCurrentResolution(int width, int height) const; 137 bool MatchesCurrentResolution(int width, int height) const;
137 138
138 private: 139 private:
139 typedef std::map<uint8_t, VCMDecoderMapItem*> DecoderMap; 140 typedef std::map<uint8_t, VCMDecoderMapItem*> DecoderMap;
140 typedef std::map<uint8_t, VCMExtDecoderMapItem*> ExternalDecoderMap; 141 typedef std::map<uint8_t, VCMExtDecoderMapItem*> ExternalDecoderMap;
141 142
142 VCMGenericDecoder* CreateAndInitDecoder(uint8_t payload_type, 143 VCMGenericDecoder* CreateAndInitDecoder(const VCMEncodedFrame& frame,
143 VideoCodec* new_codec) const; 144 VideoCodec* new_codec) const;
144 145
145 // Determines whether a new codec has to be created or not. 146 // Determines whether a new codec has to be created or not.
146 // Checks every setting apart from maxFramerate and startBitrate. 147 // Checks every setting apart from maxFramerate and startBitrate.
147 bool RequiresEncoderReset(const VideoCodec& send_codec); 148 bool RequiresEncoderReset(const VideoCodec& send_codec);
148 149
149 void DeleteEncoder(); 150 void DeleteEncoder();
150 151
151 // Create an internal Decoder given a codec type 152 // Create an internal Decoder given a codec type
152 VCMGenericDecoder* CreateDecoder(VideoCodecType type) const; 153 VCMGenericDecoder* CreateDecoder(VideoCodecType type) const;
(...skipping 16 matching lines...) Expand all
169 VCMEncodedFrameCallback* const encoded_frame_callback_; 170 VCMEncodedFrameCallback* const encoded_frame_callback_;
170 rtc::scoped_ptr<VCMGenericEncoder> ptr_encoder_; 171 rtc::scoped_ptr<VCMGenericEncoder> ptr_encoder_;
171 VCMGenericDecoder* ptr_decoder_; 172 VCMGenericDecoder* ptr_decoder_;
172 DecoderMap dec_map_; 173 DecoderMap dec_map_;
173 ExternalDecoderMap dec_external_map_; 174 ExternalDecoderMap dec_external_map_;
174 }; // VCMCodecDataBase 175 }; // VCMCodecDataBase
175 176
176 } // namespace webrtc 177 } // namespace webrtc
177 178
178 #endif // WEBRTC_MODULES_VIDEO_CODING_CODEC_DATABASE_H_ 179 #endif // WEBRTC_MODULES_VIDEO_CODING_CODEC_DATABASE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codec_database.cc » ('j') | webrtc/modules/video_coding/codec_database.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698