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

Issue 2528493004: Add method on AVFoundation capturer to adapt output format. (Closed)

Created:
4 years ago by kthelgason
Modified:
4 years ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Add method on AVFoundation capturer to adapt output format. This CL makes a method available on the AVFoundationVideoCapturer that adapts the output format of captured video to the specified width and height. BUG=webrtc:6753 Committed: https://crrev.com/2bc324cc5a97e051b45e8776e842d701bced7e2e Cr-Commit-Position: refs/heads/master@{#15351}

Patch Set 1 #

Total comments: 13

Patch Set 2 : align colons in method name #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -0 lines) Patch
M webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm View 1 1 chunk +6 lines, -0 lines 0 comments Download
M webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.h View 1 chunk +4 lines, -0 lines 0 comments Download
M webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm View 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h View 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (5 generated)
kthelgason
Short and sweet, ptal :)
4 years ago (2016-11-23 13:31:49 UTC) #2
magjed_webrtc
lgtm % nits https://codereview.webrtc.org/2528493004/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm (right): https://codereview.webrtc.org/2528493004/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm#newcode35 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm:35: - (void)adaptOutputFormatToWidth:(int)width height:(int)height fps:(int)fps { nit: ...
4 years ago (2016-11-23 13:53:40 UTC) #3
kthelgason
https://codereview.webrtc.org/2528493004/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm (right): https://codereview.webrtc.org/2528493004/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm#newcode35 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm:35: - (void)adaptOutputFormatToWidth:(int)width height:(int)height fps:(int)fps { On 2016/11/23 13:53:40, magjed_webrtc ...
4 years ago (2016-11-23 14:01:48 UTC) #4
daniela-webrtc
lgtm
4 years ago (2016-11-23 14:02:10 UTC) #5
magjed_webrtc
lgtm https://codereview.webrtc.org/2528493004/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm (right): https://codereview.webrtc.org/2528493004/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm#newcode35 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm:35: - (void)adaptOutputFormatToWidth:(int)width height:(int)height fps:(int)fps { On 2016/11/23 14:01:48, ...
4 years ago (2016-11-24 13:04:31 UTC) #6
tkchin_webrtc
lgtm just a few qns https://codereview.webrtc.org/2528493004/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm (right): https://codereview.webrtc.org/2528493004/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm#newcode35 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm:35: - (void)adaptOutputFormatToWidth:(int)width height:(int)height fps:(int)fps ...
4 years ago (2016-11-30 22:08:52 UTC) #7
kthelgason
https://codereview.webrtc.org/2528493004/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm (right): https://codereview.webrtc.org/2528493004/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm#newcode35 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm:35: - (void)adaptOutputFormatToWidth:(int)width height:(int)height fps:(int)fps { On 2016/11/30 22:08:52, tkchin_webrtc ...
4 years ago (2016-12-01 09:17:00 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2528493004/20001
4 years ago (2016-12-01 09:17:14 UTC) #11
magjed_webrtc
https://codereview.webrtc.org/2528493004/diff/1/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h File webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h (right): https://codereview.webrtc.org/2528493004/diff/1/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h#newcode40 webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h:40: - (void)adaptOutputFormatToWidth:(int)width height:(int)height fps:(int)fps; On 2016/11/30 22:08:52, tkchin_webrtc wrote: ...
4 years ago (2016-12-01 09:31:45 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-01 09:36:20 UTC) #14
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/2bc324cc5a97e051b45e8776e842d701bced7e2e Cr-Commit-Position: refs/heads/master@{#15351}
4 years ago (2016-12-01 09:36:29 UTC) #16
tkchin_webrtc
4 years ago (2016-12-02 22:02:20 UTC) #17
Message was sent while issue was closed.
https://codereview.webrtc.org/2528493004/diff/1/webrtc/sdk/objc/Framework/Hea...
File webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h
(right):

https://codereview.webrtc.org/2528493004/diff/1/webrtc/sdk/objc/Framework/Hea...
webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h:40: -
(void)adaptOutputFormatToWidth:(int)width height:(int)height fps:(int)fps;
On 2016/12/01 09:31:44, magjed_webrtc wrote:
> On 2016/11/30 22:08:52, tkchin_webrtc wrote:
> > is there a way to do this without touching the capturer directly like this?
> > ie what is the "WebRTC" way of doing things here
> 
> I think this is the "WebRTC" way of doing it. We have pushed all cropping and
> scaling to the video source since it's most efficient to do it as early as
> possible (this was more a concern when we did like 5 frame copies in the
> pipeline before scaling). So the one scaler we have is a cricket::VideoAdapter
> in the video source. CPU overuse detector and QualityScaler will signal back
to
> this cricket::VideoAdapter. I think it makes sense to also expose a direct way
> in the video source to control the VideoAdapter. This is how it's done for
> Android as well.
> 
> One alternative might be to use media constraints in
> PeerConnectionFactory::CreateVideoSource to control this, but we are trying to
> move away from media constraints for that function, see
>
https://cs.chromium.org/chromium/src/third_party/webrtc/api/peerconnectionfac....
> We are trying to move towards a more simple and direct interface and leave the
> decision logic to the app. So the app has to select one of the supported
> resolutions from the capturer and can also control the VideoAdapter directly.

I'm totally with you that mobile is a different world, and should be treated
differently when needed, so this change looks good. I guess what I meant was,
how would you do this in JS? And I guess the answer is, mobile is different.

Powered by Google App Engine
This is Rietveld 408576698