|
22 | 22 |
|
23 | 23 | package org.freedesktop.gstreamer.interfaces; |
24 | 24 |
|
| 25 | +import static org.freedesktop.gstreamer.lowlevel.GstVideoOverlayAPI.GSTVIDEOOVERLAY_API; |
| 26 | + |
| 27 | +import org.freedesktop.gstreamer.BusSyncReply; |
25 | 28 | import org.freedesktop.gstreamer.Element; |
26 | 29 | import org.freedesktop.gstreamer.Message; |
27 | 30 |
|
28 | 31 | import com.sun.jna.Native; |
29 | 32 | import com.sun.jna.NativeLong; |
30 | 33 | import com.sun.jna.Platform; |
31 | 34 |
|
32 | | -import static org.freedesktop.gstreamer.lowlevel.GstVideoOverlayAPI.GSTVIDEOOVERLAY_API; |
33 | | - |
34 | 35 | /** |
35 | 36 | * Interface for elements providing tuner operations |
36 | 37 | */ |
@@ -131,4 +132,28 @@ public void handleEvent(boolean handle_events) { |
131 | 132 | public boolean setRenderRectangle(int x, int y, int width, int height) { |
132 | 133 | return GSTVIDEOOVERLAY_API.gst_video_overlay_set_render_rectangle(this, x, y, width, height); |
133 | 134 | } |
| 135 | + |
| 136 | + /** |
| 137 | + * Configure a subregion as a video target within the window set by |
| 138 | + * {@link #setWindowHandle(long)}. If this is not used or not supported |
| 139 | + * the video will fill the area of the window set as the overlay to 100%. |
| 140 | + * By specifying the rectangle, the video can be overlayed to a specific |
| 141 | + * region of that window only. After setting the new rectangle one should |
| 142 | + * call {@link #expose()} to force a redraw. To unset the region pass -1 |
| 143 | + * for the width and height parameters. |
| 144 | + * |
| 145 | + * This method is needed for non fullscreen video overlay in UI toolkits |
| 146 | + * that do not support subwindows. |
| 147 | + * |
| 148 | + * @param overlay |
| 149 | + * @param x |
| 150 | + * @param y |
| 151 | + * @param width |
| 152 | + * @param height |
| 153 | + */ |
| 154 | + @Deprecated |
| 155 | + public boolean setRenderRectangle(VideoOverlay overlay, int x, int y, int width, int height) { |
| 156 | + return GSTVIDEOOVERLAY_API.gst_video_overlay_set_render_rectangle(this, x, y, width, height); |
| 157 | + } |
| 158 | + |
134 | 159 | } |
0 commit comments