Chromium Code Reviews| Index: webrtc/media/engine/webrtcvideodecoderfactory.h |
| diff --git a/webrtc/media/engine/webrtcvideodecoderfactory.h b/webrtc/media/engine/webrtcvideodecoderfactory.h |
| index 64a8faa1e4e24ecedacf52bb867ad23a865b76c8..3ce6e22ca6c0147a3a08887967c74a16d69ee1e3 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 { |
| @@ -29,7 +30,24 @@ class WebRtcVideoDecoderFactory { |
| // Caller takes the ownership of the returned object and it should be released |
| // by calling DestroyVideoDecoder(). |
| virtual webrtc::VideoDecoder* CreateVideoDecoder( |
|
magjed_webrtc
2017/08/24 08:59:38
I want to have as few methods as possible in this
kthelgason
2017/08/24 10:49:46
I can see that. I was planning on moving callers o
|
| - webrtc::VideoCodecType type) = 0; |
| + const cricket::VideoCodec& codec) { |
| + // Default implementation that delegates to old version in order to preserve |
| + // backwards-compatability. |
| + webrtc::VideoCodecType type = webrtc::PayloadNameToCodecType(codec.name); |
| + return CreateVideoDecoder(type); |
| + } |
| + virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams( |
|
magjed_webrtc
2017/08/24 08:59:39
Add an empty line between the methods.
kthelgason
2017/08/24 10:49:46
Done.
|
| + const cricket::VideoCodec& codec, |
| + VideoDecoderParams params) { |
| + return CreateVideoDecoder(codec); |
|
magjed_webrtc
2017/08/24 08:59:39
We have to be careful with backwards-compatability
kthelgason
2017/08/24 10:49:47
Yeah, I guess subclasses can have overridden imple
|
| + } |
| + // 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) { |
| + RTC_NOTREACHED(); |
| + }; |
| virtual webrtc::VideoDecoder* CreateVideoDecoderWithParams( |
| webrtc::VideoCodecType type, |
| VideoDecoderParams params) { |