After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740768 - videoaggregator: Expose vmethods to set converters and prepare frames
videoaggregator: Expose vmethods to set converters and prepare frames
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal enhancement
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 739011
 
 
Reported: 2014-11-26 18:01 UTC by Thibault Saunier
Modified: 2014-11-27 18:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
videoaggregator: Expose vmethods to set converters and prepare frames (12.82 KB, patch)
2014-11-26 18:01 UTC, Thibault Saunier
none Details | Review
videoaggregator: Expose vmethods to set converters and prepare frames (12.82 KB, patch)
2014-11-26 20:33 UTC, Thibault Saunier
reviewed Details | Review
videoaggregator: Expose vmethods to set converters and prepare/clean frames (18.90 KB, patch)
2014-11-27 11:05 UTC, Thibault Saunier
none Details | Review
This patch: (22.24 KB, patch)
2014-11-27 12:27 UTC, Thibault Saunier
committed Details | Review
videoconvert: Hide all conversion related fields (4.24 KB, patch)
2014-11-27 17:47 UTC, Thibault Saunier
committed Details | Review

Description Thibault Saunier 2014-11-26 18:01:00 UTC
This gives more flexibility to the subclasses and permits to remove the
GstVideoAggregatorClass->disable_frame_conversion ugly API.

WARNING: This breaks the API as it removes the disable_frame_conversion
field

API:
  + GstVideoAggregatorPadClass->set_converter
  + GstVideoAggregatorPadClass->prepare_frame
  - GstVideoAggregatorClass->disable_frame_conversion
Comment 1 Thibault Saunier 2014-11-26 18:01:03 UTC
Created attachment 291573 [details] [review]
videoaggregator: Expose vmethods to set converters and prepare frames
Comment 2 Thibault Saunier 2014-11-26 20:33:15 UTC
Created attachment 291589 [details] [review]
videoaggregator: Expose vmethods to set converters and prepare frames

This gives more flexibility to the subclasses and permits to remove the
GstVideoAggregatorClass->disable_frame_conversion ugly API.

WARNING: This breaks the API as it removes the disable_frame_conversion
field

API:
  + GstVideoAggregatorPadClass->set_converter
  + GstVideoAggregatorPadClass->prepare_frame
  - GstVideoAggregatorClass->disable_frame_conversion
Comment 3 Sebastian Dröge (slomo) 2014-11-27 09:15:19 UTC
As mentioned on IRC; maybe set_converter() should be set_info() and be called whenever the sinkpad caps are changing in one way or another?

Additional to prepare_frame() there should maybe also be an "unprepare_frame". videoaggregator already has something like that to reset whatever it did in prepare_frame().
Comment 4 Sebastian Dröge (slomo) 2014-11-27 09:16:00 UTC
Comment on attachment 291589 [details] [review]
videoaggregator: Expose vmethods to set converters and prepare frames

Otherwise looks good to me. I'll add the scaling support to compositor on top of this once this patch is done :)
Comment 5 Thibault Saunier 2014-11-27 11:05:12 UTC
Created attachment 291628 [details] [review]
videoaggregator: Expose vmethods to set converters and prepare/clean frames

This gives more flexibility to the subclasses and permits to remove the
GstVideoAggregatorClass->disable_frame_conversion ugly API.

WARNING: This breaks the API as it removes the disable_frame_conversion
field

API:
  + GstVideoAggregatorPadClass->set_format
  + GstVideoAggregatorPadClass->prepare_frame
  + GstVideoAggregatorPadClass->clean_frame

  - GstVideoAggregatorClass->disable_frame_conversion
Comment 6 Thibault Saunier 2014-11-27 11:06:11 UTC
(In reply to comment #3)
> As mentioned on IRC; maybe set_converter() should be set_info() and be called

It is done now.

> whenever the sinkpad caps are changing in one way or another?

Was already the case ifaics

> Additional to prepare_frame() there should maybe also be an "unprepare_frame".
> videoaggregator already has something like that to reset whatever it did in
> prepare_frame().

Indeed, that is usefull! Done.
Comment 7 Thibault Saunier 2014-11-27 12:27:43 UTC
Created attachment 291635 [details] [review]
This patch:

+ Adds a new GstVideoAggregatorClass->find_best_format vmethod
  + Add a current_info parametter to GstVideoAggretorPadClass->set_info vmethod
Comment 8 Sebastian Dröge (slomo) 2014-11-27 16:25:12 UTC
Review of attachment 291635 [details] [review]:

::: gst-libs/gst/video/gstvideoaggregator.c
@@ +149,3 @@
+    gst_video_converter_free (pad->priv->convert);
+
+  pad->priv->convert = NULL;

Maybe the converter should actually be public in the pad. Conversion info already is anyway.

@@ +222,3 @@
+
+    /* We wait until here to set the conversion infos, in case vagg->info changed */
+    if (pad->need_conversion_update) {

This seems wrong. If the info changes between this and setting up the converter above, then the converter will fail to convert.
Comment 9 Thibault Saunier 2014-11-27 17:47:34 UTC
Created attachment 291674 [details] [review]
videoconvert: Hide all conversion related fields

And do not delay the setting of the conversion_info
Comment 10 Thibault Saunier 2014-11-27 18:12:17 UTC
Attachment 291674 [details] pushed as a61d2e4 - videoconvert: Hide all conversion related fields