Index: webrtc/api/video_codecs/video_decoder_factory.h |
diff --git a/webrtc/api/video_codecs/video_decoder_factory.h b/webrtc/api/video_codecs/video_decoder_factory.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..591b16114d1aa7e0978728d010ac42fff671cc81 |
--- /dev/null |
+++ b/webrtc/api/video_codecs/video_decoder_factory.h |
@@ -0,0 +1,42 @@ |
+/* |
+ * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
+ |
+#ifndef WEBRTC_API_VIDEO_CODECS_VIDEO_DECODER_FACTORY_H_ |
+#define WEBRTC_API_VIDEO_CODECS_VIDEO_DECODER_FACTORY_H_ |
+ |
+#include <memory> |
+#include <vector> |
+ |
+namespace cricket { |
+struct VideoCodec; |
+} // namespace cricket |
stefan-webrtc
2017/09/06 12:40:42
What do you think of the fit of VideoCodec in the
magjed_webrtc
2017/09/10 15:27:49
It's unfortunate. cricket::VideoCodec represents t
kwiberg-webrtc
2017/09/10 19:00:21
Pardon the tangent, but do the two of you think th
magjed_webrtc
2017/09/12 12:08:48
It's still often a sign that we are mixing two cod
|
+ |
+namespace webrtc { |
+ |
+class VideoDecoder; |
+ |
+// A factory that creates VideoDecoders. |
+// NOTE: This class is still under development and may change without notice. |
+class VideoDecoderFactory { |
+ public: |
+ // Returns a list of supported video codecs in order of preference, to use for |
+ // signaling etc. |
+ virtual std::vector<cricket::VideoCodec> GetSupportedCodecs() const = 0; |
+ |
+ // Creates a VideoDecoder for the specified codec. |
+ virtual std::unique_ptr<VideoDecoder> CreateVideoDecoder( |
andersc
2017/09/06 15:00:06
Do we also need a version of this method that take
magjed_webrtc
2017/09/10 15:27:49
I will investigate a bit, but hopefully we don't n
magjed_webrtc
2017/09/12 12:08:48
I looked it up and we don't need to add VideoDecod
|
+ const cricket::VideoCodec& codec) = 0; |
+ |
+ virtual ~VideoDecoderFactory() {} |
+}; |
+ |
+} // namespace webrtc |
+ |
+#endif // WEBRTC_API_VIDEO_CODECS_VIDEO_DECODER_FACTORY_H_ |