Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Issue 2767473005: Forward frame polling in videodecodersoftwarefallbackwrapper. (Closed)

Created:
3 years, 9 months ago by sakal
Modified:
3 years, 5 months ago
Reviewers:
CC:
webrtc-reviews_webrtc.org, interface-changes_webrtc.org, video-team_agora.io, yujie_mao (webrtc), zhengzhonghou_agora.io, stefan-webrtc, tterriberry_mozilla.com, qiang.lu, niklas.enbom, peah-webrtc, the sun, mflodman
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Forward frame polling in videodecodersoftwarefallbackwrapper. Deliver video frames on Android, on the decode thread. VideoCoding * Adding a method for polling for frames on Android only until the capture implementation takes care of this (longer term plan). CodecDatabase * Add an accessor for the current decoder * Use std::unique_ptr<> for ownership. * Remove "Release()" and "ReleaseDecoder()". Instead just delete. * Remove |friend| relationship between CodecDatabase and VCMGenericDecoder. VCMDecodedFrameCallback * DCHECKs for thread correctness. * Remove |lock_| now that a threading model has been established and verified. VCMGenericDecoder * All methods now have thread checks. * Variable access associated with thread checkers. VideoReceiver * Added two notification methods, DecoderThreadStarting() and DecoderThreadStopped() * Allows us to establish a period when the decoder thread is not running and it is safe to modify variables such as callbacks, that are only read when the decoder thread is running. * Allows us to DCHECK thread guarantees. * Allows synchronizing callbacks from the module process thread and have them only active while the decoder thread is running. * The above, allows us to establish two modes for the thread, single-threaded-mutable and multi-threaded-const. * Using that knowledge, we can remove |receive_crit_| as well as locking for a number of member variables. MediaCodecVideoDecoder * Removed frame polling code from this class, since this is now done from the root thread function in VideoReceiveStream. VideoReceiveStream * On Android: Polls for decoded frames every 10ms (same interval as previously in MediaCodecVideoDecoder) * [Un]Registers the |video_receiver_| with the module thread only around the time the decoder thread is started/stopped. * Notifies the receiver of start/stop events of the decoder thread. * Changed the decoder thread to use the new PlatformThread callback type. BUG=webrtc:7361, 695438 patch from issue 2764573002 at patchset 20001 (http://crrev.com/2764573002#ps20001)

Patch Set 1 : Fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -0 lines) Patch
M webrtc/media/engine/videodecodersoftwarefallbackwrapper.h View 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/media/engine/videodecodersoftwarefallbackwrapper.cc View 1 chunk +8 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 3 (3 generated)
sakal
Patchset #1 (id:1) has been deleted
3 years, 9 months ago (2017-03-22 12:57:32 UTC) #1
sakal
Patchset #1 (id:20001) has been deleted
3 years, 9 months ago (2017-03-22 12:57:39 UTC) #2
sakal
3 years, 9 months ago (2017-03-22 12:59:28 UTC) #3
Description was changed from

==========
Fix


Deliver video frames on Android, on the decode thread.

VideoCoding
* Adding a method for polling for frames on Android only until the capture
implementation takes care of this (longer term plan).

CodecDatabase
* Add an accessor for the current decoder
* Use std::unique_ptr<> for ownership.
* Remove "Release()" and "ReleaseDecoder()". Instead just delete.
* Remove |friend| relationship between CodecDatabase and VCMGenericDecoder.

VCMDecodedFrameCallback
* DCHECKs for thread correctness.
* Remove |lock_| now that a threading model has been established and verified.

VCMGenericDecoder
* All methods now have thread checks.
* Variable access associated with thread checkers.

VideoReceiver
* Added two notification methods, DecoderThreadStarting() and
DecoderThreadStopped()
  * Allows us to establish a period when the decoder thread is not running and
it is safe to modify variables such as callbacks, that are only read when the
decoder thread is running.
  * Allows us to DCHECK thread guarantees.
  * Allows synchronizing callbacks from the module process thread and have them
only active while the decoder thread is running.
  * The above, allows us to establish two modes for the thread,
single-threaded-mutable and multi-threaded-const.
  * Using that knowledge, we can remove |receive_crit_| as well as locking for a
number of member variables.

MediaCodecVideoDecoder
* Removed frame polling code from this class, since this is now done from the
root thread function in VideoReceiveStream.

VideoReceiveStream
* On Android: Polls for decoded frames every 10ms (same interval as previously
in MediaCodecVideoDecoder)
* [Un]Registers the |video_receiver_| with the module thread only around the
time the decoder thread is started/stopped.
* Notifies the receiver of start/stop events of the decoder thread.
* Changed the decoder thread to use the new PlatformThread callback type.

BUG=webrtc:7361, 695438

patch from issue 2764573002 at patchset 20001
(http://crrev.com/2764573002#ps20001)
==========

to

==========
Forward frame polling in videodecodersoftwarefallbackwrapper.


Deliver video frames on Android, on the decode thread.

VideoCoding
* Adding a method for polling for frames on Android only until the capture
implementation takes care of this (longer term plan).

CodecDatabase
* Add an accessor for the current decoder
* Use std::unique_ptr<> for ownership.
* Remove "Release()" and "ReleaseDecoder()". Instead just delete.
* Remove |friend| relationship between CodecDatabase and VCMGenericDecoder.

VCMDecodedFrameCallback
* DCHECKs for thread correctness.
* Remove |lock_| now that a threading model has been established and verified.

VCMGenericDecoder
* All methods now have thread checks.
* Variable access associated with thread checkers.

VideoReceiver
* Added two notification methods, DecoderThreadStarting() and
DecoderThreadStopped()
  * Allows us to establish a period when the decoder thread is not running and
it is safe to modify variables such as callbacks, that are only read when the
decoder thread is running.
  * Allows us to DCHECK thread guarantees.
  * Allows synchronizing callbacks from the module process thread and have them
only active while the decoder thread is running.
  * The above, allows us to establish two modes for the thread,
single-threaded-mutable and multi-threaded-const.
  * Using that knowledge, we can remove |receive_crit_| as well as locking for a
number of member variables.

MediaCodecVideoDecoder
* Removed frame polling code from this class, since this is now done from the
root thread function in VideoReceiveStream.

VideoReceiveStream
* On Android: Polls for decoded frames every 10ms (same interval as previously
in MediaCodecVideoDecoder)
* [Un]Registers the |video_receiver_| with the module thread only around the
time the decoder thread is started/stopped.
* Notifies the receiver of start/stop events of the decoder thread.
* Changed the decoder thread to use the new PlatformThread callback type.

BUG=webrtc:7361, 695438

patch from issue 2764573002 at patchset 20001
(http://crrev.com/2764573002#ps20001)
==========

Powered by Google App Engine
This is Rietveld 408576698