Commit Graph

457 Commits

Author SHA1 Message Date
6e89b25143 VP9 wrapper: Adjust speed setting.
Use lower speed setting for smaller resolutions.

R=stefan@webrtc.org
TBR=stefan@webrtc.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#9549}
2015-07-07 21:40:51 +00:00
a7d70546ad Remove VCM_*_PAYLOAD_TYPE constants.
These payload types aren't directly connected to any payload type, and
the payload type still has to be negotiated externally. As such these
constants are just a source of confusion.

BUG=
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9546}
2015-07-07 14:35:54 +00:00
d830aeafe9 Add tkchin to video_coding OWNERS.
BUG=
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9528}
2015-07-01 23:01:56 +00:00
71f6f4405c iOS HW H264 support.
First step towards supporting H264 on iOS. More tuning/experimentation
required in future CLs. Tested using AppRTCDemo on iPhone6 + iPad Mini.
Future work to get it working on OS/X, simulator (renders black screen
currently) and with the Android AppRTCDemo. Currently protected with a
compile time guard.

BUG=4081
R=andrew@webrtc.org, haysc@webrtc.org, holmer@google.com, jiayl@webrtc.org, kjellander@webrtc.org, pbos@webrtc.org, phoglund@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9515}
2015-06-29 21:35:08 +00:00
2c4c914819 In screenshare mode, suppress VP8 bitrate overshoot and increase quality
This change includes several improvements:

* VP8 configured with new rate control
* Detection of frame dropping, with qp bump for next frame
* Increased target and TL0 bitrates
* Reworked rate control (TL allocation) in screenshare_layers

A note on performance: PSNR and SSIM is expected to get slightly worse with this cl. Frame drops and delays should however improve.

BUG=4171
R=pbos@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9495}
2015-06-24 09:24:50 +00:00
6a688f5265 Add default downscale threshold to QualityScaler.
Prevents downscaling below 160x90 or 90x160 to gain more quality.

BUG=4625
R=mflodman@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9480}
2015-06-22 06:03:07 +00:00
d4cec15c75 Resolved Rebase Conflicts
This is just https://webrtc-codereview.appspot.com/53629004/

Remove a constructor of VCMJitterBuffer.

Remove unnecessary factory use

Comment Fix

Move frame incoming simulation to the clock

DCHECK typo fix

Coding Style Fix

Rephrased some comments, and removed some virtual for override function.

Coding Style Fix

Coding Style Fix

Add a unittest for VCMReceiver::FrameForDecoding. Mainly test the time control algorithm.

BUG=

TBR=holmer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#9470}
2015-06-19 16:17:10 +00:00
728d9037c0 Reformat existing code. There should be no functional effects.
This includes changes like:
* Attempt to break lines at better positions
* Use "override" in more places, don't use "virtual" with it
* Use {} where the body is more than one line
* Make declaration and definition arg names match
* Eliminate unused code
* EXPECT_EQ(expected, actual) (but use (actual, expected) for e.g. _GT)
* Correct #include order
* Use anonymous namespaces in preference to "static" for file-scoping
* Eliminate unnecessary casts
* Update reference code in comments of ARM assembly sources to match actual current C code
* Fix indenting to be more style-guide compliant
* Use arraysize() in more places
* Use bool instead of int for "boolean" values (0/1)
* Shorten and simplify code
* Spaces around operators
* 80 column limit
* Use const more consistently
* Space goes after '*' in type name, not before
* Remove unnecessary return values
* Use "(var == const)", not "(const == var)"
* Spelling
* Prefer true, typed constants to "enum hack" constants
* Avoid "virtual" on non-overridden functions
* ASSERT(x == y) -> ASSERT_EQ(y, x)

BUG=none
R=andrew@webrtc.org, asapersson@webrtc.org, henrika@webrtc.org, juberti@webrtc.org, kjellander@webrtc.org, kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9420}
2015-06-11 21:31:48 +00:00
66a641a9c6 Update encoder settings periodically, not only on new bandwidth estimate
Also moved actual update call to encoder thread, and tweaked frame rate
estimate to be less noisy.

This is a re-upload of https://review.webrtc.org/47249004

BUG=chromium:476469
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9417}
2015-06-11 12:20:17 +00:00
a2c79405b4 Ensures that modules_unittests runs on iOS
BUG=4752
R=tkchin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#9408}
2015-06-10 11:24:58 +00:00
1b9add9df9 Prevent bitrate overshoot for HD layer in VP8.
BUG=chromium:487648
R=mflodman@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/55469004

Cr-Commit-Position: refs/heads/master@{#9394}
2015-06-08 20:52:42 +00:00
55b6acbdc5 Miscellaneous cleanups.
stream_generator.h doesn't use anything from <string.h>. Replace
<string.h> with <stdint.h> for the intXXX_t typedefs.

Rename packet_buffer to packet_buffer_ to conform to the naming
convention of data members.

R=marpan@google.com, marpan@webrtc.org, phoglund@webrtc.org

BUG=none
TEST=none

Review URL: https://webrtc-codereview.appspot.com/51949004

Cr-Commit-Position: refs/heads/master@{#9387}
2015-06-05 22:02:41 +00:00
349c2bb223 Remove the timestamp_ member of StreamGenerator.
timestamp_ is only used in GenerateFrame() and its old value is
discarded. So it just needs to be a local variable in GenerateFrame().
As a result, we can remove the start_timestamp parameter from the
constructor and Init().

Also mark the GeneratePacket() method private because it is only used
internally.

R=stefan@webrtc.org
BUG=none
TEST=none

Review URL: https://webrtc-codereview.appspot.com/50149004

Cr-Commit-Position: refs/heads/master@{#9386}
2015-06-05 21:45:13 +00:00
f291287a7e Change "hybrid mode" to "|kNack| mode" in comments.
R=stefan@webrtc.org
BUG=none
TEST=none

Review URL: https://webrtc-codereview.appspot.com/56549004

Cr-Commit-Position: refs/heads/master@{#9385}
2015-06-05 20:16:57 +00:00
eb66e800d1 Re-land "Convert native handles to buffers before encoding."
This reverts commit a67675506c9057bd9ffd4d76aae8b743343d434d.

BUG=webrtc:4081
TBR=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9381}
2015-06-05 09:08:12 +00:00
b1825a4038 Change JitterBuffer::GetNackList to return a std::vector<uint16_t>.
This fixed the problem with returning a pointer to an internal buffer
of a JitterBuffer.

R=stefan@webrtc.org
BUG=none
TEST=none

Review URL: https://webrtc-codereview.appspot.com/53639004

Cr-Commit-Position: refs/heads/master@{#9365}
2015-06-03 22:03:46 +00:00
b4c5eaa0d6 Fix a time control bug, that the VCMReceiver::FrameForDecoding may over sleep.
Remark: a unit test to verify VCMReiceiver::FrameForDecoding will be in a separate CL.

BUG=4726
R=stefan@webrtc.org, wtc@chromium.org

Review URL: https://webrtc-codereview.appspot.com/53619004

Cr-Commit-Position: refs/heads/master@{#9362}
2015-06-03 16:34:31 +00:00
308d163c71 Revert "Convert native handles to buffers before encoding."
This reverts commit a831dc3a7d10a1fbaa258ee6b1ca6cfc7e91c5ca to unblock
rolling into Chromium.

BUG=4081
TBR=magjed@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/55549004

Cr-Commit-Position: refs/heads/master@{#9354}
2015-06-02 13:04:31 +00:00
a831dc3a7d Convert native handles to buffers before encoding.
Required to permit conversion of NV12 handles on iOS to I420 for VP8
software encoding, which blocks texture-based capture. This change
enforces that all texture-based input provides a method for converting
native handles to I420 if they are ever used with software encoders that
do not understand the native handles.

BUG=4081
R=emircan@chromium.org, glaznev@webrtc.org, hbos@webrtc.org, magjed@webrtc.org, mflodman@webrtc.org, stefan@webrtc.org, tkchin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/50909005

Cr-Commit-Position: refs/heads/master@{#9347}
2015-06-01 18:06:52 +00:00
4765070b8d Rename I420VideoFrame to VideoFrame.
This is a mechanical change since it affects so many
files.
I420VideoFrame -> VideoFrame
and reformatted.

Rationale: in the next CL I420VideoFrame will
get an indication of Pixel Format (I420 for
starters) and of storage type: usually
UNOWNED, could be SHMEM, and in the near
future will be possibly TEXTURE. See
https://codereview.chromium.org/1154153003
for the change that happened in Cr.

BUG=4730, chromium:440843
R=jiayl@webrtc.org, niklas.enbom@webrtc.org, pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/52629004

Cr-Commit-Position: refs/heads/master@{#9339}
2015-05-30 00:21:56 +00:00
603175a395 Improve comments.
Use the current parameter names in the comment for SetNackMode().

Add a warning comment about the lifetime of the return value of
GetNackList().

R=stefan@webrtc.org
BUG=none
TEST=none

Review URL: https://webrtc-codereview.appspot.com/52599004

Cr-Commit-Position: refs/heads/master@{#9321}
2015-05-28 21:10:20 +00:00
45b229cc89 Remove an unnecessary webrtc:: namespace prefix.
R=stefan@webrtc.org, niklas.enbom@webrtc.org
BUG=none
TEST=none

Review URL: https://webrtc-codereview.appspot.com/50129004

Cr-Commit-Position: refs/heads/master@{#9319}
2015-05-28 20:45:37 +00:00
92d9489881 Miscellaneous cleanups in VCMReceiver and its unit tests.
The most important change is to prevent a potential buffer overflow in
NackList(). It cannot happen if the |size| argument passed to NackList()
is consistent with the |max_nack_list_size| argument passed to
SetNackSettings(), and there is an assertion to check that. But it is
good to defend against this in the release build because assert() is
compiled away in the release build.

Remove the unused |master| parameter to the VCMReceiver constructor.

Remove the unused State() getter method and the corresponding state_
member.

Remove the declarations for the nonexistent GenerateReceiverId()
method and the receiver_id_counter_ member.

Remove the unneeded data_buffer_ member of TestVCMReceiver. It was
assigned to packet.dataPtr and then immediately overwritten by
stream_generator_->GetPacket() or stream_generator_->PopPacket().

R=stefan@webrtc.org
BUG=none
TEST=none

Review URL: https://webrtc-codereview.appspot.com/51119004

Cr-Commit-Position: refs/heads/master@{#9318}
2015-05-28 20:36:22 +00:00
6a1ba8c17f Fix coding style nits.
uint32_t parameters don't need to be passed by reference. The
VCMJitterBuffer destructor doesn't need to be virtual because the
class has no virtual methods.

R=stefan@webrtc.org
BUG=none

Review URL: https://webrtc-codereview.appspot.com/55499004

Cr-Commit-Position: refs/heads/master@{#9288}
2015-05-26 21:11:46 +00:00
e87d48719f Fix ARM64 detection for VP8 and VP9 wrappers.
BUG=4702
R=marpan@google.com, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/57459004

Cr-Commit-Position: refs/heads/master@{#9287}
2015-05-26 20:10:38 +00:00
57e5fd2e60 PRESUBMIT: Improve PyLint check and add GN format check.
Add pylintrc file based on
https://code.google.com/p/chromium/codesearch#chromium/src/tools/perf/pylintrc
bit tightened up quite a bit (the one in depot_tools is far
more relaxed).

Remove a few excluded directories from pylint check and fixed/
suppressed all warnings generated.

Add GN format check + formatted all GN files using 'gn format'.
Cleanup redundant rules in tools/PRESUBMIT.py

TESTED=Ran 'git cl presubmit -vv', fixed the PyLint violations.
Ran it again with a modification in webrtc/build/webrtc.gni, formatted
all the GN files and ran it again.

R=henrika@webrtc.org, phoglund@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/50069004

Cr-Commit-Position: refs/heads/master@{#9274}
2015-05-25 10:55:50 +00:00
67b635a47e Fix simulcast_encoder_adapter giving full target_bitrate to the 2nd layer of any simulcast setup during InitEncode.
BUG=
R=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/51069004

Cr-Commit-Position: refs/heads/master@{#9265}
2015-05-22 21:12:15 +00:00
e4cb4e9aae Fix jitter buffer bug around out-of-order packets and non-RTX padding.
tl;dr - non-continuous frames (due to padding) would get stuck as incomplete if the previous complete frame arrived and was decoded before the padding arrived.This fix re-checks the incomplete frame list for continuous frames after old packets arrive.

When padding is enabled and RTX is not, padding is sent as empty RTP packets tacked onto the end of completed frames (meaning: same timestamp, but after a packet with the marker bit set). Given the following set of circumstances, codified in the new unit test method, a frame can get permanently stuck in the incomplete frames list:

- Frame A decoded (packets 94-95). Next expected sequence number is 96.
- Frame C arrives (packets 100-101) and is marked complete. It isn't continuous, since it starts at 100, so it's placed in the incomplete frame list.
- Frame B arrives (packets 96-97) and is complete, since 97 has a marker bit.  Turns out that packets 98-99 are padding, but the receiver doesn't know that.
- Frame B is decoded, removed from the decodable frames list, and last decoded state is updated.
- Packets 98-99 arrive. They hit the IsOldPacket check and update the last decoded state, but they don't trigger FindAndInsertContinuousFrames.
- Further packets/frames arrive and complete, but FindAndInsertContinuousFrames only runs on frames that are newer than the newly completed frame.

In this state, Frame C is permanently stuck as incomplete, so the jitter buffer overall is stuck until max NACK age (default: 450 packets), the max NACK list size (default: 200 packets), or a keyframe arrives and IsContinuous returns true for the keyframe.

(Before the November refactoring, Frame B wouldn't have to have been decoded for the bug to trigger; just having a complete continuous frame at any time before the padding arrived would cause this state, as FindAndInsertContinuousFrames was only called when the frame originally became continuous and was inserted into the decodable frames list. Post refactoring, the frame is removed/re-added to the decodable list on every padding packet that arrives)

BUG=
R=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/50959004

Cr-Commit-Position: refs/heads/master@{#9264}
2015-05-22 21:03:08 +00:00
5af6d47d26 Code style change for quality_scaler.
TBR=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/52559004

Cr-Commit-Position: refs/heads/master@{#9257}
2015-05-21 21:11:14 +00:00
98d8cf58ee Hardware VP8 encoding: Use QP as metric for resize.
Add vp8 frame header parser to get QP from vp8 bitstream.

BUG= 4273
R=glaznev@webrtc.org, marpan@google.com, pbos@webrtc.org
TBR=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/49259004

Cr-Commit-Position: refs/heads/master@{#9256}
2015-05-21 18:11:53 +00:00
b302ad4eab Remove unused VideoDecoder methods.
Removing VideoDecoder::Copy() and
VideoDecoder::SetCodecConfigParameters().

Also adding override to VP8DecoderImpl.

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

Review URL: https://webrtc-codereview.appspot.com/55409004

Cr-Commit-Position: refs/heads/master@{#9244}
2015-05-21 07:42:14 +00:00
ca667dbfdd Remove VCM debug recordings.
BUG=1695
R=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/46299004

Cr-Commit-Position: refs/heads/master@{#9233}
2015-05-20 11:47:26 +00:00
7252a2ba80 Add HW fallback option to software decoding.
Permits falling back to software decoding for unsupported resolutions in
bitstreams.

BUG=4625, chromium:487934
R=mflodman@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/46269004

Cr-Commit-Position: refs/heads/master@{#9209}
2015-05-18 17:41:50 +00:00
df664536af Remove FPS->kilo-FPS conversion in VideoSender.
Wat.

Also moving the parameter to make sure this doesn't happen as easily
(right now it was part of a bitrate conversion from kilobits to bits).

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

Review URL: https://webrtc-codereview.appspot.com/51819004

Cr-Commit-Position: refs/heads/master@{#9177}
2015-05-12 10:22:07 +00:00
9695d8523b Added VP9FrameBufferPool, a memory pool that is shared between libvpx and webrtc. Using the VP9 codec, the libvpx decoder will obtain its buffers from our memory pool. This lets us reuse the same buffers for our I420VideoFrames and not have to copy a frame for every decode (from libvpx buffers to webrtc/I420VideoFrame buffers).
(This is similar to chromium's MemoryPool in vpx_video_decoder.cc.)

BUG=1128
R=kjellander@webrtc.org, magjed@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/48149004

Cr-Commit-Position: refs/heads/master@{#9141}
2015-05-06 08:42:22 +00:00
ab00404571 VCMEncodedFrame::VerifyAndAllocate: Use size_t instead of uint32_t for size argument
BUG=484432
R=tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/53379004

Cr-Commit-Position: refs/heads/master@{#9135}
2015-05-05 09:37:17 +00:00
143cec1cc6 Set correct encoder-specific settings for vpx in the new API.
Also, make VideoEncoderConfig::ContentType an enum class.

BUG=4569
R=mflodman@webrtc.org, pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/46069004

Cr-Commit-Position: refs/heads/master@{#9093}
2015-04-28 08:01:14 +00:00
a96f02b6f3 Make sure histograms in jitter buffer are only updated if running.
BUG=
R=pbos@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/46089004

Cr-Commit-Position: refs/heads/master@{#9076}
2015-04-24 06:51:52 +00:00
9728241e6a Record H264 NALU type in the h264 header.
BUG=
R=niklas.enbom@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/48999004

Cr-Commit-Position: refs/heads/master@{#9072}
2015-04-23 18:14:46 +00:00
61b4d518af Dynamic resolution change for VP8 HW encode.
Off by default for now.

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

Review URL: https://webrtc-codereview.appspot.com/45849004

Cr-Commit-Position: refs/heads/master@{#9045}
2015-04-21 22:29:53 +00:00
5464a6e548 Remove VideoCodingModule::InitializeReceiver.
This code is no longer used to reset, so we can just initialize the
object in the constructor.

BUG=4391
R=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/43249004

Cr-Commit-Position: refs/heads/master@{#9044}
2015-04-21 14:35:34 +00:00
9dbbcfbcb5 Remove VideoCodingModule::InitializeSender.
This code is no longer used to reset, so we can just initialize the
object in the constructor.

BUG=4391
R=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/51619005

Cr-Commit-Position: refs/heads/master@{#9043}
2015-04-21 13:54:56 +00:00
41ee1ea4fa Modified the simulcast encoder adapter to correctly handle encoded frames from sub encoders even if the encoder is unable to (temporarily or permanently) produce frames of the exactly matching resolution. This is done by using a different EncodedImageCallback for each encoder, which remembers which VideoEncoder it is registered to and forwards that on to SimulcastEncoderAdapter::Encoded.
BUG=
R=pbos@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/45949004

Cr-Commit-Position: refs/heads/master@{#9011}
2015-04-15 16:24:16 +00:00
fcf54bdabb Reland "Avoid critsect for protection- and qm setting callbacks in
VideoSender."

The original Cl is uploaded as patch set 1, the fix in ps#2 and I'll rebase in ps#3.

BUG=4534
R=pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/46769004

Cr-Commit-Position: refs/heads/master@{#9000}
2015-04-14 19:28:03 +00:00
3949e8666e Prevent decoder busy loop for send-only channels.
ViEChannels without default encoders doesn't register a receive codec by
default. This makes VideoReceiver::Decode return early, causing a
high-priority thread to effectively be busy looping. This would be
expected to wreck more havoc in a more cross-platform manner than it has
visibly done. On Windows XP however it manages to bring the whole
machine to a grinding halt forcing a reboot if CPU usage hits 100%.

BUG=chromium:470013
R=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/48049004

Cr-Commit-Position: refs/heads/master@{#8976}
2015-04-10 13:36:32 +00:00
9bfe3daf73 Cleanup: Remove i420_video_frame.h header.
It is just a pass through to webrtc/video_frame.h. Updated the callers
to include webrtc/video_frame.h instead and removed i420_video_frame.h.

This should fix pbos' TODO in i420_video_frame.h.

Tested on Linux with the following command lines:

$ rm -rf out/
$ ./webrtc/build/gyp_webrtc
$ ninja -C out/Debug

BUG=None
TEST=see above
R=magjed@webrtc.org, pbos@webrtc.org, tommi@webrtc.org
TBR=tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/46819004

Patch from Thiago Farina <tfarina@chromium.org>.

Cr-Commit-Position: refs/heads/master@{#8973}
2015-04-10 10:52:15 +00:00
3a93986fd5 Exit after printing usage message.
We should not continue the program if the user asked for help.

Tested on Linux with the following command line:

$ out/Debug/frame_analyzer --help

BUG=None
TEST=see above
R=kjellander@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/44069004

Patch from Thiago Farina <tfarina@chromium.org>.

Cr-Commit-Position: refs/heads/master@{#8961}
2015-04-09 13:45:17 +00:00
2c37078e40 Fix crash with CVO turned on for VP9 codec
CopyCodecSpecific nulls out the rtpheader pointer hence causing the crash downstream.

More details about the codec type enums:
There are 2 enums defined. webrtc::VideoCodecType webrtc::RtpCodecTypes and they don't match. Inside CopyCodecSpecific in generic_encoder.cc, it was converted from the first to the 2nd type. At that point, it'll be kRtpVideoNone (as the effect of memset to 0). kRtpVideoNone is a bad value as it could cause assert. Later, it'll be reset to kRtpVideoGeneric in RTPSender::SendOutgoingData so it's not a concern.

BUG=4511
R=pbos@webrtc.org, pthatcher@webrtc.org, stefan@webrtc.org

Committed: https://crrev.com/29b1a1c0c7c6f4b1ae4d63844b1dfaa7a72530a0
Cr-Commit-Position: refs/heads/master@{#8951}

Review URL: https://webrtc-codereview.appspot.com/47999004

Cr-Commit-Position: refs/heads/master@{#8955}
2015-04-08 20:00:15 +00:00
1064679bba Revert "Fix crash with CVO turned on for VP9 codec"
This reverts commit 29b1a1c0c7c6f4b1ae4d63844b1dfaa7a72530a0.

TBR=guoweis@webrtc.org
BUG=

Review URL: https://webrtc-codereview.appspot.com/48929004

Cr-Commit-Position: refs/heads/master@{#8952}
2015-04-08 17:05:38 +00:00
29b1a1c0c7 Fix crash with CVO turned on for VP9 codec
CopyCodecSpecific nulls out the rtpheader pointer hence causing the crash downstream.

More details about the codec type enums:
There are 2 enums defined. webrtc::VideoCodecType webrtc::RtpCodecTypes and they don't match. Inside CopyCodecSpecific in generic_encoder.cc, it was converted from the first to the 2nd type. At that point, it'll be kRtpVideoNone (as the effect of memset to 0). kRtpVideoNone is a bad value as it could cause assert. Later, it'll be reset to kRtpVideoGeneric in RTPSender::SendOutgoingData so it's not a concern.

BUG=4511
R=pbos@webrtc.org, pthatcher@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/47999004

Cr-Commit-Position: refs/heads/master@{#8951}
2015-04-08 16:58:32 +00:00