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

Issue 2488973002: Split avfoundationcapturer classes in separate files. (Closed)

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

Description

Split avfoundationcapturer classes in separate files. Increases readibility and helps with the formating. BUG=webrtc:6680 Committed: https://crrev.com/71caaca2544963a446e189e37beec5111d918177 Cr-Commit-Position: refs/heads/master@{#15206}

Patch Set 1 #

Total comments: 16

Patch Set 2 : Decrease the similarity to 10% #

Total comments: 10

Patch Set 3 : Fix formatting #

Patch Set 4 : Remove static function from global namespace and add it to cpp class #

Total comments: 2

Patch Set 5 : Add wrapper class for static methosd #

Total comments: 6

Patch Set 6 : Renaming of classes and methods #

Total comments: 8

Patch Set 7 : Fix comments. #

Total comments: 7

Patch Set 8 : Format #

Total comments: 15

Patch Set 9 : Replace objc static methods with c externs #

Patch Set 10 : Replace objc++ static methods with c++ externs. #

Total comments: 2

Patch Set 11 : Alphabetize imports #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+217 lines, -1813 lines) Patch
M webrtc/sdk/BUILD.gn View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.h View 1 2 3 4 5 6 7 8 1 chunk +49 lines, -0 lines 0 comments Download
A + webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm View 1 2 3 4 5 6 7 8 20 chunks +104 lines, -434 lines 0 comments Download
A webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h View 1 2 3 4 5 6 7 8 1 chunk +27 lines, -0 lines 2 comments Download
A + webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.mm View 1 2 3 4 5 6 7 8 9 7 chunks +31 lines, -726 lines 0 comments Download
M webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm View 1 2 3 4 5 6 7 8 9 10 3 chunks +2 lines, -653 lines 0 comments Download

Messages

Total messages: 38 (6 generated)
daniela-webrtc
First CL towards the "split the capture classes" goal. For simplifying the review I've only ...
4 years, 1 month ago (2016-11-10 08:55:03 UTC) #2
kthelgason
A few comments: https://codereview.webrtc.org/2488973002/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.h File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.h (right): https://codereview.webrtc.org/2488973002/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.h#newcode21 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.h:21: @interface RTCAVFoundationVideoCapturerInternal Don't we prefer classname+private.h ...
4 years, 1 month ago (2016-11-10 09:28:11 UTC) #3
magjed_webrtc
https://codereview.webrtc.org/2488973002/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm (right): https://codereview.webrtc.org/2488973002/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm#newcode2 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm:2: * Copyright 2016 The WebRTC project authors. All Rights ...
4 years, 1 month ago (2016-11-10 10:32:52 UTC) #4
daniela-webrtc
On 2016/11/10 10:32:52, magjed_webrtc wrote: > https://codereview.webrtc.org/2488973002/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm > File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm > (right): > > https://codereview.webrtc.org/2488973002/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm#newcode2 ...
4 years, 1 month ago (2016-11-10 11:49:46 UTC) #5
magjed_webrtc
Looks good overall, but indentation is incorrect in a couple of places. https://codereview.webrtc.org/2488973002/diff/20001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm ...
4 years, 1 month ago (2016-11-10 13:22:45 UTC) #6
daniela-webrtc
https://codereview.webrtc.org/2488973002/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.h File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.h (right): https://codereview.webrtc.org/2488973002/diff/1/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.h#newcode21 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.h:21: @interface RTCAVFoundationVideoCapturerInternal On 2016/11/10 09:28:10, kthelgason wrote: > Don't ...
4 years, 1 month ago (2016-11-11 13:08:59 UTC) #7
daniela-webrtc
https://codereview.webrtc.org/2488973002/diff/1/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm File webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm (right): https://codereview.webrtc.org/2488973002/diff/1/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm#newcode122 webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm:122: // Perhaps adding a category on AVCaptureDevice would be ...
4 years, 1 month ago (2016-11-11 13:23:10 UTC) #8
kthelgason
On 2016/11/11 13:23:10, denicija-webrtc wrote: > https://codereview.webrtc.org/2488973002/diff/1/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm > File webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm (right): > > https://codereview.webrtc.org/2488973002/diff/1/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm#newcode122 > ...
4 years, 1 month ago (2016-11-14 13:31:31 UTC) #9
magjed_webrtc
Should avfoundationvideocapturer.mm be renamed to avfoundationvideocapturer.cc now? https://codereview.webrtc.org/2488973002/diff/60001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm (right): https://codereview.webrtc.org/2488973002/diff/60001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm#newcode491 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm:491: _capturer->SetFormatForCaptureDevice(newDevice, _captureSession, ...
4 years, 1 month ago (2016-11-14 13:48:52 UTC) #10
daniela-webrtc
On 2016/11/14 13:48:52, magjed_webrtc wrote: > Should avfoundationvideocapturer.mm be renamed to avfoundationvideocapturer.cc > now? > ...
4 years, 1 month ago (2016-11-14 15:22:43 UTC) #11
magjed_webrtc
On 2016/11/14 15:22:43, denicija-webrtc wrote: > On 2016/11/14 13:48:52, magjed_webrtc wrote: > > Should avfoundationvideocapturer.mm ...
4 years, 1 month ago (2016-11-14 16:04:22 UTC) #12
daniela-webrtc
On 2016/11/14 16:04:22, magjed_webrtc wrote: > On 2016/11/14 15:22:43, denicija-webrtc wrote: > > On 2016/11/14 ...
4 years, 1 month ago (2016-11-17 08:40:12 UTC) #13
magjed_webrtc
On 2016/11/17 08:40:12, denicija-webrtc wrote: > On 2016/11/14 16:04:22, magjed_webrtc wrote: > > Yeah, I ...
4 years, 1 month ago (2016-11-17 09:07:58 UTC) #14
daniela-webrtc
I've split out the static methods into a separate class (RTCVideoFormatMapper). I'll add unit tests ...
4 years, 1 month ago (2016-11-17 10:09:42 UTC) #15
magjed_webrtc
https://codereview.webrtc.org/2488973002/diff/80001/webrtc/sdk/objc/Framework/Classes/RTCVideoFormatMapper.h File webrtc/sdk/objc/Framework/Classes/RTCVideoFormatMapper.h (right): https://codereview.webrtc.org/2488973002/diff/80001/webrtc/sdk/objc/Framework/Classes/RTCVideoFormatMapper.h#newcode1 webrtc/sdk/objc/Framework/Classes/RTCVideoFormatMapper.h:1: /* I think the name of this class too ...
4 years, 1 month ago (2016-11-17 14:11:31 UTC) #16
kthelgason
lgtm % small nit. Feel free to ignore https://codereview.webrtc.org/2488973002/diff/80001/webrtc/sdk/objc/Framework/Classes/RTCVideoFormatMapper.h File webrtc/sdk/objc/Framework/Classes/RTCVideoFormatMapper.h (right): https://codereview.webrtc.org/2488973002/diff/80001/webrtc/sdk/objc/Framework/Classes/RTCVideoFormatMapper.h#newcode52 webrtc/sdk/objc/Framework/Classes/RTCVideoFormatMapper.h:52: format:(const ...
4 years, 1 month ago (2016-11-21 08:38:14 UTC) #17
daniela-webrtc
https://codereview.webrtc.org/2488973002/diff/80001/webrtc/sdk/objc/Framework/Classes/RTCVideoFormatMapper.h File webrtc/sdk/objc/Framework/Classes/RTCVideoFormatMapper.h (right): https://codereview.webrtc.org/2488973002/diff/80001/webrtc/sdk/objc/Framework/Classes/RTCVideoFormatMapper.h#newcode1 webrtc/sdk/objc/Framework/Classes/RTCVideoFormatMapper.h:1: /* On 2016/11/17 14:11:31, magjed_webrtc wrote: > I think ...
4 years, 1 month ago (2016-11-21 10:14:21 UTC) #18
magjed_webrtc
https://codereview.webrtc.org/2488973002/diff/100001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h (right): https://codereview.webrtc.org/2488973002/diff/100001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h#newcode23 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h:23: * Maps the list of eligible AVCaptureDeviceFormat to cricket::VideoFormat. ...
4 years, 1 month ago (2016-11-21 10:59:46 UTC) #19
daniela-webrtc
https://codereview.webrtc.org/2488973002/diff/100001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h (right): https://codereview.webrtc.org/2488973002/diff/100001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h#newcode23 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h:23: * Maps the list of eligible AVCaptureDeviceFormat to cricket::VideoFormat. ...
4 years, 1 month ago (2016-11-21 13:24:56 UTC) #20
magjed_webrtc
lgtm % nits https://codereview.webrtc.org/2488973002/diff/120001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h (right): https://codereview.webrtc.org/2488973002/diff/120001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h#newcode36 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h:36: * supportedVideoFormatsForDevice:. nit: remove colon. https://codereview.webrtc.org/2488973002/diff/120001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm ...
4 years, 1 month ago (2016-11-21 13:57:52 UTC) #21
daniela-webrtc
https://codereview.webrtc.org/2488973002/diff/120001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h (right): https://codereview.webrtc.org/2488973002/diff/120001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h#newcode36 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h:36: * supportedVideoFormatsForDevice:. On 2016/11/21 13:57:52, magjed_webrtc wrote: > nit: ...
4 years, 1 month ago (2016-11-21 16:29:50 UTC) #23
magjed_webrtc
https://codereview.webrtc.org/2488973002/diff/120001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm (right): https://codereview.webrtc.org/2488973002/diff/120001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm#newcode494 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm:494: _capturer->GetCaptureFormat(); On 2016/11/21 16:29:50, denicija-webrtc wrote: > On 2016/11/21 ...
4 years, 1 month ago (2016-11-21 16:55:35 UTC) #24
tkchin_webrtc
https://codereview.webrtc.org/2488973002/diff/140001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h (right): https://codereview.webrtc.org/2488973002/diff/140001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h#newcode30 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h:30: + (std::set<cricket::VideoFormat>)supportedVideoFormatsForDevice:(AVCaptureDevice *)device; I don't recommend returning C++ objects ...
4 years, 1 month ago (2016-11-21 18:51:47 UTC) #25
daniela-webrtc
https://codereview.webrtc.org/2488973002/diff/140001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h (right): https://codereview.webrtc.org/2488973002/diff/140001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h#newcode30 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationFormatMapper.h:30: + (std::set<cricket::VideoFormat>)supportedVideoFormatsForDevice:(AVCaptureDevice *)device; On 2016/11/21 18:51:47, tkchin_webrtc wrote: > ...
4 years, 1 month ago (2016-11-22 11:43:44 UTC) #26
tkchin_webrtc
lgtm https://codereview.webrtc.org/2488973002/diff/140001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm (right): https://codereview.webrtc.org/2488973002/diff/140001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm#newcode161 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm:161: [RTCDispatcher On 2016/11/22 11:43:44, denicija-webrtc wrote: > On ...
4 years, 1 month ago (2016-11-22 21:26:07 UTC) #27
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/2488973002/200001
4 years, 1 month ago (2016-11-23 08:28:21 UTC) #30
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 1 month ago (2016-11-23 08:42:01 UTC) #32
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/71caaca2544963a446e189e37beec5111d918177 Cr-Commit-Position: refs/heads/master@{#15206}
4 years, 1 month ago (2016-11-23 08:42:14 UTC) #34
daniela-webrtc
https://codereview.webrtc.org/2488973002/diff/140001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm File webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm (right): https://codereview.webrtc.org/2488973002/diff/140001/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm#newcode161 webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoCapturerInternal.mm:161: [RTCDispatcher On 2016/11/22 21:26:07, tkchin_webrtc wrote: > On 2016/11/22 ...
4 years ago (2016-11-23 15:04:51 UTC) #35
magjed_webrtc
https://codereview.webrtc.org/2488973002/diff/200001/webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h File webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h (right): https://codereview.webrtc.org/2488973002/diff/200001/webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h#newcode14 webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h:14: #include "webrtc/media/base/videocapturer.h" Include webrtc/media/base/videocommon.h instead. https://codereview.webrtc.org/2488973002/diff/200001/webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h#newcode19 webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h:19: extern std::set<cricket::VideoFormat> ...
4 years ago (2016-11-24 13:35:40 UTC) #36
daniela-webrtc
On 2016/11/24 13:35:40, magjed_webrtc wrote: > https://codereview.webrtc.org/2488973002/diff/200001/webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h > File webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h (right): > > https://codereview.webrtc.org/2488973002/diff/200001/webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h#newcode14 > ...
4 years ago (2016-11-25 08:25:10 UTC) #37
magjed_webrtc
4 years ago (2016-11-28 12:06:15 UTC) #38
Message was sent while issue was closed.
On 2016/11/25 08:25:10, denicija-webrtc wrote:
> On 2016/11/24 13:35:40, magjed_webrtc wrote:
> >
>
https://codereview.webrtc.org/2488973002/diff/200001/webrtc/sdk/objc/Framewor...
> > File webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h (right):
> > 
> >
>
https://codereview.webrtc.org/2488973002/diff/200001/webrtc/sdk/objc/Framewor...
> > webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h:14: #include
> > "webrtc/media/base/videocapturer.h"
> > Include webrtc/media/base/videocommon.h instead.
> 
> Is it OK to do this in the follow up CL so that I don't need to re-land this
> one?
>  
> >
>
https://codereview.webrtc.org/2488973002/diff/200001/webrtc/sdk/objc/Framewor...
> > webrtc/sdk/objc/Framework/Classes/avfoundationformatmapper.h:19: extern
> > std::set<cricket::VideoFormat> GetSupportedVideoFormatsForDevice(
> > These functions should not be marked extern, unless there is some ObjC
reason
> > I'm not aware of.
> 
> I made them extern as per Zeke's comment. I don't know of any ObjC particular
> reason to be honest. It should be the same as cpp and c.

Yes, do these changes in https://codereview.webrtc.org/2526813002/.

Powered by Google App Engine
This is Rietveld 408576698