Commit Graph

333 Commits

Author SHA1 Message Date
30e918278c This cl add support to encode from textures to MediaCodecVideoEncoder.
This has also partly been reviewed in https://codereview.webrtc.org/1375953002/.

BUG=webrtc:4993
TBR=glaznew@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10725}
2015-11-20 09:31:32 +00:00
17c0aff9ea Enable VP9 HW decoder on Exynos chips.
R=wzh@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10720}
2015-11-19 23:56:24 +00:00
ef453238aa Android: Make classes non-final
The classes are not mockable if they are final.

R=phoglund@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10714}
2015-11-19 16:54:16 +00:00
b6755ab6df Revert of Adding thread timeout for audio recorer thread in Java (patchset #2 id:20001 of https://codereview.webrtc.org/1444313002/ )
Reason for revert:
Reverting since this fix might hide real issue and the reported root problem seems extremely rare.

Original issue's description:
> Adding thread timeout for audio recorer thread in Java
>
> BUG=NONE
>
> Committed: https://crrev.com/fd614c2149c7985bd83df809df71d0d60e5a8f74
> Cr-Commit-Position: refs/heads/master@{#10671}

TBR=magjed@webrtc.org,tommi@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=NONE

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

Cr-Commit-Position: refs/heads/master@{#10707}
2015-11-19 10:43:19 +00:00
Per
488e75f11b Patchset 1 yet again relands without modification https://codereview.webrtc.org/1422963003/
It do the following:

The SurfaceTexture.updateTexImage() calls are moved from the video renderers into MediaCodecVideoDecoder, and the destructor of the texture frames will signal MediaCodecVideoDecoder that the frame has returned. This CL also removes the SurfaceTexture from the native handle and only exposes the texture matrix instead, because only the video source should access the SurfaceTexture.
It moves the responsibility of calculating the decode time to Java.

Patchset2 Refactor MediaCodecVideoDecoder to drop frames if a texture is not released.

R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10706}
2015-11-19 09:43:46 +00:00
b7ce96470b modules/video_coding/utility: Remove include
This makes it clearer this code not meant to be used as an API.
I could not find any use of this in downstream code.

BUG=webrtc:5095
TESTED=git cl try -c --bot=android_compile_rel --bot=linux_compile_rel --bot=win_compile_rel --bot=mac_compile_rel --bot=ios_rel --bot=linux_gn_rel --bot=win_x64_gn_rel --bot=mac_x64_gn_rel --bot=android_gn_rel -m tryserver.webrtc
R=stefan@webrtc.org
TBR=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10699}
2015-11-18 22:04:20 +00:00
ad948c42a1 Preliminary support of VP9 HW encoder on Android.
Not fully tested yet. Verified in test loopback application
with fake VP9 codec factory.
Assume that encoder generates bitstream in non flexible mode with
one temporal and one spatial layers.

R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10695}
2015-11-18 21:06:51 +00:00
fd614c2149 Adding thread timeout for audio recorer thread in Java
BUG=NONE

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

Cr-Commit-Position: refs/heads/master@{#10671}
2015-11-17 12:28:33 +00:00
6f8ce060a2 common_video: rename interface -> include
To avoid breaking downstream, the "interface" directories were copied
into a new "common_video/include" dir. The old headers got pragma
warnings added about deprecation (a very short deprecation since I plan
to remove them as soon downstream is updated).
The header guards are also identical to avoid mixing them up in the transition.

BUG=webrtc:5095
TESTED=Passing compile-trybots with --clobber flag:
git cl try --clobber --bot=win_compile_rel --bot=linux_compile_rel --bot=android_compile_rel --bot=mac_compile_rel --bot=ios_rel --bot=linux_gn_rel --bot=win_x64_gn_rel --bot=mac_x64_gn_rel --bot=android_gn_rel -m tryserver.webrtc

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

Cr-Commit-Position: refs/heads/master@{#10659}
2015-11-16 21:52:31 +00:00
633a3aa26f ThreadUtils: Add joinUninterruptibly() with timeout
This is similar to com.google.common.util.concurrent.Uninterruptibles.joinUninterruptibly().
http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/util/concurrent/Uninterruptibles.html#joinUninterruptibly(java.lang.Thread,%20long,%20java.util.concurrent.TimeUnit)

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

Cr-Commit-Position: refs/heads/master@{#10651}
2015-11-16 13:12:36 +00:00
3e0f602055 Android EglBase: Add support for creating EGLSurface from Surface, not SurfaceHolder
Review URL: https://codereview.webrtc.org/1438223003

Cr-Commit-Position: refs/heads/master@{#10646}
2015-11-16 10:04:57 +00:00
4a41361f98 Android SurfaceViewRenderer: Never hold a pending frame indefinitely
The original purpose with keeping one pending frame in SurfaceViewRenderer was to reduce latency for the first rendered frame when we are waiting for the Surface to be created. However, it is very dangerous to hold a pending frame indefinitely when used with a SurfaceTexture, because the SurfaceTexture only has one frame and thus holding a frame in the renderer will freeze everything and typically cause timeout crashes.

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

Cr-Commit-Position: refs/heads/master@{#10638}
2015-11-13 16:48:06 +00:00
Per
c01c25434b Revert of Android MediaCodecVideoDecoder: Manage lifetime of texture frames (patchset #12 id:320001 of https://codereview.webrtc.org/1422963003/ )
Reason for revert:
Causes fallback to SW decoder if a renderer is put in the background.

Original issue's description:
> Patchset 1 is a pure
> revert of "Revert of "Android MediaCodecVideoDecoder: Manage lifetime of texture frames" https://codereview.webrtc.org/1378033003/
>
> Following patchsets move the responsibility of calculating the decode time to Java.
>
> TESTED= Apprtc loopback using H264 and VP8 on N5, N6, N7, S5
>
> Committed: https://crrev.com/9cb8982e64f08d3d630bf7c3d2bcc78c10db88e2
> Cr-Commit-Position: refs/heads/master@{#10597}

TBR=magjed@webrtc.org,glaznev@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true

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

Cr-Commit-Position: refs/heads/master@{#10637}
2015-11-13 15:58:37 +00:00
68876f990e Introduces Android API level linting, fixes all current API lint errors.
This CL attempts to annotate accesses on >16 API levels using as
small scopes as possible. The TargetApi notations mean "yes, I know
I'm accessing a higher API and I take responsibility for gating the
call on Android API level". The Encoder/Decoder classes are annotated
on the whole class, but they're only accessed through JNI; we should
annotate on method level otherwise and preferably on private methods.

This patch also fixes some compiler-level deprecation warnings (i.e.
-Xlint:deprecation), but probably not all of them.

BUG=webrtc:5063
R=henrika@webrtc.org, kjellander@webrtc.org, magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10624}
2015-11-12 16:37:01 +00:00
9576e54836 Reland "Prepare MediaCodecVideoEncoder for surface textures.""
This reverts commit 12f680214e28dc5f0a13ac8afc0d1445f89e67e6.
Original cl in https://codereview.webrtc.org/1396073003/
Prepare MediaCodecVideoEncoder for surface textures.
This refactors MediaVideoEncoder to prepare for adding support to encode from textures. The C++ layer does not have any functional changes.
- Moves ResetEncoder to always work on the codec thread
- Adds use of ThreadChecker.
- Change Java MediaEncoder.Init to return true or false and introduce method getInputBuffers.
- Add simple unit test for Java MediaCodecVideoEncoder.

The pure revert of the revert is in patchset 1.
Patchset 2, moves getting the input buffer to before storing pending timestamps etc to fix b/24984012.

BUG=webrtc:4993 b/24984012

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

Cr-Commit-Position: refs/heads/master@{#10622}
2015-11-12 14:43:22 +00:00
fc6affc60d Android SurfaceViewRenderer: Call glClear() for every frame to avoid bad GL state
BUG=webrtc:5147

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

Cr-Commit-Position: refs/heads/master@{#10617}
2015-11-12 09:08:37 +00:00
cbfabbf818 Fix potential tearing issue in VideoRendererGui.
This make sure that the texture copy is syncronized.

To reproduce the problem I:
Reverted "Revert of "Android MediaCodecVideoDecoder: Manage lifetime of texture frames" https://codereview.webrtc.org/1378033003/"
commit 543b6ca30a43eeb069c699291460ce6bacc7959d.
Reverted "Enable SurfaceViewRenderer for AppRTCDemo"
commit 7076729c57c27aa813760d2038be02c36f4d7649.
and ran ApprtDemo in loopback and changed the orientation a couple of times.

TBR=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10598}
2015-11-11 11:38:39 +00:00
9cb8982e64 Patchset 1 is a pure
revert of "Revert of "Android MediaCodecVideoDecoder: Manage lifetime of texture frames" https://codereview.webrtc.org/1378033003/

Following patchsets move the responsibility of calculating the decode time to Java.

TESTED= Apprtc loopback using H264 and VP8 on N5, N6, N7, S5

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

Cr-Commit-Position: refs/heads/master@{#10597}
2015-11-11 11:27:05 +00:00
b2d1c5026d SurfaceViewRenderer: Add resource name to log outputs and exceptions
Add resource name to log outputs to distinguish local renderer from remote renderer.

This Cl also adds some thread checks and factors out a small helper function makeBlack().

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

Cr-Commit-Position: refs/heads/master@{#10596}
2015-11-11 11:06:49 +00:00
69a7fd5047 Support VP9 HW video decoding on Android.
Preliminary verification is done for OMX.google.vp9.decoder codec.

R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10586}
2015-11-10 18:25:59 +00:00
83dfad6853 VideoCapturerAndroid: Changed camera freeze check to check that all frames are pending before reporting a client error.
BUG=b/25514149

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

Cr-Commit-Position: refs/heads/master@{#10563}
2015-11-09 15:39:55 +00:00
89ef6cc13e Attempt to open Android camera later if it is already in use.
This change VideoCapturerAndroid to attempt 3 times with a period of 300ms to open the camera if it fails.
This is so that if another application have it already opened, it would have more time to release it.
BUG=b/25190234

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

Cr-Commit-Position: refs/heads/master@{#10559}
2015-11-09 09:35:26 +00:00
1ebf8ba368 SurfaceViewRenderer: Drop old frames instead of new frames
If SurfaceViewRenderer can't keep up with the stream of incoming frames it has to drop frames. Currently, new frames are dropped until the old pending frame is rendered. This CL drops the old pending frame instead.

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

Cr-Commit-Position: refs/heads/master@{#10558}
2015-11-09 08:41:55 +00:00
3bfef44a4d Changed timeout to 6s for reporting android camera freeze.
Also distinguish between camera failures and failures due to that buffers has not been returned.
Adds unit tests for making sure CameraEventHandler.onError is triggered if frames are not returned.

BUG=b/25514149

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

Cr-Commit-Position: refs/heads/master@{#10555}
2015-11-08 14:58:22 +00:00
23725e09c6 Remove ICU usage from jni_helpers.cc.
JNI already has jstring<->UTF8 string conversion, so using that should
save ~1mb off android binaries (ICU is *large*), probably around
300-400k after compression.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#10545}
2015-11-06 21:56:11 +00:00
5a846c086b Make ConnectionType public in order to add java NetworkObserver.
BUG=
R=glaznev@webrtc.org, jiayl@google.com

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

Cr-Commit-Position: refs/heads/master@{#10485}
2015-11-02 19:33:30 +00:00
5c3da4b6e9 Call MediaCodec.stop() on separate thread.
MediaCodec.stop() call may hang in some rear cases. To avoid
application hang this call need to be done on separate thread and
possible error reported back to application.
Application may elect to continue executing and use another codec
instance for encoding/decoding or stop the call and exit.

BUG=b/24339249
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10467}
2015-10-30 22:31:25 +00:00
075fb4bfea MediaCodecVideoEncoder: Add number of quality resolution downscales to Encoded callback.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#10453}
2015-10-29 15:49:21 +00:00
e55c42c13e Remove limitation on the amount of maximum pending HW decoder inputs.
Plus log first few decoder frames in and out events.

BUG=b/25287910

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

Cr-Commit-Position: refs/heads/master@{#10439}
2015-10-28 17:30:38 +00:00
98f53510b2 system_wrappers: rename interface -> include
BUG=webrtc:5095
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10438}
2015-10-28 17:17:50 +00:00
83585c9075 VideoCapturerAndroid: More frequent and verbose logging
BUG=b/24437529

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

Cr-Commit-Position: refs/heads/master@{#10434}
2015-10-28 10:27:30 +00:00
401fb0648a SurfaceTextureHelper: Remove use of quitSafely() because it's API lvl 18
There is no reason to not just quit() in release().

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

Cr-Commit-Position: refs/heads/master@{#10394}
2015-10-24 01:17:59 +00:00
238b15d543 SurfaceViewRenderer: Remove use of quitSafely() because it's API lvl 18
I replaced quitSafely() with a CountDownLatch. The reason for not using ThreadUtils.invokeUninterruptibly() is that I want to stop accepting frames asap, and invokeUninterruptibly() would still accept frames during the waiting time.

BUG=webrtc:4742

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

Cr-Commit-Position: refs/heads/master@{#10393}
2015-10-24 01:14:33 +00:00
c3402fc3ef EGL10.eglCreateWindowSurface(): Replace Surface input with SurfaceHolder
Sending a Surface as input to EGL10.eglCreateWindowSurface() is not supported everywhere. See this code as reference:
ae9610220b/opengl/tools/glgen/stubs/egl/eglCreateWindowSurface.java (42)

Sending a SurfaceHolder as input instead should hopefully be supported everywhere, and this is also what GlSurfaceView does:
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.1.1_r1/android/opengl/GLSurfaceView.java#1076

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

Cr-Commit-Position: refs/heads/master@{#10392}
2015-10-24 01:13:20 +00:00
49e196af40 Remove VideoFrameType aliases for FrameType.
No longer used in Chromium, so these can now be removed.

BUG=webrtc:5042
R=mflodman@webrtc.org
TBR=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10390}
2015-10-23 13:58:27 +00:00
8c425aa8f6 Android: Replace EGL14 with EGL10
The purpose with this change is to support older API levels by replacing EGL14 (API lvl 17) with EGL10 (API lvl 1). The main purpose is to lower API lvl requirement for SurfaceViewRenderer from API lvl 17 to API lvl 15. Also, camera texture capture will work on API lvl < 17 (and texture encode/decode in MediaCodec, but we don't use MediaCodec below API lvl 18?).

GLSurfaceView/VideoRendererGui is already using EGL10.

EGL 1.1 - 1.4 added new functionality, but won't affect performance. We don't need the functionality, so there should be no reason to not use EGL 1.0.

I have profiled AppRTCDemo with Qualcomm Trepn Profiler on a Nexus 5 and Nexus 6 and couldn't see any difference.

Specifically, this CL:
 * Update EglBase to use EGL10 instead of EGL14.
 * Update imports from EGL14 to EGL10 in a lot of files (plus changing import order in some cases).
 * Update VideoCapturerAndroid to always support texture capture.

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

Cr-Commit-Position: refs/heads/master@{#10378}
2015-10-22 23:52:45 +00:00
86b016027d Add stats for average QP per frame for VP8 (for received video streams):
"WebRTC.Video.Decoded.VP8.Qp"

BUG=chromium:512752

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

Cr-Commit-Position: refs/heads/master@{#10349}
2015-10-21 06:55:32 +00:00
30a5b5e9fb passing |buffer| by reference in AndroidVideoCapturer::OnIncomingFrame
BUG=webrtc:5062

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

Cr-Commit-Position: refs/heads/master@{#10342}
2015-10-20 18:05:02 +00:00
c6aec4b8ed Fix HW video codec stack traces reporting.
Print stack traces for active instance only.
Also add Nexus 4 to H.264 encoder blacklist.

R=wzh@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10329}
2015-10-19 23:39:33 +00:00
023f3ef029 Create network change notifier and pass the event to NetworkManager
BUG=

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

Cr-Commit-Position: refs/heads/master@{#10325}
2015-10-19 16:39:38 +00:00
22993e1a0c Unify FrameType and VideoFrameType.
Prevents some heap allocation and frame-type conversion since interfaces
mismatch. Also it's less confusing to have one type for this.

BUG=webrtc:5042
R=magjed@webrtc.org, mflodman@webrtc.org, henrik.lundin@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10320}
2015-10-19 09:39:15 +00:00
9781152e04 Add new Android camera events.
Add events to track when camera is requested to open,
when first camera frame is available and when camera is
closed.

BUG=b/24271359
R=perkj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10306}
2015-10-16 20:10:24 +00:00
12f680214e Revert "Prepare MediaCodecVideoEncoder for surface textures."
This reverts commit 90754174d98d6b71fd4aaed897bd54980f7e59c4.

Revert "Fix use of scaler in MediaCodecVideoEncoder"

This reverts commit ec93628e75fdb81f23635b39b5f3da846bcefd21.

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

BUG=webrtc:4993 b/24984012

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

Cr-Commit-Position: refs/heads/master@{#10300}
2015-10-16 11:31:57 +00:00
543b6ca30a Revert of "Android MediaCodecVideoDecoder: Manage lifetime of texture frames" https://codereview.webrtc.org/1378033003/
The code that depends on the reverted CL is disabled but not removed. NativeHandleImpl is reverted to the previous implementation, and the new implementation is renamed to NativeTextureHandleImpl. Texture capture can not be used anymore, because it will crash in peerconnection_jni.cc.

Reason for revert:
Increased HW decoder latency and crashes related to that. Also suspected cause of video tearing.

Original issue's description:
> This CL should be the last one in a series to finally
> unblock camera texture capture.
>
> The SurfaceTexture.updateTexImage() calls are moved from
> the video renderers into MediaCodecVideoDecoder, and the
> destructor of the texture frames will signal
> MediaCodecVideoDecoder that the frame has returned. This
> CL also removes the SurfaceTexture from the native handle
> and only exposes the texture matrix instead, because only
> the video source should access the SurfaceTexture.
>
> BUG=webrtc:4993
> R=glaznev@webrtc.org, perkj@webrtc.org
>
> Committed: https://crrev.com/91b348c7029d843e06868ed12b728a809c53176c
> Cr-Commit-Position: refs/heads/master@{#10203}

TBR=glaznev
BUG=webrtc:4993

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

Cr-Commit-Position: refs/heads/master@{#10288}
2015-10-15 12:45:13 +00:00
6d387c0e92 Android MediaCodecVideoDecoder: Limit max pending frames to number of input buffers
This CL should reduce the number of timeouts for dequeueInputBuffer() which results in the log "MediaCodecVideo: dequeueInputBuffer error" followed by software fallback for VP8/VP9 and codec restart for H264.

A timeout always happen for dequeueInputBuffer() when frames_received_ > frames_decoded_ + num_input_buffers. The following code tries to drain the decoder before enqueuing more input buffers:
// Try to drain the decoder and wait until output is not too
// much behind the input.
if (frames_received_ > frames_decoded_ + max_pending_frames_) {
  ALOGV("Received: %d. Decoded: %d. Wait for output...",
      frames_received_, frames_decoded_);
  if (!DeliverPendingOutputs(jni, kMediaCodecTimeoutMs,
                             true /* dropFrames */)) {
    ALOGE << "DeliverPendingOutputs error";
    return ProcessHWErrorOnCodecThread();
  }
  if (frames_received_ > frames_decoded_ + max_pending_frames_) {
    ALOGE << "Output buffer dequeue timeout";
    return ProcessHWErrorOnCodecThread();
  }
  ...
}

However, for H264, |max_pending_frames_| can currently be larger than the number of input buffers so that the code above is never executed. This CL limits |max_pending_frames_| to the number of input buffers.

TBR=glaznev
BUG=b/24867188,b/24864151

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

Cr-Commit-Position: refs/heads/master@{#10273}
2015-10-14 11:02:08 +00:00
73f44f6481 VideoCapturerAndroid, only you SurfaceViewHelper when capturing to textures.
SurfaceViewHelper requires EGL14 that was added in API level 17. Since the SurfaceViewHelper is only neeed when we capture to textures, this cl change back to not use it when we are capturing to byte buffers.

Also, thread.quitsafely was added in level 18. Instead a new ThreadUtil method has been added for this.

BUG=b/24782220
TEST = run
ninja -C out/Debug libjingle_peerconnection_android_unittest && CHECKOUT_SOURCE_ROOT=`pwd` build/android/adb_install_apk.py --debug out/Debug/apks/libjingle_peerconnection_android_unittest.apk && ./third_party/android_tools/sdk/platform-tools/adb shell am instrument -w -e class org.webrtc.VideoCapturerAndroidTest org.webrtc.test/android.test.InstrumentationTestRunner on a device running Android 4.1 (I tried Nexus 7, the first version)

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

Cr-Commit-Position: refs/heads/master@{#10265}
2015-10-13 15:15:13 +00:00
ec93628e75 Fix use of scaler in MediaCodecVideoEncoder
This bug fixes an issue introduced in https://codereview.webrtc.org/1396073003/

BUG=webrtc:5067
TEST= set new_bit_rate = 200 in MediaCodecVideoEncoder::SetRatesOnCodecThread and compile and run ApprtDemo
R=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10263}
2015-10-13 12:04:08 +00:00
325d414e8c Add option to print peer connection factory Java stack traces.
Removing static declaration for media codec thread to allow
running multiple HW codec instances.

R=wzh@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10258}
2015-10-12 21:56:09 +00:00
a5b62d987a Replace API v23 calls.
R=jiayl@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10257}
2015-10-12 20:56:29 +00:00
52a30e31f1 Reland of Android: Put common native VideoFrameBuffer implementation in androidvideocapturer_jni (patchset #1 id:1 of https://codereview.webrtc.org/1389283003/ )
Reason for revert:
Nothing wrong with the original CL, the bug was in rtc::Bind(), which is fixed now (https://codereview.webrtc.org/1403683004/).

Original issue's description:
> Revert of Android: Put common native VideoFrameBuffer implementation in androidvideocapturer_jni (patchset #1 id:1 of https://codereview.webrtc.org/1391403004/ )
>
> Reason for revert:
> Crashes on AppRTCDemo disconnect
>
> Original issue's description:
> > Android: Put common native VideoFrameBuffer implementation in native_handle_impl.cc
> >
> > BUG=webrtc:4993
> > R=perkj@webrtc.org
> >
> > Committed: https://crrev.com/60472216da0644b49ed5f9fa51c51d4874afafa7
> > Cr-Commit-Position: refs/heads/master@{#10248}
>
> TBR=perkj@webrtc.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:4993
>
> Committed: https://crrev.com/962c26bfd6c3eb3cf7402daaab89404ae38dd534
> Cr-Commit-Position: refs/heads/master@{#10249}

TBR=perkj@webrtc.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:4993

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

Cr-Commit-Position: refs/heads/master@{#10254}
2015-10-12 13:53:27 +00:00