Media API question regarding metadata retrieval
krueger at lesspain.de
Thu Apr 2 07:23:09 UTC 2015
On Wed, Apr 1, 2015 at 9:48 PM, David DeHaven <david.dehaven at oracle.com>
> > I was a bit surprised that the metadata retrieval functionality
> > of javafx.scene.media.Media is only usable in conjunction with a player,
> > if I want to retrieve the dimensions of a video file I have to
> > a player and wait for it to reach ready state? That's how I read the
> > javadoc. Is this a misunderstanding?
> Nope, currently you have to create a player. Once a player is created it
> kicks off a parser to grab metadata or waits for the underlying native
> player to parse.
> > If not is there a specific reason not
> > to offer this functionality independently of a player?
> There were plans, there were also issues as we don't have a Java based mp4
> parser so we're relying on the underlying platforms (e.g. QTKit,
> AVFoundation, etc..) to provide that data, which basically means we're
> creating a player at the native level anyways. If you're using the horribly
> outdated FXM format you get the benefit of a Java
Deferring to native code absolutely makes sense but I didn't think that you
needed to create a player to obtain duration, width and height in
More information about the openjfx-dev