Commit Graph

34 Commits

Author SHA1 Message Date
ab73d13c4b Remove internal encoders from VCMCodecDatabase.
Encoders need to be externally provided. To use software encoders they
need to be created and registered from the outside.

BUG=webrtc:1695
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10283}
2015-10-15 10:01:48 +00:00
f35072019b VP9: Add automaticeResize to codec setting.
Added unittest.
This setting allows for dynamic resizing at low bitrates.
Setting is off by default for now.

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

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

Cr-Commit-Position: refs/heads/master@{#9976}
2015-09-17 19:16:16 +00:00
91d6edef35 Add RTC_ prefix to (D)CHECKs and related macros.
We must remove dependency on Chromium, i.e. we can't use Chromium's base/logging.h. That means we need to define these macros in WebRTC also when doing Chromium builds. And this causes redefinition.

Alternative solutions:
* Check if we already have defined e.g. CHECK, and don't define them in that case. This makes us depend on include order in Chromium, which is not acceptable.
* Don't allow using the macros in WebRTC headers. Error prone since if someone adds it there by mistake it may compile fine, but later break if a header in added or order is changed in Chromium. That will be confusing and hard to enforce.
* Ensure that headers that are included by an embedder don't include our macros. This would require some heavy refactoring to be maintainable and enforcable.
* Changes in Chromium for this is obviously not an option.

BUG=chromium:468375
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#9964}
2015-09-17 07:24:51 +00:00
f42376c601 Wire up currently-received video codec to stats.
BUG=webrtc:1844, webrtc:4808
R=mflodman@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9810}
2015-08-28 14:35:40 +00:00
a9455ab235 Integration of VP9 packetization.
Supports running 1 spatial and 1-3 temporal layers in non-flexible mode.

BUG=webrtc:4148, webrtc:4168, chromium:500602
TBR=mflodman

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

Cr-Commit-Position: refs/heads/master@{#9665}
2015-07-31 13:10:16 +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
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
e590416722 Moving the pacer and the pacer thread to ChannelGroup.
This means all channels within the same group will share the same pacing queue and scheduler. It also means padding will be computed and sent by a single pacer. To accomplish this I also introduce a PacketRouter which finds the RTP module which owns the packet to be paced out.

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

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

Cr-Commit-Position: refs/heads/master@{#8864}
2015-03-26 10:11:22 +00:00
79064e568e Fix crash on decode found by fuzz tester.
BUG=crbug:468963
R=pbos@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8858}
2015-03-25 14:20:45 +00:00
0b52cebd28 Improve logging and add DCHECKs in codec database.
BUG=
R=mflodman@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8842}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8842 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-24 11:21:18 +00:00
67a9e40286 Prevent encoding frames with wrong resolution.
This is a speculative fix for a crash that should be able to happen if a
codec is reconfigured while a frame is leaving the
VideoProcessingModule, causing a mismatch between configured codec and
input frame size.

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

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

Cr-Commit-Position: refs/heads/master@{#8615}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8615 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-05 13:58:16 +00:00
891d48393e Wire up target_media_bitrate in VideoSendStream.
Also wires up target_enc_bitrate in WebRtcVideoEngine2.

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

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

Cr-Commit-Position: refs/heads/master@{#8515}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8515 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-26 13:16:17 +00:00
d324546ced Misc. cleanup split out of https://webrtc-codereview.appspot.com/37699004/ :
* Move constants into the files/functions that use them
* Declare variables in the narrowest scope possible
* Use correct (expected, actual) order for gtest macros
* Remove unused functions
* Untabify
* 80-column limit
* Avoid C-style casts
* Prefer true typed constants to "enum hack" constants
* Print size_t using the right format macro
* Shorten and simplify code
* Other random cleanup bits and style fixes

BUG=none
TEST=none
R=henrik.lundin@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8467}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8467 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-23 21:29:45 +00:00
026b892e72 Using << on an int8_t or uint8_t will output a character rather than a number.
Places that do this need to cast to int to get the desired behavior.

BUG=none
TEST=none
R=henrik.lundin@webrtc.org, pthatcher@webrtc.org, stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8223}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8223 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-30 19:54:19 +00:00
4591fbd09f Use size_t more consistently for packet/payload lengths.
See design doc at https://docs.google.com/a/chromium.org/document/d/1I6nmE9D_BmCY-IoV6MDPY2V6WYpEI-dg2apWXTfZyUI/edit?usp=sharing for more information.

This CL was reviewed and approved in pieces in the following CLs:
https://webrtc-codereview.appspot.com/24209004/
https://webrtc-codereview.appspot.com/24229004/
https://webrtc-codereview.appspot.com/24259004/
https://webrtc-codereview.appspot.com/25109004/
https://webrtc-codereview.appspot.com/26099004/
https://webrtc-codereview.appspot.com/27069004/
https://webrtc-codereview.appspot.com/27969004/
https://webrtc-codereview.appspot.com/27989004/
https://webrtc-codereview.appspot.com/29009004/
https://webrtc-codereview.appspot.com/30929004/
https://webrtc-codereview.appspot.com/30939004/
https://webrtc-codereview.appspot.com/31999004/
Committing as TBR to the original reviewers.

BUG=chromium:81439
TEST=none
TBR=pthatcher,henrik.lundin,tina.legrand,stefan,tkchin,glaznev,kjellander,perkj,mflodman,henrika,asapersson,niklas.enbom

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7726 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-20 22:28:14 +00:00
5b88317820 Add VP9 codec to VCM and vie_auto_test.
Include VP9 tests in videoprocessor_integrationtests.
Include end-to-end send/receiveVP9 test.

This is the same patch as https://code.google.com/p/webrtc/source/detail?r=7422, which was reverted when rolled into chrome (due to bss size increase). Relanding this again as we now have the clear to get this in:
see https://code.google.com/p/webrtc/issues/detail?id=3932

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7588 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-11-01 06:10:48 +00:00
82462aade0 Adds support for sending first set of packets at increasingly higher bitrates to probe the link and faster ramp up to a high bitrate.
Also wires up a finch experiment to control this.

R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7505 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-23 11:57:05 +00:00
b1dac33cac Revert cls (original cl + fixes) 7422-7424 "Add VP9 codec to VCM..."
BUG=3932
R=marpan@google.com

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7470 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-17 18:54:46 +00:00
573c78e31c Add VP9 codec to VCM and vie_auto_test.
Include VP9 tests in videoprocessor_integrationtests.
Include end-to-end send/receiveVP9 test.
Passes trybots.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7422 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-10-10 16:44:47 +00:00
6cd6ba8ae0 Expose VP8/H264 defaults through video_encoder.h.
Reduces code duplication quite a bit, these identical defaults were set
in quite a few different places.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7220 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-18 12:42:28 +00:00
7832648824 Add missing break introduced in r6603.
R=pbos@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6607 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-07-04 17:04:00 +00:00
b9f5453e29 Add boilerplate code for H.264.
R=mflodman@webrtc.org, niklas.enbom@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6603 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-07-04 12:42:07 +00:00
c0a15b7ddc Fix crashes due to dangling external decoder pointer.
When checking whether we need to release external decoder,
we have to do pointer comparison. We can't rely on payload
types, because payload types can be stale (e.g. before we
decode the first video frame after RegisterReceiveCodec).
This leaves a dangling pointer to external decoder, which
leads to crashes later, after we actually delete the
external decoder object.
This change has been verified in Chromecast code tree.

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

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

Patch from Sergey Volk <servolk@chromium.org>.

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5922 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-17 01:22:48 +00:00
34c5da6b5e Cleaned up logging in video_coding.
Converted all calls to WEBRTC_TRACE to LOG(). Also removed a large number of less useful logs.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5887 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-11 14:08:35 +00:00
a0d11da359 Remove upper check for number of cores in VCM, I didn't find any good reasons for checking this.
BUG=2990
TEST=Manually adding a high number without any noticable change.
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5645 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-03-05 15:18:45 +00:00
39fcfd78ae Remove empty VideoCodecGeneric struct.
Struct was added prematurely and triggers a warning with
-Wextern-c-compat in latest clang.

R=henrika@webrtc.org
BUG=

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5383 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-01-14 12:55:59 +00:00
b2c28c3699 Relanding 4597 - Don't force key frame when decoding with errors.
Makes sure that incomplete key frame or delta frames will be released from the JB when decoding with errors.
The decoder in turn will trigger a PLI until a complete key frame is received in order to start a session.

TBR=stefan@webrtc.org

BUG=

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4607 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-23 21:54:50 +00:00
ceea41d135 Revert 4597 "Don't force key frame when decoding with errors"
> Don't force key frame when decoding with errors
> 
> BUG=2241
> R=stefan@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/2036004

TBR=mikhal@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4600 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-23 00:53:24 +00:00
44af55cc44 Don't force key frame when decoding with errors
BUG=2241
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4597 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-22 23:29:43 +00:00
0d94c2f81c Avoid acquiring VCM::_receiveCritSect during decode callback.
When VideoDecoder::Decode, Reset, or Release is called,
VideoCodingModuleImpl::_receiveCritSect may have been
acquired. Decode callback needs to acquire the same lock
in ViEChannel::FrameToRender. It is not a problem for
SW decode because decode callback is run on the same
WebRTC decoding thread and the lock is re-entrant. But
for HW decode, decode callback is run on a thread different
from WebRTC decoding thread. Decode callback gets the locks
in the opposite order. Deadlock can happen.

BUG=http://crbug.com/170345
TEST=Try apprtc.appspot.com/?debug=loopback on ARM Chromebook Daisy.
     Run libjingle_peerconnection_unittest.

R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4523 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-12 14:20:49 +00:00
b9bb3d1e7d Avoid resetting encoder on identical settings.
BUG=1681
R=holmer@google.com, stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4049 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-16 18:40:48 +00:00
3d305c64b4 Updates to send side streaming mode:
1. Disabling frame-droppers from the vie encoder and not the channel.
2. Accounting for qpMax in the VP8 wrapper.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3492 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-02-10 18:42:55 +00:00
e07c661a29 VP8: Making key frame interval a tunnable parameter
Review URL: https://webrtc-codereview.appspot.com/1070006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3444 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-31 16:37:13 +00:00
14b43beb7c Move src/ -> webrtc/
TBR=niklas.enbom@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2963 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-10-22 18:19:23 +00:00