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

Unified Diff: webrtc/api/video_codecs/video_decoder_factory.h

Issue 3007073002: Add new video codec factories (Closed)
Patch Set: Add tests Created 3 years, 3 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
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_

Powered by Google App Engine
This is Rietveld 408576698