109 Commits

Author SHA1 Message Date
sprang
8f46c679d2 Extract bitrate allocation of spatial/temporal layers out of codec impl.
This CL makes a number of intervowen changes:

* Add BitrateAllocation struct, that contains a codec independent view
  of how the target bitrate is distributed over spatial and temporal
  layers.

* Adds the BitrateAllocator interface, which takes a bitrate and frame
  rate and produces a BitrateAllocation.

* A default (non layered) implementation is added, and
  SimulcastRateAllocator is extended to fully handle VP8 allocation.
  This includes capturing TemporalLayer instances created by the
  encoder.

* ViEEncoder now owns both the bitrate allocator and the temporal layer
  factories for VP8. This allows allocation to happen fully outside of
  the encoder implementation.

This refactoring will make it possible for ViEEncoder to signal the
full picture of target bitrates to the RTCP module.

BUG=webrtc:6301

Review-Url: https://codereview.webrtc.org/2434073003
Cr-Commit-Position: refs/heads/master@{#14998}
2016-11-09 13:09:12 +00:00
sakal
28ec6bdce8 Make releaseEglSurface in EglRenderer asynchronous.
BUG=webrtc:6470

Review-Url: https://codereview.webrtc.org/2483143002
Cr-Commit-Position: refs/heads/master@{#14993}
2016-11-09 09:47:19 +00:00
sakal
b6e857d30b Remove deprecated methods from CameraEnumerationAndroid.
Following methods are removed:
getDeviceNames
getDeviceCount
getDeviceName(index)
getNameOfFrontFacingDevice
getNameOfBackFacingDevice

BUG=webrtc:6606,webrtc:5519

Review-Url: https://codereview.webrtc.org/2448393003
Cr-Commit-Position: refs/heads/master@{#14966}
2016-11-08 10:06:42 +00:00
sergeyu
2cb155aa8a Remove deprected functions from EncodedImageCallback and RtpRtcp
Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
These methods should no longer be used anywhere and it's safe to remove
them.

BUG=chromium:621691

Committed: https://crrev.com/c681250aaa2025836db7669694e323898e5c2ca7
Review-Url: https://codereview.webrtc.org/2405173006
Cr-Original-Commit-Position: refs/heads/master@{#14923}
Cr-Commit-Position: refs/heads/master@{#14935}
2016-11-04 18:39:37 +00:00
kjellander
91b957d3e4 Revert of Remove deprected functions from EncodedImageCallback and RtpRtcp (patchset #4 id:100001 of https://codereview.webrtc.org/2405173006/ )
Reason for revert:
Still breaks internal downstream project.
Sergey: Please update internal project before relanding this.

Original issue's description:
> Remove deprected functions from EncodedImageCallback and RtpRtcp
>
> Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
> These methods should no longer be used anywhere and it's safe to remove
> them.
>
> BUG=chromium:621691
>
> Committed: https://crrev.com/c681250aaa2025836db7669694e323898e5c2ca7
> Cr-Commit-Position: refs/heads/master@{#14923}

TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691

Review-Url: https://codereview.webrtc.org/2479643002
Cr-Commit-Position: refs/heads/master@{#14925}
2016-11-03 18:53:50 +00:00
sergeyu
c681250aaa Remove deprected functions from EncodedImageCallback and RtpRtcp
Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
These methods should no longer be used anywhere and it's safe to remove
them.

BUG=chromium:621691

Review-Url: https://codereview.webrtc.org/2405173006
Cr-Commit-Position: refs/heads/master@{#14923}
2016-11-03 18:06:42 +00:00
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
ehmaldonado
43a9dc0f93 Revert of move deprected functions from EncodedImageCallback and RtpRtcp (patchset #1 id:1 of https://codereview.webrtc.org/2467373003/ )
Reason for revert:
Made a mistake while reverting.

Original issue's description:
> Reland of move deprected functions from EncodedImageCallback and RtpRtcp (patchset #2 id:240001 of https://codereview.webrtc.org/2474433008/ )
>
> Reason for revert:
> Breaks everything
>
> Original issue's description:
> > Revert of Remove deprected functions from EncodedImageCallback and RtpRtcp (patchset #4 id:100001 of https://codereview.webrtc.org/2405173006/ )
> >
> > Reason for revert:
> > This might be breaking projects downstream.
> >
> > Original issue's description:
> > > Remove deprected functions from EncodedImageCallback and RtpRtcp
> > >
> > > Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
> > > These methods should no longer be used anywhere and it's safe to remove
> > > them.
> > >
> > > BUG=chromium:621691
> > >
> > > Committed: https://crrev.com/fa565842718ad178a7562721b25d916fbabc2b92
> > > Cr-Commit-Position: refs/heads/master@{#14902}
> >
> > TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=chromium:621691
> >
> > Committed: https://crrev.com/6c78307a21252c2dbd704f6d5e92a220fb722ed4
> > Cr-Commit-Position: refs/heads/master@{#14914}
>
> TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:621691
>
> Committed: https://crrev.com/a1d6cd64083a3c0173aeefe38425a56de8942745
> Cr-Commit-Position: refs/heads/master@{#14915}

TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691

Review-Url: https://codereview.webrtc.org/2477773002
Cr-Commit-Position: refs/heads/master@{#14916}
2016-11-03 14:52:42 +00:00
ehmaldonado
a1d6cd6408 Reland of move deprected functions from EncodedImageCallback and RtpRtcp (patchset #2 id:240001 of https://codereview.webrtc.org/2474433008/ )
Reason for revert:
Breaks everything

Original issue's description:
> Revert of Remove deprected functions from EncodedImageCallback and RtpRtcp (patchset #4 id:100001 of https://codereview.webrtc.org/2405173006/ )
>
> Reason for revert:
> This might be breaking projects downstream.
>
> Original issue's description:
> > Remove deprected functions from EncodedImageCallback and RtpRtcp
> >
> > Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
> > These methods should no longer be used anywhere and it's safe to remove
> > them.
> >
> > BUG=chromium:621691
> >
> > Committed: https://crrev.com/fa565842718ad178a7562721b25d916fbabc2b92
> > Cr-Commit-Position: refs/heads/master@{#14902}
>
> TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:621691
>
> Committed: https://crrev.com/6c78307a21252c2dbd704f6d5e92a220fb722ed4
> Cr-Commit-Position: refs/heads/master@{#14914}

TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691

Review-Url: https://codereview.webrtc.org/2467373003
Cr-Commit-Position: refs/heads/master@{#14915}
2016-11-03 14:39:04 +00:00
ehmaldonado
6c78307a21 Revert of Remove deprected functions from EncodedImageCallback and RtpRtcp (patchset #4 id:100001 of https://codereview.webrtc.org/2405173006/ )
Reason for revert:
This might be breaking projects downstream.

Original issue's description:
> Remove deprected functions from EncodedImageCallback and RtpRtcp
>
> Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
> These methods should no longer be used anywhere and it's safe to remove
> them.
>
> BUG=chromium:621691
>
> Committed: https://crrev.com/fa565842718ad178a7562721b25d916fbabc2b92
> Cr-Commit-Position: refs/heads/master@{#14902}

TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691

Review-Url: https://codereview.webrtc.org/2474433008
Cr-Commit-Position: refs/heads/master@{#14914}
2016-11-03 14:33:25 +00:00
sergeyu
fa56584271 Remove deprected functions from EncodedImageCallback and RtpRtcp
Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
These methods should no longer be used anywhere and it's safe to remove
them.

BUG=chromium:621691

Review-Url: https://codereview.webrtc.org/2405173006
Cr-Commit-Position: refs/heads/master@{#14902}
2016-11-02 20:14:24 +00:00
mandermo
d192dce1c5 More tolerant format name for FileVideoCapturer
Before only C420 as format name was accepted, now C420mpeg2 is also
accepted. Both means the same thing.

BUG=webrtc:6545

NOTRY=True

Review-Url: https://codereview.webrtc.org/2468943002
Cr-Commit-Position: refs/heads/master@{#14897}
2016-11-02 16:15:47 +00:00
nisse
7341ab8e25 Revert of Delete all use of cricket::VideoFrame and cricket::WebRtcVideoFrame. (patchset #7 id:120001 of https://codereview.webrtc.org/2383093002/ )
Reason for revert:
Breaks chrome, see https://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/19019/steps/compile/logs/stdio

Analysis: Chrome uses cricket::VideoFrame, without explicitly including webrtc/media/base/videoframe.h, and breaks when that file is no longer included by any other webrtc headers. Will reland after updating Chrome.

Original issue's description:
> Delete all use of cricket::VideoFrame and cricket::WebRtcVideoFrame.
>
> Replaced with webrtc::VideoFrame.
>
> TBR=mflodman@webrtc.org
> BUG=webrtc:5682
>
> Committed: https://crrev.com/45c8b8940042bd2574c39920804ade8343cefdba
> Cr-Commit-Position: refs/heads/master@{#14885}

TBR=perkj@webrtc.org,pthatcher@webrtc.org,tkchin@webrtc.org,mflodman@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/2471783002
Cr-Commit-Position: refs/heads/master@{#14886}
2016-11-02 10:40:05 +00:00
nisse
45c8b89400 Delete all use of cricket::VideoFrame and cricket::WebRtcVideoFrame.
Replaced with webrtc::VideoFrame.

TBR=mflodman@webrtc.org
BUG=webrtc:5682

Review-Url: https://codereview.webrtc.org/2383093002
Cr-Commit-Position: refs/heads/master@{#14885}
2016-11-02 10:20:28 +00:00
deadbeef
ee8ad2bb0f Adding data channel ID to Java binding of DataChannel.
BUG=webrtc:6106

Review-Url: https://codereview.webrtc.org/2466993002
Cr-Commit-Position: refs/heads/master@{#14879}
2016-11-01 21:59:03 +00:00
magjed
1e45cc6ee0 Replace WebRtcVideoEncoderFactory::VideoCodec with cricket::VideoCodec
This CL introduces two new functions to the WebRtcVideoEncoderFactory
interface based on cricket::VideoFormat instead of
WebRtcVideoEncoderFactory::VideoCodec. The functions are:
WebRtcVideoEncoderFactory::CreateVideoEncoder() and
WebRtcVideoEncoderFactory::supported_codecs(). In order to make a smooth
transition to the new interface, the old functions are kept, and default
implementations are provided for both the old and new functions so that
external clients can switch from the old to the new functions in peace.
The default implementations will just convert between
cricket::VideoFormat and WebRtcVideoEncoderFactory::VideoCodec. Once all
external clients have updated their code, the plan is to remove the old
functions and all default implementations to make
WebRtcVideoEncoderFactory a pure interface again.

BUG=webrtc:6402,webrtc:6337

Review-Url: https://codereview.webrtc.org/2449993003
Cr-Commit-Position: refs/heads/master@{#14826}
2016-10-28 14:43:52 +00:00
mandermo
9890a5861f Testing of FileVideoCapturer.
Based on https://codereview.webrtc.org/2273573003/

BUG=webrtc:6545

Review-Url: https://codereview.webrtc.org/2405463002
Cr-Commit-Position: refs/heads/master@{#14801}
2016-10-27 14:26:44 +00:00
glaznev
489c0d4832 Decrease threshold for key frame generation.
On some recent Android devices camera switch is completed in 400 ms.
Need to adjust key frame generation threshold to ensure HW encoder
still generates a key frame after camera switch to workaround video
distortions.

BUG=b/32238476

Review-Url: https://codereview.webrtc.org/2447163003
Cr-Commit-Position: refs/heads/master@{#14791}
2016-10-26 17:53:05 +00:00
kthelgason
b906172e02 Reland of Move bitstream parser to more appropriate directory. (patchset #1 id:1 of https://codereview.webrtc.org/2430353004/ )
Reason for revert:
Internal project has been fixed

Original issue's description:
> Revert of Move bitstream parser to more appropriate directory. (patchset #4 id:60001 of https://codereview.webrtc.org/2370853005/ )
>
> Reason for revert:
> Breaks internal project
>
> Original issue's description:
> > Move current bitstream parser to more appropriate directory.
> >
> > This CL groups together the code that has to do with parsing H264 bitstreams.
> > This code logically belongs together, and having it in the same directory not
> > only simplifies things from a project structure perspective, but also makes it
> > easier to refactor out common parts incrementally.
> > An added benefit is that this simplifies modular compilation, where for example
> > one would like a build of WebRTC without the H264 codec-specific parts.
> >
> > BUG=webrtc:6338
> >
> > Committed: https://crrev.com/cc6817e9ce4a5ffc73efb660cf0368afbc7d9a4f
> > Cr-Commit-Position: refs/heads/master@{#14684}
>
> TBR=magjed@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:6338
>
> Committed: https://crrev.com/f04f14e772f803de39f8a6128e5157127cd35103
> Cr-Commit-Position: refs/heads/master@{#14685}

TBR=magjed@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:6338

Review-Url: https://codereview.webrtc.org/2434043002
Cr-Commit-Position: refs/heads/master@{#14783}
2016-10-26 09:48:24 +00:00
sakal
d0af5c6fd4 Fix a deadlock in EglRenderer.releaseEglSurface.
Main thread is waiting for an operation on the render thread to complete
while holding the handler lock. Something can be waiting on the render
thread for this lock. This CL changes the behaviour so that the lock
is released before waiting for the operation to complete.

BUG=webrtc:6602,webrtc:6470
R=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2449693003
Cr-Commit-Position: refs/heads/master@{#14773}
2016-10-25 14:21:00 +00:00
Magnus Jedvert
894c400c61 Android VideoFileRenderer: Wait for posted frames in release()
We need to wait for posted frames to be rendered first in release()
instead of abruptly quitting, in order to simplify testing.

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

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

Cr-Commit-Position: refs/heads/master@{#14722}
2016-10-21 13:05:09 +00:00
magjed
1cb48232ac Android YuvConverter: Use OpenGL Framebuffer instead of EGL pixel buffer
This CL changes YuvConverter to use an OpenGL Framebuffer as rendering
target instead of an EGL pixel buffer surface. The purpose is to reduce
the number of EGL contexts and to be able to use YuvConverter from
EglRenderer without having to detach the EGL surface.

BUG=webrtc:6470

Review-Url: https://codereview.webrtc.org/2436653003
Cr-Commit-Position: refs/heads/master@{#14699}
2016-10-20 10:19:20 +00:00
magjed
9ab8a1884d Android: Extend functionality of EglRenderer
The purpose is to prepare for a TextureViewRenderer that will need the
new functionality.

The new functionality is:
 * Be able to create an EglRenderer using a SurfaceTexture.
 * Fps reduction logic.
 * Log statistics every 4 seconds regardless of framerate.
 * Include swap buffer time in statistics.
 * Use EglBase10 if texture frames are disabled.
 * Function for printing stack trace of render thread.
 * Public clearImage() function for clearing the EGLSurface.

BUG=webrtc:6470

Review-Url: https://codereview.webrtc.org/2428933002
Cr-Commit-Position: refs/heads/master@{#14698}
2016-10-20 10:18:15 +00:00
kthelgason
f04f14e772 Revert of Move bitstream parser to more appropriate directory. (patchset #4 id:60001 of https://codereview.webrtc.org/2370853005/ )
Reason for revert:
Breaks internal project

Original issue's description:
> Move current bitstream parser to more appropriate directory.
>
> This CL groups together the code that has to do with parsing H264 bitstreams.
> This code logically belongs together, and having it in the same directory not
> only simplifies things from a project structure perspective, but also makes it
> easier to refactor out common parts incrementally.
> An added benefit is that this simplifies modular compilation, where for example
> one would like a build of WebRTC without the H264 codec-specific parts.
>
> BUG=webrtc:6338
>
> Committed: https://crrev.com/cc6817e9ce4a5ffc73efb660cf0368afbc7d9a4f
> Cr-Commit-Position: refs/heads/master@{#14684}

TBR=magjed@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:6338

Review-Url: https://codereview.webrtc.org/2430353004
Cr-Commit-Position: refs/heads/master@{#14685}
2016-10-19 17:34:39 +00:00
kthelgason
cc6817e9ce Move current bitstream parser to more appropriate directory.
This CL groups together the code that has to do with parsing H264 bitstreams.
This code logically belongs together, and having it in the same directory not
only simplifies things from a project structure perspective, but also makes it
easier to refactor out common parts incrementally.
An added benefit is that this simplifies modular compilation, where for example
one would like a build of WebRTC without the H264 codec-specific parts.

BUG=webrtc:6338

Review-Url: https://codereview.webrtc.org/2370853005
Cr-Commit-Position: refs/heads/master@{#14684}
2016-10-19 16:31:15 +00:00
Magnus Jedvert
577bc19210 Android: Move YuvConverter to its own file
YuvConverter is complex class that deserves its own file. It is also used outside of SurfaceTextureHelper.

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

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

Cr-Commit-Position: refs/heads/master@{#14683}
2016-10-19 13:29:13 +00:00
mandermo
64e1a32e2f Second try to get "Support for video file instead of camera and output video out to file" accepted
The old CL can be found here: https://codereview.webrtc.org/2273573003/

The orginal broke down stream, this CL tries to solve those issues.

BUG=webrtc:6545

Review-Url: https://codereview.webrtc.org/2426003002
Cr-Commit-Position: refs/heads/master@{#14665}
2016-10-18 15:47:59 +00:00
kjellander
67a8c986ab Revert of Support for video file instead of camera and output video out to file (patchset #17 id:320001 of https://codereview.webrtc.org/2273573003/ )
Reason for revert:
Breaks internal project.

Original issue's description:
> Support for video file instead of camera and output video out to file
>
> When video out to file is enabled the remote video which is recorded is
> not show on screen.
>
> You can use this command line for file input and output:
> monkeyrunner ./webrtc/examples/androidapp/start_loopback_stubbed_camera_saved_video_out.py --devname 02157df28cd47001 --videoin /storage/emulated/0/reference_video_1280x720_30fps.y4m --videoout /storage/emulated/0/output.y4m --videoout_width 1280 --videoout_height 720 --videooutsave /tmp/out.y4m
>
> BUG=webrtc:6545
>
> Committed: https://crrev.com/44666997ca912705f8f96c9bd211e719525a3ccc
> Cr-Commit-Position: refs/heads/master@{#14660}

TBR=magjed@webrtc.org,sakal@webrtc.org,jansson@chromium.org,mandermo@google.com,mandermo@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6545

Review-Url: https://codereview.webrtc.org/2425763003
Cr-Commit-Position: refs/heads/master@{#14664}
2016-10-18 13:05:40 +00:00
mandermo
44666997ca Support for video file instead of camera and output video out to file
When video out to file is enabled the remote video which is recorded is
not show on screen.

You can use this command line for file input and output:
monkeyrunner ./webrtc/examples/androidapp/start_loopback_stubbed_camera_saved_video_out.py --devname 02157df28cd47001 --videoin /storage/emulated/0/reference_video_1280x720_30fps.y4m --videoout /storage/emulated/0/output.y4m --videoout_width 1280 --videoout_height 720 --videooutsave /tmp/out.y4m

BUG=webrtc:6545

Review-Url: https://codereview.webrtc.org/2273573003
Cr-Commit-Position: refs/heads/master@{#14660}
2016-10-18 11:52:06 +00:00
sakal
d2cf1ce8aa Remove legacy Camera2Enumerator.isSupported method.
BUG=webrtc:6390
R=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2395403002
Cr-Commit-Position: refs/heads/master@{#14572}
2016-10-07 14:06:10 +00:00
magjed
df494b0908 Android: Split out EGL rendering from SurfaceViewRenderer to separate class
The purpose is to prepare for a TextureViewRenderer that will share the
EGL rendering code.

Two functional changes are also included:
* The implementation of SurfaceHolder.Callback.surfaceDestroyed will now
  block until the EGL surface is released. This is done in order to
  comply with the documentation that says: "If you have a rendering
  thread that directly accesses the surface, you must ensure that thread
  is no longer touching the Surface before returning from this function."
* We will no longer try to hide render glitches during layout changes.
  This was a lost cause anyway.

BUG=webrtc:6407

Review-Url: https://codereview.webrtc.org/2399463006
Cr-Commit-Position: refs/heads/master@{#14570}
2016-10-07 12:32:43 +00:00
sakal
327e9d0821 Make MediaCodecEncoder fallback to a software encoder on failure.
This should allow us to enable Intel HW VP8 encoder again.

BUG=webrtc:6232,b/30947951

Review-Url: https://codereview.webrtc.org/2263043003
Cr-Commit-Position: refs/heads/master@{#14552}
2016-10-06 12:55:19 +00:00
sakal
55b9544290 Add camera start/stop time stats to VideoCapturerAndroid.
BUG=webrtc:6302

Review-Url: https://codereview.webrtc.org/2395433003
Cr-Commit-Position: refs/heads/master@{#14548}
2016-10-06 09:59:50 +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
65b42c251f Fix receiving H264 video from iPhone on Kitkat devices.
Changing this constant has been empirically proven to solve the issue.

BUG=webrtc:6455,b/31827852

Review-Url: https://codereview.webrtc.org/2382733006
Cr-Commit-Position: refs/heads/master@{#14479}
2016-10-03 15:07:06 +00:00
sakal
8f741e953c Change Camera1Enumerator to create a Camera1Capturer instead of VideoCapturerAndroid.
BUG=webrtc:6148

Review-Url: https://codereview.webrtc.org/2356073003
Cr-Commit-Position: refs/heads/master@{#14478}
2016-10-03 15:06:05 +00:00
sakal
55d932b331 Add logging statements to places where the frame might be dropped in WebRTC pipeline.
BUG=b/31645554

Review-Url: https://codereview.webrtc.org/2361803003
Cr-Commit-Position: refs/heads/master@{#14457}
2016-09-30 13:19:12 +00:00
magjed
606018600e Add presubmit format requirement for webrtc/api/android
BUG=webrtc:6419
NOTRY=True
TBR=kjellander@webrtc.org

Review-Url: https://codereview.webrtc.org/2377113003
Cr-Commit-Position: refs/heads/master@{#14435}
2016-09-29 12:36:03 +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
kthelgason
478681e1e6 Move the QP scaling thresholds to the relevant encoders.
Also provide a new set of thresholds for the VideoToolbox encoder. The new thresholds were experimentally determined to work well on the iPhone 6S, and also adequately on the iPhone 5S.

BUG=webrtc:5678

Review-Url: https://codereview.webrtc.org/2309743002
Cr-Commit-Position: refs/heads/master@{#14420}
2016-09-28 15:17:51 +00:00
sakal
e87d6734ea Return texture frame when dropping frames in CameraCapturer.
BUG=webrtc:6411,b/31686979

Review-Url: https://codereview.webrtc.org/2363043002
Cr-Commit-Position: refs/heads/master@{#14365}
2016-09-23 08:27:38 +00:00
glaznev
893a7eeecb Support more QCOM specific color formats for Android HW decoder.
BUG=b/31483393

Review-Url: https://codereview.webrtc.org/2349843002
Cr-Commit-Position: refs/heads/master@{#14359}
2016-09-22 17:44:34 +00:00
sakal
1c6d3f7eae Add new Camera2Enumerator.isSupported with Context parameter.
The old method is marked deprecated and will be removed soon. The new
method checks if all cameras on the device support better than legacy
implementation of the camera2 API.

BUG=webrtc:6390

Review-Url: https://codereview.webrtc.org/2354883002
Cr-Commit-Position: refs/heads/master@{#14350}
2016-09-22 12:52:13 +00:00
Alex Glaznev
772bd0d40b Log supported camera preview resolutions.
BUG=b/29935437
R=sakal@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14336}
2016-09-21 19:17:15 +00:00
sakal
28d5bc68c3 Fix deadlock issue in CameraCapturer.stopCapture.
BUG=webrtc:6404
NOTRY=True

Review-Url: https://codereview.webrtc.org/2357213002
Cr-Commit-Position: refs/heads/master@{#14333}
2016-09-21 14:44:55 +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
0cb8828bce Reland of lease camera statistics after switching camera on CameraCapturer. (patchset #1 id:1 of https://codereview.webrtc.org/2353163003/ )
Reason for revert:
Fix bugs causing the new code to fail.

Original issue's description:
> Revert of Release camera statistics after switching camera on CameraCapturer. (patchset #1 id:1 of https://codereview.webrtc.org/2353263002/ )
>
> Reason for revert:
> Breaks bots.
>
> Original issue's description:
> > Release camera statistics after switching camera on CameraCapturer.
> >
> > BUG=webrtc:6397
> > TBR=magjed@webrtc.org
> > NOTRY=True
> >
> > Committed: https://crrev.com/d5e9237b303e5fe253dc6530fbcf939921f4eaed
> > Cr-Commit-Position: refs/heads/master@{#14323}
>
> TBR=magjed@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6397
>
> Committed: https://crrev.com/ad5d65845f5c859d0564811a4eea68e1efdb8450
> Cr-Commit-Position: refs/heads/master@{#14324}

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

Review-Url: https://codereview.webrtc.org/2357893002
Cr-Commit-Position: refs/heads/master@{#14330}
2016-09-21 13:08:59 +00:00
sakal
ad5d65845f Revert of Release camera statistics after switching camera on CameraCapturer. (patchset #1 id:1 of https://codereview.webrtc.org/2353263002/ )
Reason for revert:
Breaks bots.

Original issue's description:
> Release camera statistics after switching camera on CameraCapturer.
>
> BUG=webrtc:6397
> TBR=magjed@webrtc.org
> NOTRY=True
>
> Committed: https://crrev.com/d5e9237b303e5fe253dc6530fbcf939921f4eaed
> Cr-Commit-Position: refs/heads/master@{#14323}

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

Review-Url: https://codereview.webrtc.org/2353163003
Cr-Commit-Position: refs/heads/master@{#14324}
2016-09-21 10:51:15 +00:00