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

Unified Diff: webrtc/media/engine/webrtcvideodecoderfactory.h

Issue 3007433002: Let CreateVideoDecoder take a cricket::VideoCodec. (Closed)
Patch Set: return a value from unused function Created 3 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideodecoderfactory.h
diff --git a/webrtc/media/engine/webrtcvideodecoderfactory.h b/webrtc/media/engine/webrtcvideodecoderfactory.h
index 64a8faa1e4e24ecedacf52bb867ad23a865b76c8..d0dc3a500ea8a49d7bcd8c58d867d8adf859ecda 100644
--- a/webrtc/media/engine/webrtcvideodecoderfactory.h
+++ b/webrtc/media/engine/webrtcvideodecoderfactory.h
@@ -12,6 +12,7 @@
#define WEBRTC_MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_
#include "webrtc/common_types.h"
+#include "webrtc/media/base/codec.h"
#include "webrtc/rtc_base/refcount.h"
namespace webrtc {
@@ -28,8 +29,23 @@ class WebRtcVideoDecoderFactory {
public:
// Caller takes the ownership of the returned object and it should be released
// by calling DestroyVideoDecoder().
+ virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams(
+ const VideoCodec& codec,
+ VideoDecoderParams params) {
+ // Default implementation that delegates to old version in order to preserve
+ // backwards-compatability.
+ webrtc::VideoCodecType type = webrtc::PayloadStringToCodecType(codec.name);
+ return CreateVideoDecoderWithParams(type, params);
+ }
+ // DEPRECATED.
+ // These methods should not be used by new code and will eventually be
+ // removed. See http://crbug.com/webrtc/8140.
virtual webrtc::VideoDecoder* CreateVideoDecoder(
- webrtc::VideoCodecType type) = 0;
+ webrtc::VideoCodecType type) {
+ RTC_NOTREACHED();
+ return nullptr;
+ };
+
virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams(
webrtc::VideoCodecType type,
VideoDecoderParams params) {
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698