Commit graph

16 commits

Author SHA1 Message Date
Thibault Saunier
05115da59e effect: Allow setting properties on any element specified by the user
Those are the elements he cares about and we should expose their APIs
as is, event if they are not classified as effects. For example if
the user want to use a capsfilter as effect, he should be able to set
its caps.
2018-04-20 19:24:56 -03:00
Thibault Saunier
15782c6ecd ges: Update the media-duration-factor each time a child property is set
Otherwise the changes won't be reflected in the NLE backend.

This makes speed changes working inside ges-launch-1.0

  ges-launch-1.0 +clip /path/to/file i=10 d=5 +effect videorate set-rate 5.0

https://bugzilla.gnome.org/show_bug.cgi?id=794699
2018-03-26 12:39:55 -03:00
Suhas Nayak
14b0470cb0 ges: Register videorate::rate as a rate changing property
https://bugzilla.gnome.org/show_bug.cgi?id=794699
2018-03-26 11:45:45 -03:00
Edward Hervey
9a45d0ef85 ges: Fix a bunch of leaks
There are definitely more left, but don't have time for more debugging
2017-11-27 11:49:43 +01:00
Thibault Saunier
35256b47ff docs: Port all docstring to gtk-doc markdown 2017-03-08 18:13:48 -03:00
Aurélien Zanelli
813c4b4fb7 ges: add some g-i annotations according to documentation
Mainly (transfer xxx) and (nullable). Also fix some typo.

https://bugzilla.gnome.org/show_bug.cgi?id=766459
2016-05-14 20:36:07 -03:00
Thibault Saunier
189eb79b10 ges: Register scaletempo::rate as a rate changing property 2016-02-26 20:42:41 +01:00
Sjors Gielen
84f7f04a64 Handle changing playback rate
Before this patch, NLE and GES did not support NleOperations (respectively
GESEffects) that changed the speed/tempo/rate at which the source plays. For
example, the 'pitch' element can make audio play faster or slower. In GES 1.5.90
and before, an NleOperation containing the pitch element to change the rate (or
tempo) would cause a pipeline state change to PAUSED after that stack; that has
been fixed in 1.5.91 (see #755012 [0]). But even then, in 1.5.91 and later,
NleComposition would send segment events to its NleSources assuming that one
source second is equal to one pipeline second. The resulting early EOS event
(in the case of a source rate higher than 1.0) would cause it to switch stacks
too early, causing confusion in the timeline and spectacularly messed up
output.

This patch fixes that by searching for rate-changing elements in
GESTrackElements such as GESEffects. If such rate-changing elements are found,
their final effect on the playing rate is stored in the corresponding NleObject
as the 'media duration factor', named like this because the 'media duration',
or source duration, of an NleObject can be computed by multiplying the duration
with the media duration factor of that object and its parents (this is called
the 'recursive media duration factor'). For example, a 4-second NleSource with
an NleOperation with a media duration factor of 2.0 will have an 8-second media
duration, which means that for playing 4 seconds in the pipeline, the seek
event sent to it must span 8 seconds of media. (So, the 'duration' of an
NleObject or GES object always refers to its duration in the timeline, not the
media duration.)

To summarize:

* Rate-changing elements are registered in the GESEffectClass (pitch::tempo and
  pitch::rate are registered by default);
* GESTimelineElement is responsible for detecting rate-changing elements and
  computing the media_duration_factor;
* GESTrackElement is responsible for storing the media_duration_factor in
  NleObject;
* NleComposition is responsible for the recursive_media_duration_factor;
* The latter property finally fixes media time computations in NleObject.

NLE and GES tests are included.

[0] https://bugzilla.gnome.org/show_bug.cgi?id=755012

Differential Revision: https://phabricator.freedesktop.org/D276
2016-02-26 19:54:40 +01:00
Thibault Saunier
8c672f8366 effect: Determine the effect type as soon as possible
Making it possible to create the nleobject right at the creation
of the element.

Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D738
2016-02-04 15:23:26 +01:00
Christoph Reiter
a66e674649 Include class related section documentation in the gir file.
g-ir-scanner includes section docs as class/interface docs if the section name is equal to the lowercase type name.
Since all the documentation is in section blocks, rename them to match the type names.

https://bugzilla.gnome.org/show_bug.cgi?id=727776
2014-04-07 22:13:25 +02:00
Alexandru Băluț
abfe68b285 Remove "#" from short-description
It breaks the display in the index.html page.
2014-02-27 09:54:41 +01:00
Thibault Saunier
b774783af8 ges: Remove versionning infos now that we start on the 1.X API serie
They are now meaningless, all the current symbols are the basic
ones for the 1.X serie.
2013-12-27 10:14:19 +01:00
Thibault Saunier
54b10dcbbf trackelement: Simplify the way we handle children properties
So subclass do not have to implement a new logic all the time, but
instead can use a simple method to add properties as needed.
2013-08-27 15:33:45 -04:00
Thibault Saunier
b2b96c743d Rename GESTimelineLayer to GESLayer 2013-04-23 20:22:31 -03:00
Thibault Saunier
b397a41f2f Add a GESEffectAsset class, and make sure to set the GESTrackType asap on effects
+ Make use of the asset in ges_effect_new
2013-03-15 00:13:09 -03:00
Thibault Saunier
e24cccabfd Rename GESTrackParseLaunchEffect to GESEffect 2013-02-15 14:42:05 -03:00
Renamed from ges/ges-track-parse-launch-effect.c (Browse further)