Commit Graph

57 Commits

Author SHA1 Message Date
d818dcb939 Sets up framework for decoding with errors: collects frame sizes (in number of packets) in JB and passes this information to VCMSessionInfo with rtt_ms as FrameData.
R=marpan@google.com, mikhal@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4424 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-29 21:48:11 +00:00
1a7b9b94be Cleanup WebRTC tracing
The goal of this change is to:
1. Remove unused tracing events.
2. Organize tracing events to facilitate measurement of end to end latency.

The major change in this CL is to use ASYNC_STEP such that operation
flow can be traced for the same frame.

R=marpan@webrtc.org, pwestin@webrtc.org, turaj@webrtc.org, wu@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4308 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-07-08 21:31:18 +00:00
5616abadf5 Suppress excessive logging in video_coding
Only prints the warning message if a frame was dropped.

R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4278 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-06-27 19:47:40 +00:00
4cf1a8af69 Removes kStateFree and kStateDecoding, added a free_frames_ list which simplifies finding a free frame.
The idea is to have all frames not in use be stored in free_frames_, and whenever a packet from a new frame arrives we can just pop a frame from free_frames_. When a frame is grabbed for decoding it will be removed from all lists, and will be added to free_frames_ when it's returned to the jitter buffer.

We should be able to remove the state enum completely later, as their state is defined by the list they are in. But I'll keep it around for now to simplify the cl.

TEST=try bots and vie_auto_test --automated
R=mikhal@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4273 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-06-27 15:20:14 +00:00
9ca7360b97 VCM: removing max jitter estimate
BUG= 1921
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4249 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-06-20 20:13:07 +00:00
50fb4afade Revert r4145 "Revert 4127 "Switch frame list implementation to std::map.""
TBR=tnakamura@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4233 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-06-17 07:33:58 +00:00
c8b29a2feb Revert r4146 "Revert 4104 "Refactor jitter buffer to use separate lists for de...""
TBR=tnakamura@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4232 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-06-17 07:13:16 +00:00
b1bba167f4 Prevent excessive logging in jitter buffer
Jitter buffer logs a message when it is going to recycle frames. This adds a
lot of noise even in normal operation. This change make sure only critical
cases are logged.

R=mikhal@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4150 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-31 18:52:16 +00:00
694cdc6e84 Revert 4104 "Refactor jitter buffer to use separate lists for de..."
Reason - leading suspect of video frame corruption tracked in http://b/9216252
Note that if this turns out to not be the cause, be sure to re-revert both this change and r4145.

> Refactor jitter buffer to use separate lists for decodable and incomplete frames.
> 
> This changes the design of the jitter buffer to keeping track of decodable frames from the point when packets are inserted in the buffer, instead of searching for decodable frames when they are needed.
> 
> To accomplish this the frame_list_, which previously contained all frames (incomplete or complete, continuous or not), is split into a list of decodable_frames_ (complete, continuous) and a list of incomplete_frames_ (either incomplete or non-continuous). These frame lists are updated every time a packet is inserted.
> 
> This is another step in the direction of doing most of the work in the jitter buffer only once, when packets are inserted, instead of doing it every time we look for a frame or try to get a nack list.
> 
> BUG=1798
> TEST=vie_auto_test, trybots
> R=mikhal@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/1522005

TBR=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4146 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-31 16:09:48 +00:00
4d9c07ad6d Revert 4127 "Switch frame list implementation to std::map."
We want to revert r4104 for b/9216252, but because r4127 was built on top of r4104, we need to revert r4127 first. We'll un/re-revert this if we discover that r4104 is not to blame.


> Switch frame list implementation to std::map.
> 
> This reduces the complexity of insert and find (by timestamp) from linear to logarithmic, which has a big impact on large frame lists.
> 
> BUG=1726
> TEST=trybots, vie_auto_test --automated
> R=mikhal@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/1561005

TBR=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4145 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-31 16:06:01 +00:00
ace7ad2302 Switch frame list implementation to std::map.
This reduces the complexity of insert and find (by timestamp) from linear to logarithmic, which has a big impact on large frame lists.

BUG=1726
TEST=trybots, vie_auto_test --automated
R=mikhal@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4127 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-29 07:41:48 +00:00
7f3f8bc5a6 Refactor jitter buffer to use separate lists for decodable and incomplete frames.
This changes the design of the jitter buffer to keeping track of decodable frames from the point when packets are inserted in the buffer, instead of searching for decodable frames when they are needed.

To accomplish this the frame_list_, which previously contained all frames (incomplete or complete, continuous or not), is split into a list of decodable_frames_ (complete, continuous) and a list of incomplete_frames_ (either incomplete or non-continuous). These frame lists are updated every time a packet is inserted.

This is another step in the direction of doing most of the work in the jitter buffer only once, when packets are inserted, instead of doing it every time we look for a frame or try to get a nack list.

BUG=1798
TEST=vie_auto_test, trybots
R=mikhal@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4104 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-27 07:02:45 +00:00
c74c3c2447 Adds integration test for RTX and fixes bugs found.
BUG=1811
R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4096 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-23 13:48:22 +00:00
a7dc37d568 Log the type of recycled frames.
Also correct the logging of incoming key frame packets.

BUG=1814
R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4090 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-23 07:21:05 +00:00
8c49c1eab3 Log a message when a key frame packet is received
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4089 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-22 21:18:59 +00:00
3417eb49f6 Consolidate GetFrame and InsertPacket and move NACK list processing to after a packet has been successfully inserted.
TEST=trybots
BUG=1799
R=mikhal@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4080 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-21 15:25:53 +00:00
fe307e1332 Add one unit test for NACKing a key frame
Adding a test case that wasn't covered. This new test is passing.

R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4051 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-16 21:19:59 +00:00
2038214c77 Log too long non-decodable duration events.
R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4043 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-16 11:39:06 +00:00
cb20a5b2d7 VCM/JB: Bug fix in ExtractAndSetDecode
BUG=1771
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4035 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-15 17:10:44 +00:00
1673481ed7 Fixes a bug where the render buffer size (and indirectly the non-continuous duration) was computed incorrectly.
BUG=1769
R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4026 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-14 12:00:47 +00:00
7bfb3a3227 Add more tracing for key frames.
R=mallinath@webrtc.org, stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4015 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-13 22:59:00 +00:00
ef14488d03 Trigger a PLI if the duration of non-decodable frames exceeds a threshold.
BUG=1663
R=mikhal@webrtc.org, ronghuawu@chromium.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3975 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-07 19:16:33 +00:00
759b041019 Relanding r3952: VCM: Updating receiver logic
BUG=r1734
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3970 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-07 16:36:00 +00:00
9c7685f9a6 VCM/JB: Break and skip to key if possible
BUG=1734
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3969 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-07 16:07:52 +00:00
a5dee33639 Correctly add packets to nack list when sequence number wraps.
BUG=1737
R=mflodman@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3966 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-07 11:11:17 +00:00
4ce19b1664 Revert r3952 "VCM: Updating receiver logic"
TBR=phoglund@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3963 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-06 13:16:51 +00:00
d3cd565ecf VCM: Updating receiver logic
R=stefan@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3952 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-05-03 17:54:18 +00:00
4980679d35 Fixes two bugs in receive statistics.
- Reported bitrate wasn't reset correctly when no frames had been received.
- Internal framerate estimate wasn't reset when no frames had been received.

BUG=1713

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3924 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-30 22:05:07 +00:00
6faba6edc9 VCM: Setting buffering delay in timing
Review URL: https://webrtc-codereview.appspot.com/1338004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3921 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-30 15:39:34 +00:00
381da4be9c VCM: Adding API for the size(duration) of the jitter buffer.
Refers to the duration in time of the frames which are ready to be sent to the decoder.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3903 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-25 21:45:29 +00:00
8392cd9edd VCM/JB: Using last decoded state for waiting for key
relanding 1323006

BUG=

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3902 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-25 21:30:50 +00:00
dc3cd217b2 VCM/JB: FrameForDecoding->IncompleteFrameForDecoding
- Update complete frame for decoding
- Remove FrameForDecodingNack

This CL should only be committed after issue http://webrtc-codereview.appspot.com/1313007/

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3901 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-25 20:27:04 +00:00
df9c0e5ec9 Revert 3892 "VCM/JB: Using last decoded state for waiting for key"
> VCM/JB: Using last decoded state for waiting for key
> 
> Review URL: https://webrtc-codereview.appspot.com/1323006

Although I have no idea why, it appears this might be causing failures in ViEStandardIntegrationTest.RunsFileTestWithoutErrors. I was unable to reproduce locally. This is a trial revert to verify. If the errors continue to happen, I will restore this change.

TBR=mikhal@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3896 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-24 02:13:18 +00:00
1248d4effc VCM/JB: Using last decoded state for waiting for key
Review URL: https://webrtc-codereview.appspot.com/1323006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3892 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-23 20:57:06 +00:00
c1f243f8e7 VCM/JB: Skip to the next complete key frame
Review URL: https://webrtc-codereview.appspot.com/1317006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3885 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-22 22:24:38 +00:00
885cd13356 Start NACKing as soon as we have the first packet of a key frame.
BUG=1605

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3855 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-16 09:38:26 +00:00
d6bd7cd2b1 removing redundant calls to cleanframes
Review URL: https://webrtc-codereview.appspot.com/1318004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3844 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-12 17:09:51 +00:00
9da751715f VCM/JB:Removing hybrid and setting a decodable state.
Review URL: https://webrtc-codereview.appspot.com/1283004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3834 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-11 18:49:13 +00:00
7bc465bd21 Fix issues with incorrect wrap checks when having big buffers and high bitrate.
Introduces shared functions for timestamp and sequence number wrap checks.

BUG=1607
TESTS=trybots

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3833 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-11 17:48:02 +00:00
806dc3b0e6 More trace events
The goal of this change is to unify tracing events styles
and add trace events for all RTP traffic.

BUG=1555
Review URL: https://webrtc-codereview.appspot.com/1290007

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3806 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-09 19:54:10 +00:00
4d2f5de67a Improve how NACK lists are generated before a frame has been decoded.
BUG=1598

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3805 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-09 18:24:41 +00:00
79b0289bfc Adds event traces and counters for WebRTC receive side.
Review URL: https://webrtc-codereview.appspot.com/1279005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3766 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-04 19:43:34 +00:00
836af79f58 Remove incorrect asserts.
BUG=1527

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3698 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-03-21 12:15:44 +00:00
2baf5f5fa0 Refactor webrtc specific Event implementation to an EventFactory.
Review URL: https://webrtc-codereview.appspot.com/1187005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3664 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-03-13 08:46:25 +00:00
a64300af50 Refactor NACK list creation to build the NACK list as packets arrive.
Also fixes a timer bug related to NACKing in the RTP module which could cause packets to only be NACKed twice if there's frequent packet losses.

Note that I decided to remove any selective NACKing for now as I don't think the gain of doing it is big enough compared to the added complexity. The same reasoning for empty packets. None of them will be retransmitted by a smart sender since the sender would know that they aren't needed.

BUG=1420
TEST=video_coding_unittests, vie_auto_test, video_coding_integrationtests, trybots

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3599 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-03-04 15:24:40 +00:00
ef9f76a59d Adding a receive side API for buffering mode.
At the same time, renaming the send side API.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3525 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-02-15 23:22:18 +00:00
becf9c897c Fix mismatch between different NACK list lengths and packet buffers.
This is a second version of http://review.webrtc.org/1065006/ which passes the parameters via methods instead of via constructors.

BUG=1289

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3456 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-02-01 15:09:57 +00:00
119c67df36 Adding a max jitter filter to the JB estimate - allowing two modes, one will return the last estimate (current setting), and another will return the max value seen, and allow setting an initial value.
This cl also includes tests and some clean up.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3445 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-31 17:18:02 +00:00
bf535b9b6b Optimize NACK list creation.
- No longer looping through all frame buffers.
- Keeping track of the current nack list index when building the list.
- Don't look for changes in the NACK list if the size has increased.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3420 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-28 08:48:13 +00:00
a678a3baee Move video_coding to new Clock interface and remove fake clock implementations from RTP module tests.
TEST=video_coding_unittests, video_coding_integrationtests, rtp_rtcp_unittests, trybots

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3393 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-01-21 07:42:11 +00:00