Commit graph

64 commits

Author SHA1 Message Date
Thibault Saunier
fe49c80c8d ges: Add all missing Since markers from 1.16 onward
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/191>
2020-06-19 11:13:24 -04:00
Thibault Saunier
4a9e2c8984 ges: Update documentation
And start generating TrackElement children property with a stupid
simple script
2020-04-09 10:10:09 -04:00
Thibault Saunier
e41a6b6fac ges: Rework the way we ensure core elements are not wrongly moved between clips
Instead of focusing on the instances of the clips and their children,
we relax the check to allow moving track element clip between clips
that share a common asset. This makes it as correct conceptually but
more flexible, and the code becomes simpler.
2020-04-08 14:35:28 +01:00
Thibault Saunier
ddaf67fed3 ges: Deprecate GESImageSource and GESMultiFileSource
Refactoring GESVideoSource so that #GESUriVideoSource can handle
still image in a simple way

MultiFileSource has been replaced with the new `imagesequencesrc`
element, this was totally broken anyway as `multifilesrc` can not seek
properly.
2020-03-30 06:54:22 -03:00
Thibault Saunier
13325aabdd ges: Add a SourceClipAsset class
Cleaning up the way we use the default framerate for natural
frame rate.
2020-03-25 11:26:29 -03:00
Thibault Saunier
dcb3ad620d ges: Plug some leaks 2020-03-25 11:26:29 -03:00
Thibault Saunier
bd33ed972c ges: Add API to retrieve the natural framerate of an element 2020-03-25 11:26:27 -03:00
Thibault Saunier
0012c6a3b0 ges: Cleanup the way we declare object types
We create our own _DECLARE_ macro because we have instance structures
2020-03-19 21:09:18 +00:00
Sebastian Dröge
5feeb35dba Fix old-style C function declarations
ges-uri-asset.c: In function ‘create_discoverer’:
ges-uri-asset.c:53:1: error: old-style function definition [-Werror=old-style-definition]
   53 | create_discoverer ()
      | ^~~~~~~~~~~~~~~~~
ges-uri-asset.c: In function ‘get_discoverer’:
ges-uri-asset.c:67:1: error: old-style function definition [-Werror=old-style-definition]
   67 | get_discoverer ()
      | ^~~~~~~~~~~~~~
  CC       libges_1.0_la-ges-auto-transition.lo
ges-asset.c: In function ‘_get_type_entries’:
ges-asset.c:489:1: error: old-style function definition [-Werror=old-style-definition]
  489 | _get_type_entries ()
      | ^~~~~~~~~~~~~~~~~
2019-08-12 14:58:45 +00:00
Thibault Saunier
91dd3e44a7 doc: Add some missing Since: 2019-08-12 10:10:22 -04:00
Thibault Saunier
abb4f005e3 Mark nested timeline assets as such
Adding a property to let the application know

Also make sure that the duration of nested timeline assets is reported
as CLOCK_TIME_NONE as those are extended as necessary.

And make a difference between asset duration and their max duration
As nested timelines can be extended 'infinitely' those max duration
is GST_CLOCK_TIME_NONE, but their duration is the real duration of
the timeline.
2019-07-26 13:48:51 -04:00
Thibault Saunier
564505e16f uri-asset: Fix retrieving a relocated asset sync twice
Add a simple test for that.
2019-07-05 18:11:04 -04:00
Thibault Saunier
61c952c714 uri-asset: Implement multi threading support
Making sure to have 1 GstDiscoverer per thread.

Use that new feature in gesdemux by loading the timeline directly from
the streaming thread. Modifying the timeline is not supported allowed
anyway.
2019-07-05 17:56:03 -04:00
Thibault Saunier
cb96d0287e Use the new GstDiscoverer caching feature 2019-07-05 17:54:29 -04:00
Thibault Saunier
14d1f558b1 xml-formatter: Load assets before their proxies
Paving the way to removing pending fields to make the code
simpler to follow.
2019-07-05 17:44:31 -04:00
Sebastian Dröge
214987bd8a ges: Sprinkle around some Since: 1.16 markers 2019-05-16 15:09:13 +03:00
Thibault Saunier
5caf822526 docs: Minor fixes 2019-05-13 10:30:19 -04:00
Yeongjin Jeong
05d919a2eb uri-asset: Ensure that the discoverer stops on deinit.
Discoverer maintain a referernce on the discoverer object while
the async timeout callback is alive to prevent a potential crash
if the object is freed while the callback is pending.

But if g_main_context is released before calling the timeout callback,
the discoverer pointer which was weak referenced from GESUriClipAssetClass
will not be disposed because the discoverer object is not finalized.
2019-04-15 18:37:58 +09:00
Thibault Saunier
85f0e76566 asset-uri: Create a specific discoverer when discovering sync
To allow 'reintrancy'.

This was a 'regression' introduced in bad64296d9

Fixes https://gitlab.gnome.org/GNOME/pitivi/issues/2278
2019-03-14 12:35:23 +00:00
Yeongjin Jeong
70deab616a uri-asset: Implement dispose vmethod for GESUriSourceAsset
... and fix DiscovererStreamInfo leak
2019-01-29 16:16:49 +09:00
Yeongjin Jeong
f5f63ecdf3 uri-asset: Don't forget to unref DiscovererInfo on dispose
Dispose() must unref DiscovererInfo ownership
taken by ges_uri_clip_asset_set_info().
2019-01-29 16:16:13 +09:00
Thibault Saunier
bad64296d9 uri-asset: Use the same code path for sync discovery as the async one
And start handling relocated assets.

Also expose the discoverer callback as a vmethod so that we can
overridde the discoverer when necessary (to handle discovering of
timeline through gesdemux for example)
2019-01-29 00:06:32 +00:00
Seungha Yang
702c298122 ges: Add check sync/async discoverer
To support ges_{init/deinit} multiple times in a process,
there should be a method for setting up internal object/table of
GESUriClipAssetClass. because *_class_init() will be called
only once in process lifecycle.
2019-01-28 17:37:10 +09:00
Seungha Yang
173badbccf uri-asset: Add missing GHashTable cleanup
... and use g_object_unref() for GFile object, it's not a GstObject.
2019-01-28 17:35:04 +09:00
Corentin Noël
87925a72da uri-asset: Add ges_uri_clip_asset_finish to get better introspection
Vala requires a matching _finish function to correctly bind the method with the right finish method.
2019-01-23 11:51:08 +00:00
Seungha Yang
c883f98961 uri-asset: Don't leak GstDiscovererInfo 2019-01-18 20:32:02 +00:00
Seungha Yang
5a46f2eae9 uri-asset: Impl. dispose vfunc
... and fix GList/GESAsset leak
2019-01-18 20:32:02 +00:00
Tim-Philipp Müller
a7347ca8f7 WIP: ges: fix API export/import and 'inconsistent linkage' on MSVC
Export GES library API in headers when we're building the
library itself, otherwise import the API from the headers.

This fixes linker warnings on Windows when building with MSVC.

Fix up some missing config.h includes when building the lib which
is needed to get the export api define from config.h

Fixes https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/42
2018-12-15 00:14:51 +00:00
Thibault Saunier
13b8c8554d Update for g_type_class_add_private() deprecation in recent GLib 2018-09-05 22:57:27 -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
Guillaume Desmottes
53c5bc069c introduce ges_deinit()
GstDiscoverer objects were leaked by tests making the leaks detector
unusable.
Introduce ges_deinit(), similiar to gst_deinit(), doing some cleanup
before exiting the process.

https://bugzilla.gnome.org/show_bug.cgi?id=776805
2017-02-06 09:49:20 -03:00
namanyadav12
7ba2c22ccb uri-clip-asset: Add file-size metadata
Add file-size metadata to GESUriClipAsset.

Reviewed-by: Thibault Saunier <thibault.saunier@osg.samsung.com>
Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D1645
2017-02-04 18:52:59 -03:00
Philippe Renon
be48b040ea ges-uri-asset: fix compile error 'timeout' may be used uninitialized
https://bugzilla.gnome.org/show_bug.cgi?id=774751
2016-11-21 09:29:59 +02:00
Thibault Saunier
9bc06c755a ges: Check if GstDiscoverer could be created at init time
And fail initialization if it is not the case, we make the assumption
it worked all around the codebase so we should really concider it fatal.
2016-11-15 15:19:42 -03:00
Sebastian Dröge
90b5735f7a ges-uri-asset: GstDiscoverer can return a valid info but a non-OK result, consider this an error
The asynchronous case in ges_uri_clip_asset_request_async() already considered
it an error, do the same in ges_uri_clip_asset_request_sync().

https://bugzilla.gnome.org/show_bug.cgi?id=767293
2016-06-06 17:45:40 +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
Justin Kim
46f9cbdf4f uri-asset: do not reuse a passed GError pointer
Summary: A passed GError is re-allocated when discoverer has no information.

Reviewers: thiblahute

Projects: #gstreamer_editing_services

Reviewed By: thiblahute

Differential Revision: https://phabricator.freedesktop.org/D302
2015-10-02 16:08:03 +02:00
Justin Kim
aff2de6d5a uri-asset: don't leak uri string
https://bugzilla.gnome.org/show_bug.cgi?id=755505
2015-09-28 16:03:41 +02:00
Thibault Saunier
9669bafe46 uri-asset: Bump the discoverer timeout to 1 minute
We should by default avoid false timeouts
2015-07-01 10:19:07 +02:00
Thibault Saunier
321d2c2edd ges: Raise an error when the discoverer returns != RESULT_OK
And do not try to run the pipeline when that happens
2015-06-10 08:35:45 +02:00
Thibault Saunier
4f83cde172 uri-asset: Add a way to control discoverer timeout through envvar
Making it possible to run ges-launch test under valgrind for example
2015-06-10 08:35:45 +02:00
Thibault Saunier
dc2f48a726 uri-asset: Check that the newly computed URI exist
No the one we know failed!
2014-12-12 12:07:01 +01:00
Thibault Saunier
dc0770bfa6 uri-asset: Ensure that UriAssets loaded with error are remembered 2014-12-06 10:34:15 +01:00
Thibault Saunier
56abc17a70 uri-asset: Check return value of gst_tag_list_copy_value
CID 1139597
2014-04-17 13:18:19 +02: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
Lubosz Sarnecki
46c65aaaaf ges: multifilesrc support
* GESMultiFileSource class
* multifilesrc example
* Support multifile:// urls in uri asset
* start/stop index modification
* Doc

https://bugzilla.gnome.org/show_bug.cgi?id=719373
2014-03-19 18:32:48 +01:00
Thibault Saunier
f76000d750 uri-asset: Let a chance for user to change URI if the set one is not readable
It sounds like the most logical thing to do in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=721111
2014-02-04 13:53:34 +01:00
Lubosz Sarnecki
7b1df27c86 gir: fix warnings 2013-11-22 17:50:27 -03:00
Thibault Saunier
ee36beb244 uri-asset: Check if file exists before trying it as a proxy
This avoids:

  1- discovering file that we know do not exist
  2- proposing the current proxy path (that failed) as a possible proxy
     which lead to errors
2013-10-11 17:09:46 -03:00