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

Issue 19297003: Add support for drawing video onto a Java ByteBuffer (Closed)

Created:
7 years, 5 months ago by solb
Modified:
7 years, 5 months ago
Reviewers:
garykac, Wez
CC:
chromium-reviews, jamiewalch+watch_chromium.org, dcaiafa+watch_chromium.org, hclam+watch_chromium.org, wez+watch_chromium.org, amit, sanjeevr, garykac+watch_chromium.org, lambroslambrou+watch_chromium.org, rmsousa+watch_chromium.org, weitaosu+watch_chromium.org, alexeypa+watch_chromium.org, sergeyu+watch_chromium.org
Visibility:
Public.

Description

Add support for drawing video onto a Java ByteBuffer We now place frames into a Java-accessible memory region as we decode them. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=212063

Patch Set 1 #

Total comments: 1

Patch Set 2 : Reword highly cryptic comment #

Total comments: 34

Patch Set 3 : Rename to JniFrameConsumer, use WeakPtrFactory, eliminate buffer_ pointer #

Total comments: 34

Patch Set 4 : Rearrange video buffer allocation #

Patch Set 5 : Fix crashes discovered during integration testing #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+305 lines, -41 lines) Patch
M remoting/client/frame_consumer.h View 1 chunk +1 line, -0 lines 0 comments Download
M remoting/client/jni/chromoting_jni.h View 1 2 3 3 chunks +11 lines, -5 lines 0 comments Download
M remoting/client/jni/chromoting_jni.cc View 1 2 3 4 3 chunks +32 lines, -4 lines 0 comments Download
M remoting/client/jni/chromoting_jni_instance.h View 1 2 3 4 3 chunks +10 lines, -1 line 0 comments Download
M remoting/client/jni/chromoting_jni_instance.cc View 1 2 3 4 8 chunks +51 lines, -30 lines 0 comments Download
A remoting/client/jni/jni_frame_consumer.h View 1 2 3 1 chunk +58 lines, -0 lines 0 comments Download
A remoting/client/jni/jni_frame_consumer.cc View 1 2 3 4 1 chunk +133 lines, -0 lines 4 comments Download
M remoting/client/jni/jni_interface.cc View 1 2 3 4 2 chunks +7 lines, -1 line 0 comments Download
M remoting/remoting.gyp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
solb
This is designed to apply on top of https://codereview.chromium.org/19253003/, so ignore all those trybot errors...
7 years, 5 months ago (2013-07-15 22:59:39 UTC) #1
garykac
lgtm https://codereview.chromium.org/19297003/diff/1/remoting/client/jni/frame_consumer_impl.h File remoting/client/jni/frame_consumer_impl.h (right): https://codereview.chromium.org/19297003/diff/1/remoting/client/jni/frame_consumer_impl.h#newcode43 remoting/client/jni/frame_consumer_impl.h:43: // State is to be used from the ...
7 years, 5 months ago (2013-07-16 01:28:19 UTC) #2
Wez
https://codereview.chromium.org/19297003/diff/6001/remoting/client/jni/chromoting_jni_instance.cc File remoting/client/jni/chromoting_jni_instance.cc (right): https://codereview.chromium.org/19297003/diff/6001/remoting/client/jni/chromoting_jni_instance.cc#newcode132 remoting/client/jni/chromoting_jni_instance.cc:132: frame_consumer_->Attach(view_->AsWeakPtr()); Rather than have JniFrameConsumer SupportsWeakPtr, have this class ...
7 years, 5 months ago (2013-07-16 02:18:12 UTC) #3
solb
https://codereview.chromium.org/19297003/diff/6001/remoting/client/jni/chromoting_jni_instance.cc File remoting/client/jni/chromoting_jni_instance.cc (right): https://codereview.chromium.org/19297003/diff/6001/remoting/client/jni/chromoting_jni_instance.cc#newcode132 remoting/client/jni/chromoting_jni_instance.cc:132: frame_consumer_->Attach(view_->AsWeakPtr()); On 2013/07/16 02:18:12, Wez wrote: > Rather than ...
7 years, 5 months ago (2013-07-16 18:00:57 UTC) #4
Wez
https://codereview.chromium.org/19297003/diff/11001/remoting/client/jni/chromoting_jni.h File remoting/client/jni/chromoting_jni.h (right): https://codereview.chromium.org/19297003/diff/11001/remoting/client/jni/chromoting_jni.h#newcode60 remoting/client/jni/chromoting_jni.h:60: // |session| is null. nit: |session| -> |session_| It ...
7 years, 5 months ago (2013-07-16 18:45:53 UTC) #5
solb
https://codereview.chromium.org/19297003/diff/11001/remoting/client/jni/chromoting_jni.h File remoting/client/jni/chromoting_jni.h (right): https://codereview.chromium.org/19297003/diff/11001/remoting/client/jni/chromoting_jni.h#newcode60 remoting/client/jni/chromoting_jni.h:60: // |session| is null. On 2013/07/16 18:45:53, Wez wrote: ...
7 years, 5 months ago (2013-07-16 21:35:40 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/solb@chromium.org/19297003/39001
7 years, 5 months ago (2013-07-17 07:17:23 UTC) #7
commit-bot: I haz the power
Change committed as 212063
7 years, 5 months ago (2013-07-17 16:36:55 UTC) #8
Wez
https://codereview.chromium.org/19297003/diff/11001/remoting/client/jni/jni_frame_consumer.cc File remoting/client/jni/jni_frame_consumer.cc (right): https://codereview.chromium.org/19297003/diff/11001/remoting/client/jni/jni_frame_consumer.cc#newcode53 remoting/client/jni/jni_frame_consumer.cc:53: ChromotingJni::GetInstance()->RedrawCanvas(); On 2013/07/16 21:35:41, solb wrote: > On 2013/07/16 ...
7 years, 5 months ago (2013-07-22 19:41:27 UTC) #9
solb
7 years, 5 months ago (2013-07-22 22:49:32 UTC) #10
Message was sent while issue was closed.
See https://codereview.chromium.org/19967007.

https://codereview.chromium.org/19297003/diff/11001/remoting/client/jni/jni_f...
File remoting/client/jni/jni_frame_consumer.cc (right):

https://codereview.chromium.org/19297003/diff/11001/remoting/client/jni/jni_f...
remoting/client/jni/jni_frame_consumer.cc:53:
ChromotingJni::GetInstance()->RedrawCanvas();
On 2013/07/22 19:41:28, Wez wrote:
> On 2013/07/16 21:35:41, solb wrote:
> > On 2013/07/16 18:45:53, Wez wrote:
> > > Rather than calling via the global instance, why not pass the instance in
> when
> > > constructing this class?
> > 
> > It's a singleton. I think that holding a reference to it would just clutter
> > things up and make another hurdle for someone trying to follow the code
path.
> 
> I disagree; it's clearer for the reader to see the ChromotingJni instance as a
> dependency of this class, and not be troubled by the fact that it's a global,
> which isn't relevant to JniFrameConsumer's operation.

Done.

https://codereview.chromium.org/19297003/diff/39001/remoting/client/jni/jni_f...
File remoting/client/jni/jni_frame_consumer.cc (right):

https://codereview.chromium.org/19297003/diff/39001/remoting/client/jni/jni_f...
remoting/client/jni/jni_frame_consumer.cc:45: : provide_buffer_(true),
On 2013/07/22 19:41:28, Wez wrote:
> nit: This should be e.g. |shutting_down_| or |in_dtor_| to more precisely
> describe what it means, since the code assumes it's only false during
shutdown.

Done.

https://codereview.chromium.org/19297003/diff/39001/remoting/client/jni/jni_f...
remoting/client/jni/jni_frame_consumer.cc:82: if (provide_buffer_)
On 2013/07/22 19:41:28, Wez wrote:
> If |provide_buffer_| is false _and_ the view hasn't got bigger then you'll
> neither delete nor pass back |buffer|, will you?

Oops! Thanks for catching that.

Powered by Google App Engine
This is Rietveld 408576698