Closed orlovsn closed 2 years ago
What is your component hierarchy? What layout manager? Is it in a JScrollPane?
GstVideoComponent in Center of BorderLayout of JPanel that is context for JFrame, without scroll
Looks like problem was with windows 11+JDK8 (x86 jvm) on mine Lenovo P17G1 with 1080 screen - can't reproduce it with JDK11 and on another PCs with w11+JDK11/JDK17 (amd64 jvm) or Debian11 + JDK11/JDK17 (amd64 jvm)
I'm using SwingPlayer example code to render rtsp and hls streams (1080+ resolution) on smaller (like 640x480) jpanels Problem - when GstVideoComponent starts to render video, it is unscaled (so I see 640x480 crop from full 1080 frame) until jpanel is resized and GstVideoComponent gets new prefferedSize
When I switch source with
it is also unscaled, even if jpanel was resized/revalidated before (with previous url)
Workaround - I currently use full revalidate + setPreferredSize with parent's width and height after every source change in Bus.ASYNC_DONE event:
Is it normal or there is some better approach not covered in SwingPlayer example?
gstreamer latest release, windows 11