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

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

Issue 2987413002: ObjC: Implement HW codecs in ObjC instead of C++ (Closed)
Patch Set: Rebase against https://codereview.webrtc.org/2992233002 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
Index: webrtc/modules/video_coding/codecs/test/objc_codec_h264_test.mm
diff --git a/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h b/webrtc/modules/video_coding/codecs/test/objc_codec_h264_test.mm
similarity index 31%
copy from webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h
copy to webrtc/modules/video_coding/codecs/test/objc_codec_h264_test.mm
index fbb2bd29b6c77b1630a4a0c21ee4238976603c84..ceb661a69451860a21134ad67766038bdacb16a6 100644
--- a/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h
+++ b/webrtc/modules/video_coding/codecs/test/objc_codec_h264_test.mm
@@ -8,40 +8,22 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#import <Foundation/Foundation.h>
+#include "webrtc/modules/video_coding/codecs/test/objc_codec_h264_test.h"
-#import <WebRTC/RTCMacros.h>
-#import <WebRTC/RTCVideoCodecFactory.h>
+#import "WebRTC/RTCVideoCodecH264.h"
+#include "webrtc/sdk/objc/Framework/Classes/VideoToolbox/objc_video_decoder_factory.h"
+#include "webrtc/sdk/objc/Framework/Classes/VideoToolbox/objc_video_encoder_factory.h"
-/** Class for H264 specific config. */
-typedef NS_ENUM(NSUInteger, RTCH264PacketizationMode) {
- NonInterleaved = 0, // Mode 1 - STAP-A, FU-A is allowed
- SingleNalUnit // Mode 0 - only single NALU allowed
-};
+namespace webrtc {
-RTC_EXPORT
-@interface RTCCodecSpecificInfoH264 : NSObject<RTCCodecSpecificInfo>
+std::unique_ptr<cricket::WebRtcVideoEncoderFactory> CreateObjCEncoderFactory() {
+ return std::unique_ptr<cricket::WebRtcVideoEncoderFactory>(
+ new ObjCVideoEncoderFactory([[RTCVideoEncoderFactoryH264 alloc] init]));
+}
-@property(nonatomic, assign) RTCH264PacketizationMode packetizationMode;
+std::unique_ptr<cricket::WebRtcVideoDecoderFactory> CreateObjCDecoderFactory() {
+ return std::unique_ptr<cricket::WebRtcVideoDecoderFactory>(
+ new ObjCVideoDecoderFactory([[RTCVideoDecoderFactoryH264 alloc] init]));
+}
-@end
-
-/** Encoder. */
-RTC_EXPORT
-@interface RTCVideoEncoderH264 : NSObject<RTCVideoEncoder>
-@end
-
-/** Decoder. */
-RTC_EXPORT
-@interface RTCVideoDecoderH264 : NSObject<RTCVideoDecoder>
-@end
-
-/** Encoder factory. */
-RTC_EXPORT
-@interface RTCVideoEncoderFactoryH264 : NSObject<RTCVideoEncoderFactory>
-@end
-
-/** Decoder factory. */
-RTC_EXPORT
-@interface RTCVideoDecoderFactoryH264 : NSObject<RTCVideoDecoderFactory>
-@end
+} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698