15 Commits

Author SHA1 Message Date
kwiberg
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
Per
766ad3b989 This cl do a major cleanup of the VideoAdapter and make sure it does care about the VideoSinkWants.max_pixel_count and VideoSinkWants.max_pixel_count_step_up.
Unit tests are updated to test that screen share is not adapted but it does not change the VideoSinkWants in WebRtcVideoEngine2::SendStream due to a switch to screen share. The reason is that it works anyway and sprang is looking into how to do adaptation based on frame rate as well and use the adapter for screen share as well.

BUG=webrtc:5688, webrtc:5426
R=nisse@webrtc.org, pbos@webrtc.org, sprang@google.com

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

Cr-Commit-Position: refs/heads/master@{#12240}
2016-04-05 13:23:58 +00:00
Per
fb45d170c0 Reland Remove unused cricket::VideoCapturer methods. Originally reviewed and landed as patchset #2 id:30001 of https://codereview.webrtc.org/1733673002/)
I readded virtual bool Pause(bool paused) for now with a dummy implementation since Chrome remoting override this method.

Original cl description:

Removed unused cricket::VideoCapturer methods:

void UpdateAspectRatio(int ratio_w, int ratio_h);
void ClearAspectRatio();
bool Pause(bool paused);
Restart(const VideoFormat& capture_format);
MuteToBlackThenPause(bool muted);
IsMuted() const
set_square_pixel_aspect_ratio
bool square_pixel_aspect_ratio()

This cl also remove the use of messages and posting of state change.
Further more - a thread checker is added to make sure methods are called on only one thread. Construction can happen on a separate thred.
It does not add restrictions on what thread frames are delivered on though.

There is more features in VideoCapturer::Onframe related to screen share in ARGB that probably can be cleaned up in a follow up cl.

BUG=webrtc:5426
TBR=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11809}
2016-02-29 11:07:45 +00:00
perkj
74622e0613 Revert of Removed unused cricket::VideoCapturer methods (patchset #2 id:30001 of https://codereview.webrtc.org/1733673002/ )
Reason for revert:
Breaks remoting::protocol::WebrtcVideoCapturerAdapter::Pause'

See https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win%20Builder/builds/3689/steps/compile/logs/stdio

Original issue's description:
> Removed unused cricket::VideoCapturer methods:
>
> void UpdateAspectRatio(int ratio_w, int ratio_h);
> void ClearAspectRatio();
> ool Pause(bool paused);
> Restart(const VideoFormat& capture_format);
> MuteToBlackThenPause(bool muted);
> IsMuted() const
> set_square_pixel_aspect_ratio
> bool square_pixel_aspect_ratio()
>
> This cl also remove the use of messages and posting of state change.
> Further more - a thread checker is added to make sure methods are called on only one thread. Construction can happen on a separate thred.
> It does not add restrictions on what thread frames are delivered on though.
>
> There is more features in VideoCapturer::Onframe related to screen share in ARGB that probably can be cleaned up in a follow up cl.
>
> BUG=webrtc:5426
>
> Committed: https://crrev.com/e9c0cdff2dad2553b6ff6820c0c7429cb2854861
> Cr-Commit-Position: refs/heads/master@{#11773}

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

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

Cr-Commit-Position: refs/heads/master@{#11777}
2016-02-26 10:54:43 +00:00
perkj
e9c0cdff2d Removed unused cricket::VideoCapturer methods:
void UpdateAspectRatio(int ratio_w, int ratio_h);
void ClearAspectRatio();
ool Pause(bool paused);
Restart(const VideoFormat& capture_format);
MuteToBlackThenPause(bool muted);
IsMuted() const
set_square_pixel_aspect_ratio
bool square_pixel_aspect_ratio()

This cl also remove the use of messages and posting of state change.
Further more - a thread checker is added to make sure methods are called on only one thread. Construction can happen on a separate thred.
It does not add restrictions on what thread frames are delivered on though.

There is more features in VideoCapturer::Onframe related to screen share in ARGB that probably can be cleaned up in a follow up cl.

BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#11773}
2016-02-26 07:36:22 +00:00
Magnus Jedvert
5199c74d25 AndroidVideoCapturer getSupportedFormats(): Change interface from JSON string to List/vector
This CL simplifies the VideoCapturer interface from 'String getSupportedFormatsAsJson() throws JSONException' to 'List<CaptureFormat> getSupportedFormats()'. The intermediate conversion to/from a JSON string is removed, and AndroidVideoCapturerJni converts the Java list to a C++ vector directly instead.

BUG=webrtc:5519
R=perkj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11669}
2016-02-18 12:10:02 +00:00
Magnus Jedvert
5e7834e151 Android: Make VideoCapturer an interface for all VideoCapturers to implement
This CL factors out the interface that AndroidVideoCapturerJni is using to communicate with the Java counterpart. This interface is moved into VideoCapturer. The interface is not touched in this CL, and a follow-up CL is planned to simplify and improve it.

Another change is that the native part of VideoCapturer is created in PeerConnectionFactory.createVideoSource() instead of doing it immediately in the ctor.

BUG=webrtc:5519
R=perkj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11606}
2016-02-12 16:05:36 +00:00
Per
a50924115e This reland https://codereview.webrtc.org/1655793003/ with the change that cricket::VideoCapturer::SignalVideoFrame is added back and used for frame forwarding. It is used in Chrome remoting.
BUG=webrtc:5426
R=pthatcher@webrtc.org
TBR=pthatcher@webrtc.org for moved channelmanager....

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

Cr-Commit-Position: refs/heads/master@{#11597}
2016-02-12 12:31:08 +00:00
kjellander@webrtc.org
5ad129741c Rename webrtc/media/webrtc -> webrtc/media/engine
BUG=webrtc:5420
NOTRY=True
R=pthatcher@google.com, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11591}
2016-02-12 05:39:50 +00:00
perkj
162c3393be Revert of Make cricket::VideoCapturer implement VideoSourceInterface (patchset #14 id:300001 of https://codereview.webrtc.org/1655793003/ )
Reason for revert:
Needs to revert again unfortunately.
There are multiple implementations in Chrome of cricket::VideoCapturer.

One is ./../remoting/protocol/webrtc_video_capturer_adapter.cc...

https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/9581/steps/compile/logs/stdio

Fun times - I will have to modify this cl after trying it manually out in Chrome.

Original issue's description:
> This cl introduce a VideoSourceInterface and let cricket::VideoCapturer implement it.
> Further more, it adds a VideoBroadcaster than is used for delivering frames to multiple sinks.
>
> BUG=webrtc:5426
> R=nisse@webrtc.org, pthatcher@webrtc.org
>
> Committed: https://crrev.com/4d19c5b010473615fa181afa84c6f4b3104e3171
> Cr-Commit-Position: refs/heads/master@{#11567}

TBR=pthatcher@google.com,nisse@webrtc.org,pthatcher@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#11568}
2016-02-11 10:56:41 +00:00
Per
4d19c5b010 This cl introduce a VideoSourceInterface and let cricket::VideoCapturer implement it.
Further more, it adds a VideoBroadcaster than is used for delivering frames to multiple sinks.

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

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

Cr-Commit-Position: refs/heads/master@{#11567}
2016-02-11 10:06:19 +00:00
perkj
4b2a5a8095 Revert of Make cricket::VideoCapturer implement VideoSourceInterface (patchset #12 id:260001 of https://codereview.webrtc.org/1655793003/ )
Reason for revert:
Somehow breaks Chromium FYI....
https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win%20Builder/builds/3483/steps/compile/logs/stdio

Original issue's description:
> This cl introduce a VideoSourceInterface and let cricket::VideoCapturer implement it.
> Further more, it adds a VideoBroadcaster than is used for delivering frames to multiple sinks.
>
>
> BUG=webrtc:5426

TBR=pthatcher@google.com,nisse@webrtc.org,pthatcher@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#11565}
2016-02-11 09:20:24 +00:00
perkj
2f21789b4b This cl introduce a VideoSourceInterface and let cricket::VideoCapturer implement it.
Further more, it adds a VideoBroadcaster than is used for delivering frames to multiple sinks.

BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#11563}
2016-02-11 07:55:25 +00:00
kjellander
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
Henrik Kjellander
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