Advertisement
Guest User

Untitled

a guest
Aug 19th, 2015
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. diff --git a/gst/vaapi/gstvaapisink.c b/gst/vaapi/gstvaapisink.c
  2. index b148cac..bf7ae7a 100644
  3. --- a/gst/vaapi/gstvaapisink.c
  4. +++ b/gst/vaapi/gstvaapisink.c
  5. @@ -64,7 +64,8 @@ static const char gst_vaapisink_sink_caps_str[] =
  6. GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
  7. "{ ENCODED, NV12, I420, YV12 }") ";"
  8. GST_VIDEO_CAPS_MAKE_WITH_FEATURES (
  9. - GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
  10. + GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY ","
  11. + GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION,
  12. GST_VIDEO_FORMATS_ALL) ";"
  13. #endif
  14. GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL);
  15. @@ -889,6 +890,7 @@ gst_vaapisink_reconfigure_window (GstVaapiSink * sink)
  16. sink->window_width, sink->window_height, win_width, win_height);
  17. sink->window_width = win_width;
  18. sink->window_height = win_height;
  19. + gst_pad_push_event (GST_BASE_SINK_PAD (sink), gst_event_new_reconfigure ());
  20. return TRUE;
  21. }
  22. return FALSE;
  23. @@ -1433,13 +1435,24 @@ static gboolean
  24. gst_vaapisink_propose_allocation (GstBaseSink * base_sink, GstQuery * query)
  25. {
  26. GstVaapiPluginBase *const plugin = GST_VAAPI_PLUGIN_BASE (base_sink);
  27. + GstVaapiSink *const sink = GST_VAAPISINK_CAST (base_sink);
  28. + GstStructure *params = NULL;
  29.  
  30. if (!gst_vaapi_plugin_base_propose_allocation (plugin, query))
  31. return FALSE;
  32.  
  33. gst_query_add_allocation_meta (query, GST_VIDEO_CROP_META_API_TYPE, NULL);
  34. +
  35. + if (sink->window_width > 0 && sink->window_height > 0) {
  36. + params = gst_structure_new ("params",
  37. + "width", G_TYPE_UINT, sink->window_width,
  38. + "height", G_TYPE_UINT, sink->window_height,
  39. + NULL);
  40. + }
  41. +
  42. gst_query_add_allocation_meta (query,
  43. - GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE, NULL);
  44. + GST_VIDEO_OVERLAY_COMPOSITION_META_API_TYPE, params);
  45. +
  46. return TRUE;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement