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

Issue 2966023002: Injectable Obj-C video codecs (Closed)

Created:
3 years, 5 months ago by andersc
Modified:
3 years, 5 months ago
Reviewers:
magjed_webrtc
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Injectable Obj-C video codecs Initial CL for this effort, with a working RTCVideoEncoder/Decoder for H264 (wrapping the VideoToolbox codec). Some notes / things left to do: - There are some hard-coded references to codec types that are supported by webrtc::VideoCodec, cricket::VideoCodec, webrtc::CodecSpecificInfo etc since we need to convert to/from these types in ObjCVideoEncoder/Decoder. These types would need to be more codec agnostic to avoid this. - Most interfaces are borrowed from the design document for injectable codecs in Android. Some data in the corresponding C++ classes is discarded when converting to the Obj-C version, since it has fewer fields. I have not verified whether all data that we do keep is needed, or whether we might be losing anything useful in these conversions. - Implement the VideoToolbox codec code directly in the RTCVideoEncoderH264 classes, instead of wrapping webrtc::H264VideoToolboxEncoder / decoder. Eliminates converting between ObjC/C++ types outside the ObjCVideoEncoder/ Decoder wrapper classes. - List the injected codec factory's supported codecs in the list of codecs in AppRTCMobile. BUG=webrtc:7924 R=magjed@webrtc.org Review-Url: https://codereview.webrtc.org/2966023002 . Cr-Commit-Position: refs/heads/master@{#18928} Committed: https://chromium.googlesource.com/external/webrtc/+/a0349c138db62c52435be84b6c837f5f4758e264

Patch Set 1 #

Patch Set 2 : Fix build depencencies. #

Patch Set 3 : Fix build dependencies again. #

Patch Set 4 : More granular iOS flag checks in header. #

Total comments: 13

Patch Set 5 : Fix some issues from comments. #

Total comments: 10

Patch Set 6 : Fix formatting and build targets. #

Total comments: 1

Patch Set 7 : Don’t reference the H264 codec in NO_MEDIA mode. #

Patch Set 8 : Support nil encoder / decoder. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1214 lines, -10 lines) Patch
M webrtc/sdk/BUILD.gn View 1 2 3 4 5 8 chunks +18 lines, -0 lines 0 comments Download
M webrtc/sdk/objc/Framework/Classes/Common/helpers.h View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCEncodedImage.mm View 1 2 3 4 5 1 chunk +74 lines, -0 lines 0 comments Download
M webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCPeerConnectionFactory.mm View 1 2 3 4 5 6 7 4 chunks +26 lines, -5 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCRtpFragmentationHeader.mm View 1 2 3 4 5 1 chunk +61 lines, -0 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoCodec.mm View 1 2 3 4 5 1 chunk +114 lines, -0 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoCodec+Private.h View 1 2 3 4 5 1 chunk +57 lines, -0 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoCodecH264.mm View 1 2 3 4 5 1 chunk +263 lines, -0 lines 0 comments Download
M webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoFrame.mm View 1 chunk +1 line, -0 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/PeerConnection/objc_video_decoder_factory.h View 1 chunk +39 lines, -0 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/PeerConnection/objc_video_decoder_factory.mm View 1 2 3 4 5 1 chunk +125 lines, -0 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/PeerConnection/objc_video_encoder_factory.h View 1 chunk +41 lines, -0 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/PeerConnection/objc_video_encoder_factory.mm View 1 2 3 4 5 1 chunk +156 lines, -0 lines 0 comments Download
M webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h View 1 2 3 4 5 6 7 1 chunk +9 lines, -1 line 0 comments Download
A webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodec.h View 1 2 3 4 5 1 chunk +137 lines, -0 lines 0 comments Download
A webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h View 1 2 3 4 5 1 chunk +36 lines, -0 lines 0 comments Download
A webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h View 1 2 3 4 5 1 chunk +47 lines, -0 lines 0 comments Download
M webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrame.h View 1 chunk +3 lines, -0 lines 0 comments Download
M webrtc/sdk/objc/Framework/Headers/WebRTC/WebRTC.h View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (27 generated)
magjed_webrtc
https://codereview.webrtc.org/2966023002/diff/60001/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m File webrtc/examples/objc/AppRTCMobile/ARDAppClient.m (right): https://codereview.webrtc.org/2966023002/diff/60001/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m#newcode25 webrtc/examples/objc/AppRTCMobile/ARDAppClient.m:25: #import "WebRTC/RTCVideoCodecFactory.h" This include looks unnecessary. https://codereview.webrtc.org/2966023002/diff/60001/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoCodec.mm File webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoCodec.mm ...
3 years, 5 months ago (2017-07-04 14:08:33 UTC) #19
andersc
https://codereview.webrtc.org/2966023002/diff/60001/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m File webrtc/examples/objc/AppRTCMobile/ARDAppClient.m (right): https://codereview.webrtc.org/2966023002/diff/60001/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m#newcode25 webrtc/examples/objc/AppRTCMobile/ARDAppClient.m:25: #import "WebRTC/RTCVideoCodecFactory.h" On 2017/07/04 14:08:32, magjed_webrtc wrote: > This ...
3 years, 5 months ago (2017-07-04 15:10:42 UTC) #20
magjed_webrtc
I would like to move RTCEncodedImage.h and RTCRtpFragmentationHeader.h into RTCVideoCodec.h as well, in order to ...
3 years, 5 months ago (2017-07-05 13:22:35 UTC) #21
andersc
Moved the files with media dependencies into the target that compiles without the `HAVE_NO_MEDIA` flag. ...
3 years, 5 months ago (2017-07-06 12:39:42 UTC) #22
magjed_webrtc
lgtm! https://codereview.webrtc.org/2966023002/diff/100001/webrtc/sdk/BUILD.gn File webrtc/sdk/BUILD.gn (right): https://codereview.webrtc.org/2966023002/diff/100001/webrtc/sdk/BUILD.gn#newcode490 webrtc/sdk/BUILD.gn:490: "../modules:module_api", I hope this dependency doesn't increase the ...
3 years, 5 months ago (2017-07-06 14:33:07 UTC) #27
andersc
Committed patchset #8 (id:140001) manually as a0349c138db62c52435be84b6c837f5f4758e264 (presubmit successful).
3 years, 5 months ago (2017-07-07 11:19:23 UTC) #33
tkchin_webrtc
3 years, 5 months ago (2017-07-11 19:42:51 UTC) #34
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:140001) has been created in
https://codereview.webrtc.org/2975963002/ by tkchin@webrtc.org.

The reason for reverting is: Causes no video in certain scenarios. Please come
up with a test plan or unit test to prevent such problems in the future..

Powered by Google App Engine
This is Rietveld 408576698