Commit graph

24 commits

Author SHA1 Message Date
Thibault Saunier
01e70e3552 Move files from gst-editing-services into the "subprojects/gst-editing-services/" subdir 2021-09-24 16:15:30 -03:00
Seungha Yang
eaaaf78090 framepositioner: Install operator property only when compositor is used
Other compositor/mixer elements might not have the property. For instance,
d3d11compositor and glvideomixer define graphics API specific blending
properties, instead of simple "operator" one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/242>
2021-05-15 01:36:44 +09:00
François Laignel
ec5b267249 Use gst_element_request_pad_simple...
Instead of the deprecated gst_element_get_request_pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/240>
2021-05-05 06:16:53 +00:00
Seungha Yang
3ee8672897 framepositioner: Allow ANY caps features
framepositioner will not touch raw video data and therefore should
be able to accept ANY caps features

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/243>
2021-04-23 19:35:25 +00:00
reed.lawrence
9f2de279c5 gstframepositioner: fix operator magic number
In gst_frame_positioner_init, there was the magic number 1
when assigning the default value of the operator. Now it
has the default value for the operator pulled from the
compositor.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/241>
2021-04-23 09:01:35 -05:00
reed.lawrence
355d986d80 gstframepositioner: added 'operator' property
The 'operator' property was added to gstframepositioner so that
blending modes in the compositor could be accessed. This was done
by accessing the pad of the compositor class, and referencing the
'operator' property in that pad. Getters and Setters were also
created so that the 'operator' could be accessed by software that
is based on GES, such as Pitivi.

Related to but does not close Issue
https://gitlab.gnome.org/GNOME/pitivi/-/issues/2313

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/236>
2021-04-21 18:12:30 -05:00
Seungha Yang
1327f428d2 framepositioner: Fix runtime warning
GstCaps is not a GObject!

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/238>
2021-04-14 15:38:32 +09:00
Matthew Waters
083ae2b8ed gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/234>
2021-03-19 17:21:22 +11:00
Thibault Saunier
5720ae4f25 framepositioner: Fix some source repositionning rounding issues
Avoid loosing (too much) precision when rescaling back and forth by
storing values in gdoubles.

Handle the fact that position values can be negative

Also fix debug category static variable
as it clashes with the instance variable name in a few methods.
2020-04-16 21:52:52 -04:00
Thibault Saunier
6db3dc1661 framepositionner: Fix wrong old size check condition
CID: 1461277
2020-04-10 11:12:12 -04:00
Thibault Saunier
ed2c7006c5 framepositioner: Avoid dereferencing NULL pointer 2020-03-19 18:45:51 -03:00
Thibault Saunier
9cf986c71c framepositioner: Reposition source when the user positioned them
Keeping the same proportion in the size and position and only if
the aspect ratio is conserved.
2020-02-26 13:39:29 -03:00
Thibault Saunier
53637ad749 ges: Properly position video sources in the scene by default
We try to do our best to have the video frames scaled the best way
to fill most space on the final frames, keeping aspect ratio. The user
can later on rescale or move the sources as usual but it makes the
default behaviour a better and more natural especially now that we
set default restriction caps to the video tracks.

And fix the unit test to take that change into account
2020-02-26 13:36:30 -03:00
Thibault Saunier
df6058c802 framepositioner: Stop lying about the source size
Basically we were advertising that the source size would be the
size of the track if it hadn't been defined by end user, but since
we started to let scaling happen in the compositor, this is not true
as the source size is now the natural size of the underlying video
stream.

Remove the unit test and reimplemented using a validate scenario which
make the test much simpler to read :=)
2020-02-26 13:36:30 -03:00
Thibault Saunier
61a659d298 framepositioner: Plug caps leak 2019-04-15 17:11:48 -04:00
Seungha Yang
f850da7e4b framepositioner: Fix invalid memory access
The GstFramePositioner might be finalized before the notify callback

Without this commit,
gst-editing-services / ges_basic / test_ges_timeline_remove_track
can reproduce the case.
2019-01-18 20:32:02 +00:00
Thibault Saunier
3c7f488fc2 video-transition: Port to the new 'operator' API in compositor
Now subclassing a ghostpad with an alpha property so that
we can multiply the alpha of the frame positioning meta
and the alpha of that pad, setting it on the compositor pad.

https://bugzilla.gnome.org/show_bug.cgi?id=797169
2018-10-29 13:50:16 +00:00
Thibault Saunier
62891c3f03 ges: Sync 'par' to track restriction caps in the frame positionner
Allowing GES users to have control over how compositing is done
2017-10-31 12:57:08 -03:00
Sebastian Dröge
50c98bae24 framepositioner: Prevent division by zero
CID 1369046
CID 1369047
2017-02-28 15:40:08 +02:00
Scott D Phillips
3319ed17d8 Cast away const from GstMetaInfo in *_get_meta_info() functions
MSVC warns about the const in the implicit argument conversion in the
calls to g_once_init_{enter,leave}. It's OK so explicitly cast it.

https://bugzilla.gnome.org/show_bug.cgi?id=774641
2016-11-18 09:13:53 -03:00
Thibault Saunier
855488f58e ges: Do not rescale videos if the track aspect ratio changes
Differential Revision: https://phabricator.freedesktop.org/D1242
2016-08-05 21:40:57 -04:00
Thibault Saunier
1cef62ab79 ges: Let the compositor do the scaling if mixing is enabled
Differential Revision: https://phabricator.freedesktop.org/D1241
2016-08-05 21:40:56 -04:00
Aurélien Zanelli
df9921f470 framepositionner: add a weak ref on track element to know when it is finalized
Otherwise if frame positionner is disposed after track element has been
finalized, it will raise a critical message because we will try to
disconnect a signal handler on a freed track element object.

https://bugzilla.gnome.org/show_bug.cgi?id=766525
2016-05-16 14:37:25 -04:00
Sebastian Dröge
abfe2c5949 ges: Fix typo by renaming positionner to positioner
It's fortunately private API
2016-04-13 12:31:05 +03:00
Renamed from ges/gstframepositionner.c (Browse further)