Commit Graph

18 Commits

Author SHA1 Message Date
0426222f4c Modified the rtp_receiver_unittests.
Implemented operator == in RtpSource and use the gmock EXPECT_THAT to make the test cleaner.

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

BUG=chromium:703122

Review-Url: https://codereview.webrtc.org/2813753002
Cr-Commit-Position: refs/heads/master@{#17659}
2017-04-11 18:28:10 +00:00
8d609f6b6d Reland of Implemented the GetSources() in native code. (patchset #1 id:1 of https://codereview.webrtc.org/2809613002/ )
Reason for revert:
Re-land, reverting did not fix bug.

https://bugs.chromium.org/p/webrtc/issues/detail?id=7465

Original issue's description:
> Revert of Implemented the GetSources() in native code. (patchset #11 id:510001 of https://codereview.webrtc.org/2770233003/ )
>
> Reason for revert:
> Suspected of WebRtcApprtcBrowserTest.MANUAL_WorksOnApprtc breakage, see
>
> https://bugs.chromium.org/p/webrtc/issues/detail?id=7465
>
> Original issue's description:
> > Added the GetSources() to the RtpReceiverInterface and implemented
> > it for the AudioRtpReceiver.
> >
> > This method returns a vector of RtpSource(both CSRC source and SSRC
> > source) which contains the ID of a source, the timestamp, the source
> > type (SSRC or CSRC) and the audio level.
> >
> > The RtpSource objects are buffered and maintained by the
> > RtpReceiver in webrtc/modules/rtp_rtcp/. When the method is called,
> > the info of the contributing source will be pulled along the object
> > chain:
> > AudioRtpReceiver -> VoiceChannel -> WebRtcVoiceMediaChannel ->
> > AudioReceiveStream -> voe::Channel -> RtpRtcp module
> >
> > Spec:https://w3c.github.io/webrtc-pc/archives/20151006/webrtc.html#widl-RTCRtpReceiver-getContributingSources-sequence-RTCRtpContributingSource
> >
> > BUG=chromium:703122
> > TBR=stefan@webrtc.org, danilchap@webrtc.org
> >
> > Review-Url: https://codereview.webrtc.org/2770233003
> > Cr-Commit-Position: refs/heads/master@{#17591}
> > Committed: 292084c376
>
> TBR=deadbeef@webrtc.org,solenberg@webrtc.org,hbos@webrtc.org,philipel@webrtc.org,stefan@webrtc.org,danilchap@webrtc.org,zhihuang@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=chromium:703122
>
> Review-Url: https://codereview.webrtc.org/2809613002
> Cr-Commit-Position: refs/heads/master@{#17616}
> Committed: fbcc5cb386

TBR=deadbeef@webrtc.org,solenberg@webrtc.org,philipel@webrtc.org,stefan@webrtc.org,danilchap@webrtc.org,zhihuang@webrtc.org,olka@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:703122

Review-Url: https://codereview.webrtc.org/2810623003
Cr-Commit-Position: refs/heads/master@{#17621}
2017-04-10 14:39:05 +00:00
fbcc5cb386 Revert of Implemented the GetSources() in native code. (patchset #11 id:510001 of https://codereview.webrtc.org/2770233003/ )
Reason for revert:
Suspected of WebRtcApprtcBrowserTest.MANUAL_WorksOnApprtc breakage, see

https://bugs.chromium.org/p/webrtc/issues/detail?id=7465

Original issue's description:
> Added the GetSources() to the RtpReceiverInterface and implemented
> it for the AudioRtpReceiver.
>
> This method returns a vector of RtpSource(both CSRC source and SSRC
> source) which contains the ID of a source, the timestamp, the source
> type (SSRC or CSRC) and the audio level.
>
> The RtpSource objects are buffered and maintained by the
> RtpReceiver in webrtc/modules/rtp_rtcp/. When the method is called,
> the info of the contributing source will be pulled along the object
> chain:
> AudioRtpReceiver -> VoiceChannel -> WebRtcVoiceMediaChannel ->
> AudioReceiveStream -> voe::Channel -> RtpRtcp module
>
> Spec:https://w3c.github.io/webrtc-pc/archives/20151006/webrtc.html#widl-RTCRtpReceiver-getContributingSources-sequence-RTCRtpContributingSource
>
> BUG=chromium:703122
> TBR=stefan@webrtc.org, danilchap@webrtc.org
>
> Review-Url: https://codereview.webrtc.org/2770233003
> Cr-Commit-Position: refs/heads/master@{#17591}
> Committed: 292084c376

TBR=deadbeef@webrtc.org,solenberg@webrtc.org,hbos@webrtc.org,philipel@webrtc.org,stefan@webrtc.org,danilchap@webrtc.org,zhihuang@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:703122

Review-Url: https://codereview.webrtc.org/2809613002
Cr-Commit-Position: refs/heads/master@{#17616}
2017-04-10 11:38:13 +00:00
292084c376 Added the GetSources() to the RtpReceiverInterface and implemented
it for the AudioRtpReceiver.

This method returns a vector of RtpSource(both CSRC source and SSRC
source) which contains the ID of a source, the timestamp, the source
type (SSRC or CSRC) and the audio level.

The RtpSource objects are buffered and maintained by the
RtpReceiver in webrtc/modules/rtp_rtcp/. When the method is called,
the info of the contributing source will be pulled along the object
chain:
AudioRtpReceiver -> VoiceChannel -> WebRtcVoiceMediaChannel ->
AudioReceiveStream -> voe::Channel -> RtpRtcp module

Spec:https://w3c.github.io/webrtc-pc/archives/20151006/webrtc.html#widl-RTCRtpReceiver-getContributingSources-sequence-RTCRtpContributingSource

BUG=chromium:703122
TBR=stefan@webrtc.org, danilchap@webrtc.org

Review-Url: https://codereview.webrtc.org/2770233003
Cr-Commit-Position: refs/heads/master@{#17591}
2017-04-07 17:57:22 +00:00
b10f32f9b2 Adding more comments to every header file in api/ subdirectory.
Many of these interfaces are not intuitive, or are the way they are for
complex historical reasons, so it would be nice to document these things
for future developers.

Also, many nonstandard things (such as RTCConfiguration options) were
not documented at all before this CL.

BUG=webrtc:7131
TBR=pthatcher@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2680273002
Cr-Commit-Position: refs/heads/master@{#16485}
2017-02-08 09:38:21 +00:00
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
d99a200fad Adding some features to proxy.h, and restructuring the macros.
New features are:
- Invoke a destructor on the worker thread.
- Make proxy wrapper for a non-refcounted object.
- Ability to use unique_ptrs (as arguments or return values).

These features are needed by this CL:
https://codereview.webrtc.org/2632613002/

BUG=None

Review-Url: https://codereview.webrtc.org/2628343003
Cr-Commit-Position: refs/heads/master@{#16151}
2017-01-18 16:55:23 +00:00
ba29c6aac7 Reland 2 of: Use VoiceChannel/VideoChannel directly from RtpSender/RtpReceiver.
Relanding again after fixing issue with RTC_DCHECKs.

This CL eliminates the need for the extra layer of indirection provided by
mediastreamprovider.h. It will thus make it easier to implement new
functionality in RtpSender/RtpReceiver.

It also brings us one step closer to the end goal of combining "senders"
and "send streams". Currently the sender still needs to go through the
BaseChannel and MediaChannel, using an SSRC as a key.

R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13305}
2016-06-27 23:30:45 +00:00
3784b4a697 Revert of Use VoiceChannel/VideoChannel directly from RtpSender/RtpReceiver. (patchset #3 id:40001 of https://codereview.webrtc.org/2046173002/ )
Reason for revert:
Broke video sending for iOS AppRTCDemo. To repro, run iOS AppRTCDemo in Release in loopback mode. The revision prior to this change worked.

Original issue's description:
> Reland of: Use VoiceChannel/VideoChannel directly from RtpSender/RtpReceiver.
>
> This eliminates the need for the extra layer of indirection provided by
> mediastreamprovider.h. It will thus make it easier to implement new
> functionality in RtpSender/RtpReceiver.
>
> It also brings us one step closer to the end goal of combining "senders"
> and "send streams". Currently the sender still needs to go through the
> BaseChannel and MediaChannel, using an SSRC as a key.
>
> R=pthatcher@webrtc.org
>
> Committed: 2d5491783a

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

Review-Url: https://codereview.webrtc.org/2092273003
Cr-Commit-Position: refs/heads/master@{#13289}
2016-06-25 02:31:54 +00:00
2d5491783a Reland of: Use VoiceChannel/VideoChannel directly from RtpSender/RtpReceiver.
This eliminates the need for the extra layer of indirection provided by
mediastreamprovider.h. It will thus make it easier to implement new
functionality in RtpSender/RtpReceiver.

It also brings us one step closer to the end goal of combining "senders"
and "send streams". Currently the sender still needs to go through the
BaseChannel and MediaChannel, using an SSRC as a key.

R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13287}
2016-06-24 21:18:29 +00:00
1a7162dbc9 Revert of Use VoiceChannel/VideoChannel directly from RtpSender/RtpReceiver. (patchset #3 id:40001 of https://codereview.webrtc.org/2046173002/ )
Reason for revert:
Broke peerconnection_unittest somehow, due to introduction of thread check. Will fix and reland.

Original issue's description:
> Use VoiceChannel/VideoChannel directly from RtpSender/RtpReceiver.
>
> This eliminates the need for the extra layer of indirection provided by
> mediastreamprovider.h. It will thus make it easier to implement new
> functionality in RtpSender/RtpReceiver.
>
> It also brings us one step closer to the end goal of combining "senders"
> and "send streams". Currently the sender still needs to go through the
> BaseChannel and MediaChannel, using an SSRC as a key.
>
> R=pthatcher@webrtc.org
>
> Committed: https://crrev.com/bc5831999d3354509d75357b659b4bb8e39f8a6c
> Cr-Commit-Position: refs/heads/master@{#13285}

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

Review-Url: https://codereview.webrtc.org/2099843003
Cr-Commit-Position: refs/heads/master@{#13286}
2016-06-24 21:13:14 +00:00
bc5831999d Use VoiceChannel/VideoChannel directly from RtpSender/RtpReceiver.
This eliminates the need for the extra layer of indirection provided by
mediastreamprovider.h. It will thus make it easier to implement new
functionality in RtpSender/RtpReceiver.

It also brings us one step closer to the end goal of combining "senders"
and "send streams". Currently the sender still needs to go through the
BaseChannel and MediaChannel, using an SSRC as a key.

R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13285}
2016-06-24 21:06:42 +00:00
184a3fd648 Forward the SignalFirstPacketReceived to RtpReceiver.
The RtpReceiverObserverInterface is created.
The SignalFirstPacketReceived will be forwarded from BaseChannel to WebRtcSession.
WebRtcSession will forward SignalFirstAudioPacketReceived and SignalFirstVideoPacketReceived to the RtpReceiverInterface.
The application can listen to the Signal by implementing and registering a RtpReceiverObserver.

Review-Url: https://codereview.webrtc.org/1999853002
Cr-Commit-Position: refs/heads/master@{#13139}
2016-06-14 18:47:20 +00:00
a601f5c863 Separating internal and external methods of RtpSender/RtpReceiver.
This moves the implementation specific methods to separate classes
(RtpSenderInternal/RtpReceiverInternal) so that the interface classes
represent the interface that external applications can rely on.

The reason this wasn't done earlier was that PeerConnection needed
to store proxy pointers, but also needed to access implementation-
specific methods on the underlying objects. This is now possible
by using "RtpSenderProxyWithInternal<RtpSenderInternal>", which is a proxy
that implements RtpSenderInterface but also provides direct access
to an RtpSenderInternal.

Review-Url: https://codereview.webrtc.org/2023373002
Cr-Commit-Position: refs/heads/master@{#13056}
2016-06-06 21:27:43 +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
72c8d2b708 Rename BEGIN_PROXY_MAP --> BEGIN_SIGNALLING_PROXY_MAP.
And BEGIN_WORKER_PROXY_MAP --> BEGIN_PROXY_MAP.

This rename was suggested by Tommi, with the idea that a proxy
invoking methods on the worker thread should be the common case.
It's a followup to https://codereview.webrtc.org/1861633002/

This cl also adds unittests for proxy calls to the
worker thread.

BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12374}
2016-04-15 10:49:13 +00:00
b24317bfda Fix license headers in webrtc/api.
In addition to the code moved from talk/app/webrtc
there were some files in webrtc/api/objctests that still
had the libjingle license header.

BUG=webrtc:5418
TBR=tkchin@webrtc.org
NOTRY=True

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

Cr-Commit-Position: refs/heads/master@{#11552}
2016-02-10 15:54:53 +00:00
15583c19d7 Move talk/app/webrtc to webrtc/api
The previously disabled warnings that were inherited from
talk/build/common.gypi are now replaced by target-specific disabling
of only the failing warnings. Additional disabling was needed since the stricter
compilation warnings that applies to code in webrtc/.

License headers will be updated in a follow-up CL.

Other modifications:
* Updated the header guards.
* Sorted the includes using chromium/src/tools/sort-headers.py
  except for these files:
  talk/app/webrtc/peerconnectionendtoend_unittest.cc
  talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
  talk/app/webrtc/java/jni/androidmediaencoder_jni.cc
  webrtc/media/devices/win32devicemanager.cc

The HAVE_SCTP define was added for the peerconnection_unittests target
in api_tests.gyp.

I also checked that none of
SRTP_RELATIVE_PATH
HAVE_SRTP
HAVE_WEBRTC_VIDEO
HAVE_WEBRTC_VOICE
were used by the talk/app/webrtc code.

For Chromium, the following changes will need to be applied to the roll CL that updates the
DEPS for WebRTC and libjingle:
https://codereview.chromium.org/1615433002

BUG=webrtc:5418
NOPRESUBMIT=True
R=deadbeef@webrtc.org, pthatcher@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11545}
2016-02-10 09:53:26 +00:00