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 659322 - Videomixer with size changing support as parameter.
Videomixer with size changing support as parameter.
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal enhancement
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-09-17 15:48 UTC by Jaka Hudoklin
Modified: 2015-02-24 12:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Tar archive of patches. (180.00 KB, application/x-compressed-tar)
2011-09-17 15:48 UTC, Jaka Hudoklin
Details

Description Jaka Hudoklin 2011-09-17 15:48:02 UTC
Created attachment 196808 [details]
Tar archive of patches.

Hello!

I have modified videomixer plugin to support changing width and height as parameters. I know that it's possible to change width and height with changing caps, but in a such a case you can't make nice linear transitions(animations) as far as i know. Source is avalible on https://github.com/offlinehacker/gst-plugins-good( git@github.com:offlinehacker/gst-plugins-good.git branch videomixer3 ) and i also attach patches.

Patches are so big, because i included most of the code from videoscale element, that's because i don't know how to link code other elements, so if anybody knows please help.
Comment 1 Jaka Hudoklin 2011-09-17 15:50:51 UTC
Sorry git clone link is my private, use this instead git://github.com/offlinehacker/gst-plugins-good.git .
Comment 2 Sebastian Dröge (slomo) 2011-09-17 16:18:07 UTC
I think it would be better to not include all of videoscale inside videomixer but instead a) extend videomixer to allow scaling via properties and b) use a videoscale in front of the videomixer sinkpads.
Comment 3 Jaka Hudoklin 2011-09-17 16:28:58 UTC
But the only way for changing video size is by changing caps, but this way you can't make nice linear animations as far as i know, if i'm wrong please let me know. There's no need to include whole videoscale, we can just use functions from videoscale, but i don't know how to include source and header files from one plugin to another.
Comment 4 Jaka Hudoklin 2011-09-17 16:33:10 UTC
I don't see changing caps 100 and more times during animations efficient, could it be even done nice linear?
Comment 5 Sebastian Dröge (slomo) 2011-09-17 19:25:24 UTC
What I meant was adding support to videoscale to change the output width/height with a property as an additional mode to the current one that changes it based on the caps.
This would allow you to do nice animations with the videoscale/videomixer combination.
Comment 6 Jaka Hudoklin 2011-09-17 20:30:44 UTC
I see what you think, but this way you would have to make static output caps from videoscale element and you won't be able to scale beyond original size, or you have to crop(this does not present a real problem). This is more like videobox element with resizing capabilities as videscale, but i think this two elements(videscale and videobox) should be combined, forming one  well made videoresize element. Meybe i will make someday when i will have too mouch time.

While i support your idea, i still think that videomixer should receive my patch, since it would make life much easier to many users, and that's actually the only basic option that videmoxer fails. The fact is you can always throw it out when you came up with nicer solution. If you look from minimalistic aspecp videomixer shouldn't even have to have xpos and ypos properties nor alpha, but they are there, well the only property videomixer must have is z-index, everything else should be covered in other elements. 
If you look from other direction, why not keep all these stuff in and give users more options to make same thing. Well if you take this path you have to make sure you keep processing in elements optimized, so that additional options don't slow down processing if you don't use them.
Comment 7 Sebastian Dröge (slomo) 2011-09-19 08:09:08 UTC
Why would adding width/height scaling properties to videoscale prevent scaling beyong original size? It would allow to do the same that is currently possible by changing the downstream caps. videoscale would never crop but scale to the requested width/height.

Instead of copying the videoscale code it would make sense to refactor it into a library and use the public API of that library from videoscale and videomixer and possibly other elements. That's the plan for 0.11 (and the same for video format conversion, audio format conversion, resampling, ...) but it could be done for 0.10 too already.



Ideally there would be a videocomposition element that allows you to scale/crop/rotate/position different video streams and composite them with different operations (ADD, SUB, OVER, ...) in different orders.
Comment 8 Jaka Hudoklin 2011-09-19 08:36:53 UTC
Videocomposition element and public API sounds awsome, let me know and meybe i can contribute something. How can i become gstreamer developer anyway?
Comment 9 Sebastian Dröge (slomo) 2011-09-19 08:47:48 UTC
Nobody is working on that yet so you could just propose patches against libgstvideo that add a simple scaling API there.

Also I don't think anybody is planning on to work on a generic composition element, it's only something nice to have but nobody has the time to do it :) By using cairo (which unfortunately only supports (A)RGB currently) it should be possible to create such a element quite fast though.
Comment 10 Sebastian Dröge (slomo) 2013-08-21 19:01:52 UTC
Anybody planning to work on this?
Comment 11 Tim-Philipp Müller 2015-02-24 12:40:57 UTC
The sink pads of the new compositor element in gst-plugins-bad now have width/height properties that allow for the input to be scaled, also dynamically via GstController, which I think covers the features requested in this bug report.