174 Commits

Author SHA1 Message Date
nisse
94cd3fa03a Eliminate use of IsZeroSize method
Check for dropped frames by instead checking the
frame_buffer pointer directly.

Also add RTC_DCHECK to verify that a webrtc::VideoFrame never
has video_frame_buffer_ set to nullptr (except by the default
constructor).

BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/1995343002
Cr-Commit-Position: refs/heads/master@{#12859}
2016-05-24 06:36:00 +00:00
Magnus Jedvert
181310fb6f Android: Drop old frame in SurfaceTextureHelper.startListening()
Drop any pending texture frame when SurfaceTextureHelper.startListening()
is called because the frame might be from the previous
startListening()/stopListening() capture session. This typically happens
when switching between the front/back camera, and an old frame will get
incorrect rotation and mirroring because of the front/back camera
mismatch.

Dropping the frame in SurfaceTextureHelper also removes the need for
the |dropNextFrame| logic in VideoCapturerAndroid.

R=perkj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12849}
2016-05-23 14:26:59 +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
nisse
c82d0902e1 Don't do a thread jump for incoming frames.
We're now supposed to accept incoming frames from any thread.

BUG=webrtc:5902

Review-Url: https://codereview.webrtc.org/1987663002
Cr-Commit-Position: refs/heads/master@{#12844}
2016-05-23 07:39:45 +00:00
Honghai Zhang
351d77b702 Update the type and cost of existing networks
if the network monitor detects it after the native code does.

Also set the network cost for ethernet, wifi, unknown, cellular network type to be 0, 10, 50, 900,
so that unknown networks will have lower precedence than known networks with low cost (like Wifi) but  higher precedence than known networks with high cost.

And third, infer network type based on limited name matching in Android if there is no network monitor or network monitor did not find the type.

BUG=webrtc:5890
R=pthatcher@chromium.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12833}
2016-05-20 22:08:37 +00:00
Magnus Jedvert
a8eab866a1 Reland of Android: Make base interface for camera1 and camera2 (patchset #1 id:1 of https://codereview.webrtc.org/1994013004/ )
Reason for revert:
Downstream code has been updated.

Original issue's description:
> Revert of Android: Make base interface for camera1 and camera2 (patchset #1 id:1 of https://codereview.webrtc.org/1994893002/ )
>
> Reason for revert:
> Still breaks downstream import.
>
> Original issue's description:
> > Reland of Android: Make base interface for camera1 and camera2 (patchset #1 id:1 of https://codereview.webrtc.org/1979583002/ )
> >
> > Reason for revert:
> > Downstream code has been updated.
> >
> > Original issue's description:
> > > Revert of Android: Make base interface for camera1 and camera2 (patchset #3 id:80001 of https://codereview.webrtc.org/1895483002/ )
> > >
> > > Reason for revert:
> > > Breaks downstream import.
> > >
> > > Original issue's description:
> > > > Android: Make base interface for camera1 and camera2
> > > >
> > > > This CL adds a new interface CameraVideoCapturer that extends VideoCapturer with a switchCamera() function. It also moves moves CameraEventsHandler, CameraStatistics, and CameraSwitchHandler from VideoCapturerAndroid to this new interface. The purpose is to prepare for a camera2 implementation that will use the same interfaces and helper class.
> > > >
> > > > BUG=webrtc:5519
> > > >
> > > > Committed: https://crrev.com/6bdacaddfb18edef1f0cdd778209f6b05a8f9210
> > > > Cr-Commit-Position: refs/heads/master@{#12723}
> > >
> > > TBR=perkj@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:5519
> > >
> > > Committed: https://crrev.com/181b5ffdf036427d92929667d9d43bbcff560435
> > > Cr-Commit-Position: refs/heads/master@{#12727}
> >
> > TBR=perkj@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:5519
> >
> > Committed: https://crrev.com/d269b023bfe1c321798fe9c8dbd631a562914fe1
> > Cr-Commit-Position: refs/heads/master@{#12807}
>
> TBR=perkj@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5519
>
> Committed: https://crrev.com/bd76607abb712f98c01709f240f147e4bd49df6d
> Cr-Commit-Position: refs/heads/master@{#12809}

TBR=perkj@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5519

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

Cr-Commit-Position: refs/heads/master@{#12830}
2016-05-20 15:22:25 +00:00
nisse
04ebea3629 Delete obsolete cricket::VideoFrame methods.
GetWidth and GetHeight (renamed to width and height),

GetNativeHandle (replaced by video_frame_buffer()->native_handle).

TBR=tkchin@webrtc.org (trivial changes to objc RTCVideoFrame and VideoRendererAdapter)

BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/1990063005
Cr-Commit-Position: refs/heads/master@{#12822}
2016-05-20 08:48:53 +00:00
magjed
bd76607abb Revert of Android: Make base interface for camera1 and camera2 (patchset #1 id:1 of https://codereview.webrtc.org/1994893002/ )
Reason for revert:
Still breaks downstream import.

Original issue's description:
> Reland of Android: Make base interface for camera1 and camera2 (patchset #1 id:1 of https://codereview.webrtc.org/1979583002/ )
>
> Reason for revert:
> Downstream code has been updated.
>
> Original issue's description:
> > Revert of Android: Make base interface for camera1 and camera2 (patchset #3 id:80001 of https://codereview.webrtc.org/1895483002/ )
> >
> > Reason for revert:
> > Breaks downstream import.
> >
> > Original issue's description:
> > > Android: Make base interface for camera1 and camera2
> > >
> > > This CL adds a new interface CameraVideoCapturer that extends VideoCapturer with a switchCamera() function. It also moves moves CameraEventsHandler, CameraStatistics, and CameraSwitchHandler from VideoCapturerAndroid to this new interface. The purpose is to prepare for a camera2 implementation that will use the same interfaces and helper class.
> > >
> > > BUG=webrtc:5519
> > >
> > > Committed: https://crrev.com/6bdacaddfb18edef1f0cdd778209f6b05a8f9210
> > > Cr-Commit-Position: refs/heads/master@{#12723}
> >
> > TBR=perkj@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=webrtc:5519
> >
> > Committed: https://crrev.com/181b5ffdf036427d92929667d9d43bbcff560435
> > Cr-Commit-Position: refs/heads/master@{#12727}
>
> TBR=perkj@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:5519
>
> Committed: https://crrev.com/d269b023bfe1c321798fe9c8dbd631a562914fe1
> Cr-Commit-Position: refs/heads/master@{#12807}

TBR=perkj@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/1994013004
Cr-Commit-Position: refs/heads/master@{#12809}
2016-05-19 11:23:06 +00:00
magjed
d269b023bf Reland of Android: Make base interface for camera1 and camera2 (patchset #1 id:1 of https://codereview.webrtc.org/1979583002/ )
Reason for revert:
Downstream code has been updated.

Original issue's description:
> Revert of Android: Make base interface for camera1 and camera2 (patchset #3 id:80001 of https://codereview.webrtc.org/1895483002/ )
>
> Reason for revert:
> Breaks downstream import.
>
> Original issue's description:
> > Android: Make base interface for camera1 and camera2
> >
> > This CL adds a new interface CameraVideoCapturer that extends VideoCapturer with a switchCamera() function. It also moves moves CameraEventsHandler, CameraStatistics, and CameraSwitchHandler from VideoCapturerAndroid to this new interface. The purpose is to prepare for a camera2 implementation that will use the same interfaces and helper class.
> >
> > BUG=webrtc:5519
> >
> > Committed: https://crrev.com/6bdacaddfb18edef1f0cdd778209f6b05a8f9210
> > Cr-Commit-Position: refs/heads/master@{#12723}
>
> TBR=perkj@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5519
>
> Committed: https://crrev.com/181b5ffdf036427d92929667d9d43bbcff560435
> Cr-Commit-Position: refs/heads/master@{#12727}

TBR=perkj@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5519

Review-Url: https://codereview.webrtc.org/1994893002
Cr-Commit-Position: refs/heads/master@{#12807}
2016-05-19 10:29:53 +00:00
deadbeef
be0c96fd00 Add ice_candidate_pool_size to Obj-C and Java RTCConfiguration.
Review-Url: https://codereview.webrtc.org/1986073004
Cr-Commit-Position: refs/heads/master@{#12801}
2016-05-18 23:20:18 +00:00
nisse
c9c142f170 Reland of Delete webrtc::VideoFrame methods buffer and stride. (patchset #1 id:1 of https://codereview.webrtc.org/1983583002/ )
Reason for revert:
Should work after cl https://codereview.webrtc.org/1985693002/ is landed, which initializes the frames used by FakeWebRtcVideoCaptureModule. So intend to reland after that, with no changes.

Original issue's description:
> Revert of Delete webrtc::VideoFrame methods buffer and stride. (patchset #2 id:290001 of https://codereview.webrtc.org/1963413004/ )
>
> Reason for revert:
> Speculative revert to see if failures on the DrMemory bot are related to this cl.  See e.g. here:
> https://build.chromium.org/p/client.webrtc/builders/Win%20DrMemory%20Full/builds/4243
>
> UNINITIALIZED READ: reading 0x04980040-0x04980060 32 byte(s) within 0x04980040-0x04980060
> # 0 CopyRow_AVX
> # 1 CopyPlane
> # 2 I420Copy
> # 3 webrtc::ExtractBuffer
> # 4 cricket::WebRtcVideoCapturer::SignalFrameCapturedOnStartThread
> # 5 cricket::WebRtcVideoCapturer::OnIncomingCapturedFrame
> # 6 FakeWebRtcVideoCaptureModule::SendFrame
> # 7 WebRtcVideoCapturerTest_TestCaptureVcm_Test::TestBody
> # 8 testing::internal::HandleSehExceptionsInMethodIfSupported<>
>
> Original issue's description:
> > Reland of Delete webrtc::VideoFrame methods buffer and stride. (patchset #1 id:1 of https://codereview.webrtc.org/1935443002/ )
> >
> > Reason for revert:
> > I plan to reland this change in a week or two, after downstream users are updated.
> >
> > Original issue's description:
> > > Revert of Delete webrtc::VideoFrame methods buffer and stride. (patchset #14 id:250001 of https://codereview.webrtc.org/1900673002/ )
> > >
> > > Reason for revert:
> > > Breaks chrome FYI bots.
> > >
> > > Original issue's description:
> > > > Delete webrtc::VideoFrame methods buffer and stride.
> > > >
> > > > To make the HasOneRef/IsMutable hack work, also had to change the
> > > > video_frame_buffer method to return a const ref to a scoped_ref_ptr,
> > > > to not imply an AddRef.
> > > >
> > > > BUG=webrtc:5682
> > >
> > > TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@webrtc.org,stefan@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=webrtc:5682
> > >
> > > Committed: https://crrev.com/5b3c443d301f2c2f18dac5b02652c08b91ea3828
> > > Cr-Commit-Position: refs/heads/master@{#12558}
> >
> > TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@webrtc.org,stefan@webrtc.org
> > # Not skipping CQ checks because original CL landed more than 1 days ago.
> > BUG=webrtc:5682
> >
> > Committed: https://crrev.com/d0dc66e0ea30c8614001e425a4ae0aa7dd56c2a7
> > Cr-Commit-Position: refs/heads/master@{#12721}
>
> TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@webrtc.org,stefan@webrtc.org,nisse@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5682
>
> Committed: https://crrev.com/d49c30cd2fe442f2b5b4ecec8d5cbaa430464725
> Cr-Commit-Position: refs/heads/master@{#12745}

TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@webrtc.org,stefan@webrtc.org,tommi@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/1979193003
Cr-Commit-Position: refs/heads/master@{#12773}
2016-05-17 11:05:51 +00:00
danilchap
e9021a3601 Propogate network-worker thread split to api
BUG=webrtc:5645

Review-Url: https://codereview.webrtc.org/1968393002
Cr-Commit-Position: refs/heads/master@{#12767}
2016-05-17 08:52:06 +00:00
Taylor Brandstetter
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
tommi
d49c30cd2f Revert of Delete webrtc::VideoFrame methods buffer and stride. (patchset #2 id:290001 of https://codereview.webrtc.org/1963413004/ )
Reason for revert:
Speculative revert to see if failures on the DrMemory bot are related to this cl.  See e.g. here:
https://build.chromium.org/p/client.webrtc/builders/Win%20DrMemory%20Full/builds/4243

UNINITIALIZED READ: reading 0x04980040-0x04980060 32 byte(s) within 0x04980040-0x04980060
# 0 CopyRow_AVX
# 1 CopyPlane
# 2 I420Copy
# 3 webrtc::ExtractBuffer
# 4 cricket::WebRtcVideoCapturer::SignalFrameCapturedOnStartThread
# 5 cricket::WebRtcVideoCapturer::OnIncomingCapturedFrame
# 6 FakeWebRtcVideoCaptureModule::SendFrame
# 7 WebRtcVideoCapturerTest_TestCaptureVcm_Test::TestBody
# 8 testing::internal::HandleSehExceptionsInMethodIfSupported<>

Original issue's description:
> Reland of Delete webrtc::VideoFrame methods buffer and stride. (patchset #1 id:1 of https://codereview.webrtc.org/1935443002/ )
>
> Reason for revert:
> I plan to reland this change in a week or two, after downstream users are updated.
>
> Original issue's description:
> > Revert of Delete webrtc::VideoFrame methods buffer and stride. (patchset #14 id:250001 of https://codereview.webrtc.org/1900673002/ )
> >
> > Reason for revert:
> > Breaks chrome FYI bots.
> >
> > Original issue's description:
> > > Delete webrtc::VideoFrame methods buffer and stride.
> > >
> > > To make the HasOneRef/IsMutable hack work, also had to change the
> > > video_frame_buffer method to return a const ref to a scoped_ref_ptr,
> > > to not imply an AddRef.
> > >
> > > BUG=webrtc:5682
> >
> > TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@webrtc.org,stefan@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=webrtc:5682
> >
> > Committed: https://crrev.com/5b3c443d301f2c2f18dac5b02652c08b91ea3828
> > Cr-Commit-Position: refs/heads/master@{#12558}
>
> TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@webrtc.org,stefan@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:5682
>
> Committed: https://crrev.com/d0dc66e0ea30c8614001e425a4ae0aa7dd56c2a7
> Cr-Commit-Position: refs/heads/master@{#12721}

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

Review-Url: https://codereview.webrtc.org/1983583002
Cr-Commit-Position: refs/heads/master@{#12745}
2016-05-14 10:18:13 +00:00
pbos
1f53452ca6 Unify hardware and software QP thresholds.
Uses current libvpx (slightly older) thresholds to maintain a larger
window of stable QP, but maintains the newer H264 thresholds.

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

Review-Url: https://codereview.webrtc.org/1966213002
Cr-Commit-Position: refs/heads/master@{#12734}
2016-05-13 18:05:38 +00:00
ivoc
c1513ee1a3 Add a parameter to set a maximum file size when starting an RTC event log on the PeerConnectionFactory API.
The caller can set a negative or zero file size to avoid using a limit.
BUG=

Review-Url: https://codereview.webrtc.org/1974453002
Cr-Commit-Position: refs/heads/master@{#12730}
2016-05-13 15:30:44 +00:00
magjed
181b5ffdf0 Revert of Android: Make base interface for camera1 and camera2 (patchset #3 id:80001 of https://codereview.webrtc.org/1895483002/ )
Reason for revert:
Breaks downstream import.

Original issue's description:
> Android: Make base interface for camera1 and camera2
>
> This CL adds a new interface CameraVideoCapturer that extends VideoCapturer with a switchCamera() function. It also moves moves CameraEventsHandler, CameraStatistics, and CameraSwitchHandler from VideoCapturerAndroid to this new interface. The purpose is to prepare for a camera2 implementation that will use the same interfaces and helper class.
>
> BUG=webrtc:5519
>
> Committed: https://crrev.com/6bdacaddfb18edef1f0cdd778209f6b05a8f9210
> Cr-Commit-Position: refs/heads/master@{#12723}

TBR=perkj@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/1979583002
Cr-Commit-Position: refs/heads/master@{#12727}
2016-05-13 13:27:57 +00:00
magjed
6bdacaddfb Android: Make base interface for camera1 and camera2
This CL adds a new interface CameraVideoCapturer that extends VideoCapturer with a switchCamera() function. It also moves moves CameraEventsHandler, CameraStatistics, and CameraSwitchHandler from VideoCapturerAndroid to this new interface. The purpose is to prepare for a camera2 implementation that will use the same interfaces and helper class.

BUG=webrtc:5519

Review-Url: https://codereview.webrtc.org/1895483002
Cr-Commit-Position: refs/heads/master@{#12723}
2016-05-13 12:25:17 +00:00
Henrik Boström
e06c2ddbde JNI+mm: Generate certificate if non-default key type is specified.
By comparing key type with KT_DEFAULT we remove the implicit assumption that
the default is RSA.

Removing the assumptions about what the default is is necessary for a
follow-up CL that will change the default.

BUG=webrtc:5795, webrtc:5707
R=hta@webrtc.org, magjed@webrtc.org, tommi@webrtc.org
TBR=tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12722}
2016-05-13 11:50:50 +00:00
nisse
d0dc66e0ea Reland of Delete webrtc::VideoFrame methods buffer and stride. (patchset #1 id:1 of https://codereview.webrtc.org/1935443002/ )
Reason for revert:
I plan to reland this change in a week or two, after downstream users are updated.

Original issue's description:
> Revert of Delete webrtc::VideoFrame methods buffer and stride. (patchset #14 id:250001 of https://codereview.webrtc.org/1900673002/ )
>
> Reason for revert:
> Breaks chrome FYI bots.
>
> Original issue's description:
> > Delete webrtc::VideoFrame methods buffer and stride.
> >
> > To make the HasOneRef/IsMutable hack work, also had to change the
> > video_frame_buffer method to return a const ref to a scoped_ref_ptr,
> > to not imply an AddRef.
> >
> > BUG=webrtc:5682
>
> TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@webrtc.org,stefan@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5682
>
> Committed: https://crrev.com/5b3c443d301f2c2f18dac5b02652c08b91ea3828
> Cr-Commit-Position: refs/heads/master@{#12558}

TBR=perkj@webrtc.org,magjed@webrtc.org,pbos@webrtc.org,pthatcher@webrtc.org,stefan@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/1963413004
Cr-Commit-Position: refs/heads/master@{#12721}
2016-05-13 11:12:48 +00:00
Magnus Jedvert
a3002db8d6 Android: Add support for cropping textures
BUG=b/28622232
R=glaznev@webrtc.org, nisse@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12720}
2016-05-13 10:51:13 +00:00
Magnus Jedvert
210dd5c361 VideoCapturerAndroid: Ignore erroneous startCaptureOnCameraThread calls instead of crashing
Fix a bug where startCaptureOnCameraThread() is called while the camera is already successfully running. It may happen in the scenario when startCapture() is called, but startCaptureOnCameraThread() fails and posts a retry, then stopCapture() is called and removeCallbacksAndMessages() fails to remove the pending retry, and then startCapture() is called successfully.

BUG=b/28181364
R=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12697}
2016-05-12 10:40:36 +00:00
Magnus Jedvert
060aa57084 VideoCapturerAndroid: Force setDisplayOrientation to 0
BUG=b/27994417
R=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12695}
2016-05-12 08:08:00 +00:00
Niels Möller
d28db7fd65 Delete all use of tick_util.h.
Depends on Chrome cl https://codereview.chromium.org/1888003002/, which was landed some time ago.

BUG=webrtc:5740
R=stefan@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12674}
2016-05-10 14:31:58 +00:00
magjed
2aa84260d8 Android: Handle SurfaceTextureHelper ctor failure for decoder and capturer
BUG=webrtc:5874
TEST=Manually throw an exception inside the SurfaceTextureHelper ctor and run AppRTCDemo.

Review-Url: https://codereview.webrtc.org/1840193007
Cr-Commit-Position: refs/heads/master@{#12665}
2016-05-09 15:28:55 +00:00
Alex Glaznev
fac23f00ef Tune QP threshold for HW codecs.
Lower down bad thresholds a bit to avoid staying
at 720p resolution at 300 - 500 kbps.

R=wzh@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12633}
2016-05-04 19:58:32 +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
magjed
ddf165393f Android EGL: Synchronize calls to eglCreateContext
Synchronize calls to EGL10/EGL14.eglCreateContext on EglBase.lock. The
reason is that a deadlock between the remote render thread in
eglSwapBuffers and MediaCodecVideoEncoder eglCreateContext was observed.

The function calls that are now synchronized on EglBase.lock are:
eglCreateContext, eglMakeCurrent, eglSwapBuffers, and
SurfaceTexture.updateTexImage.

BUG=webrtc:5702

Review-Url: https://codereview.webrtc.org/1937933002
Cr-Commit-Position: refs/heads/master@{#12603}
2016-05-03 08:24:44 +00:00
nisse
fc88ffe9d8 Fix allocation size in CricketToJavaI420Frame, taking stride into account.
BUG=

Review-Url: https://codereview.webrtc.org/1941773002
Cr-Commit-Position: refs/heads/master@{#12601}
2016-05-03 07:32:16 +00:00
henrika
7d4a6c3208 Adds timeout for audio record thread in Java layer
BUG=b/28448866
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12590}
2016-05-02 09:01:02 +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
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
nisse
0565451820 Reland of Delete cricket::VideoFrame methods GetYPlane and GetYPitch. (patchset #1 id:1 of https://codereview.webrtc.org/1921493004/ )
Reason for revert:
Chrome has been updated, cl https://codereview.chromium.org/1919283005/

Original issue's description:
> Revert of Delete cricket::VideoFrame methods GetYPlane and GetYPitch. (patchset #5 id:80001 of https://codereview.webrtc.org/1901973002/ )
>
> Reason for revert:
> GetYPlane, GetYPitch etc is used by Chromium.
>
> Original issue's description:
> > Delete cricket::VideoFrame methods GetYPlane and GetYPitch.
> >
> > (And similarly for U and V). Also change video_frame_buffer method to
> > return a const ref to a scoped_ref_ptr.
> >
> > This cl is analogous to https://codereview.webrtc.org/1900673002/,
> > which delete corresponding methods in webrtc::VideoFrame.
> >
> > BUG=webrtc:5682
> >
> > Committed: https://crrev.com/1c27c6bf4cf0476dd2f09425509afaae4cdfe599
> > Cr-Commit-Position: refs/heads/master@{#12492}
>
> TBR=magjed@webrtc.org,perkj@webrtc.org,pbos@webrtc.org,pthatcher@webrtc.org,nisse@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5682
>
> Committed: https://crrev.com/b05f994bb6f3055c852891c8acb531aee916a668
> Cr-Commit-Position: refs/heads/master@{#12494}

TBR=magjed@webrtc.org,perkj@webrtc.org,pbos@webrtc.org,pthatcher@webrtc.org,terelius@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/1923903002
Cr-Commit-Position: refs/heads/master@{#12559}
2016-04-29 09:56:06 +00:00
nisse
5b3c443d30 Revert of Delete webrtc::VideoFrame methods buffer and stride. (patchset #14 id:250001 of https://codereview.webrtc.org/1900673002/ )
Reason for revert:
Breaks chrome FYI bots.

Original issue's description:
> Delete webrtc::VideoFrame methods buffer and stride.
>
> To make the HasOneRef/IsMutable hack work, also had to change the
> video_frame_buffer method to return a const ref to a scoped_ref_ptr,
> to not imply an AddRef.
>
> BUG=webrtc:5682

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

Review-Url: https://codereview.webrtc.org/1935443002
Cr-Commit-Position: refs/heads/master@{#12558}
2016-04-29 09:39:33 +00:00
nisse
a0591b5473 Delete webrtc::VideoFrame methods buffer and stride.
To make the HasOneRef/IsMutable hack work, also had to change the
video_frame_buffer method to return a const ref to a scoped_ref_ptr,
to not imply an AddRef.

BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/1900673002
Cr-Commit-Position: refs/heads/master@{#12557}
2016-04-29 09:09:33 +00:00
nisse
b99395a544 Reland of Delete video_render module. (patchset #1 id:1 of https://codereview.webrtc.org/1923613003/ )
Reason for revert:
Chrome's build files have now been updated, see cl https://codereview.chromium.org/1929933002/

Original issue's description:
> Revert of Delete video_render module. (patchset #12 id:220001 of https://codereview.webrtc.org/1912143002/ )
>
> Reason for revert:
> This breaks every buildbot in chromium.webrtc.fyi and I don't see any roll in progress to address this (and I don't see how that would be possible either).
> Usage in Chrome: https://code.google.com/p/chromium/codesearch#search/&q=modules.gyp%3Avideo_render&sq=package:chromium&type=cs
>
> Example failures:
> https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/5420
> https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win%20Builder/builds/4526
>
> I think it's fine to delete our video_render_module_internal_impl target and those files, but video_render target needs to remain.
>
> Original issue's description:
> > Delete video_render module.
> >
> > BUG=webrtc:5817
> >
> > Committed: https://crrev.com/97cfd1ec05d07ef233356e57f7aa4b028b74ffba
> > Cr-Commit-Position: refs/heads/master@{#12526}
>
> TBR=mflodman@webrtc.org,pbos@webrtc.org,nisse@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:5817

TBR=mflodman@webrtc.org,pbos@webrtc.org,kjellander@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:5817

Review-Url: https://codereview.webrtc.org/1929223003
Cr-Commit-Position: refs/heads/master@{#12556}
2016-04-29 07:58:48 +00:00
kjellander
0190367cea Revert of Delete video_render module. (patchset #12 id:220001 of https://codereview.webrtc.org/1912143002/ )
Reason for revert:
This breaks every buildbot in chromium.webrtc.fyi and I don't see any roll in progress to address this (and I don't see how that would be possible either).
Usage in Chrome: https://code.google.com/p/chromium/codesearch#search/&q=modules.gyp%3Avideo_render&sq=package:chromium&type=cs

Example failures:
https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/5420
https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win%20Builder/builds/4526

I think it's fine to delete our video_render_module_internal_impl target and those files, but video_render target needs to remain.

Original issue's description:
> Delete video_render module.
>
> BUG=webrtc:5817
>
> Committed: https://crrev.com/97cfd1ec05d07ef233356e57f7aa4b028b74ffba
> Cr-Commit-Position: refs/heads/master@{#12526}

TBR=mflodman@webrtc.org,pbos@webrtc.org,nisse@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5817

Review-Url: https://codereview.webrtc.org/1923613003
Cr-Commit-Position: refs/heads/master@{#12534}
2016-04-27 15:56:56 +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
nisse
97cfd1ec05 Delete video_render module.
BUG=webrtc:5817

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

Cr-Commit-Position: refs/heads/master@{#12526}
2016-04-27 09:52:27 +00:00
Peter Boström
53edac6c0e Report dropped frames from codec thread.
Removes data race inside QualityScaler which were called both from the
codec thread and the invoking thread at the same time.

BUG=webrtc:5678
R=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12517}
2016-04-26 22:08:45 +00:00
kwiberg
4485ffb58d #include "webrtc/base/constructormagic.h" where appropriate
Any file that uses the RTC_DISALLOW_* macros should #include
"webrtc/base/constructormagic.h", but a shocking number of them don't.
This causes trouble when we try to wean files off of #including
scoped_ptr.h, since a bunch of files get their constructormagic macros
only from there.

Rather than fixing these errors one by one as they turn up, this CL
simply ensures that every file in the WebRTC tree that uses the
RTC_DISALLOW_* macros #includes "webrtc/base/constructormagic.h".

BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#12509}
2016-04-26 15:14:48 +00:00
Peter Boström
3c6eac2860 Remove QualityScaler framerate reduction.
Framerate-reduction code is disabled on all platforms, and this code
adds complexity. It's necessary to react fast, especially on mobile
platforms or other bad network conditions and framerate reduction adds
another step between HD and QVGA.

BUG=webrtc:5678, webrtc:5830
R=jackychen@webrtc.org, mflodman@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12503}
2016-04-26 11:37:20 +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
terelius
b05f994bb6 Revert of Delete cricket::VideoFrame methods GetYPlane and GetYPitch. (patchset #5 id:80001 of https://codereview.webrtc.org/1901973002/ )
Reason for revert:
GetYPlane, GetYPitch etc is used by Chromium.

Original issue's description:
> Delete cricket::VideoFrame methods GetYPlane and GetYPitch.
>
> (And similarly for U and V). Also change video_frame_buffer method to
> return a const ref to a scoped_ref_ptr.
>
> This cl is analogous to https://codereview.webrtc.org/1900673002/,
> which delete corresponding methods in webrtc::VideoFrame.
>
> BUG=webrtc:5682
>
> Committed: https://crrev.com/1c27c6bf4cf0476dd2f09425509afaae4cdfe599
> Cr-Commit-Position: refs/heads/master@{#12492}

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

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

Cr-Commit-Position: refs/heads/master@{#12494}
2016-04-25 18:41:55 +00:00
nisse
1c27c6bf4c Delete cricket::VideoFrame methods GetYPlane and GetYPitch.
(And similarly for U and V). Also change video_frame_buffer method to
return a const ref to a scoped_ref_ptr.

This cl is analogous to https://codereview.webrtc.org/1900673002/,
which delete corresponding methods in webrtc::VideoFrame.

BUG=webrtc:5682

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

Cr-Commit-Position: refs/heads/master@{#12492}
2016-04-25 16:45:38 +00:00
Alex Glaznev
dcd730f564 Enable VP9 HW encoder on Exynos devices.
R=wzh@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12461}
2016-04-22 00:01:57 +00:00
Taylor Brandstetter
0cd086b70e Adding codecs to the RtpParameters returned by an RtpSender.
Contains every field except for sdpFmtpLine.
Setting a reordered list of codecs is not yet supported.

R=glaznev@webrtc.org, pthatcher@webrtc.org, skvlad@webrtc.org, tkchin@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#12453}
2016-04-20 23:23:22 +00:00
asapersson
24ebc44f95 MediaCodecVideoEncoder: Add QP stats to Encoded callback for VP8.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#12435}
2016-04-20 06:48:26 +00:00