30 Commits

Author SHA1 Message Date
nisse
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
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
jbauch
555604a746 Replace scoped_ptr with unique_ptr in webrtc/base/
This propagated into various other places. Also had to #include headers that
were implicitly pulled by "scoped_ptr.h".

BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12501}
2016-04-26 10:13:28 +00:00
solenberg
d53a3f9758 Early initialize recording on the ADM from WebRtcVoiceMediaChannel.
BUG=webrtc:4690

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

Cr-Commit-Position: refs/heads/master@{#12369}
2016-04-14 20:56:45 +00:00
nisse
3858477d4b FakeVideoTrackRenderer is a thin wrapper over
FakeVideoRenderer, only registering itself on a
VideoSourceInterface on construction and removing itself on
destruction. Let it inherit FakeVideoRenderer, instead of
proxying all methods.

BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12313}
2016-04-11 11:38:39 +00:00
perkj
57db65255c Changed PeerConnectionEndToEndTest to use a separate worker thread.
This is a follow up to https://codereview.webrtc.org/1859933002 to change this test also to use a separate worker thread.

PeerConnectionEndToEndTest currently use the current thread both as a signaling thread and a worker thread. Although convenient while debugging, it can also hide real bugs. An example is https://codereview.webrtc.org/1766653002/#ps420001 where the worker thread is deadlocked in the track proxy due to that the worker thread waits for the signaling thread but the proxy in turns invokes the worker thread..... That bug was only discovered on Android.

BUG= webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12295}
2016-04-08 15:16:41 +00:00
nisse
5b68ab50bb Extended proxy abstraction, to call certain methods to the worker thread.
Extracted from cl https://codereview.webrtc.org/1766653002/, where
AddOrUpdateSink results in a deadlock.

BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12281}
2016-04-07 14:46:00 +00:00
Peter Boström
ae69b02846 Fix typo in FakeAdmTest.TestProcess name.
BUG=
R=pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12134}
2016-03-29 10:13:07 +00:00
nisse
1509fa1aa9 Delete cricket::VideoRenderer.
TBR=glaznev@webrtc.org (deleting an #include in main_wnd.h)
BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12101}
2016-03-23 11:06:05 +00:00
Niels Möller
8f59762897 Delete VideoRendererInterface.
Use in chromium was deleted a few days ago.

BUG=webrtc:5426
R=magjed@webrtc.org, pbos@webrtc.org, perkj@webrtc.org, pthatcher@webrtc.org, tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12099}
2016-03-23 09:33:19 +00:00
nisse
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
perkj
9e083d2ac5 Reland of Delete empty API files and cleaned up includes. (patchset #1 id:1 of https://codereview.webrtc.org/1813083002/ )
Reason for revert:
New attempt. Cl for removing videosourceinterface.h dep in chrome is landed here: https://codereview.chromium.org/1810273003/

Original issue's description:
> Revert of Delete empty API files and cleaned up includes. (patchset #2 id:20001 of https://codereview.webrtc.org/1809053002/ )
>
> Reason for revert:
> Breaks Chromium build. Need to remove the references to the obsolete header files from Chromium and reland.
>
> Original issue's description:
> > Delete empty API files and cleaned up includes.
> >
> > TBR=glaznev@webrtc.org
> >
> > BUG=webrtc:5426
> >
> > Committed: https://crrev.com/c9022f508644dc33c01b05cb22ebfc2be145d6b2
> > Cr-Commit-Position: refs/heads/master@{#12039}
>
> TBR=nisse@webrtc.org,glaznev@webrtc.org,perkj@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5426
>
> Committed: https://crrev.com/246b5273986d5a5b140b3d1a656baa8d40c36276
> Cr-Commit-Position: refs/heads/master@{#12042}

TBR=nisse@webrtc.org,glaznev@webrtc.org,deadbeef@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12065}
2016-03-20 16:38:44 +00:00
perkj
caafdba0e4 Fix broken CVO header extension
Adds end to end unit tests for CVO.

BUG=webrtc:5621

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

Cr-Commit-Position: refs/heads/master@{#12063}
2016-03-20 14:34:37 +00:00
jbauch
eec21bdae3 Reland Use CopyOnWriteBuffer instead of Buffer to avoid unnecessary copies.
This CL removes copy and assign support from Buffer and changes various
parameters from Buffer to CopyOnWriteBuffer so they can be passed along
and copied without actually copying the underlying data.

With this changed some parameters to be "const" and fixed an issue when
creating a CopyOnWriteBuffer with empty data.

BUG=webrtc:5155

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

Cr-Commit-Position: refs/heads/master@{#12062}
2016-03-20 13:15:48 +00:00
kjellander
194e3bcc53 Revert of Use CopyOnWriteBuffer instead of Buffer to avoid unnecessary copies. (patchset #4 id:60001 of https://codereview.webrtc.org/1785713005/ )
Reason for revert:
I'm really sorry for having to revert this but it seems this hit an unexpected compile error downstream:

webrtc/media/sctp/sctpdataengine.cc: In function 'void cricket::VerboseLogPacket(const void*, size_t, int)':
webrtc/media/sctp/sctpdataengine.cc:172:37: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
              data, length, direction)) != NULL) {
                                     ^
In file included from webrtc/media/sctp/sctpdataengine.cc:20:0:
third_party/usrsctp/usrsctplib/usrsctp.h:964:1: error:   initializing argument 1 of 'char* usrsctp_dumppacket(void*, size_t, int)' [-fpermissive]
 usrsctp_dumppacket(void *, size_t, int);
 ^

I'm sure you can fix this easily and just re-land this CL, while I'm going to look into how to add this warning at the public bots (on Monday).

Original issue's description:
> Use CopyOnWriteBuffer instead of Buffer to avoid unnecessary copies.
>
> This CL removes copy and assign support from Buffer and changes various
> parameters from Buffer to CopyOnWriteBuffer so they can be passed along
> and copied without actually copying the underlying data.
>
> With this changed some parameters to be "const" and fixed an issue when
> creating a CopyOnWriteBuffer with empty data.
>
> BUG=webrtc:5155
>
> Committed: https://crrev.com/944c39006f1c52aee20919676002dac7a42b1c05
> Cr-Commit-Position: refs/heads/master@{#12058}

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

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

Cr-Commit-Position: refs/heads/master@{#12060}
2016-03-19 19:12:58 +00:00
jbauch
944c39006f Use CopyOnWriteBuffer instead of Buffer to avoid unnecessary copies.
This CL removes copy and assign support from Buffer and changes various
parameters from Buffer to CopyOnWriteBuffer so they can be passed along
and copied without actually copying the underlying data.

With this changed some parameters to be "const" and fixed an issue when
creating a CopyOnWriteBuffer with empty data.

BUG=webrtc:5155

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

Cr-Commit-Position: refs/heads/master@{#12058}
2016-03-19 08:57:40 +00:00
deadbeef
246b527398 Revert of Delete empty API files and cleaned up includes. (patchset #2 id:20001 of https://codereview.webrtc.org/1809053002/ )
Reason for revert:
Breaks Chromium build. Need to remove the references to the obsolete header files from Chromium and reland.

Original issue's description:
> Delete empty API files and cleaned up includes.
>
> TBR=glaznev@webrtc.org
>
> BUG=webrtc:5426
>
> Committed: https://crrev.com/c9022f508644dc33c01b05cb22ebfc2be145d6b2
> Cr-Commit-Position: refs/heads/master@{#12039}

TBR=nisse@webrtc.org,glaznev@webrtc.org,perkj@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/1813083002

Cr-Commit-Position: refs/heads/master@{#12042}
2016-03-17 22:03:46 +00:00
perkj
c9022f5086 Delete empty API files and cleaned up includes.
TBR=glaznev@webrtc.org

BUG=webrtc:5426

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

Cr-Commit-Position: refs/heads/master@{#12039}
2016-03-17 16:57:30 +00:00
perkj
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
hbos
5291393510 DtlsIdentityStoreInterface::RequestIdentity: const& parameters
Changing from:

virtual void RequestIdentity(
    rtc::KeyParams key_params,
    rtc::Optional<uint64_t> expires,
    const rtc::scoped_refptr<DtlsIdentityRequestObserver>& observer);

to:

virtual void RequestIdentity(
    const rtc::KeyParams& key_params,
    const rtc::Optional<uint64_t>& expires_ms,
    const rtc::scoped_refptr<DtlsIdentityRequestObserver>& observer);

Making FakeDtlsIdentityStore DCHECK that |expires_ms| is not set, since it does not support that parameterization.

In a follow-up chromium CL the new signature will be used.

BUG=webrtc:5092, chromium:544902

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

Cr-Commit-Position: refs/heads/master@{#11892}
2016-03-07 23:14:48 +00:00
hbos
25359e0cc2 DtlsIdentityStoreInterface::RequestIdentity gets optional expires param.
This is a preparation CL. The expires param will be used in
a follow-up CL. Initially it will only be used by the
chromium implementation. Then we will either update the
webrtc implementation (DtlsIdentityStoreImpl) to use it or
we will remove that store completely as part of clean-up
work.

There are currently two versions of RequestIdentity, one
that takes KeyType and one that takes KeyParams.

The KeyType version is removed in favor of the new
KeyParams + expires version. The KeyParams version without
expires is kept as to not break chromium which currently
implements that. This is the version that can be removed in
a follow-up CL.

BUG=webrtc:5092, chromium:544902

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

Cr-Commit-Position: refs/heads/master@{#11846}
2016-03-02 15:55:56 +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
nisse
db25d2e8c5 Make VideoTrack and VideoTrackRenderers implement rtc::VideoSourceInterface.
This patch tries to only change the interface to VideoTrack, with
minimal changes to the implementation. Some points worth noting:

VideoTrackRenderers should ultimately be deleted, but it is kept for
now since we need an object implementing webrtc::VideoRenderer, and
that shouldn't be VideoTrack.

BUG=webrtc:5426
TBR=glaznev@webrtc.org  // please look at  examples

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

Cr-Commit-Position: refs/heads/master@{#11775}
2016-02-26 09:25:02 +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
pbos
a26ac925f7 Reland of move ignored return code from modules. (patchset #1 id:1 of https://codereview.webrtc.org/1736663004/ )
Reason for revert:
Revert breaks other uses, a fix will be rolled into Chromium instead.

Original issue's description:
> Revert of Remove ignored return code from modules. (patchset #3 id:40001 of https://codereview.webrtc.org/1703833002/ )
>
> Reason for revert:
> Breaks Chromium.
>
> Original issue's description:
> > Remove ignored return code from modules.
> >
> > ModuleProcessImpl doesn't act on return codes and having them around is
> > confusing (it's unclear what an error return code here would do even).
> >
> > BUG=
> > R=tommi@webrtc.org
> >
> > Committed: f14c47a58c
>
> TBR=tommi@webrtc.org,pbos@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=
>
> Committed: https://crrev.com/da33a8a2a22f6d19ba2a8cce963beafbdbaa8fd8
> Cr-Commit-Position: refs/heads/master@{#11761}

TBR=tommi@webrtc.org,torbjorng@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/1737013002

Cr-Commit-Position: refs/heads/master@{#11762}
2016-02-25 12:50:09 +00:00
torbjorng
da33a8a2a2 Revert of Remove ignored return code from modules. (patchset #3 id:40001 of https://codereview.webrtc.org/1703833002/ )
Reason for revert:
Breaks Chromium.

Original issue's description:
> Remove ignored return code from modules.
>
> ModuleProcessImpl doesn't act on return codes and having them around is
> confusing (it's unclear what an error return code here would do even).
>
> BUG=
> R=tommi@webrtc.org
>
> Committed: f14c47a58c

TBR=tommi@webrtc.org,pbos@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/1736663004

Cr-Commit-Position: refs/heads/master@{#11761}
2016-02-25 12:34:12 +00:00
Peter Boström
f14c47a58c Remove ignored return code from modules.
ModuleProcessImpl doesn't act on return codes and having them around is
confusing (it's unclear what an error return code here would do even).

BUG=
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11747}
2016-02-24 15:51:23 +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