Commit Graph

35 Commits

Author SHA1 Message Date
bf02e2070f Revert of Fix for RtcEventLog ObjC interface (patchset #3 id:40001 of https://codereview.webrtc.org/2106103003/ )
Reason for revert:
Reverting all CLs related to moving the eventlog, as they break Chromium tests.

Original issue's description:
> Fix for RtcEventLog ObjC interface
>
> This moves the RtcEventLog start/stop functions to PeerConnection on the objC interface.
>
> BUG=
> R=tkchin@webrtc.org
>
> Committed: c43bf56ef1

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

Review-Url: https://codereview.webrtc.org/2110373002
Cr-Commit-Position: refs/heads/master@{#13338}
2016-06-30 07:55:07 +00:00
c43bf56ef1 Fix for RtcEventLog ObjC interface
This moves the RtcEventLog start/stop functions to PeerConnection on the objC interface.

BUG=
R=tkchin@webrtc.org

Review URL: https://codereview.webrtc.org/2106103003 .

Cr-Commit-Position: refs/heads/master@{#13337}
2016-06-30 07:32:15 +00:00
123f33cd00 Revert of Delete method cricket::VideoFrame::Copy. (patchset #7 id:120001 of https://codereview.webrtc.org/2080253002/ )
Reason for revert:
It broke a downstream build by removing VideoFrame::Copy method.

Original issue's description:
> Delete method cricket::VideoFrame::Copy.
>
> Should be unused in Chrome since cl
> https://codereview.chromium.org/2068703002/
>
> TBR=tkchin@webrtc.org,magjed@webrtc.org
> BUG=webrtc:5682
>
> Committed: https://crrev.com/9c00f646f0b3cd33506a1944c7bc6724af041237
> Committed: https://crrev.com/7e4e00d189a5dfac2b463a5100ee65ee2f11ed79
> Cr-Original-Commit-Position: refs/heads/master@{#13236}
> Cr-Commit-Position: refs/heads/master@{#13244}

TBR=pbos@webrtc.org,tkchin@webrtc.org,magjed@webrtc.org,sergeyu@chromium.org,nisse@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2087923004
Cr-Commit-Position: refs/heads/master@{#13246}
2016-06-21 21:03:01 +00:00
7e4e00d189 Delete method cricket::VideoFrame::Copy.
Should be unused in Chrome since cl
https://codereview.chromium.org/2068703002/

TBR=tkchin@webrtc.org,magjed@webrtc.org
BUG=webrtc:5682

Committed: https://crrev.com/9c00f646f0b3cd33506a1944c7bc6724af041237
Review-Url: https://codereview.webrtc.org/2080253002
Cr-Original-Commit-Position: refs/heads/master@{#13236}
Cr-Commit-Position: refs/heads/master@{#13244}
2016-06-21 19:53:56 +00:00
3a2a6404b1 Revert of Delete method cricket::VideoFrame::Copy. (patchset #7 id:120001 of https://codereview.webrtc.org/2080253002/ )
Reason for revert:
Breaks chrome, because a new use of Copy was added in cl https://codereview.chromium.org/2062843003

Original issue's description:
> Delete method cricket::VideoFrame::Copy.
>
> Should be unused in Chrome since cl
> https://codereview.chromium.org/2068703002/
>
> TBR=tkchin@webrtc.org,magjed@webrtc.org
> BUG=webrtc:5682
>
> Committed: https://crrev.com/9c00f646f0b3cd33506a1944c7bc6724af041237
> Cr-Commit-Position: refs/heads/master@{#13236}

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

Review-Url: https://codereview.webrtc.org/2082643004
Cr-Commit-Position: refs/heads/master@{#13238}
2016-06-21 11:17:36 +00:00
9c00f646f0 Delete method cricket::VideoFrame::Copy.
Should be unused in Chrome since cl
https://codereview.chromium.org/2068703002/

TBR=tkchin@webrtc.org,magjed@webrtc.org
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2080253002
Cr-Commit-Position: refs/heads/master@{#13236}
2016-06-21 11:04:30 +00:00
ca6d5d1c9f Partial reland of Delete unused and almost unused frame-related methods. (patchset #1 id:1 of https://codereview.webrtc.org/2076113002/ )
Reason for revert:
Taking out the VideoFrameBuffer changes which broke downstream.

Original issue's description:
> Revert of Delete unused and almost unused frame-related methods. (patchset #12 id:220001 of https://codereview.webrtc.org/2065733003/ )
>
> Reason for revert:
> Breaks downstream applications which inherits webrtc::VideoFrameBuffer and tries to override deleted methods data(), stride() and MutableData().
>
> Original issue's description:
> > Delete unused and almost unused frame-related methods.
> >
> > webrtc::VideoFrame::set_video_frame_buffer
> > webrtc::VideoFrame::ConvertNativeToI420Frame
> >
> > cricket::WebRtcVideoFrame::InitToBlack
> >
> > VideoFrameBuffer::data
> > VideoFrameBuffer::stride
> > VideoFrameBuffer::MutableData
> >
> > TBR=tkchin@webrtc.org # Refactoring affecting RTCVideoFrame
> > BUG=webrtc:5682
> >
> > Committed: https://crrev.com/76270de4bc2dac188f10f805e6e2fb86693ef864
> > Cr-Commit-Position: refs/heads/master@{#13183}
>
> TBR=perkj@webrtc.org,pbos@webrtc.org,marpan@webrtc.org,tkchin@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5682
>
> Committed: https://crrev.com/72e735d3867a0fd6ab7e4d0761c7ba5f6c068617
> Cr-Commit-Position: refs/heads/master@{#13184}

TBR=perkj@webrtc.org,pbos@webrtc.org,marpan@webrtc.org,tkchin@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2076123002
Cr-Commit-Position: refs/heads/master@{#13189}
2016-06-17 12:03:09 +00:00
72e735d386 Revert of Delete unused and almost unused frame-related methods. (patchset #12 id:220001 of https://codereview.webrtc.org/2065733003/ )
Reason for revert:
Breaks downstream applications which inherits webrtc::VideoFrameBuffer and tries to override deleted methods data(), stride() and MutableData().

Original issue's description:
> Delete unused and almost unused frame-related methods.
>
> webrtc::VideoFrame::set_video_frame_buffer
> webrtc::VideoFrame::ConvertNativeToI420Frame
>
> cricket::WebRtcVideoFrame::InitToBlack
>
> VideoFrameBuffer::data
> VideoFrameBuffer::stride
> VideoFrameBuffer::MutableData
>
> TBR=tkchin@webrtc.org # Refactoring affecting RTCVideoFrame
> BUG=webrtc:5682
>
> Committed: https://crrev.com/76270de4bc2dac188f10f805e6e2fb86693ef864
> Cr-Commit-Position: refs/heads/master@{#13183}

TBR=perkj@webrtc.org,pbos@webrtc.org,marpan@webrtc.org,tkchin@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2076113002
Cr-Commit-Position: refs/heads/master@{#13184}
2016-06-17 09:55:23 +00:00
76270de4bc Delete unused and almost unused frame-related methods.
webrtc::VideoFrame::set_video_frame_buffer
webrtc::VideoFrame::ConvertNativeToI420Frame

cricket::WebRtcVideoFrame::InitToBlack

VideoFrameBuffer::data
VideoFrameBuffer::stride
VideoFrameBuffer::MutableData

TBR=tkchin@webrtc.org # Refactoring affecting RTCVideoFrame
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2065733003
Cr-Commit-Position: refs/heads/master@{#13183}
2016-06-17 09:00:19 +00:00
204177f967 Add RTCEventLog API to ObjC.
NOTRY=True

BUG=

Review-Url: https://codereview.webrtc.org/2067683002
Cr-Commit-Position: refs/heads/master@{#13144}
2016-06-14 22:03:19 +00:00
5d97a9a05b Adding more detail to MessageQueue::Dispatch logging.
Every message will now be traced with the location from which it was
posted, including function name, file and line number.

This CL also writes a normal LOG message when the dispatch took more
than a certain amount of time (currently 50ms).

This logging should help us identify messages that are taking
longer than expected to be dispatched.

R=pthatcher@webrtc.org, tommi@webrtc.org

Review URL: https://codereview.webrtc.org/2019423006 .

Cr-Commit-Position: refs/heads/master@{#13104}
2016-06-10 21:17:33 +00:00
f9da44dbcf RTCPeerConnectionInterface.mm createNativeConfiguration and other clean-up.
This CL turns nativeConfiguration into createNativeConfiguration returning a
pointer or nil on failure. This method's certificate generation is updated to
use the new API and reports failure (nil) if unsuccessful instead of relying on
the default certificate. We also remove the implicit assumption (now incorrect)
that RSA is the default. This is the same type of changes as was done in
https://codereview.webrtc.org/1965313002 but this file
(RTCPeerConnectionInterface.mm) was forgotten.

With no more usages of kIdentityName it and dtlsidentitystore.cc is removed.
Also removes unnecessary #include in peerconnectioninterface.h that was still
remnant due to an indirect include of kIdentityName.

RTCConfiguration+Private.h now lists method nativeEncryptionKeyTypeForKeyType
which was added in the above mentioned prior CL.

BUG=webrtc:5707, webrtc:5708

Review-Url: https://codereview.webrtc.org/2035473004
Cr-Commit-Position: refs/heads/master@{#13089}
2016-06-09 10:18:35 +00:00
fc22e03eb8 Add AVFoundation video capture support to Mac objc SDK (based on iOS)
The AppRTCDemo app on Mac OSX does not show or send local video streams,
as ACFoundation capture session is not compiled in or implemented in
the appropriate places.  This is the first part of a two-part patch
that implements local capture on the Mac for AppRTCDemo

P.S. This is my first patch to WebRTC.   I didn't see any relevant tests, but I could write some if you can point me at a location. Also, I don't have access to the automated tests (I don't think)

BUG=webrtc:3417

Review-Url: https://codereview.webrtc.org/2046863004
Cr-Commit-Position: refs/heads/master@{#13080}
2016-06-09 00:24:44 +00:00
d5f41ce898 Use the new versions of OnAddStream/OnRemoveStream in objc binding.
Review-Url: https://codereview.webrtc.org/2049153002
Cr-Commit-Position: refs/heads/master@{#13078}
2016-06-08 20:31:54 +00:00
0ab07d67cb Add ObjC API for getting native histograms.
BUG=

Review-Url: https://codereview.webrtc.org/2036773003
Cr-Commit-Position: refs/heads/master@{#13064}
2016-06-08 11:59:24 +00:00
46007ae1eb Add flag in ios to support disabling high-cost networks.
This depends on CL:
https://codereview.webrtc.org/1987833002/

BUG=
R=tkchin@webrtc.org

Review URL: https://codereview.webrtc.org/2030443002 .

Cr-Commit-Position: refs/heads/master@{#13046}
2016-06-03 23:31:45 +00:00
5251680ec3 Restart avfoundationvideocapturer on errors.
NOTRY=True

BUG=
R=haysc@webrtc.org

Review URL: https://codereview.webrtc.org/2028403003 .

Cr-Commit-Position: refs/heads/master@{#13041}
2016-06-03 18:57:22 +00:00
d7973ccdb5 Revert of Replacing DtlsIdentityStoreInterface with RTCCertificateGeneratorInterface. (patchset #2 id:20001 of https://codereview.webrtc.org/2013523002/ )
Reason for revert:
There are more CreatePeerConnection calls than I anticipated/had found in Chromium, like remoting/protocol/webrtc_transport.cc. Reverting due to broken Chromium FYI bots.

Original issue's description:
> Replacing DtlsIdentityStoreInterface with RTCCertificateGeneratorInterface.
>
> The store was used in WebRtcSessionDescriptionFactory to generate certificates,
> now a generator is used instead (new API). PeerConnection[Factory][Interface],
> and WebRtcSession are updated to pass generators all the way down to the
> WebRtcSessionDescriptionFactory instead of stores.
>
> The webrtc implementation of a generator, RTCCertificateGenerator, is used as
> the default generator (peerconnectionfactory.cc:189) instead of the webrtc
> implementation of a store, DtlsIdentityStoreImpl.
>   The generator is fully parameterized and does not generate RSA-1024 unless you
> ask for it (which makes sense not to do beforehand since ECDSA is now default).
> The store was not fully parameterized (known filed bug).
>
> The "top" layer, PeerConnectionFactoryInterface::CreatePeerConnection, is
> updated to take a generator instead of a store. But as to not break Chromium,
> the old function signature taking a store is kept. It is implemented to invoke
> the generator version by wrapping the store in an
> RTCCertificateGeneratorStoreWrapper. As soon as Chromium is updated to use the
> new function signature we can remove the old CreatePeerConnection.
>   Due to having multiple CreatePeerConnection signatures, some calling places
> are updated to resolve the ambiguity introduced.
>
> BUG=webrtc:5707, webrtc:5708
> R=phoglund@webrtc.org, tommi@webrtc.org
> TBR=tkchin@webrc.org
>
> Committed: 400781a209

TBR=tkchin@webrtc.org,tommi@webrtc.org,phoglund@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5707, webrtc:5708

Review-Url: https://codereview.webrtc.org/2020633002
Cr-Commit-Position: refs/heads/master@{#12948}
2016-05-27 13:08:58 +00:00
400781a209 Replacing DtlsIdentityStoreInterface with RTCCertificateGeneratorInterface.
The store was used in WebRtcSessionDescriptionFactory to generate certificates,
now a generator is used instead (new API). PeerConnection[Factory][Interface],
and WebRtcSession are updated to pass generators all the way down to the
WebRtcSessionDescriptionFactory instead of stores.

The webrtc implementation of a generator, RTCCertificateGenerator, is used as
the default generator (peerconnectionfactory.cc:189) instead of the webrtc
implementation of a store, DtlsIdentityStoreImpl.
  The generator is fully parameterized and does not generate RSA-1024 unless you
ask for it (which makes sense not to do beforehand since ECDSA is now default).
The store was not fully parameterized (known filed bug).

The "top" layer, PeerConnectionFactoryInterface::CreatePeerConnection, is
updated to take a generator instead of a store. But as to not break Chromium,
the old function signature taking a store is kept. It is implemented to invoke
the generator version by wrapping the store in an
RTCCertificateGeneratorStoreWrapper. As soon as Chromium is updated to use the
new function signature we can remove the old CreatePeerConnection.
  Due to having multiple CreatePeerConnection signatures, some calling places
are updated to resolve the ambiguity introduced.

BUG=webrtc:5707, webrtc:5708
R=phoglund@webrtc.org, tommi@webrtc.org
TBR=tkchin@webrc.org

Review URL: https://codereview.webrtc.org/2013523002 .

Cr-Commit-Position: refs/heads/master@{#12947}
2016-05-27 12:52:06 +00:00
da2ba4dcba Pass around the candidate removals events in IOS clients
When local candidates are removed, signal to RTCPeerConnection
and eventually send to the remote client.
When a candidate-removal message is received, notify the native PeerConnection.

BUG=
R=tkchin@webrtc.org

Review URL: https://codereview.webrtc.org/1972483002 .

Cr-Commit-Position: refs/heads/master@{#12852}
2016-05-23 18:53:26 +00:00
04ebea3629 Delete obsolete cricket::VideoFrame methods.
GetWidth and GetHeight (renamed to width and height),

GetNativeHandle (replaced by video_frame_buffer()->native_handle).

TBR=tkchin@webrtc.org (trivial changes to objc RTCVideoFrame and VideoRendererAdapter)

BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/1990063005
Cr-Commit-Position: refs/heads/master@{#12822}
2016-05-20 08:48:53 +00:00
be0c96fd00 Add ice_candidate_pool_size to Obj-C and Java RTCConfiguration.
Review-Url: https://codereview.webrtc.org/1986073004
Cr-Commit-Position: refs/heads/master@{#12801}
2016-05-18 23:20:18 +00:00
3c5a294b60 Fix Info.plist path in build_ios_libs.sh
NOTRY=True
BUG=

Review-Url: https://codereview.webrtc.org/1988003002
Cr-Commit-Position: refs/heads/master@{#12784}
2016-05-18 06:08:32 +00:00
a73ca5668e Polishing code to handle certificate generation failure in .mm files.
This is a follow-up to https://codereview.webrtc.org/1965313002/ which
was TBR-landed.

Minor code clean-up/corrections:

Property nativeConfiguration -> - method createNativeConfiguration.
RTCLogWarning -> RTCLogError.
setConfiguration returning NO instead of false.
initWithFactory returning nil instead of nullptr.
Braces around ifs.

Review-Url: https://codereview.webrtc.org/1978233002
Cr-Commit-Position: refs/heads/master@{#12770}
2016-05-17 10:29:07 +00:00
e9021a3601 Propogate network-worker thread split to api
BUG=webrtc:5645

Review-Url: https://codereview.webrtc.org/1968393002
Cr-Commit-Position: refs/heads/master@{#12767}
2016-05-17 08:52:06 +00:00
db0cd9e774 Adding getParameters/setParameters APIs to RtpReceiver.
This is similar to how a "receive" method is used to apply
RtpParameters to an RtpReceiver in ORTC. Currently, SetParameters
doesn't allow changing the parameters, so the main use of the API is
to retrieve the set of configured codecs. But other uses will likely
be made possible in the future.

R=glaznev@webrtc.org, pthatcher@webrtc.org, tkchin@webrtc.org

Review URL: https://codereview.webrtc.org/1917193008 .

Cr-Commit-Position: refs/heads/master@{#12761}
2016-05-16 18:40:38 +00:00
fd8be3468a Remove webrtc/base/scoped_ptr.h
This is a re-land of https://codereview.webrtc.org/1942823002

TBR=tommi@webrtc.org
BUG=webrtc:5520

Review-Url: https://codereview.webrtc.org/1966423002
Cr-Commit-Position: refs/heads/master@{#12750}
2016-05-15 02:44:18 +00:00
e06c2ddbde JNI+mm: Generate certificate if non-default key type is specified.
By comparing key type with KT_DEFAULT we remove the implicit assumption that
the default is RSA.

Removing the assumptions about what the default is is necessary for a
follow-up CL that will change the default.

BUG=webrtc:5795, webrtc:5707
R=hta@webrtc.org, magjed@webrtc.org, tommi@webrtc.org
TBR=tkchin@webrtc.org

Review URL: https://codereview.webrtc.org/1965313002 .

Cr-Commit-Position: refs/heads/master@{#12722}
2016-05-13 11:50:50 +00:00
3108fc933b Add config continualGatheringPolicy to the IOS RTCConfiguration.
BUG=
R=tkchin@webrtc.org

Review URL: https://codereview.webrtc.org/1971563002 .

Cr-Commit-Position: refs/heads/master@{#12689}
2016-05-11 17:10:47 +00:00
6ab3db249b Revert of Remove webrtc/base/scoped_ptr.h (patchset #3 id:100001 of https://codereview.webrtc.org/1942823002/ )
Reason for revert:
Breaks user code. Said code needs to stop using scoped_ptr!

Original issue's description:
> Remove webrtc/base/scoped_ptr.h
>
> BUG=webrtc:5520
>
> NOTRY=True
>
> Committed: https://crrev.com/65fc62e9dd8a8716db625aaef76ab92f542ecc5a
> Cr-Commit-Position: refs/heads/master@{#12684}

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

Review-Url: https://codereview.webrtc.org/1965063003
Cr-Commit-Position: refs/heads/master@{#12686}
2016-05-11 12:07:33 +00:00
65fc62e9dd Remove webrtc/base/scoped_ptr.h
BUG=webrtc:5520

NOTRY=True

Review-Url: https://codereview.webrtc.org/1942823002
Cr-Commit-Position: refs/heads/master@{#12684}
2016-05-11 11:29:38 +00:00
630d9ba364 Fixed a crash in Objective-C clients when data channel becomes closed.
Objective-C applications using the data channel could crash when the following conditions were met:
 - The application creates a data channel and sets a data channel delegate
 - The delegate is deallocated but the application never clears it
When this happens, the dealloc method in RTCDataChannel would reset the delegate to nil. The setDelegate: method immediately returns if the new delegate value is the same as the old one. Since the old one is a weak reference, it becomes nil, and the DataChannelDelegateAdapter is not unsubscribed from the native channel before it gets deleted.

The fix removes the two optimizations, and instead subscribes the adapter to the native data channel at creation time - and unsubscribes it at dealloc time. This makes it very easy to reason about the lifetime of the subscription. Removing the optimization should have little effect on performance, as applications typically set the delegate when the channel is created.

BUG=

Review-Url: https://codereview.webrtc.org/1957523006
Cr-Commit-Position: refs/heads/master@{#12649}
2016-05-06 23:10:51 +00:00
bfefb03ec1 Replace scoped_ptr with unique_ptr everywhere
But keep #including scoped_ptr.h in .h files, so as not to break
WebRTC users who expect those .h files to give them rtc::scoped_ptr.

BUG=webrtc:5520

Review-Url: https://codereview.webrtc.org/1937693002
Cr-Commit-Position: refs/heads/master@{#12581}
2016-05-01 21:53:55 +00:00
f3569c8a8f Added the API to create an RTCRtpSender to the Objective C wrapper.
Objective C applications can now create new RTCRtpSenders and change their tracks, which gives them more fine grained control than MediaStreams.

BUG=

Review-Url: https://codereview.webrtc.org/1888633002
Cr-Commit-Position: refs/heads/master@{#12570}
2016-04-29 22:30:24 +00:00
9eeb6240c9 Build dynamic iOS SDK.
- Places most ObjC code into webrtc/sdk/objc instead.
- New gyp targets to build, strip and export symbols for dylib.
- Removes old script used to generate dylib.

BUG=

Review URL: https://codereview.webrtc.org/1903663002

Cr-Commit-Position: refs/heads/master@{#12524}
2016-04-27 08:54:27 +00:00