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

Issue 2811963004: Deliver video frames on Android, on the decode thread.

Created:
3 years, 8 months ago by tommi
Modified:
3 years, 4 months ago
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, mflodman
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

[ Reland of https://codereview.webrtc.org/2764573002/ ] 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 Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Include sakal's changes #

Patch Set 4 : Rebase #

Patch Set 5 : Remove bogus call to SetPriority #

Patch Set 6 : Update after bad rebase #

Patch Set 7 : Fix again #

Patch Set 8 : rebase after moves #

Patch Set 9 : Reset the decoder thread checker when the decoder thread is stopped #

Patch Set 10 : Revert MediaCodecVideoDecoder.java change #

Patch Set 11 : Revert processthread change #

Patch Set 12 : Fix macro #

Patch Set 13 : Rebase #

Patch Set 14 : Add the java change back again #

Patch Set 15 : Rebase after landing some changes separately #

Patch Set 16 : Rebase #

Patch Set 17 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+391 lines, -262 lines) Patch
M webrtc/api/video_codecs/video_decoder.h View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M webrtc/media/engine/videodecodersoftwarefallbackwrapper.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/media/engine/videodecodersoftwarefallbackwrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 15 1 chunk +8 lines, -0 lines 0 comments Download
M webrtc/modules/video_coding/generic_decoder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +16 lines, -11 lines 0 comments Download
M webrtc/modules/video_coding/generic_decoder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +65 lines, -42 lines 0 comments Download
M webrtc/modules/video_coding/video_coding_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 15 4 chunks +49 lines, -19 lines 0 comments Download
M webrtc/modules/video_coding/video_receiver.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 21 chunks +140 lines, -65 lines 0 comments Download
M webrtc/sdk/android/api/org/webrtc/MediaCodecVideoDecoder.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M webrtc/sdk/android/src/jni/androidmediadecoder_jni.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 24 chunks +76 lines, -121 lines 0 comments Download
M webrtc/video/video_receive_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +24 lines, -3 lines 0 comments Download

Messages

Total messages: 129 (96 generated)
tommi
Created Reland of Deliver video frames on Android, on the decode thread.
3 years, 8 months ago (2017-04-11 12:52:08 UTC) #1
tommi
Rebase
3 years, 8 months ago (2017-04-11 13:00:16 UTC) #4
sakal
I find it unlikely that my changes would fix the problems with the Chromium bots ...
3 years, 8 months ago (2017-04-11 13:02:26 UTC) #5
tommi
Include sakal's changes
3 years, 8 months ago (2017-04-11 13:05:19 UTC) #6
tommi
Heads up - If all goes as planned, I'll be landing this soon. There are ...
3 years, 8 months ago (2017-04-11 13:07:48 UTC) #9
tommi
Rebase (again?)
3 years, 8 months ago (2017-04-11 13:49:44 UTC) #12
tommi
Rebase
3 years, 8 months ago (2017-04-13 08:45:44 UTC) #19
tommi
Rebase
3 years, 8 months ago (2017-04-26 13:41:19 UTC) #24
mflodman
Sorry, I totally missed this reland-CL. LGTM, mainly looked at the changes ps#3, which I ...
3 years, 7 months ago (2017-04-28 07:56:06 UTC) #25
tommi
Rebase
3 years, 7 months ago (2017-05-10 13:00:05 UTC) #30
tommi
Rebase
3 years, 6 months ago (2017-05-29 13:46:42 UTC) #34
tommi
Rebase
3 years, 6 months ago (2017-06-08 08:03:00 UTC) #39
tommi
Rebase
3 years, 6 months ago (2017-06-19 11:11:21 UTC) #40
tommi
Remove bogus call to SetPriority
3 years, 6 months ago (2017-06-19 13:13:51 UTC) #45
tommi
Rebase
3 years, 6 months ago (2017-06-20 17:54:26 UTC) #50
tommi
Update after bad rebase
3 years, 5 months ago (2017-06-27 18:27:07 UTC) #51
tommi
Fix again
3 years, 5 months ago (2017-06-27 19:34:08 UTC) #56
tommi
rebase after moves
3 years, 5 months ago (2017-06-29 10:33:16 UTC) #61
tommi
Reset the decoder thread checker when the decoder thread is stopped
3 years, 5 months ago (2017-06-30 11:02:14 UTC) #62
tommi
Revert MediaCodecVideoDecoder.java change
3 years, 5 months ago (2017-06-30 18:23:52 UTC) #67
tommi
Revert processthread change
3 years, 5 months ago (2017-06-30 18:42:06 UTC) #75
tommi
Fix macro
3 years, 5 months ago (2017-06-30 19:39:29 UTC) #78
tommi
Rebase
3 years, 5 months ago (2017-06-30 22:32:45 UTC) #83
tommi
Add the java change back again
3 years, 5 months ago (2017-06-30 22:56:48 UTC) #88
tommi
Rebase after landing some changes separately
3 years, 5 months ago (2017-07-06 12:30:19 UTC) #93
tommi
Rebase
3 years, 5 months ago (2017-07-10 11:19:16 UTC) #98
tommi
Fix merge
3 years, 5 months ago (2017-07-10 11:24:09 UTC) #99
tommi
Rebase
3 years, 5 months ago (2017-07-17 13:25:02 UTC) #104
tommi
Fix bad merge
3 years, 5 months ago (2017-07-17 13:29:23 UTC) #107
tommi
Fix merge
3 years, 5 months ago (2017-07-17 13:42:40 UTC) #114
tommi
Rebase
3 years, 5 months ago (2017-07-20 22:02:48 UTC) #116
tommi
Rebase
3 years, 5 months ago (2017-07-21 13:05:28 UTC) #117
tommi
3 years, 4 months ago (2017-08-18 08:09:41 UTC) #125
Rebase

Powered by Google App Engine
This is Rietveld 408576698