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

Unified Diff: webrtc/modules/video_coding/codecs/test/objc_codec_h264_test.mm

Issue 2978623002: Implement H264 codec in Objective-C classes. (Closed)
Patch Set: Fix test after rebase. Created 3 years, 5 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/modules/video_coding/codecs/test/objc_codec_h264_test.mm
diff --git a/webrtc/modules/video_coding/codecs/test/objc_codec_h264_test.mm b/webrtc/modules/video_coding/codecs/test/objc_codec_h264_test.mm
new file mode 100644
index 0000000000000000000000000000000000000000..7c1ba214a9b54af4bb859cbbf5f74494b84d0400
--- /dev/null
+++ b/webrtc/modules/video_coding/codecs/test/objc_codec_h264_test.mm
@@ -0,0 +1,41 @@
+/*
+ * Copyright 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.
+ */
+
+#include "webrtc/modules/video_coding/codecs/test/objc_codec_h264_test.h"
+
+#import "WebRTC/RTCVideoCodecH264.h"
+#include "webrtc/sdk/objc/Framework/Classes/PeerConnection/objc_video_decoder_factory.h"
+#include "webrtc/sdk/objc/Framework/Classes/PeerConnection/objc_video_encoder_factory.h"
+
+namespace webrtc {
+
+/** Create a wrapped factory that uses the default RTCVideoEncoder used from Objective-C. */
+ObjCVideoEncoderFactoryWrapper::ObjCVideoEncoderFactoryWrapper()
+ : encoder_factory_(new ObjCVideoEncoderFactory([[RTCVideoEncoderFactoryH264 alloc] init])) {}
+
+ObjCVideoEncoderFactoryWrapper::~ObjCVideoEncoderFactoryWrapper() {}
+
+cricket::WebRtcVideoEncoderFactory* ObjCVideoEncoderFactoryWrapper::wrapped_encoder_factory()
+ const {
+ return encoder_factory_;
+}
+
+/** Create a wrapped factory that uses the default RTCVideoDecoder used from Objective-C. */
+ObjCVideoDecoderFactoryWrapper::ObjCVideoDecoderFactoryWrapper()
+ : decoder_factory_(new ObjCVideoDecoderFactory([[RTCVideoDecoderFactoryH264 alloc] init])) {}
+
+ObjCVideoDecoderFactoryWrapper::~ObjCVideoDecoderFactoryWrapper() {}
+
+cricket::WebRtcVideoDecoderFactory* ObjCVideoDecoderFactoryWrapper::wrapped_decoder_factory()
+ const {
+ return decoder_factory_;
+}
+
+} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698