51 Commits

Author SHA1 Message Date
sakal
fb0c573263 Android EglRenderer: Add Bitmap frame listener functionality.
BUG=webrtc:6470

Review-Url: https://codereview.webrtc.org/2456873002
Cr-Commit-Position: refs/heads/master@{#14921}
2016-11-03 16:15:41 +00:00
sakal
f156bddbc6 Add onCameraDisconnected camera event.
BUG=webrtc:6334

Review-Url: https://codereview.webrtc.org/2381343002
Cr-Commit-Position: refs/heads/master@{#14540}
2016-10-06 07:59:18 +00:00
Magnus Jedvert
62b1c35d30 Android: Move layout measure code from SurfaceViewRenderer to RendererCommon
BUG=webrtc:6470
R=sakal@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14526}
2016-10-05 13:56:17 +00:00
sakal
b6760f9e44 Format all Java in WebRTC.
BUG=webrtc:6419
TBR=henrika@webrtc.org

Review-Url: https://codereview.webrtc.org/2377003002
Cr-Commit-Position: refs/heads/master@{#14432}
2016-09-29 11:12:51 +00:00
magjed
ff9793c600 Android: Remove onOutputFormatRequest from the VideoCapturer interface
Remove onOutputFormatRequest from the VideoCapturer interface and from
all implementations of that interface. Apps should now use
VideoSource.adaptOutputFormat() instead.

BUG=webrtc:6391

Review-Url: https://codereview.webrtc.org/2373353002
Cr-Commit-Position: refs/heads/master@{#14428}
2016-09-29 09:14:39 +00:00
Magnus Jedvert
7640fcf6ed Android VideoSource: Add adaptOutputFormat function
The Java VideoSource class wraps the C++ AndroidVideoTrackSource.
AndroidVideoTrackSource is the object actually owning the VideoAdapter.
We currently control the VideoAdapter through the Java VideoCapturer,
but it is more natural and direct to control it through the Java
VideoSource class. This CL adds the necessary function to do this, and
the function in VideoCapturer is deprecated.

BUG=webrtc:6391
R=sakal@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14332}
2016-09-21 14:20:16 +00:00
sakal
bc18fc07be Change onCameraOpening to take camera name as a parameter instead of camera id.
Camera id doesn't really exist for Camera2. Changing onCameraOpening to
take a string instead removes ugly code.

BUG=webrtc:6325
R=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2331013002
Cr-Commit-Position: refs/heads/master@{#14212}
2016-09-14 12:36:26 +00:00
sakal
504e838be2 Move getSupportedFormats from capturer interface to camera enumerator.
R=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2308493002
Cr-Commit-Position: refs/heads/master@{#14047}
2016-09-02 12:58:15 +00:00
sakal
9591e3e82d Convert PeerConnectionTest to use the new capture APIs.
Review-Url: https://codereview.webrtc.org/2236323002
Cr-Commit-Position: refs/heads/master@{#13735}
2016-08-12 07:06:22 +00:00
sakal
d30e0ad3e7 Session based capturing for Camera2Capturer.
BUG=webrtc:6148
TBR=tommi@webrtc.org

Review-Url: https://codereview.webrtc.org/2186253002
Cr-Commit-Position: refs/heads/master@{#13723}
2016-08-11 08:00:43 +00:00
Sami Kalliomaki
d3235f0cd9 Re-order and remove unused Java imports.
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13608}
2016-08-02 13:44:19 +00:00
sakal
8626eb5dd2 Fix testReturnBufferLate incorrectly calling end to end test.
Review-Url: https://codereview.webrtc.org/2202183002
Cr-Commit-Position: refs/heads/master@{#13604}
2016-08-02 10:32:19 +00:00
Honghai Zhang
c980062242 Use a new method (android_setsocknetwork) to bind socket to network in Android M and later.
The old method (setNetworkForSocket) is not supported in Android-N.

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

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

Cr-Commit-Position: refs/heads/master@{#13591}
2016-08-01 16:27:43 +00:00
asapersson
4374a09f9b Only update codec type histogram if lifetime is long enough (10 sec).
Add metrics for Call/VideoSendStream/VideoReceiveStream lifetime.

BUG=

Review-Url: https://codereview.webrtc.org/2136533002
Cr-Commit-Position: refs/heads/master@{#13537}
2016-07-27 07:39:17 +00:00
sakal
2fa14623cc Convert Android camera tests to use the new createVideoSource API.
Review-Url: https://codereview.webrtc.org/2171023003
Cr-Commit-Position: refs/heads/master@{#13528}
2016-07-26 12:41:43 +00:00
Sami Kalliomaki
16032126ed This implementation greatly simplifies Android video capturing stack. The old
stack will be removed soon in a separate CL. Constraints will not be supported
in the new implementation. Apps can request a format directly and the closest
supported format will be selected.

Changes needed from the apps:
1. Use the new createVideoSource without constraints.
2. Call startCapture manually.
3. Don't call videoSource.stop/restart, use startCapture/stopCapture instead.

R=magjed@webrtc.org
TBR=kjellander@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13504}
2016-07-20 14:13:20 +00:00
magjed
e5a246f693 SurfaceViewRendererOnMeasureTest: Wait for frame size change to take effect
SurfaceViewRendererOnMeasureTest#testFrame1280x720 is currently flaky
because of a race. This issue was introduced here:
https://codereview.webrtc.org/2111933002/. That CL moved the function
updateFrameDimensionsAndReportEvents() from renderFrame() to
renderFrameOnRenderThread(). The OnMeasureTest currently just calls
renderFrame() with a new frame size and immediately starts testing the
measured size, which might be before renderFrameOnRenderThread() is
executed. This CL waits for the RendererEvents.onFrameResolutionChanged()
callback before starting the test to fix this race.

BUG=webrtc:6089

Review-Url: https://codereview.webrtc.org/2147463002
Cr-Commit-Position: refs/heads/master@{#13448}
2016-07-12 14:48:22 +00:00
Magnus Jedvert
27dcacdbc1 Android: Add initialize() function to VideoCapturer interface
This CL moves some arguments, e.g. the camera thread, from the startCapture() function to a new initialize() function. These arguments are constant during the lifetime of the VideoCapturer, and are not changed for different startCapture() calls. Setting them once allows for simplifications in the code.

This CL also fixes a bug for camera2 where pendingCameraSwitchSemaphore might not be released when switchEventsHandler is null.

In camera1, the handler lock and 'cameraThreadHandler == null' check is replaced with an atomic boolean to check if the camera is stopped.

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

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

Cr-Commit-Position: refs/heads/master@{#13404}
2016-07-07 08:00:35 +00:00
Sami Kalliomaki
8cf2a3a3ad Android: Camera2 implementation and tests for it.
BUG=webrtc:5519
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#13320}
2016-06-29 11:27:50 +00:00
sakal
62379c89d0 Move Camera1 specific methods to Camera1Enumerator and create CameraEnumerator interface.
The plan is to use CameraEnumerator as a "factory" for camera objects in
the future. This CL prepares for that by moving Camera1 specific stuff
away from CameraEnumerationAndroid to Camera1Enumerator. Because
CameraEnumerationAndroid methods were part of public API there are
deprecated mocks for now.

When making these changes, I noticed that code duplication in
CameraVideoCapturer tests implementing TestObjectFactory could be
decreased by making TestObjectFactory an abstract class that uses
CameraEnumerator.

BUG=webrtc:5519

Review-Url: https://codereview.webrtc.org/2071803002
Cr-Commit-Position: refs/heads/master@{#13185}
2016-06-17 10:45:53 +00:00
sakal
79ede033f6 Refactor VideoCapturerAndroid tests in WebRTC.
Camera1 tests are now separated from general CameraVideoCapturer tests.
Main motivation behind these changes is that Camera2 implementation can
be tested using the same tests.

CL also reduces code duplication on tests using textures.

BUG=webrtc:5519

Review-Url: https://codereview.webrtc.org/2024843002
Cr-Commit-Position: refs/heads/master@{#13130}
2016-06-14 12:33:48 +00:00
sakal
d9f3d56bb6 Use a video renderer instead of a capture observer in VideoCapturerAndroidTest.
In org.webrtc.VideoCapturerAndroidTest#startWhileCameraIsAlreadyOpenAndCloseCamera,
use a video renderer instead of a capture observer. The video renderer
automatically returns the texture buffers, which resolves the bug.
There shouldn't be any changes to the effectiveness of the test.

BUG=webrtc:5982

Review-Url: https://codereview.webrtc.org/2042283004
Cr-Commit-Position: refs/heads/master@{#13085}
2016-06-09 07:56:26 +00:00
magjed
453018a29e CameraEnumerationAndroid: Remove Enumerator class
BUG=webrtc:5519

Review-Url: https://codereview.webrtc.org/2015143004
Cr-Commit-Position: refs/heads/master@{#12999}
2016-06-01 21:39:43 +00:00
Taylor Brandstetter
98cde26c78 Use scoped_refptr for On(Add|Remove)Stream and OnDataChannel.
This will make it much less likely for application developers to not
realize the object is reference counted.

It also fixes a bug in the Java PeerConnection binding, by allowing a
reference to be transferred in the OnRemoveStream call via std::move.

BUG=webrtc:5128
R=pthatcher@webrtc.org, tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12976}
2016-05-31 20:02:30 +00:00
magjed
e9cc6b9f19 VideoCapturerAndroidTestFixtures: Fix deprecation compile warnings
This CL removes compile warnings such as:
[4520/4630] ACTION Compiling java for libjingle_peerconnection_android_unittest
androidtests/src/org/webrtc/VideoCapturerAndroidTestFixtures.java:13: warning: [deprecation] Camera in android.hardware has been deprecated
import android.hardware.Camera;

Review-Url: https://codereview.webrtc.org/2024083002
Cr-Commit-Position: refs/heads/master@{#12970}
2016-05-31 10:50:29 +00:00
magjed
e38a93663a Reland of Android: Add FramerateRange class (patchset #1 id:1 of https://codereview.webrtc.org/2024573002/ )
Reason for revert:
Updated signature to work with other JNI versions. We would need to compile it differently in order to catch failures like this in WebRTC in the future.

Original issue's description:
> Revert of Android: Add FramerateRange class (patchset #2 id:60001 of https://codereview.webrtc.org/2010763003/ )
>
> Reason for revert:
> Breaks downstream Android tests:
> java.lang.NoSuchFieldError: no field with name='framerate' signature='org/webrtc/CameraEnumerationAndroid$CaptureFormat$FramerateRange' in class Lorg/webrtc/CameraEnumerationAndroid$CaptureFormat;
>
> We should have a similar test in WebRTC so we can catch such errors pre-commit.
>
> Original issue's description:
> > Android: Add FramerateRange class
> >
> > The Camera1 and Camera2 API use different framerate range types. Camera1
> > uses int[2] and Camera2 uses Range<Integer>. Range<Integer> is
> > unfortunately only available on Lollipop and later, so this CL adds a
> > similar FramerateRange class in CaptureFormat.
> >
> > The purpose with this CL is to have a common framerate range type that can
> > be reused from both Camera1 and Camera2 in helper functions such as
> > CameraEnumerationAndroid.getClosestSupportedFramerateRange().
> >
> > BUG=webrtc:5519
> > R=sakal@webrtc.org
> >
> > Committed: https://crrev.com/94cb67d6df1a78e7fa25e469f719c1a8809dc583
> > Cr-Commit-Position: refs/heads/master@{#12942}
>
> TBR=sakal@webrtc.org,magjed@webrtc.org
> NOTRY=True
> BUG=webrtc:5519
>
> Committed: https://crrev.com/bd5621f065fd25e0a77307f10dc9ddaf76e7945f
> Cr-Commit-Position: refs/heads/master@{#12956}

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

Review-Url: https://codereview.webrtc.org/2019333002
Cr-Commit-Position: refs/heads/master@{#12957}
2016-05-30 11:00:27 +00:00
kjellander
bd5621f065 Revert of Android: Add FramerateRange class (patchset #2 id:60001 of https://codereview.webrtc.org/2010763003/ )
Reason for revert:
Breaks downstream Android tests:
java.lang.NoSuchFieldError: no field with name='framerate' signature='org/webrtc/CameraEnumerationAndroid$CaptureFormat$FramerateRange' in class Lorg/webrtc/CameraEnumerationAndroid$CaptureFormat;

We should have a similar test in WebRTC so we can catch such errors pre-commit.

Original issue's description:
> Android: Add FramerateRange class
>
> The Camera1 and Camera2 API use different framerate range types. Camera1
> uses int[2] and Camera2 uses Range<Integer>. Range<Integer> is
> unfortunately only available on Lollipop and later, so this CL adds a
> similar FramerateRange class in CaptureFormat.
>
> The purpose with this CL is to have a common framerate range type that can
> be reused from both Camera1 and Camera2 in helper functions such as
> CameraEnumerationAndroid.getClosestSupportedFramerateRange().
>
> BUG=webrtc:5519
> R=sakal@webrtc.org
>
> Committed: https://crrev.com/94cb67d6df1a78e7fa25e469f719c1a8809dc583
> Cr-Commit-Position: refs/heads/master@{#12942}

TBR=sakal@webrtc.org,magjed@webrtc.org
NOTRY=True
BUG=webrtc:5519

Review-Url: https://codereview.webrtc.org/2024573002
Cr-Commit-Position: refs/heads/master@{#12956}
2016-05-30 06:06:31 +00:00
Magnus Jedvert
94cb67d6df Android: Add FramerateRange class
The Camera1 and Camera2 API use different framerate range types. Camera1
uses int[2] and Camera2 uses Range<Integer>. Range<Integer> is
unfortunately only available on Lollipop and later, so this CL adds a
similar FramerateRange class in CaptureFormat.

The purpose with this CL is to have a common framerate range type that can
be reused from both Camera1 and Camera2 in helper functions such as
CameraEnumerationAndroid.getClosestSupportedFramerateRange().

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

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

Cr-Commit-Position: refs/heads/master@{#12942}
2016-05-27 08:36:01 +00:00
nisse
a44e72c44f Call java SurfaceTextureHelper.dispose from the corresponding C++ destructor.
This makes it clearer that the C++ SurfaceTextureHelper owns its associated java object it.

In addition, arrange so that the SurfaceTextureHelper.stopListening
method (in java) can be called from any thread.

BUG=

Review-Url: https://codereview.webrtc.org/1988043002
Cr-Commit-Position: refs/heads/master@{#12941}
2016-05-27 07:28:05 +00:00
magjed
cd8e2ba29b VideoCapturerAndroid: Remove isDisposed()
Also remove the unnecessary code in VideoCapturerAndroid.dispose() and
only log instead.

BUG=webrtc:5519

Review-Url: https://codereview.webrtc.org/2007863005
Cr-Commit-Position: refs/heads/master@{#12913}
2016-05-26 11:00:55 +00:00
asapersson
b432b26b5f Android: Add API for getting native histograms.
The function getAndReset returns a map which holds the name of a histogram and its samples.

This CL depends on: https://codereview.webrtc.org/1915523002/

BUG=

Review-Url: https://codereview.webrtc.org/1952223007
Cr-Commit-Position: refs/heads/master@{#12848}
2016-05-23 13:49:41 +00:00
ivoc
1aa435c6db Reland of Android GlDrawer: Add frame size as argument to draw functions (patchset #1 id:1 of https://codereview.webrtc.org/1950953002/ )
Reason for revert:
I was too quick to judge, this CL does not cause the problem.

Original issue's description:
> Revert of Android GlDrawer: Add frame size as argument to draw functions (patchset #2 id:20001 of https://codereview.webrtc.org/1948473002/ )
>
> Reason for revert:
> Causes errors on Google3 import.
>
> Original issue's description:
> > Android GlDrawer: Add frame size as argument to draw functions
> >
> > BUG=b/28544933
> >
> > Committed: https://crrev.com/71af75dc3ca8516017dca9de2ebe582145ecad14
> > Cr-Commit-Position: refs/heads/master@{#12623}
>
> TBR=glaznev@webrtc.org,magjed@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=b/28544933
>
> Committed: https://crrev.com/172683173dd84a72659ad494962245445eb2a353
> Cr-Commit-Position: refs/heads/master@{#12627}

TBR=glaznev@webrtc.org,magjed@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=b/28544933

Review-Url: https://codereview.webrtc.org/1947073002
Cr-Commit-Position: refs/heads/master@{#12628}
2016-05-04 14:14:23 +00:00
ivoc
172683173d Revert of Android GlDrawer: Add frame size as argument to draw functions (patchset #2 id:20001 of https://codereview.webrtc.org/1948473002/ )
Reason for revert:
Causes errors on Google3 import.

Original issue's description:
> Android GlDrawer: Add frame size as argument to draw functions
>
> BUG=b/28544933
>
> Committed: https://crrev.com/71af75dc3ca8516017dca9de2ebe582145ecad14
> Cr-Commit-Position: refs/heads/master@{#12623}

TBR=glaznev@webrtc.org,magjed@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=b/28544933

Review-Url: https://codereview.webrtc.org/1950953002
Cr-Commit-Position: refs/heads/master@{#12627}
2016-05-04 13:50:29 +00:00
magjed
71af75dc3c Android GlDrawer: Add frame size as argument to draw functions
BUG=b/28544933

Review-Url: https://codereview.webrtc.org/1948473002
Cr-Commit-Position: refs/heads/master@{#12623}
2016-05-04 09:02:17 +00:00
Magnus Jedvert
d1d96b2508 VideoCapturerAndroid: Remove deprecated create function with egl context argument
R=glaznev@webrtc.org, perkj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12587}
2016-05-02 07:43:32 +00:00
magjed
82b750b80e Android SurfaceTextureHelper: Distinguish thread names for decoder and camera
Review URL: https://codereview.webrtc.org/1843973002

Cr-Commit-Position: refs/heads/master@{#12176}
2016-03-31 07:54:18 +00:00
skvlad
303b3c21a4 Added the JNI interface to get and set RtpParameters and the maximum bitrate limits.
Defined a JavaCollection convenience class to simplify iterating over collections from within JNI code
Follow-up to https://codereview.webrtc.org/1788583004/.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#12125}
2016-03-25 02:36:54 +00:00
magjed
d8ddb796e4 SurfaceTextureHelper: Fix startListening()/stopListening() race
SurfaceTextureHelper.startListening() is asynchronous and posts a Runnable to the handler thread. If stopListening() is called before that Runnable is executed, the Runnable will set the listener after stopListening() has been called. Then the next call to startListening() will fail with "SurfaceTextureHelper listener has already been set."

This CL adds a test to reproduce this bug, and a fix.

BUG=5519,b/27677772

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

Cr-Commit-Position: refs/heads/master@{#12030}
2016-03-17 10:13:47 +00:00
Honghai Zhang
7fb69db670 Reland the CL to remove candidates when doing continual gathering
When doing candidate re-gathering in the same ICE generation, signal the remote side to remove its remote candidates.

Fixed the pure virtual method in jsep.h

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

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

Cr-Commit-Position: refs/heads/master@{#11985}
2016-03-14 18:59:34 +00:00
magjed
0dc2316e8b VideoCapturer: Update interface
This CL changes the interface by adding a SurfaceTextureHelper argument
to VideoCapturer.startCapture(). This removes the need for the
VideoCapturer to create the SurfaceTextureHelper itself. This also means
that it is no longer necessary to send an EGLContext to the
VideoCapturerAndroid.create() function.

The SurfaceTextureHelper is now created in AndroidVideoCapturerJni, and
the EGLContext is passed from PeerConnectionFactory in
nativeCreateVideoSource().

Another change in this CL is that the C++ SurfaceTextureHelper creates
the Java SurfaceTextureHelper instead of getting it passed as an
argument in the ctor.

BUG=webrtc:5519

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

Cr-Commit-Position: refs/heads/master@{#11977}
2016-03-14 10:59:42 +00:00
tommi
6f59a4fc4f Revert of Remove candidates when doing continual gathering (patchset #15 id:560001 of https://codereview.webrtc.org/1648813004/ )
Reason for revert:
Breaks the build.  Suggest we reland with a default implementation of the new method, update Chrome, land a change that changes |{}| -> |= 0;|

Here's the error:

FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/content/renderer/media/webrtc/test_support_content.mock_peer_connection_dependency_factory.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=262839-1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_TOPCHROME_MD=1 -DDCHECK_ALWAYS_ON=1 -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DMOJO_USE_SYSTEM_IMPL -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DSK_SUPPORT_GPU=1 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DUNIT_TEST -DGTEST_HAS_RTTI=0 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DPROTOBUF_USE_DLLS -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DCHROME_PNG_WRITE_SUPPORT -DPNG_USER_CONFIG -DFEATURE_ENABLE_SSL -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DOSX -DWEBRTC_MAC -DWEBRTC_POSIX -DXML_STATIC -DWEBRTC_CHROMIUM_BUILD -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../.. -I../../third_party/khronos -I../../gpu -I../../skia/config -Igen/angle -I../../third_party/WebKit/Source -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/utils/mac -I../../skia/ext -I../../testing/gmock/include -I../../testing/gtest/include -I../../third_party/icu/source/i18n -I../../third_party/icu/source/common -Igen/ui/resources -Igen/protoc_out -I../../third_party/protobuf -I../../third_party/protobuf/src -I../../third_party/WebKit -I../../ipc -I../../third_party/opus/src/include -I../../third_party/WebKit -I../../third_party/npapi -I../../third_party/npapi/bindings -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/libwebp -I../../third_party/ots/include -I../../third_party/qcms/src -I../../third_party/iccjpeg -I../../third_party/libjpeg_turbo -I../../v8/include -I../../third_party/webrtc_overrides -I../../third_party/libjingle/overrides -I../../third_party/libjingle/source -I../../third_party -I../../third_party/expat/files/lib -I../../third_party/libvpx/source/libvpx -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -O2 -gdwarf-2 -fvisibility=hidden -Werror -mmacosx-version-min=10.6 -arch x86_64 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /b/build/slave/Mac_Builder/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansion -fcolor-diagnostics -fno-strict-aliasing  -c ../../content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc -o obj/content/renderer/media/webrtc/test_support_content.mock_peer_connection_dependency_factory.o
../../content/renderer/media/webrtc/mock_peer_connection_dependency_factory.cc:404:14: error: allocating an object of abstract class type 'content::MockSessionDescription'
  return new MockSessionDescription(type, sdp);
             ^
../../third_party/webrtc/api/jsep.h💯18: note: unimplemented pure virtual method 'RemoveCandidates' in 'MockSessionDescription'
  virtual size_t RemoveCandidates(
                 ^
1 error generated.
ninja: build stopped: subcommand failed.

Original issue's description:
> When doing candidate re-gathering in the same generation, Remove the existing local candidate on the same network
> and signaling the remote side to remove its remote candidate by setting the candidate priority to 0.
>
> BUG=
>
> Committed: https://crrev.com/84430da6817ce69c53bfad088be5c9df8b420f01
> Cr-Commit-Position: refs/heads/master@{#11958}

TBR=pthatcher@webrtc.org,deadbeef@webrtc.org,glaznev@webrtc.org,honghaiz@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/1785613011

Cr-Commit-Position: refs/heads/master@{#11960}
2016-03-11 22:05:15 +00:00
honghaiz
84430da681 When doing candidate re-gathering in the same generation, Remove the existing local candidate on the same network
and signaling the remote side to remove its remote candidate by setting the candidate priority to 0.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#11958}
2016-03-11 21:28:12 +00:00
magjed
81e8e374ec Android SurfaceTextureHelper: Add stopListening() function
This CL replaces the function SurfaceTextureHelper.setListener() that
could only be called once with the functions startListening() and
stopListening() that can be called multiple times. This is necessary
when the SurfaceTextureHelper will be passed to the VideoCapturerAndroid
in startCapture(). startListening() will be called in startCapture() and
stopListening() in stopCapture().

BUG=webrtc:5519

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

Cr-Commit-Position: refs/heads/master@{#11855}
2016-03-03 10:18:44 +00:00
magjed
9e69dfdfd5 Java SurfaceTextureHelper: Remove support for external thread
Currently, VideoCapturerAndroid owns a dedicated tread, and
SurfaceTextureHelper get this thread passed in the ctor. In
VideoCapturerAndroid.dispose(), ownership of the thread is passed to
SurfaceTextureHelper so that we can return directly instead of waiting
for the last frame to return.

This CL makes the SurfaceTextureHelper own the thread the whole time
instead, and VideoCapturerAndroid calls getHandler() to get it instead.

BUG=webrtc:5519

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

Cr-Commit-Position: refs/heads/master@{#11790}
2016-02-26 15:45:50 +00:00
Magnus Jedvert
f45381e1e5 VideoCapturerAndroid: Report onFirstFrameAvailable() for textures as well
We currently only trigger onFirstFrameAvailable() for byte buffer frames.

R=perkj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11670}
2016-02-18 14:47:55 +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
kjellander
af71655b68 Revert of Android: Remove VideoCapturer (patchset #2 id:20001 of https://codereview.webrtc.org/1684403002/ )
Reason for revert:
Breaks downstream compilation. Please reland in a non-breaking fashion.

Original issue's description:
> Android: Remove VideoCapturer
>
> This CL makes PeerConnectionFactory.createVideoSource() and nativeCreateVideoSource work directly with VideoCapturerAndroid instead of going via VideoCapturer. The native part is now created in nativeCreateVideoSource() instead of doing it immediately in VideoCapturerAndroid.create().
>
> BUG=webrtc:5519
> R=perkj@webrtc.org
>
> Committed: https://crrev.com/09eab315fddc3432c19d8f662f4b9360f2a58010
> Cr-Commit-Position: refs/heads/master@{#11582}

TBR=perkj@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:5519

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

Cr-Commit-Position: refs/heads/master@{#11586}
2016-02-11 20:21:48 +00:00
deadbeef
6ecee07bab Fixing bug in MediaStream.java that caused double disposal of track.
Also fixing an issue with the Java PeerConnection unit test.
It wasn't correctly waiting for 10 video frames to be received.

And fixed an issue with the video engine, where generated
black frames don't get any rotation.

BUG=webrtc:5128

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

Cr-Commit-Position: refs/heads/master@{#11583}
2016-02-11 17:57:29 +00:00
Magnus Jedvert
09eab315fd Android: Remove VideoCapturer
This CL makes PeerConnectionFactory.createVideoSource() and nativeCreateVideoSource work directly with VideoCapturerAndroid instead of going via VideoCapturer. The native part is now created in nativeCreateVideoSource() instead of doing it immediately in VideoCapturerAndroid.create().

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

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

Cr-Commit-Position: refs/heads/master@{#11582}
2016-02-11 17:25:18 +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