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

Issue 2724005: player_x11 : change X/GL thread to message loop for injecting task (Closed)

Created:
10 years, 6 months ago by jiesun
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Antoine Labour
Visibility:
Public.

Description

change X/GL thread to message loop for injecting task 1. there are need to allocate buffer in this thread, requested by other threads. therefore it is natural to use message loop instead of infinite loop. 2. in the future, gpu command buffer consumer is running on it own thread and own the eglContext. we need to post buffer allocation there, therefore this change make player_x11 more resemble the real workflow in chrome. TEST= glVideoRender on host machine. glesVideoRender/x11VideoRender on arm netbook. BUGS=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=49255

Patch Set 1 #

Patch Set 2 : fix build bug and remove periodical paint. #

Total comments: 6

Patch Set 3 : name change to avoid overload the MediaFilter::message_loop_ #

Patch Set 4 : fixing nits #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -82 lines) Patch
M media/tools/player_x11/gl_video_renderer.h View 1 2 2 chunks +9 lines, -4 lines 0 comments Download
M media/tools/player_x11/gl_video_renderer.cc View 1 2 3 2 chunks +6 lines, -15 lines 0 comments Download
M media/tools/player_x11/gles_video_renderer.h View 1 2 3 chunks +9 lines, -4 lines 2 comments Download
M media/tools/player_x11/gles_video_renderer.cc View 1 2 3 2 chunks +6 lines, -15 lines 0 comments Download
M media/tools/player_x11/player_x11.cc View 1 2 2 chunks +37 lines, -25 lines 0 comments Download
M media/tools/player_x11/x11_video_renderer.h View 1 2 2 chunks +9 lines, -4 lines 0 comments Download
M media/tools/player_x11/x11_video_renderer.cc View 1 2 3 2 chunks +6 lines, -15 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
jiesun
please review.
10 years, 6 months ago (2010-06-08 20:28:47 UTC) #1
Alpha Left Google
MediaFilter already provides MessageLoop, is that not enough? http://codereview.chromium.org/2724005/diff/2001/3001 File media/tools/player_x11/gl_video_renderer.cc (right): http://codereview.chromium.org/2724005/diff/2001/3001#newcode266 media/tools/player_x11/gl_video_renderer.cc:266: if ...
10 years, 6 months ago (2010-06-08 22:36:52 UTC) #2
jiesun
please have another look!
10 years, 6 months ago (2010-06-08 23:28:21 UTC) #3
Alpha Left Google
One lat nit: Should update if ( glx_thread_message_loop() ) to if (glx_thread_message_loop()). After that LGTM.
10 years, 6 months ago (2010-06-08 23:42:38 UTC) #4
wjia(left Chromium)
LGTM except the comment on message_loop. http://codereview.chromium.org/2724005/diff/14001/15004 File media/tools/player_x11/gles_video_renderer.h (right): http://codereview.chromium.org/2724005/diff/14001/15004#newcode40 media/tools/player_x11/gles_video_renderer.h:40: } Is it ...
10 years, 6 months ago (2010-06-09 01:08:05 UTC) #5
jiesun
10 years, 6 months ago (2010-06-09 01:18:36 UTC) #6
http://codereview.chromium.org/2724005/diff/14001/15004
File media/tools/player_x11/gles_video_renderer.h (right):

http://codereview.chromium.org/2724005/diff/14001/15004#newcode42
media/tools/player_x11/gles_video_renderer.h:42: MessageLoop*
glx_thread_message_loop() {
MediaFilter::message_loop_ mostly mean its own message loop on it own thread,
not someone else's message loop.
If in the future, we need a message loop based VideoRenderBase, then this
overload will be troublesome and confusing. thanks

Powered by Google App Engine
This is Rietveld 408576698