On the direct rendering callback media player, setting the aspect ratio by normal methods has no effect.
Aspect ratio is a presentation issue, and the app that renders (presents) the video that is responsible for scaling it and therefore for rendering in the desired aspect ratio.
Consider adding a new "painter" implementation that allows dynamic setting of the aspect ratio.
There may need to be some way to force it repaint the current frame e.g. if the media is stopped.
Consider adding something similar for cropping.
See https://github.com/caprica/vlcj-javafx/issues/2
该提问来源于开源项目:caprica/vlcj