Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/gst/vaapi/gstvaapisink.c b/gst/vaapi/gstvaapisink.c
- index b148cac..bf7ae7a 100644
- --- a/gst/vaapi/gstvaapisink.c
- +++ b/gst/vaapi/gstvaapisink.c
- @@ -64,7 +64,8 @@ static const char gst_vaapisink_sink_caps_str[] =
- GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
- "{ ENCODED, NV12, I420, YV12 }") ";"
- GST_VIDEO_CAPS_MAKE_WITH_FEATURES (
- - GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
- + GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY ","
- + GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
- GST_VIDEO_FORMATS_ALL) ";"
- #endif
- GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL);
- @@ -889,6 +890,7 @@ gst_vaapisink_reconfigure_window (GstVaapiSink * sink)
- sink->window_width, sink->window_height, win_width, win_height);
- sink->window_width = win_width;
- sink->window_height = win_height;
- + gst_pad_push_event (GST_BASE_SINK_PAD (sink), gst_event_new_reconfigure ());
- return TRUE;
- }
- return FALSE;
- @@ -1433,13 +1435,24 @@ static gboolean
- gst_vaapisink_propose_allocation (GstBaseSink * base_sink, GstQuery * query)
- {
- GstVaapiPluginBase *const plugin = GST_VAAPI_PLUGIN_BASE (base_sink);
- + GstVaapiSink *const sink = GST_VAAPISINK_CAST (base_sink);
- + GstStructure *params = NULL;
- if (!gst_vaapi_plugin_base_propose_allocation (plugin, query))
- return FALSE;
- gst_query_add_allocation_meta (query, GST_VIDEO_CROP_META_API_TYPE, NULL);
- +
- + if (sink->window_width > 0 && sink->window_height > 0) {
- + params = gst_structure_new ("params",
- + "width", G_TYPE_UINT, sink->window_width,
- + "height", G_TYPE_UINT, sink->window_height,
- + NULL);
- + }
- +
- gst_query_add_allocation_meta (query,
- - GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE, NULL);
- + GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE, params);
- +
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement