Commit Graph

64 Commits

Author SHA1 Message Date
6449990387 Update scalability structure data according to updates in the RTP payload profile.
https://tools.ietf.org/id/draft-ietf-payload-vp9-01.txt

BUG=chromium:500602
TBR=mflodman

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

Cr-Commit-Position: refs/heads/master@{#10445}
2015-10-29 10:35:16 +00:00
1b40a9a8af RefCountInterface: Make AddRef() and Release() const
This CL makes AddRef() and Release() const member methods and the refcount integer mutable. This is reasonable, because they only manage the lifetime of the object, and this is also how it's done in Chromium.

The purpose is to be able to capture a const pointer in a scoped_refptr, which is currenty impossible. The practial problem this CL solves is this:

void Foo::Bar() const {}

rtc::Callback0<void> Foo::MakeClosure() const {
  return rtc::Bind(&Foo::Bar, this);
}

We currently capture |this| as const Foo*. With this CL, |this| will be captured as scoped_refptr<const Foo>.

A test is also added in bind_unittest to check this behaviour.

BUG=webrtc:5065
R=perkj@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#10253}
2015-10-12 13:50:50 +00:00
3c089d751e Add RTC_ prefix to contructormagic 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.

* DISALLOW_ASSIGN -> RTC_DISALLOW_ASSIGN
* DISALLOW_COPY_AND_ASSIGN -> RTC_DISALLOW_COPY_AND_ASSIGN
* DISALLOW_IMPLICIT_CONSTRUCTORS -> RTC_DISALLOW_IMPLICIT_CONSTRUCTORS

Related CL: https://codereview.webrtc.org/1335923002/

BUG=chromium:468375
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#9953}
2015-09-16 12:37:52 +00:00
c3aa12d5f2 Add utility class for unwrapping 16 bit sequence numbers
Unwrap uint16_t to int64_t, based on delta and last sequence number.
This can make application logic, putting packets in maps etc, much
simpler.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#9887}
2015-09-08 10:43:22 +00:00
7f6a6fc0b2 Enabling spatial layers in VP9Impl. Filter layers in the loopback test.
Handling the case when encoder drops only the higher layer.
Added options to screenshare loopback test to discard high temporal or spatial layers (to view the lower layers).

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

Cr-Commit-Position: refs/heads/master@{#9883}
2015-09-08 09:40:36 +00:00
dce40cf804 Update a ton of audio code to use size_t more correctly and in general reduce
use of int16_t/uint16_t.

This is the upshot of a recommendation by henrik.lundin and kwiberg on an original small change ( https://webrtc-codereview.appspot.com/42569004/#ps1 ) to stop using int16_t just because values could fit in it, and is similar in nature to a previous "mass change to use size_t more" ( https://webrtc-codereview.appspot.com/23129004/ ) which also needed to be split up for review but to land all at once, since, like adding "const", such changes tend to cause a lot of transitive effects.

This was be reviewed and approved in pieces:
https://codereview.webrtc.org/1224093003
https://codereview.webrtc.org/1224123002
https://codereview.webrtc.org/1224163002
https://codereview.webrtc.org/1225133003
https://codereview.webrtc.org/1225173002
https://codereview.webrtc.org/1227163003
https://codereview.webrtc.org/1227203003
https://codereview.webrtc.org/1227213002
https://codereview.webrtc.org/1227893002
https://codereview.webrtc.org/1228793004
https://codereview.webrtc.org/1228803003
https://codereview.webrtc.org/1228823002
https://codereview.webrtc.org/1228823003
https://codereview.webrtc.org/1228843002
https://codereview.webrtc.org/1230693002
https://codereview.webrtc.org/1231713002

The change is being landed as TBR to all the folks who reviewed the above.

BUG=chromium:81439
TEST=none
R=andrew@webrtc.org, pbos@webrtc.org
TBR=aluebs, andrew, asapersson, henrika, hlundin, jan.skoglund, kwiberg, minyue, pbos, pthatcher

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

Cr-Commit-Position: refs/heads/master@{#9768}
2015-08-24 21:52:45 +00:00
2328a94ec7 Add average rtt to CallStatsObserver and an average rtt histogram.
TBR=mflodman@webrtc.org

BUG=webrtc:4711,webrtc:4548

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

Cr-Commit-Position: refs/heads/master@{#9687}
2015-08-07 11:27:56 +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
f38ea3caa3 Add support for VP9 packetization/depacketization.
RTP payload format for VP9:
https://www.ietf.org/id/draft-uberti-payload-vp9-01.txt

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

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

Cr-Commit-Position: refs/heads/master@{#9649}
2015-07-28 11:02:58 +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
f045e4da43 Prepare to convert various types to size_t.
This makes some behaviorally-invariant changes to make certain code that
currently only works correctly with signed types work safely regardless of the
signedness of the types in question.  This is preparation for a future change
that will convert a variety of types to size_t.

There are also some formatting changes (e.g. converting "enum hack" usage to real consts) to make it simpler to just change "int" to "size_t" in the future to change the types of those constants.

BUG=none
R=andrew@webrtc.org, juberti@webrtc.org, kwiberg@webrtc.org
TBR=ajm

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

Cr-Commit-Position: refs/heads/master@{#9413}
2015-06-11 04:15:51 +00:00
f69f1fbc98 Testing and improving NADA algorithm.
A modified operation mode was added, holding:
--- Stricter conditions for AcceleratedRampUp.
--- Smoother GradualRateUpdate adjustments.
--- New AcceleratedRampDown update mode.
This mode reduces significantly the delay for bitrates around its minimum bound.

Several NADA unittests and a few simulations were added.

Fixed LinkedSet bug.
Fixed IsNewerSequenceNumber/IsNewerTimestamp bug.

BUG=4550
R=stefan@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9340}
2015-05-30 15:49:32 +00:00
a3ba0c7f5a RTPFragmentationHeader::VerifyAndAllocateFragmentationHeader: Verify that size fits in 16 bits
This CL change the function declaration from uint16_t to size_t, and CHECKs that the size fits in uint16_t before proceeding.

BUG=484432
R=tommi@webrtc.org

Committed: https://crrev.com/10022cdeae785187e1d4329042b4ed294c393a16
Cr-Commit-Position: refs/heads/master@{#9246}

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

Cr-Commit-Position: refs/heads/master@{#9253}
2015-05-21 15:39:00 +00:00
848d524879 Revert "RTPFragmentationHeader::VerifyAndAllocateFragmentationHeader: Verify that size fits in 16 bits" https://webrtc-codereview.appspot.com/47229004/
Reason for revert: Breaks Chromium FYI compilation

This reverts commit 10022cdeae785187e1d4329042b4ed294c393a16.

BUG=484432
TBR=tommi

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

Cr-Commit-Position: refs/heads/master@{#9247}
2015-05-21 11:25:04 +00:00
10022cdeae RTPFragmentationHeader::VerifyAndAllocateFragmentationHeader: Verify that size fits in 16 bits
This CL change the function declaration from uint16_t to size_t, and CHECKs that the size fits in uint16_t before proceeding.

BUG=484432
R=tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9246}
2015-05-21 09:40:35 +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
2519c45d00 Fix clang style warnings in webrtc/modules/audio_coding
Mostly this consists of marking functions with override when
applicable, and moving function bodies from .h to .cc files.

BUG=163
R=henrik.lundin@webrtc.org, tina.legrand@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8938}
2015-04-07 14:13:10 +00:00
e1c1ee211e EncodedVideoData is unused, so remove it
I'm doing cleanups for bug 163, and would rather remove
this class than fix it.

BUG=163
R=pbos@webrtc.org
TBR=mflodman@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8931}
2015-04-07 08:36:17 +00:00
4346d92578 Use SendTimeHistory to keep track of send times in simulations.
Use SendTimeHistory to keep track of send times in simulations.
Keep piggybacking send time in PacketInfo for now but use history in
order to be more in line with what we expect to do.

Landing this for sprang@. Original CL: https://review.webrtc.org/43559004/

TBR=sprang@webrtc.org
BUG=4308

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

Cr-Commit-Position: refs/heads/master@{#8778}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8778 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-18 13:42:48 +00:00
2386d6dd92 Revert 8599 "Revert 8580 "Unify underlying frame buffer in I420VideoFrame and...""
It's possible to build Chrome on Windows with this patch now.

BUG=1128

> This is unfortunately causing build problems in Chrome on Windows.

>> Unify underlying frame buffer in I420VideoFrame and WebRtcVideoFrame
>>
>> Currently, I420VideoFrame uses three webrtc::Plane to store pixel data, and WebRtcVideoFrame uses WebRtcVideoFrame::FrameBuffer/webrtc::VideoFrame. The two subclasses WebRtcTextureVideoFrame and TextureVideoFrame use a NativeHandle to store pixel data, and there is also a class WebRtcVideoRenderFrame that wraps an I420VideoFrame.
>>
>> This CL replaces these classes with a new interface VideoFrameBuffer that provides the common functionality. This makes it possible to remove deep frame copies between cricket::VideoFrame and I420VideoFrame.
>>
>> Some additional minor changes are:
>> * Disallow creation of 0x0 texture frames.
>> * Remove the half-implemented ref count functions in I420VideoFrame.
>> * Remove the Alias functionality in WebRtcVideoFrame
>>
>> The final goal is to eliminate all frame copies, but to limit the scope of this CL, some planned changes are postponed to follow-up CL:s (see planned changes in https://webrtc-codereview.appspot.com/38879004, or https://docs.google.com/document/d/1bxoJZNmlo-Z9GnQwIaWpEG6hDlL_W-bzka8Zb_K2NbA/preview). Specifically, this CL:
>> * Keeps empty subclasses WebRtcTextureVideoFrame and TextureVideoFrame, and just delegates the construction to the superclass.
>> * Keeps the deep copies from cricket::VideoFrame to I420VideoFrame.
>>
>> BUG=1128
>> R=mflodman@webrtc.org, pbos@webrtc.org, perkj@webrtc.org, tommi@webrtc.org
>>
>> Review URL: https://webrtc-codereview.appspot.com/42469004

R=pbos@webrtc.org
TBR=mflodman, pbos, perkj, tommi

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

Cr-Commit-Position: refs/heads/master@{#8616}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8616 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-05 14:03:51 +00:00
4536289353 Add CVO support to RTP sender side.
According to http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ts_126114v120700p.pdf,
CVO byte should only be added in the last packet of each key frame or when the rotation changes. Currently, we're adding this byte in each frame to start with.

BUG=4145
R=mflodman@webrtc.org, pthatcher@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8606}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8606 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-04 22:55:43 +00:00
1f94407319 Revert 8580 "Unify underlying frame buffer in I420VideoFrame and..."
This is unfortunately causing build problems in Chrome on Windows.

> Unify underlying frame buffer in I420VideoFrame and WebRtcVideoFrame
> 
> Currently, I420VideoFrame uses three webrtc::Plane to store pixel data, and WebRtcVideoFrame uses WebRtcVideoFrame::FrameBuffer/webrtc::VideoFrame. The two subclasses WebRtcTextureVideoFrame and TextureVideoFrame use a NativeHandle to store pixel data, and there is also a class WebRtcVideoRenderFrame that wraps an I420VideoFrame.
> 
> This CL replaces these classes with a new interface VideoFrameBuffer that provides the common functionality. This makes it possible to remove deep frame copies between cricket::VideoFrame and I420VideoFrame.
> 
> Some additional minor changes are:
> * Disallow creation of 0x0 texture frames.
> * Remove the half-implemented ref count functions in I420VideoFrame.
> * Remove the Alias functionality in WebRtcVideoFrame
> 
> The final goal is to eliminate all frame copies, but to limit the scope of this CL, some planned changes are postponed to follow-up CL:s (see planned changes in https://webrtc-codereview.appspot.com/38879004, or https://docs.google.com/document/d/1bxoJZNmlo-Z9GnQwIaWpEG6hDlL_W-bzka8Zb_K2NbA/preview). Specifically, this CL:
> * Keeps empty subclasses WebRtcTextureVideoFrame and TextureVideoFrame, and just delegates the construction to the superclass.
> * Keeps the deep copies from cricket::VideoFrame to I420VideoFrame.
> 
> BUG=1128
> R=mflodman@webrtc.org, pbos@webrtc.org, perkj@webrtc.org, tommi@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/42469004

TBR=magjed@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8599}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8599 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-04 17:35:00 +00:00
c8895aa2f3 Unify underlying frame buffer in I420VideoFrame and WebRtcVideoFrame
Currently, I420VideoFrame uses three webrtc::Plane to store pixel data, and WebRtcVideoFrame uses WebRtcVideoFrame::FrameBuffer/webrtc::VideoFrame. The two subclasses WebRtcTextureVideoFrame and TextureVideoFrame use a NativeHandle to store pixel data, and there is also a class WebRtcVideoRenderFrame that wraps an I420VideoFrame.

This CL replaces these classes with a new interface VideoFrameBuffer that provides the common functionality. This makes it possible to remove deep frame copies between cricket::VideoFrame and I420VideoFrame.

Some additional minor changes are:
* Disallow creation of 0x0 texture frames.
* Remove the half-implemented ref count functions in I420VideoFrame.
* Remove the Alias functionality in WebRtcVideoFrame

The final goal is to eliminate all frame copies, but to limit the scope of this CL, some planned changes are postponed to follow-up CL:s (see planned changes in https://webrtc-codereview.appspot.com/38879004, or https://docs.google.com/document/d/1bxoJZNmlo-Z9GnQwIaWpEG6hDlL_W-bzka8Zb_K2NbA/preview). Specifically, this CL:
* Keeps empty subclasses WebRtcTextureVideoFrame and TextureVideoFrame, and just delegates the construction to the superclass.
* Keeps the deep copies from cricket::VideoFrame to I420VideoFrame.

BUG=1128
R=mflodman@webrtc.org, pbos@webrtc.org, perkj@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8580}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8580 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-03 21:22:26 +00:00
3985f0151a ProcessThread improvements.
* Added a way to notify a Module that it's been attached to a ProcessThread.
  The benefit of this is to give the module a way to wake up the thread
  when it needs work to happen on the worker thread, immediately.
  Today, module instances are typically registered with a process thread
  outside the control of the modules themselves.  I.e. they typically
  don't know about the process thread they're attached to.

* Improve ProcessThread's WakeUp algorithm to not call TimeUntilNextProcess
  when a WakeUp call is requested.  This is an optimization for the above
  case which avoids the module having to acquire a lock or do an interlocked
  operation before calling WakeUp(), which would ensure the module's
  TimeUntilNextProcess() implementation would return 0.

BUG=2822
R=stefan@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8527}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8527 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-27 13:37:25 +00:00
0c3e12b7bf Revamp the ProcessThreadImpl implementation.
* Add a new WakeUp method that gives a module a chance to be called back right away on the worker thread.
* Wrote unit tests for the class.
* Significantly reduce the amount of locking.
  - ProcessThreadImpl itself does a lot less locking.
  - Reimplemented the way we keep track of when to make calls to Process.
    This reduces the amount of calls to TimeUntilNextProcess and since most implementations of that function grab a lock, this means less locking.
* Renamed ProcessThread::CreateProcessThread to ProcessThread::Create.
* Added thread checks for Start/Stop.  Threading model of other functions is now documented.
* We now log an error if an implementation of TimeUntilNextProcess returns a negative value (some implementations do, but the method should only return a positive nr of ms).
* Removed the DestroyProcessThread method and instead force callers to use scoped_ptr<> to maintain object lifetime.

BUG=2822
R=henrika@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8261}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8261 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-06 09:44:45 +00:00
4161715e3f Remove ChangeUniqueID.
This fixes a two year old TODO of deleting dead code :)
In cases where the _id or id_ member variable is being used for tracing,
I changed the member to at least be const.

It doesn't look like id's are that useful anymore so maybe the next step is to get rid of them.

BUG=
R=henrika@webrtc.org, perkj@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8201}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8201 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-29 12:14:13 +00:00
16825b1a82 Use int64_t more consistently for times, in particular for RTT values.
Existing code was inconsistent about whether to use uint16_t, int, unsigned int,
or uint32_t, and sometimes silently truncated one to another, or truncated
int64_t.  Because most core time-handling functions use int64_t, being
consistent about using int64_t unless otherwise necessary minimizes the number
of explicit or implicit casts.

BUG=chromium:81439
TEST=none
R=henrik.lundin@webrtc.org, holmer@google.com, tommi@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8045 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-01-12 21:51:21 +00:00
0b1534c52e Use int64_t for milliseconds more often, primarily for TimeUntilNextProcess.
This fixes a variety of MSVC warnings about value truncations when implicitly
storing the 64-bit values we get back from e.g. TimeTicks in 32-bit objects, and
removes the need for a number of explicit casts.

This also moves a number of constants so they're declared right where they're used, which is easier to read and maintain, and makes some of them of integral type rather than using the "enum hack".

BUG=chromium:81439
TEST=none
R=tommi@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7905 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-12-15 22:09:40 +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
2ec560606b Add H.264 packetization.
This also includes:
- Creating new packetizer and depacketizer interfaces.
- Moved VP8 packetization was H264 packetization and depacketization to these interfaces. This is a work in progress and should be continued to get this 100% generic. This also required changing the return type for RtpFormatVp8::NextPacket(), which now returns bool instead of the index of the first partition.
- Created a Create() factory method for packetizers and depacketizers.

R=niklas.enbom@webrtc.org, pbos@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6804 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-07-31 14:59:24 +00:00
eec6ecdb1e Landing pkasting's webrtc fixes for MSVC level 4 warnings in WebRTC.
---

Fixes for re-enabling more MSVC level 4 warnings: webrtc/ edition

This contains fixes for the following sorts of issues:
* Possibly-uninitialized local variable
* Signedness mismatch
* Assignment inside conditional

This also contains a small number of other cleanups to nearby code. In
particular several warning-disables for MSVC are removed because they don't seem
to be necessary (either that warning is not enabled or the code does not trigger
it).

BUG=crbug.com/81439
TEST=none
R=henrika@webrtc.org, pkasting@chromium.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6667 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-07-11 19:09:59 +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
94454b71ad Fix the chain that propagates the audio frame's rtp and ntp timestamp including:
* In AudioCodingModuleImpl::PlayoutData10Ms, don't reset the timestamp got from GetAudio.
* When there're more than one participant, set AudioFrame's RTP timestamp to 0.
* Copy ntp_time_ms_ in AudioFrame::CopyFrom method.
* In RemixAndResample, pass src frame's timestamp_ and ntp_time_ms_ to the dst frame.
* Fix how |elapsed_time_ms| is computed in channel.cc by adding GetPlayoutFrequency.

Tweaks on ntp_time_ms_:
* Init ntp_time_ms_ to -1 in AudioFrame ctor.
* When there're more than one participant, set AudioFrame's ntp_time_ms_ to an invalid value. I.e. we don't support ntp_time_ms_ in multiple participants case before the mixing is moved to chrome.

Added elapsed_time_ms to AudioFrame and pass it to chrome, where we don't have the information about the rtp timestmp's sample rate, i.e. can't convert rtp timestamp to ms.

BUG=3111
R=henrik.lundin@webrtc.org, turaj@webrtc.org, xians@webrtc.org
TBR=andrew
andrew to take another look on audio_conference_mixer_impl.cc

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6346 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-06-05 20:34:08 +00:00
1fddd6185d Add a Reset() method to AudioFrame.
This method is introduced to try to avoid inconsistent resetting of
AudioFrame members to default/uninitialized values.

Use it at the call points of DownConvertToCodecFormat(). Results in the
following minor functional changes:
- speech_activity_ is set to its uninitialized value. AFAICT, this
member isn't used at all in the capture path.
- timestamp_ is switched from -1 to 0. This member doesn't appear to be
used either in the capture path, but left a TODO for wu to change the
default value to better represent the uninitialized state.

Bonus: Don't copy the frame on error in RemixAndResample(). An error
indicates a logical fault (as pointed out by the asserts) that we should
not attempt to recover from.
BUG=3111
R=turaj@webrtc.org, wu@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6289 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-30 17:28:50 +00:00
88fbb2d86b Switch to using base/constructormagic.h and remove system_wrappers/interface/constructor_magic.h.
Same as https://webrtc-codereview.appspot.com/19519004. The issue in
http://chromegw.corp.google.com/i/internal.chromium.webrtc.fyi/builders/Linux...
is solved by this change
http://src.chromium.org/viewvc/chrome/trunk/src/third_party/libjingle/libjing...
(tested locally).

BUG=3380
R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6218 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-21 21:18:46 +00:00
2fa7f79094 Revert 6202 "Switch to using base/constructormagic.h and remove ..."
> Switch to using base/constructormagic.h and remove system_wrappers/interface/constructor_magic.h.
> 
> BUG=N/A
> R=andrew@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/19519004

TBR=henrike@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6210 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-21 11:07:29 +00:00
125ffd709d Switch to using base/constructormagic.h and remove system_wrappers/interface/constructor_magic.h.
BUG=N/A
R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6202 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-20 15:20:44 +00:00
cb711f77d2 Add interface to propagate audio capture timestamp to the renderer.
BUG=3111
R=andrew@webrtc.org, turaj@webrtc.org, xians@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6189 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-19 17:39:11 +00:00
4d363ae305 The webrtc::AudioFrame struct contains a variable energy_. Since the energy isn't always calculated when the frame is created, this change makes the CalculateEnergy method in Audio Conference Mixer always calculate the energy.
This part of the the aftermath of issue 3255.

BUG=3255
R=andrew@webrtc.org, henrike@webrtc.org, turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6117 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-13 08:50:02 +00:00
6c75c98964 Propagate capture ntp timestamp from rtp to renderer.
Mostly the interface changes, the real implementation of ntp timestamp will come in a follow up cl.

TEST=new tests and try bots
BUG=3111
R=niklas.enbom@webrtc.org, stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5911 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-15 17:46:33 +00:00
b1f5010075 VoE changes to allow forwarding of packets from VoE to ViE BWE.
BUG=
R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5757 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-03-24 10:38:25 +00:00
ebdb0e3ad0 Help to land 7969005 on behalf of solenberg. The review and try is done in 7969005.
- Add ability to VoE to send Absolute Sender Time header extension.
- Refactor handling of RTP header extensions in VoE to work the same as in ViE.
- Add API to enable receiving Absolute Sender Time in VoE.

This is part of the work to include audio packets in bandwidth estimation, for
better accuracy in estimates.

BUG=
TBR=solenberg@webrtc.org,henrikg@webrtc.org,stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5654 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-03-06 23:49:08 +00:00
5ab756703e Revert r5294 to re-roll r5293.
To fix races in test each stream now owns its own encoder/decoder.

R=mflodman@webrtc.org
BUG=

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5297 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-16 12:24:44 +00:00
41e2615e02 Revert 5293 "Auto instantiate RBE depending on whether AST or TO..."
> Auto instantiate RBE depending on whether AST or TOF is available in incoming packet stream.
> 
> BUG=
> R=mflodman@webrtc.org, stefan@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/5409004

TBR=solenberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5294 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-15 18:42:32 +00:00
341e91441a Auto instantiate RBE depending on whether AST or TOF is available in incoming packet stream.
BUG=
R=mflodman@webrtc.org, stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5293 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-12-13 23:57:54 +00:00
57eb858698 Remove ".." from include_dirs in build/common.
BUG=1662
TEST=compile on trybots
R=tina.legrand@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5107 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-11-11 10:20:27 +00:00
c94abd313e Use clang-format -style=chromium to correct the format in webrtc/modules/interface/module_common_types.h
R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5036 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-25 18:15:09 +00:00
0729460acb Added a "interleaved_" flag to webrtc::AudioFrame.
And also did some format refactoring on the AudioFrame class, no change on the functionalities on those format refactoring code.

BUG=
TEST=compile
R=andrew@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5032 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-10-25 12:50:46 +00:00
7bb8f02274 Adds support for combining RTX and FEC/RED.
This is accomplished by breaking out RTX and FEC/RED functionality from the RTP module and keeping track of the base payload type, that is the payload type received when not receiving RTX.

Enables retransmissions over RTX by default in the loopback test.

BUG=1811
TESTS=voe/vie_auto_test --automated and trybots.
R=mflodman@webrtc.org, pbos@webrtc.org, xians@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4692 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-09-06 13:40:11 +00:00
822fbd8b68 Update talk to 50918584.
Together with Stefan's http://review.webrtc.org/1960004/.

R=mallinath@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4556 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-08-15 23:38:54 +00:00