Re: Canvas blowing up (was Re: JavaFX Media issues)

2013-08-28 Thread Joseph Andresen
Canvas as of right now (pretty much any 8.0 build) is actually not persistent due to the MT changes that were implemented to make the buffer system "work" with multi-threading. I had a patch which implements the clearRect (without considering Jim's warning about stale state), but it is usele

Re: Canvas blowing up (was Re: JavaFX Media issues)

2013-08-11 Thread John Hendrikx
It was late...I forgot WritableImage is not a Node. I wrapped it in an ImageView, added some width/height properties that react on changes in width/height by replacing the WritableImage, and it was almost a drop-in replacement for Canvas for me (the main difference being that you have to re-g

Re: Canvas blowing up (was Re: JavaFX Media issues)

2013-08-09 Thread Richard Bair
Scale the imageview? On Aug 9, 2013, at 8:57 PM, John Hendrikx wrote: > On 10/08/2013 05:46, John Hendrikx wrote: >> On 9/08/2013 20:15, Richard Bair wrote: Also the proposed clear() or empty() option only applies to Canvas correct? i.e. WritableImages don't suffer from these kind of i

Re: Canvas blowing up (was Re: JavaFX Media issues)

2013-08-09 Thread John Hendrikx
On 10/08/2013 05:46, John Hendrikx wrote: On 9/08/2013 20:15, Richard Bair wrote: Also the proposed clear() or empty() option only applies to Canvas correct? i.e. WritableImages don't suffer from these kind of issues and don't require such methods? That is correct (WritableImage we don't provid

Re: Canvas blowing up (was Re: JavaFX Media issues)

2013-08-09 Thread John Hendrikx
On 9/08/2013 20:15, Richard Bair wrote: Also the proposed clear() or empty() option only applies to Canvas correct? i.e. WritableImages don't suffer from these kind of issues and don't require such methods? That is correct (WritableImage we don't provide a 2D API to use to fill the buffer, you

Re: Canvas blowing up (was Re: JavaFX Media issues)

2013-08-09 Thread John Hendrikx
On 9/08/2013 17:23, Richard Bair wrote: I mean, it looks like it is working for a few seconds, but then as the memory fills with the Canvas backlog it can lead to the GC using a lot more CPU, thus reducing the ability for Canvas to process its command queue even further, well it just collapses in

RE: JavaFX Media issues

2013-08-09 Thread John Smith
eha...@oracle.com] Sent: Friday, August 09, 2013 11:38 AM To: John Smith Cc: Richard Bair; Felix Bembrick; openjfx-dev@openjdk.java.net List Subject: Re: JavaFX Media issues >> So called arbitrary input stream support is among the features for the >> future. > > Could somebody

Re: JavaFX Media issues

2013-08-09 Thread David DeHaven
>> So called arbitrary input stream support is among the features for the >> future. > > Could somebody post back a reference to the jira, I've seen the feature > referred to from other jiras, but I've never been able to find the actual > jira reference for this. Thanks! Here's an umbrella is

RE: JavaFX Media issues

2013-08-09 Thread John Smith
age- From: openjfx-dev-boun...@openjdk.java.net [mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of Richard Bair Sent: Friday, August 09, 2013 8:35 AM To: Felix Bembrick Cc: openjfx-dev@openjdk.java.net List Subject: Re: JavaFX Media issues Forwarded from Kiriil Kirichenko who is gettin

Re: Canvas blowing up (was Re: JavaFX Media issues)

2013-08-09 Thread Richard Bair
> Also the proposed clear() or empty() option only applies to Canvas correct? > i.e. WritableImages don't suffer from these kind of issues and don't require > such methods? That is correct (WritableImage we don't provide a 2D API to use to fill the buffer, you just bash the pixels yourself howe

RE: Canvas blowing up (was Re: JavaFX Media issues)

2013-08-09 Thread John Smith
2013 9:43 AM To: Dr. Michael Paus Cc: openjfx-dev@openjdk.java.net Subject: Re: Canvas blowing up (was Re: JavaFX Media issues) > What would be the performance penalty for using this quick-fix? The > clear/fill commands do not just clear the command buffer. They also > fill the canvas are

Re: Canvas blowing up (was Re: JavaFX Media issues)

2013-08-09 Thread Richard Bair
> What would be the performance penalty for using this quick-fix? The > clear/fill commands do not > just clear the command buffer. They also fill the canvas area with a certain > color. So in normal > operation the canvas is always filled twice for each frame, isn't it? That would be correct. A

Re: Canvas blowing up (was Re: JavaFX Media issues)

2013-08-09 Thread steve . x . northover
We would still do the fill but we could throw away any buffered commands that happened before the fill. Steve On 09/08/2013 12:16 PM, Dr. Michael Paus wrote: What would be the performance penalty for using this quick-fix? The clear/fill commands do not just clear the command buffer. They also

Re: Canvas blowing up (was Re: JavaFX Media issues)

2013-08-09 Thread Richard Bair
> That's okay for a quick hack. In the case of a video preview surface, I will > be explicitly setting the value for every pixel from a ByteBuffer. You could > save the extra step of doing a rectFill or clearRect if you knew that every > pixel was about to be overwritten. It's a reasonable op

Re: Canvas blowing up (was Re: JavaFX Media issues)

2013-08-09 Thread Scott Palmer
That's okay for a quick hack. In the case of a video preview surface, I will be explicitly setting the value for every pixel from a ByteBuffer. You could save the extra step of doing a rectFill or clearRect if you knew that every pixel was about to be overwritten. It's a reasonable optimization.

Re: Canvas blowing up (was Re: JavaFX Media issues)

2013-08-09 Thread Dr. Michael Paus
What would be the performance penalty for using this quick-fix? The clear/fill commands do not just clear the command buffer. They also fill the canvas area with a certain color. So in normal operation the canvas is always filled twice for each frame, isn't it? Am 09.08.13 17:23, schrieb Richa

Re: Canvas blowing up (was Re: JavaFX Media issues)

2013-08-09 Thread steve . x . northover
This is a great idea. We should just enter a tweak and do it. If the area that is being cleared is larger than the current size of the canvas, we can throw away all pending draw commands. Steve On 09/08/2013 11:23 AM, Richard Bair wrote: I mean, it looks like it is working for a few seconds

Re: JavaFX Media issues

2013-08-09 Thread Richard Bair
Forwarded from Kiriil Kirichenko who is getting his mailing list credentials sorted out... >> *From: *Felix Bembrick > > >> *Subject: **JavaFX Media issues* >> *Date: *August 8, 2013 1:31:37 PM PDT >> *To: *"openjfx-dev@openjdk.java.net >>

Re: Canvas blowing up (was Re: JavaFX Media issues)

2013-08-09 Thread Richard Bair
https://javafx-jira.kenai.com/browse/RT-32242 On Aug 9, 2013, at 8:23 AM, Richard Bair wrote: >> I mean, it looks like it is working for a few seconds, >> but then as the memory fills with the Canvas backlog it can lead to the GC >> using a lot more CPU, thus reducing the ability for Canvas to p

Canvas blowing up (was Re: JavaFX Media issues)

2013-08-09 Thread Richard Bair
> I mean, it looks like it is working for a few seconds, > but then as the memory fills with the Canvas backlog it can lead to the GC > using a lot more CPU, thus reducing the ability for Canvas to process its > command queue even further, well it just collapses in on itself and dies. Forking the

Re: JavaFX Media issues

2013-08-09 Thread John Hendrikx
On 9/08/2013 03:48, Scott Palmer wrote: I have heard rumors of people being able to play HD video via Canvas. I have tried everything and can't come close. (Yes, I have been careful about the pixel format.) I mean, it looks like it is working for a few seconds, but then as the memory fills wi

Re: JavaFX Media issues

2013-08-08 Thread Scott Palmer
At minimum the Media Player must support H.264, MP3, AAC (so there is a guarantee of a cross-platform format) and then defer to the default platform media decoder for everything else. I.e. *anything* that the standard OS provided media system can decode - I.e. QuickTime on Mac, GStreamer on Linux

Re: JavaFX Media issues

2013-08-08 Thread John Hendrikx
On 9/08/2013 02:10, Scott Palmer wrote: The Media APIs are mostly useless in their current state. Other than demoing that you can play a video, they don't go far enough to be of practical value. I tried to get someone to pay attention to them back in the JavaFX 1.0 days https://javafx-jira.kena

Re: JavaFX Media issues

2013-08-08 Thread Scott Palmer
I was referring to supplying the pixel data to the media nodes. Getting the pixel data of the media from the media nodes should also be possible. It actually is possible now to a degree via the "snapshot" method on Node. Though I encountered a lot of lock-up problems when I tried it. Scott On

Re: JavaFX Media issues

2013-08-08 Thread Daniel Zwolenski
I don't want to detract from the issues around media stuff (they are significant), but if you are desperate (as I was), here's some code for doing video capture and streaming based on LTI-CIVIL and writing to JFX image to render the video: - https://code.google.com/p/jfxcamera/ It's a work aro

Re: JavaFX Media issues

2013-08-08 Thread Scott Palmer
The Media APIs are mostly useless in their current state. Other than demoing that you can play a video, they don't go far enough to be of practical value. I tried to get someone to pay attention to them back in the JavaFX 1.0 days https://javafx-jira.kenai.com/browse/RT-2684 at least someone lis

Re: JavaFX Media issues

2013-08-08 Thread Felix Bembrick
Scott, That JIRA issue doesn't make any mention of getting hooks into pixel data etc., it only refers to user defined codecs. Maybe you could open another issue to manage the wishlist of missing features such as the ones you referred to? I too would very much like to see greatly improved media s

Re: JavaFX Media issues

2013-08-08 Thread Kevin Rushforth
There is already bug filed to restore the FX Media APIs to the FX 8 API docs: https://javafx-jira.kenai.com/browse/RT-32004 -- Kevin Joe McGlynn wrote: I don't know why FX Media isn't in the FX 8 API docs, but that's clearly an error. Please file a bug on that. In the meantime, you shoul

RE: JavaFX Media issues

2013-08-08 Thread John Smith
openjdk.java.net List Subject: Re: JavaFX Media issues > I am having a look at JavaFX media support and have a couple of questions: > > 1. It seems that the only way to load media files is by specifying a > source such as a file path etc. This is not going to work well for me >

Re: JavaFX Media issues

2013-08-08 Thread Fabrizio Giudici
On Thu, 08 Aug 2013 22:57:51 +0200, Joe McGlynn wrote: I don't know why FX Media isn't in the FX 8 API docs, but that's clearly an error. Please file a bug on that. In the meantime, you should look at the FX 2 media docs, there isn't a lot of change from FX2 media in FX8. Buffering and

Re: JavaFX Media issues

2013-08-08 Thread Joe McGlynn
I don't know why FX Media isn't in the FX 8 API docs, but that's clearly an error. Please file a bug on that. In the meantime, you should look at the FX 2 media docs, there isn't a lot of change from FX2 media in FX8. Buffering and streaming (HTTP Live Streaming) are both supported, as is pla

Re: JavaFX Media issues

2013-08-08 Thread Richard Bair
> I am having a look at JavaFX media support and have a couple of questions: > > 1. It seems that the only way to load media files is by specifying a source > such as a file path etc. This is not going to work well for me as all of > my application's content (which includes data, digital assets,

RE: JavaFX Media issues

2013-08-08 Thread John Smith
JavaFX 2.2 does http live streaming: http://docs.oracle.com/javafx/2/media/overview.htm "HTTP Live Streaming Support With the addition of HTTP live streaming support, you can now download the playlist file and playback video or audio segments using JavaFX Media. Media players are now able to s