139 Commits

Author SHA1 Message Date
denicija
b681aabdfc Revert of Add metal view, shaders and renderer. (patchset #18 id:340001 of https://codereview.webrtc.org/2651743007/ )
Reason for revert:
Reverting due to breakage in the Google3 import

Original issue's description:
> Add metal view, shaders and renderer.
>
> This CL submits standalone Metal view, renderer and shader.
>
> BUG=webrtc:7079
>
> Review-Url: https://codereview.webrtc.org/2651743007
> Cr-Commit-Position: refs/heads/master@{#16787}
> Committed: fc8c97f950

TBR=magjed@webrtc.org,kthelgason@webrtc.org,tkchin@webrtc.org,haysc@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7079

Review-Url: https://codereview.webrtc.org/2711003004
Cr-Commit-Position: refs/heads/master@{#16788}
2017-02-23 09:15:07 +00:00
denicija
fc8c97f950 Add metal view, shaders and renderer.
This CL submits standalone Metal view, renderer and shader.

BUG=webrtc:7079

Review-Url: https://codereview.webrtc.org/2651743007
Cr-Commit-Position: refs/heads/master@{#16787}
2017-02-23 08:46:07 +00:00
magjed
c3c46246a9 Add RTCVideoFrame init function from CVPixelBufferRef
Adds a public init function in RTCVideoFrame that makes it possible to
create a frame from a CVPixelBufferRef.

BUG=webrtc:7177
NOTRY=True

Review-Url: https://codereview.webrtc.org/2700113003
Cr-Commit-Position: refs/heads/master@{#16746}
2017-02-21 13:28:48 +00:00
magjed
7ee512581c Clean up RTCVideoFrame
RTCVideoFrame is an ObjectiveC version of webrtc::VideoFrame, but it
currently contains some extra logic beyond that. We want RTCVideoFrame
to be as simple as possible, i.e. just a container with no extra state,
so we can use it as input to RTCVideoSource without complicating the
interface for consumers.

BUG=webrtc:7177
NOTRY=True

Review-Url: https://codereview.webrtc.org/2695203004
Cr-Commit-Position: refs/heads/master@{#16740}
2017-02-21 12:19:46 +00:00
zhihuang
d7e771da7b Add the URL attribute to cricket::Candiate. (Objc wrapper)
The url of the ICE server is added to the IceCandiate class.
This can be used to tell which server this candidate was gathered from.

BUG=webrtc:7128

Review-Url: https://codereview.webrtc.org/2688943003
Cr-Commit-Position: refs/heads/master@{#16652}
2017-02-16 19:29:39 +00:00
kthelgason
1f16ee38c1 Compile ios helpers on mac as well.
BUG=webrtc:5582

Review-Url: https://codereview.webrtc.org/2586433002
Cr-Commit-Position: refs/heads/master@{#16604}
2017-02-14 11:07:57 +00:00
adam.fedor
806a1a0c28 Add ifdef protection for iOS-only headers
BUG=webrtc:6841

Review-Url: https://codereview.webrtc.org/2553683008
Cr-Commit-Position: refs/heads/master@{#16580}
2017-02-13 13:09:01 +00:00
deadbeef
112b2e99d8 Switching some interfaces to use std::unique_ptr<>.
This helps show where ownership is transfered between objects.

Specifically, this CL wraps cricket::VideoCapturer, MediaEngineInterface
and DataEngineInterface in unique_ptr.

BUG=None
TBR=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2685093002
Cr-Commit-Position: refs/heads/master@{#16548}
2017-02-11 04:13:37 +00:00
kjellander
5d52bf7049 Roll chromium_revision baaeb3f30e..ba3e8dd8fa (449272:449304)
Disabled AVFormatMapperTest.SetFormatWhenFormatIsIncompatible due to failure
with OCMock upgraded to 3.1.5.

Change log: baaeb3f30e..ba3e8dd8fa
Full diff: baaeb3f30e..ba3e8dd8fa

Changed dependencies:
* src/build: ad4a5750d2..fa619b2a12
* src/ios: c60f051132..e1e28f1363
* src/testing: 0136cdb11f..eafb0c38ce
* src/third_party: 1f75580222..9979a014f0
* src/third_party/catapult: 5c71aaccc3..5a31d0e078
DEPS diff: baaeb3f30e..ba3e8dd8fa/DEPS

No update to Clang.

TBR=magjed@webrtc.org
BUG=webrtc:7137
NOTRY=True

Review-Url: https://codereview.webrtc.org/2687963002
Cr-Commit-Position: refs/heads/master@{#16520}
2017-02-09 19:19:31 +00:00
zhihuang
4da058c0dd Create an Obj-C wrapper of the RtpReceiverObserverInterface.
Create the RTCRtpReceiverDelegate which is a wrapper over
webrtc::RtpReceiverObserverInterface.
The callback will be called whenever the first rtp packet is received.

Related CL: https://codereview.webrtc.org/2531333003/

BUG=webrtc:6742

Review-Url: https://codereview.webrtc.org/2641923003
Cr-Commit-Position: refs/heads/master@{#16501}
2017-02-08 18:41:20 +00:00
deadbeef
e702b30fec Adding C++ versions of currently spec'd "RtpParameters" structs.
These structs will be used for ORTC objects (and their WebRTC
equivalents).

This CL also introduces some minor changes to the existing implemented
structs:

- max_bitrate_bps uses rtc::Optional instead of "-1 means unset"
- "mime_type" turned into "name"/"kind" (which can be used to form the
  MIME type string, if needed).
- clock_rate and channels changed to rtc::Optional, since they will
  need to be for RtpSender.send().
- Renamed "channels" to "num_channels" (the ORTC name, which I prefer).

BUG=webrtc:7013, webrtc:7112

Review-Url: https://codereview.webrtc.org/2651883010
Cr-Commit-Position: refs/heads/master@{#16437}
2017-02-04 20:09:01 +00:00
haysc
98c437458a Allow passing network config constraint as base64 encoded string to preserve values of serialized protos. The values are a serialized byte stream packed into a std::string. To be represented as a NSString they must be base64 encoded or bytes outside of the ASCII range will be encoded into multi byte UTF8 sequences by default.
BUG=0

Review-Url: https://codereview.webrtc.org/2650343006
Cr-Commit-Position: refs/heads/master@{#16435}
2017-02-03 21:03:39 +00:00
hnsl
6741516e18 Implement new PeerConnection certificate policy API in ObjC API
BUG=webrtc:7088

Review-Url: https://codereview.webrtc.org/2664233002
Cr-Commit-Position: refs/heads/master@{#16424}
2017-02-02 21:04:27 +00:00
skvlad
a5d94fff99 Objective-C API to set the ICE check rate through RTCConfiguration.
This is the Objective-C counterpart to
https://codereview.webrtc.org/2670053002/. Allows applications to
control the maximum ICE check rate to match bandwidth constraints.

BUG=webrtc:7082

Review-Url: https://codereview.webrtc.org/2674663002
Cr-Commit-Position: refs/heads/master@{#16423}
2017-02-02 21:02:30 +00:00
haysc
148e370526 iOS: Add SendSideBweWithOverhead field trial key
BUG=0

Review-Url: https://codereview.webrtc.org/2649923011
Cr-Commit-Position: refs/heads/master@{#16275}
2017-01-25 18:02:20 +00:00
tkchin
4c78702d12 iOS: Add MedianSlopeFilter field trial.
BUG=0

Review-Url: https://codereview.webrtc.org/2646443013
Cr-Commit-Position: refs/heads/master@{#16223}
2017-01-23 19:24:57 +00:00
ossu
7bb87ee4e8 Create //webrtc/api:libjingle_peerconnection_api + refactorings.
Create a new target //webrtc/api:libjingle_peerconnection_api and start moving
things into it. Move remaining parts of //webrtc/api:libjingle_peerconnection
to //webrtc/pc:libjingle_peerconnection.

Moved the RTCStatsCollectorCallback into its own header file, so that
PeerConnectionInterface can include that instead of pulling in
RTCStatsCollector and PeerConnection and everything.

Separated cricket::MediaType into its own header/source set, so that it
can be used in the api.

BUG=webrtc:5883

Review-Url: https://codereview.webrtc.org/2514883002
Cr-Commit-Position: refs/heads/master@{#16210}
2017-01-23 12:56:25 +00:00
magjed
aea1a017ed Move webrtc/sdk/DEPS to webrtc/sdk/objc/DEPS
The folder webrtc/sdk/ now contains android as well, so we should move the objc DEPS file to the objc folder.

TBR=tommi
BUG=None

Review-Url: https://codereview.webrtc.org/2644733008
Cr-Commit-Position: refs/heads/master@{#16191}
2017-01-20 14:56:44 +00:00
nisse
e8abe3ef1b Revert of New method StatsObserver::OnCompleteReports, passing ownership. (patchset #2 id:20001 of https://codereview.webrtc.org/2584553002/ )
Reason for revert:
The new method doesn't work as intended.

It can't pass ownership, because the StatsReports is a vector of raw pointers to StatReport objects owned by the StatsCollector.

Original issue's description:
> New method StatsObserver::OnCompleteReports, passing ownership.
>
> The new name, OnCompleteReports rather than OnComplete, is needed
> because in C++ method lookup, overriding a method hides all otherwise
> inherited methods with the same name, even if they have a different
> signature. And here, the intention is that each subclass should
> override one or the other of the two methods, and inherit the method it
> doesn't override.
>
> This cl is a prerequisite for
> https://codereview.webrtc.org/2567143003/, because the Chrome glue
> code needs to retain the stats report after the OnComplete method has
> returned.
>
> Currently, Chrome makes a copy of the stats mapping (which breaks when
> changing ValuePtr from an rtc::linked_ptr to an std::unique_ptr). After
> this cl, Chrome can be fixed to take ownership and no longer needs to
> copy anything, unblocking cl 2567143003.
>
> BUG=webrtc:6424
>
> Review-Url: https://codereview.webrtc.org/2584553002
> Cr-Commit-Position: refs/heads/master@{#15708}
> Committed: b36ee8d498

TBR=solenberg@webrtc.org,magjed@webrtc.org,tkchin@webrtc.org,hbos@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2641783002
Cr-Commit-Position: refs/heads/master@{#16144}
2017-01-18 13:00:34 +00:00
magjed
bf0845201a Remove use of PCH files in webrtc/sdk/objc
A decision has been made to not use prefix header files.

BUG=None

Review-Url: https://codereview.webrtc.org/2590823002
Cr-Commit-Position: refs/heads/master@{#16056}
2017-01-13 15:10:16 +00:00
nisse
af916899cc Move VideoFrame and related declarations to webrtc/api/video.
Moves webrtc/common_video/rotation.h and parts of
webrtc/common_video/include/video_frame_buffer.h and
webrtc/video_frame.h, and adds to a new GN target api:video_frame_api.

BUG=webrtc:5880

Review-Url: https://codereview.webrtc.org/2517173004
Cr-Commit-Position: refs/heads/master@{#15993}
2017-01-10 15:44:26 +00:00
kthelgason
a3f6ce10ed Update bitrate adjustment with true buffer used size.
This used to be updated with the reserved capacity of the buffer,
not the actual portion in use.

BUG=webrtc:6034

Review-Url: https://codereview.webrtc.org/2620653005
Cr-Commit-Position: refs/heads/master@{#15982}
2017-01-10 11:02:04 +00:00
deadbeef
5d0b6d8da3 Merge RTCConfiguration with RTCMediaConstraints in Java/Obj-C wrappers.
The intention of SetConfiguration is that it modifies the configuration,
while keeping the constraints passed into CreatePeerConnection. Right
now that's now happening. See bug for more explanation.

BUG=webrtc:6942

Review-Url: https://codereview.webrtc.org/2603653002
Cr-Commit-Position: refs/heads/master@{#15974}
2017-01-10 00:05:28 +00:00
magjed
0b7bd75659 AVFoundationVideoCapturer: Fix apply_rotation() logic
When apply_rotation() returns true, rotation and captured width/heigh are not set correctly.

BUG=webrtc:6925

Review-Url: https://codereview.webrtc.org/2611113003
Cr-Commit-Position: refs/heads/master@{#15963}
2017-01-09 15:09:23 +00:00
magjed
29fe6f338f Make magjed@ owner of webrtc/sdk/objc
Also, move owner file from webrtc/sdk to webrtc/sdk/objc since we now
also have webrtc/sdk/android directory.

BUG=None
TBR=tkchin
NOTRY=True

Review-Url: https://codereview.webrtc.org/2589233002
Cr-Commit-Position: refs/heads/master@{#15961}
2017-01-09 12:20:30 +00:00
kthelgason
c1b661eee0 Remove duplicate implementations of string conversion methods.
BUG=webrtc:4773

Review-Url: https://codereview.webrtc.org/2583853002
Cr-Commit-Position: refs/heads/master@{#15957}
2017-01-09 09:40:03 +00:00
deadbeef
8014c75931 Adding Java and Obj-C bindings for RtpEncodingParameters.ssrc.
BUG=webrtc:6903

Review-Url: https://codereview.webrtc.org/2581913002
Cr-Commit-Position: refs/heads/master@{#15936}
2017-01-07 00:53:00 +00:00
ehmaldonado
da8dcfb43e Refactor rtc_unittests into several targets.
Also fix some warnings.

NOTRY=True
BUG=webrtc:6954

Review-Url: https://codereview.webrtc.org/2611663002
Cr-Commit-Position: refs/heads/master@{#15900}
2017-01-04 15:11:23 +00:00
nisse
b36ee8d498 New method StatsObserver::OnCompleteReports, passing ownership.
The new name, OnCompleteReports rather than OnComplete, is needed
because in C++ method lookup, overriding a method hides all otherwise
inherited methods with the same name, even if they have a different
signature. And here, the intention is that each subclass should
override one or the other of the two methods, and inherit the method it
doesn't override.

This cl is a prerequisite for
https://codereview.webrtc.org/2567143003/, because the Chrome glue
code needs to retain the stats report after the OnComplete method has
returned.

Currently, Chrome makes a copy of the stats mapping (which breaks when
changing ValuePtr from an rtc::linked_ptr to an std::unique_ptr). After
this cl, Chrome can be fixed to take ownership and no longer needs to
copy anything, unblocking cl 2567143003.

BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2584553002
Cr-Commit-Position: refs/heads/master@{#15708}
2016-12-20 11:30:00 +00:00
magjed
b4ad603b47 Put iOS H264 High profile under a field trial
H264 High profile is causing problems for some downstream apps. Therefore,
put it behind a field trial instead.

BUG=webrtc:6337

Review-Url: https://codereview.webrtc.org/2580963004
Cr-Commit-Position: refs/heads/master@{#15663}
2016-12-18 07:50:17 +00:00
kthelgason
b3df385f5c Remove device HW id -> marketing name mapping table for iOS devices.
BUG=webrtc:6907

Review-Url: https://codereview.webrtc.org/2581153002
Cr-Commit-Position: refs/heads/master@{#15656}
2016-12-16 14:17:58 +00:00
kthelgason
beafee3009 Move ios_helpers to sdk folder
BUG=webrtc:5582

Review-Url: https://codereview.webrtc.org/2572743004
Cr-Commit-Position: refs/heads/master@{#15649}
2016-12-16 10:12:42 +00:00
kthelgason
05d6e260f5 Initialize packetization mode in VideoToolbox
This fixes a recently introduced bug where we would read uninitialized
memory as the packetization_mode member in codec_specific_info was not
being properly initialized.

BUG=webrtc:6858

Review-Url: https://codereview.webrtc.org/2577043003
Cr-Commit-Position: refs/heads/master@{#15646}
2016-12-16 10:10:20 +00:00
tkchin
4cd6221127 iOS: Add trendline filter to field trials.
NOTRY=True
BUG=webrtc:6902

Review-Url: https://codereview.webrtc.org/2583643002
Cr-Commit-Position: refs/heads/master@{#15643}
2016-12-15 21:17:58 +00:00
nisse
df2ceb88a8 Reland of Delete VideoFrame default constructor, and IsZeroSize method. (patchset #1 id:1 of https://codereview.webrtc.org/2574123002/ )
Reason for revert:
Fixing perf tests.

Original issue's description:
> Revert of Delete VideoFrame default constructor, and IsZeroSize method. (patchset #5 id:80001 of https://codereview.webrtc.org/2541863002/ )
>
> Reason for revert:
> Crashes perf tests, e.g.,
>
> ./out/Debug/webrtc_perf_tests --gtest_filter='FullStackTest.ScreenshareSlidesVP8_2TL_VeryLossyNet'
>
> dies with an assert related to rtc::Optional.
>
> Original issue's description:
> > Delete VideoFrame default constructor, and IsZeroSize method.
> >
> > This ensures that the video_frame_buffer method never can return a
> > null pointer.
> >
> > BUG=webrtc:6591
> >
> > Committed: https://crrev.com/bfcf561923a42005e4c7d66d8e72e5932155f997
> > Cr-Commit-Position: refs/heads/master@{#15574}
>
> TBR=magjed@webrtc.org,stefan@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6591
>
> Committed: https://crrev.com/0989fbcad2ca4eb5805a77e8ebfefd3af06ade23
> Cr-Commit-Position: refs/heads/master@{#15597}

TBR=magjed@webrtc.org,stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6591

Review-Url: https://codereview.webrtc.org/2574183002
Cr-Commit-Position: refs/heads/master@{#15633}
2016-12-15 14:30:00 +00:00
nisse
0989fbcad2 Revert of Delete VideoFrame default constructor, and IsZeroSize method. (patchset #5 id:80001 of https://codereview.webrtc.org/2541863002/ )
Reason for revert:
Crashes perf tests, e.g.,

./out/Debug/webrtc_perf_tests --gtest_filter='FullStackTest.ScreenshareSlidesVP8_2TL_VeryLossyNet'

dies with an assert related to rtc::Optional.

Original issue's description:
> Delete VideoFrame default constructor, and IsZeroSize method.
>
> This ensures that the video_frame_buffer method never can return a
> null pointer.
>
> BUG=webrtc:6591
>
> Committed: https://crrev.com/bfcf561923a42005e4c7d66d8e72e5932155f997
> Cr-Commit-Position: refs/heads/master@{#15574}

TBR=magjed@webrtc.org,stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6591

Review-Url: https://codereview.webrtc.org/2574123002
Cr-Commit-Position: refs/heads/master@{#15597}
2016-12-14 10:06:49 +00:00
nisse
bfcf561923 Delete VideoFrame default constructor, and IsZeroSize method.
This ensures that the video_frame_buffer method never can return a
null pointer.

BUG=webrtc:6591

Review-Url: https://codereview.webrtc.org/2541863002
Cr-Commit-Position: refs/heads/master@{#15574}
2016-12-13 14:08:39 +00:00
denicija
28c2487c85 Add unit tests for avfoundation format mapper functions.
The CL fixes adds tests that fully test the functions that manipulate the cricket::VideoFormat<->AVCaptureDeviceFormat
relation.

BUG=webrtc:6680

Review-Url: https://codereview.webrtc.org/2526813002
Cr-Commit-Position: refs/heads/master@{#15444}
2016-12-06 13:22:53 +00:00
haysc
c9f95005f2 Expose audio_jitter_buffer_fast_accelerate config to objc wrapper
NOTRY=True
BUG=webrtc:6827

Review-Url: https://codereview.webrtc.org/2556553002
Cr-Commit-Position: refs/heads/master@{#15429}
2016-12-05 22:24:41 +00:00
kthelgason
2bc324cc5a 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

Review-Url: https://codereview.webrtc.org/2528493004
Cr-Commit-Position: refs/heads/master@{#15351}
2016-12-01 09:36:22 +00:00
kthelgason
a974d76c74 Enable VideoToolbox encoder on mac
BUG=webrtc:6317

Review-Url: https://codereview.webrtc.org/2532983006
Cr-Commit-Position: refs/heads/master@{#15348}
2016-12-01 08:16:54 +00:00
kthelgason
876222f77d Move usage of QualityScaler to ViEEncoder.
This brings QualityScaler much more in line with OveruseFrameDetector.
The two classes are conceptually similar, and should be used in the
same way. The biggest changes in this CL are:
- Quality scaling is now only done in ViEEncoder and not in each
  encoder implementation separately.
- QualityScaler now checks the average QP asynchronously, instead of
  having to be polled on each frame.
- QualityScaler is no longer responsible for actually scaling the frames,
  but has a callback to ViEEncoder that it uses to express it's desire
  for lower resolution.

BUG=webrtc:6495

Review-Url: https://codereview.webrtc.org/2398963003
Cr-Commit-Position: refs/heads/master@{#15286}
2016-11-29 09:44:22 +00:00
kwiberg
af476c737f RTC_[D]CHECK_op: Remove "u" suffix on integer constants
There's no longer any need to make the two arguments have the same
signedness, so we can drop the "u" suffix on literal integer
arguments.

NOPRESUBMIT=true
BUG=webrtc:6645

Review-Url: https://codereview.webrtc.org/2535593002
Cr-Commit-Position: refs/heads/master@{#15280}
2016-11-28 23:21:51 +00:00
magjed
fd34d30579 iOS HW encoder: Enable H264 High profile support
BUG=webrtc:6337
TBR=tkchin

Review-Url: https://codereview.webrtc.org/2531823002
Cr-Commit-Position: refs/heads/master@{#15249}
2016-11-25 15:32:37 +00:00
denicija
71caaca254 Split avfoundationcapturer classes in separate files.
Increases readibility and helps with the formating.

BUG=webrtc:6680

Review-Url: https://codereview.webrtc.org/2488973002
Cr-Commit-Position: refs/heads/master@{#15206}
2016-11-23 08:42:06 +00:00
magjed
10165ab8e7 Unify VideoCodecType to/from string functionality
BUG=None

Review-Url: https://codereview.webrtc.org/2509273002
Cr-Commit-Position: refs/heads/master@{#15200}
2016-11-22 18:17:04 +00:00
magjed
2d60e53ad5 H264 encoder: Include QP information in encoded images
Set the |qp_| field in EncodedImage before calling OnEncodedImage.

BUG=webrtc:6541

Review-Url: https://codereview.webrtc.org/2499003002
Cr-Commit-Position: refs/heads/master@{#15199}
2016-11-22 16:42:14 +00:00
brandtr
96385e0432 iOS: Add FlexFEC-03 field trial.
NOTRY=true
BUG=webrtc:5654
R=tkchin@webrtc.org
CC=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2517123002
Cr-Commit-Position: refs/heads/master@{#15176}
2016-11-22 07:43:27 +00:00
tkchin
5b93db2a53 iOS: Add AudioSendSideBwe field trial.
NOTRY=True

BUG=webrtc:6722

Review-Url: https://codereview.webrtc.org/2510923002
Cr-Commit-Position: refs/heads/master@{#15141}
2016-11-17 18:29:50 +00:00
magjed
5d54e185d5 Prepare iOS H264 HW encoder for High Profile
BUG=webrtc:6337

Review-Url: https://codereview.webrtc.org/2484493002
Cr-Commit-Position: refs/heads/master@{#15091}
2016-11-15 17:57:02 +00:00