Commit Graph

26 Commits

Author SHA1 Message Date
5214a0ab8e Add support for content hints to VideoTrack.
Permits overriding the source-default is_screencast option to be able to
treat screencast sources as fluid video, preserving motion at the loss
of individual frame quality (or vice versa).

BUG=chromium:653531
R=deadbeef@webrtc.org

Review-Url: https://codereview.webrtc.org/2579993003
Cr-Commit-Position: refs/heads/master@{#15659}
2016-12-16 23:39:11 +00:00
7af91ddd6b Removing "crypto_required" from MediaContentDescription.
"Crypto required" is a property of the PeerConnection of construction
time; it has nothing to do with SDP. So I'm moving it out of
MediaContentDescription and putting it in the BaseChannel constructor
instead. This is more intuitive, and provides the added assurance that
"secure_required_" can't be flipped from "true" to "false".

BUG=None

Review-Url: https://codereview.webrtc.org/2537343003
Cr-Commit-Position: refs/heads/master@{#15579}
2016-12-13 19:29:16 +00:00
11a9cbfa50 Refactoring: move ownership of RtcEventLog from Call to PeerConnection
This CL is a pure refactoring which should not result in any functinal
changes. It moves ownership of the RtcEventLog from webrtc::Call to the
webrtc::PeerConnection object.

This is done so that we can add RtcEventLog support for ICE events -
which will require the TransportController to have a pointer to the
RtcEventLog. PeerConnection is the closest common owner of both Call and
TransportController (through WebRtcSession).

BUG=webrtc:6393

Review-Url: https://codereview.webrtc.org/2353033005
Cr-Commit-Position: refs/heads/master@{#14578}
2016-10-07 18:53:15 +00:00
ac9f876bc0 Sort #includes that got unsorted when gmock.h and gtest.h moved to webrtc/test/
gmock.h and gtest.h were moved (or rather, got wrappers so that we
could put some icky compatibility hacks in one place instead of 500)
in this CL: https://codereview.webrtc.org/2358993004/

NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2381013002
Cr-Commit-Position: refs/heads/master@{#14464}
2016-10-01 05:29:53 +00:00
77eab70470 Enable the -Wundef warning for clang
NOPRESUBMIT=true
BUG=webrtc:6398

Review-Url: https://codereview.webrtc.org/2358993004
Cr-Commit-Position: refs/heads/master@{#14425}
2016-09-29 00:42:08 +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
5a4a75ae48 Combining SetVideoSend and SetSource into one method.
This means there's only one thread hop to the worker thread.

At the video engine level, SetOptions and SetSource
are combined into one method (all within the same critical section)
which ensures that no frame will be encoded while SetVideoSend
is only partially finished.

BUG=webrtc:5691

Review-Url: https://codereview.webrtc.org/1838413002
Cr-Commit-Position: refs/heads/master@{#13022}
2016-06-02 23:23:47 +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
5dd42fd849 Fixing a segfault that can occur when changing the track of an RtpSender.
The reference to the old track needs to be kept alive until SetAudioSend/
SetSource is called, because otherwise it could be deleted while the audio/
video engine is still trying to use the track.

BUG=webrtc:5796

Review-Url: https://codereview.webrtc.org/1894283002
Cr-Commit-Position: refs/heads/master@{#12598}
2016-05-02 23:20:08 +00:00
ef8b61e110 Enable -Winconsistent-missing-override flag.
The problem with gmock is worked around by commenting out any other override declarations in classes using gmock.

NOPRESUBMIT=True
BUG=webrtc:3970

Review-Url: https://codereview.webrtc.org/1921653002
Cr-Commit-Position: refs/heads/master@{#12563}
2016-04-29 13:09:23 +00:00
d1fe281e12 Replace scoped_ptr with unique_ptr in webrtc/api/
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/1930463002

Cr-Commit-Position: refs/heads/master@{#12530}
2016-04-27 13:47:40 +00:00
2ded9b19d1 Replace SetCapturer and SetCaptureDevice by SetSource.
Drop return value.

BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12291}
2016-04-08 09:24:01 +00:00
d61bf803d2 Removed MediaStreamTrackInterface::set_state
The track state should be implicitly set by the underlying source.
This removes the public method and cleans up how AudioRtpReceiver is created. Further more it cleans up how the RtpReceivers are destroyed.

Note that this cl depend on https://codereview.webrtc.org/1790633002.
BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12115}
2016-03-24 10:16:23 +00:00
af510afc91 Use a FakeVideoTrackSource instead of nullptr in all VideoTrack tests.
Extracted from cl 1790633002.

BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12074}
2016-03-21 15:20:47 +00:00
dc1c62cd30 Enable setting the maximum bitrate limit in RtpSender.
This change allows the application to limit the bitrate of the outgoing
audio and video streams at runtime. The API roughly follows the WebRTC
API draft, defining the RTCRtpParameters structure witn exactly one
encoding (simulcast streams are not exposed in the API for now).
(https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters)

BUG=

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

Cr-Commit-Position: refs/heads/master@{#12025}
2016-03-17 02:07:49 +00:00
f0dcfe2c81 Change VideoRtpReceiver to create remote VideoTrack and VideoTrackSource.
This enabled us to be able to remove VideoTrack::GetSink and RemoteVideoCapturer.

Since video frames from the decoder is delivered on a media engine internal thread, VideoBroadCaster must be made thread safe.

BUG=webrtc:5426
R=deadbeef@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11944}
2016-03-10 17:32:08 +00:00
0d3eef2080 Add implementation of VideoTrackSource and make VideoCapturerTrackSource inherit from it.
BUG=webrtc:5426
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11923}
2016-03-09 01:39:33 +00:00
1a018dcda3 Prevent a voice channel from sending data before a source is set.
At the top level, setting a track on an RtpSender is equivalent to
setting a source (previously called a renderer)
on a voice send stream. An RtpSender without a track
is not supposed to send data (not even muted data), so a send stream without
a source shouldn't send data.

Also replacing SendFlags with a boolean and implementing "Start"
and "Stop" methods on AudioSendStream, which was planned anyway
and simplifies this CL.

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

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

Cr-Commit-Position: refs/heads/master@{#11918}
2016-03-08 20:37:48 +00:00
a3ede6c510 Renamed VideoSourceInterface to VideoTrackSourceInterface.
Moved VideoSourceInterface to MediaStreamInterface.h
Renamed VideoSourceTest to VideoCapturerTrackSourceTest
Renamed VideoSource to VideoCaptureTrackSource and cl lint and cl format.
BUG=webrtc:5426
TBR=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11893}
2016-03-08 00:28:03 +00:00
f2880a0e04 Change webrtc::VideoSourceInterface to inherit rtc::VideoSourceInterface.
Also introduce a typedef VideoTrackSourceInterface to be able to start changing clients such as Chrome to use the name VideoTrackSourceInterface.

Document: https://docs.google.com/a/google.com/document/d/1mEIw_0uDzyHjL3l8a82WKp6AvgR8Tlwn9JGvhbUjVpY/edit?usp=sharing

BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#11854}
2016-03-03 09:51:56 +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