145 Commits

Author SHA1 Message Date
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
sakal
d5e9237b30 Release camera statistics after switching camera on CameraCapturer.
BUG=webrtc:6397
TBR=magjed@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2353263002
Cr-Commit-Position: refs/heads/master@{#14323}
2016-09-21 10:15:53 +00:00
sakal
3442579fd7 Session based capturing for Camera1Capturer.
BUG=webrtc:6148

Review-Url: https://codereview.webrtc.org/2187293002
Cr-Commit-Position: refs/heads/master@{#14318}
2016-09-21 08:35:01 +00:00
sakal
be22d51307 Enable auto-focus on Camera2.
BUG=webrtc:6357

Review-Url: https://codereview.webrtc.org/2347823002
Cr-Commit-Position: refs/heads/master@{#14288}
2016-09-19 13:01:59 +00:00
sakal
dd0c7f0ea4 Events refactor in Android session based capturing.
In the new implementation session reports all events through
CameraSession.Events interface. CameraCapturer passes these events
forward.

BUG=webrtc:6325

Review-Url: https://codereview.webrtc.org/2331343010
Cr-Commit-Position: refs/heads/master@{#14286}
2016-09-19 11:37:22 +00:00
sakal
227c3c125e Enable stabilization on Camera2.
BUG=webrtc:6357

Review-Url: https://codereview.webrtc.org/2345213002
Cr-Commit-Position: refs/heads/master@{#14285}
2016-09-19 10:08:21 +00:00
sakal
71b8393b6a Remove name parameter from HistogramAdd function.
This name is only used for a DCHECK. Having it as a parameter leads to unnecessary string copying even on release builds.

This CL instead adds a GetHistogramName function that is only called on debug builds.

Checking if pointer is null is also moved outside HistogramAdd function. Having it there is confusing since Chromium implementation doesn't have it there.

BUG=webrtc:6329

Review-Url: https://codereview.webrtc.org/2337883003
Cr-Commit-Position: refs/heads/master@{#14263}
2016-09-16 13:56:20 +00:00
sakal
232c56ba9a Add logging available fps ranges to Camera2Session.
R=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2340283002
Cr-Commit-Position: refs/heads/master@{#14242}
2016-09-15 19:31:21 +00:00
Magnus Jedvert
4ed5b9f62d Android SurfaceViewRenderer: Create EGL context on render thread
This CL avoids eglMakeCurrent failing on some problematic Marvel based
Jelly Bean devices.

BUG=webrtc:6350
R=perkj@webrtc.org, sakal@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#14234}
2016-09-15 13:30:29 +00:00
nisse
cbae0b475c Use I420Buffer rather than VideoFrameBuffer when writing pixels.
Prepares for deleting VideoFrameBuffer::MutableDataY{,U,V}. Android
changes extracted from cl https://codereview.webrtc.org/2278883002/.

BUG=webrtc:5921

Review-Url: https://codereview.webrtc.org/2331383005
Cr-Commit-Position: refs/heads/master@{#14213}
2016-09-14 12:45:31 +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
magjed
b471d1cffb Android EglBase: Include EGL error code in exceptions
This CL appends the EGL error code in exceptions after an EGL function
fails. This information is helpful when debugging.

BUG=webrtc:6350

Review-Url: https://codereview.webrtc.org/2338033002
Cr-Commit-Position: refs/heads/master@{#14208}
2016-09-14 09:40:58 +00:00
sakal
b3f7876a95 Add printStackTrace method to CameraCapturer.
The method can be used to print the stack trace of the camera thread in
error conditions.

BUG=webrtc:6148

Review-Url: https://codereview.webrtc.org/2332693002
Cr-Commit-Position: refs/heads/master@{#14187}
2016-09-12 14:35:21 +00:00
sakal
1a0533dc3d Add statistics for the time it takes to start and stop the camera on Camera2.
BUG=webrtc:6302

Review-Url: https://codereview.webrtc.org/2326483003
Cr-Commit-Position: refs/heads/master@{#14180}
2016-09-12 08:05:28 +00:00
honghaiz
5df5434cef Fix a type mistake
long in c++ is 32 bits. We need 64 bits here.

Review-Url: https://codereview.webrtc.org/2326253002
Cr-Commit-Position: refs/heads/master@{#14176}
2016-09-10 22:48:00 +00:00