* Add test to Generic decoder unittests to ensure drop behaviour is covered.
* Use simulated time in the generic decoder unittests.
Bug: webrtc:14324
Change-Id: I10b28b45c434f92d5344683fb9ca6676efe0e08c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/270662
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37710}
Clean up by removing unused field-trial that was added in this CL
https://webrtc-review.googlesource.com/c/src/+/151911
to make it possible to simulate a slow decoder.
Bug: None
Change-Id: I237f3ac6baae76f81fcd2938e43eab9c19cea45f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261681
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36824}
There is no active use of it, and the fields are enabled by default in
the uses of it.
Change-Id: Ibfdb3f1befca886cb4b2f4b2ae4d6235aafafe3d
Fixed: webrtc:13998
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256262
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36655}
This patch takes a stab at modules/video_coding,
but reaches only about half.
Bug: webrtc:10335
Change-Id: I0d47d0468b818145470c51ae4e8e75ff58d499ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256112
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36335}
Remove private members that are no longer used or always have same value
Use less allocations
Bug: None
Change-Id: I5430c2356f0039212baf8b248b92775e8852ce1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227765
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34665}
There's been reports of dropped frames that are not counted and
correctly reported by getStats().
If a HW decoder is used and the system is provoked by stressing
the system, I've been able to reproduce this problem. It turns out
that we've missed frames that are dropped because there is no
callback to the Decoded() function.
This CL restructures the code so that dropped frames are counted
even in cases where there's no corresponding callback for some frames.
Bug: webrtc:11229
Change-Id: I0216edba3733399c188649908d459ee86a9093d0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214783
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33671}
The access to |_timestampMap| was guarded by a lock but
not the access to the data pointer stored in |_timestampMap|.
There was a potential race condition if new data was added
in VCMGenericDecoder::Decode() while the data pointer
retrieved from _timestampMap.Pop() was being used in
VCMDecodedFrameCallback::Decoded().
This CL moves the storage of data to within |_timestampMap|,
instead of being a pointer so that it's guarded by the same
lock.
Bug: webrtc:11229
Change-Id: I3f2afb568ed724db5719d508a73de402c4531dec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209361
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33374}
The low-latency renderer is activated by the RTP header extension
playout-delay if the min value is set to 0 and the max value is
set to something greater than 0.
According to the specification of the playout-delay header
extension it doesn't have to be set for every frame but only if
it is changed. The bug that this CL fixes occured if a playout
delay had been set previously but some frames without any specified
playout-delay were received. In this case max composition delay
would not be set and the low-latency renderer algorithm would be
disabled for the rest of the session.
Bug: chromium:1138888
Change-Id: I12d10715fd5ec29f6ee78296ddfe975d7edab8a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208581
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33330}
This adds a new way to poll decoder metadata.
A default implementation still delegates to the old methods.
Root call site is updates to not use the olds methods.
Follow-ups will dismantle usage of the olds methods in wrappers.
Bug: webrtc:12271
Change-Id: Id0fa6863c96ff9e3b849da452d6540e7c5da4512
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196520
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32976}
This is just general cleanup.
The assumed behavior is late decoding, and this function is not used to make any decision (except in the deprecated jitter buffer).
Bug: webrtc:12271
Change-Id: Ifb48186d55903f068f25e44c5f73e7a724f6f456
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/200804
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32940}
This feature is active if and only if the RTP header extension
playout-delay is used with min playout delay=0 and max playout delay>0.
In this case, a maximum composition delay will be calculated and attached
to the video frame as a signal to use the low-latency renderer algorithm,
which is landed in a separate CL in Chromium.
The maximum composition delay is specified in number of frames and is
calculated based on the max playout delay.
The feature can be completetly disabled by specifying the field trial
WebRTC-LowLatencyRenderer/enabled:false/
Bug: chromium:1138888
Change-Id: I05f461982d0632bd6e09e5d7ec1a8985dccdc61b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190141
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32493}
This CL adds a field trial parameter WebRTC-SlowDownDecoder that is
used to simulate a slow decoder. The parameter specifies how many
extra ms it takes to decode each video frame. This must only be used
in manual testing.
Bug: None
Change-Id: Iad4079100d67b95c224277aaeaf572e38068717f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151911
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29153}
This partially reverts these 2 CLs:
1) Reland "Copy video frames metadata between encoded and plain frames in one place"
https://webrtc.googlesource.com/src/+/2ebf5239782bf6b46d4aa812f34fa9f9e5a02be9
2) Don't copy video frame metadata in each encoder/decoder
https://webrtc.googlesource.com/src/+/ab62b2ee51e622be6d0aade15e87e927fa60e6f2
The problem with them were that ColorSpace was made to always be copied from the
EncodedImage in the GenericDecoder, which overwrote ColorSpace information from
the decoder.
If decoder applied color space transition or bitstream color space information
was different from the WebRTC signaled one, the incorrect color space data were
passed to the renderer.
This CL removes introduced change regarding color space data: GenericDecoder
doesn't copy or store it and software decoders are restored to copy it.
Relevant tests are also removed.
Bug: chromium:982486
Change-Id: I989e01476ff7f7df376c05578ab8f540b95a1dd2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145323
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28556}
This change adds the plumbing of RtpPacketInfo from RtpVideoStreamReceiver::OnRtpPacket() to VideoReceiveStream::OnFrame() for video. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time.
Bug: webrtc:10668
Change-Id: Ib97d430530c5a8487d3b129936c7c51e118889bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139891
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/master@{#28332}
Reland with fixes.
Currently some video frames metadata like rotation or ntp timestamps are
copied in every encoder and decoder separately. This CL makes copying to
happen at a single place for send or receive side. This will make it
easier to add new metadata in the future.
Also, added some missing tests.
Original Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133346
Bug: webrtc:10460
Change-Id: I98629589fa55ca1d74056033cf86faccfdf848cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136582
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27930}
This reverts commit 4fb12b0cae.
Reason for revert: Breaks some asan chromium bots
Original change's description:
> Reland "Copy video frames metadata between encoded and plain frames in one place"
>
> Reland with fixes.
>
> Currently some video frames metadata like rotation or ntp timestamps are
> copied in every encoder and decoder separately. This CL makes copying to
> happen at a single place for send or receive side. This will make it
> easier to add new metadata in the future.
>
> Also, added some missing tests.
>
> Original Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133346
>
> Bug: webrtc:10460
> Change-Id: Ia71198685de7fbd990704b575231cdce94dc0645
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134961
> Reviewed-by: Johannes Kron <kron@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27828}
TBR=ilnik@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,kron@webrtc.org,artit@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:10460
Change-Id: I9c87a43a716622b389974cb8377f973573fc29a5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135747
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27895}
Reland with fixes.
Currently some video frames metadata like rotation or ntp timestamps are
copied in every encoder and decoder separately. This CL makes copying to
happen at a single place for send or receive side. This will make it
easier to add new metadata in the future.
Also, added some missing tests.
Original Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133346
Bug: webrtc:10460
Change-Id: Ia71198685de7fbd990704b575231cdce94dc0645
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134961
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27828}
This reverts commit c9a2c5e93a.
Reason for revert: Breaks downstream test
Original change's description:
> Reland "Copy video frames metadata between encoded and plain frames in one place"
>
> Reland with fixes: Do not remove extra metadata copies in software decoders as some downstream projects assumes these fields are copied by the encoders.
>
> Currently some video frames metadata like rotation or ntp timestamps are
> copied in every encoder and decoder separately. This CL makes copying to
> happen at a single place for send or receive side. This will make it
> easier to add new metadata in the future.
>
> Also, added some missing tests.
>
> Original Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133346
>
> Bug: webrtc:10460
> Change-Id: I8e49589bf75f406e2b5ddee34882de0faedbd09a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134102
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Johannes Kron <kron@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27756}
TBR=ilnik@webrtc.org,sprang@webrtc.org,kron@webrtc.org,artit@webrtc.org
Change-Id: I34cc563ec6383735c2a76a6f45a72a7726b74421
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10460
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134204
Reviewed-by: Artem Titarenko <artit@google.com>
Commit-Queue: Artem Titarenko <artit@google.com>
Cr-Commit-Position: refs/heads/master@{#27765}
Reland with fixes: Do not remove extra metadata copies in software decoders as some downstream projects assumes these fields are copied by the encoders.
Currently some video frames metadata like rotation or ntp timestamps are
copied in every encoder and decoder separately. This CL makes copying to
happen at a single place for send or receive side. This will make it
easier to add new metadata in the future.
Also, added some missing tests.
Original Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133346
Bug: webrtc:10460
Change-Id: I8e49589bf75f406e2b5ddee34882de0faedbd09a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134102
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27756}
This reverts commit 00d0a0a1a9.
Reason for revert: Breaks downstream tests
Original change's description:
> Copy video frames metadata between encoded and plain frames in one place
>
> Currently some video frames metadata like rotation or ntp timestamps are
> copied in every encoder and decoder separately. This CL makes copying to
> happen at a single place for send or receive side. This will make it
> easier to add new metadata in the future.
>
> Also, added some missing tests.
>
> Bug: webrtc:10460
> Change-Id: Ia49072c3041e75433f125a61050d2982b2bec1da
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133346
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Johannes Kron <kron@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27719}
TBR=ilnik@webrtc.org,sprang@webrtc.org,kron@webrtc.org
Change-Id: I8960a6cc15e552925129ba0037f197ff3fd93c25
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10460
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134100
Reviewed-by: Artem Titarenko <artit@webrtc.org>
Commit-Queue: Artem Titarenko <artit@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27737}
Currently some video frames metadata like rotation or ntp timestamps are
copied in every encoder and decoder separately. This CL makes copying to
happen at a single place for send or receive side. This will make it
easier to add new metadata in the future.
Also, added some missing tests.
Bug: webrtc:10460
Change-Id: Ia49072c3041e75433f125a61050d2982b2bec1da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133346
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27719}
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script from modules with parameters
'pacing video_coding congestion_controller remote_bitrate_estimator':
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+
find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;
git cl format
Bug: webrtc:9078
Change-Id: I8ea501d7f1ee36e8d8cd3ed37e6b763c7fe29118
Reviewed-on: https://webrtc-review.googlesource.com/83900
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23640}
This reverts commit a4e71b9e7e.
Reason for revert: Breaking internal project
Original change's description:
> VCMGenericDecoder threading updates for all but Android.
>
> * All methods now have thread checks.
> * Variable access associated with thread checkers.
> * Remove need for |rtc::CriticalSection lock_|
>
> Since the android decoder is inherently asynchronous, and
> FrameBuffer2's decoder doesn't support posting tasks to it
> yet (for async decode completion), we need to tackle android
> separately. Once FrameBuffer2 gets changed to use a TaskQueue
> or ProcessThread, we can move Android over to delivering decoded
> frames on the right thread/queue and delete generic_decoder_android.*.
>
> Note: This is a subset of code that was previously reviewed here:
> - https://codereview.webrtc.org/2764573002/
>
> Bug: webrtc:7361, webrtc:8907, chromium:695438
> Change-Id: I118609dfa5c0f0180287d8c2b6d62987b7473c5c
> Reviewed-on: https://webrtc-review.googlesource.com/55060
> Commit-Queue: Tommi <tommi@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22119}
TBR=sakal@webrtc.org,tommi@webrtc.org
Change-Id: I3afe4671f9d06bb4a2b17e4f14c21d79f773e067
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7361, webrtc:8907, chromium:695438
Reviewed-on: https://webrtc-review.googlesource.com/56282
Reviewed-by: Lu Liu <lliuu@webrtc.org>
Commit-Queue: Lu Liu <lliuu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22143}
* All methods now have thread checks.
* Variable access associated with thread checkers.
* Remove need for |rtc::CriticalSection lock_|
Since the android decoder is inherently asynchronous, and
FrameBuffer2's decoder doesn't support posting tasks to it
yet (for async decode completion), we need to tackle android
separately. Once FrameBuffer2 gets changed to use a TaskQueue
or ProcessThread, we can move Android over to delivering decoded
frames on the right thread/queue and delete generic_decoder_android.*.
Note: This is a subset of code that was previously reviewed here:
- https://codereview.webrtc.org/2764573002/
Bug: webrtc:7361, webrtc:8907, chromium:695438
Change-Id: I118609dfa5c0f0180287d8c2b6d62987b7473c5c
Reviewed-on: https://webrtc-review.googlesource.com/55060
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22119}
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
In order to eliminate the WebRTC Subtree mirror in Chromium,
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/modules/video_coding/generic_decoder.h (Browse further)