caprica / vlcj-javafx-demo

Sample application showing vlcj rendering video in a JavaFX scene.
113 stars 46 forks source link

Video frame renderer should account for Sample Aspect Ratio #36

Open caprica opened 4 years ago

caprica commented 4 years ago

e.g. for playing DVD.

See https://github.com/caprica/vlcj/issues/986.

It should be quite simple to port the solution from there.

caprica commented 4 years ago

Well, not so simple as the linked issue because the JavaFX solution is relying on certain ImageView behaviours (like preserveAspectRatio). So, a bit trickier indeed.

caprica commented 4 years ago

Probably need to manually calculate the scale and use imageView.setScaleX and imageView.setScaleY.

caprica commented 4 years ago

This is a bit trickier than in vlcj itself because the source image/buffer dimensions are not as readily available.