diff --git a/docs/gstreamer-base/docs.md b/docs/gstreamer-base/docs.md index 103c0e3f1..ae4094b91 100644 --- a/docs/gstreamer-base/docs.md +++ b/docs/gstreamer-base/docs.md @@ -546,6 +546,187 @@ a `glib::List` of bytes are not available Releases the memory obtained with the last `Adapter::map`. + +Manages a set of pads with the purpose of aggregating their buffers. +Control is given to the subclass when all pads have data. + + * Base class for mixers and muxers. Subclasses should at least implement + the `AggregatorClass.aggregate`() virtual method. + + * Installs a `GstPadChainFunction`, a `GstPadEventFullFunction` and a + `GstPadQueryFunction` to queue all serialized data packets per sink pad. + Subclasses should not overwrite those, but instead implement + `AggregatorClass.sink_event`() and `AggregatorClass.sink_query`() as + needed. + + * When data is queued on all pads, the aggregate vmethod is called. + + * One can peek at the data on any given GstAggregatorPad with the + gst_aggregator_pad_peek_buffer () method, and remove it from the pad + with the gst_aggregator_pad_pop_buffer () method. When a buffer + has been taken with pop_buffer (), a new buffer can be queued + on that pad. + + * If the subclass wishes to push a buffer downstream in its aggregate + implementation, it should do so through the + gst_aggregator_finish_buffer () method. This method will take care + of sending and ordering mandatory events such as stream start, caps + and segment. + + * Same goes for EOS events, which should not be pushed directly by the + subclass, it should instead return GST_FLOW_EOS in its aggregate + implementation. + + * Note that the aggregator logic regarding gap event handling is to turn + these into gap buffers with matching PTS and duration. It will also + flag these buffers with GST_BUFFER_FLAG_GAP and GST_BUFFER_FLAG_DROPPABLE + to ease their identification and subsequent processing. + + * Subclasses must use (a subclass of) `AggregatorPad` for both their + sink and source pads. + See `gst::ElementClass::add_static_pad_template_with_gtype`. + +This class used to live in gst-plugins-bad and was moved to core. + +Feature: `v1_14` + +# Implements + +[`AggregatorExt`](trait.AggregatorExt.html), [`gst::ElementExt`](../gst/trait.ElementExt.html), [`gst::ObjectExt`](../gst/trait.ObjectExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + +Trait containing all `Aggregator` methods. + +Feature: `v1_14` + +# Implementors + +[`Aggregator`](struct.Aggregator.html) + +This method will push the provided output buffer downstream. If needed, +mandatory events such as stream-start, caps, and segment events will be +sent before pushing the buffer. + +Feature: `v1_14` + +## `buffer` +the `gst::Buffer` to push. + +Lets `Aggregator` sub-classes get the memory `allocator` +acquired by the base class and its `params`. + +Unref the `allocator` after use it. + +Feature: `v1_14` + +## `allocator` +the `gst::Allocator` +used +## `params` +the +`gst::AllocationParams` of `allocator` + + +Feature: `v1_14` + + +# Returns + +the instance of the `gst::BufferPool` used +by `trans`; free it after use it + +Retrieves the latency values reported by `self` in response to the latency +query, or `GST_CLOCK_TIME_NONE` if there is not live source connected and the element +will not wait for the clock. + +Typically only called by subclasses. + +Feature: `v1_14` + + +# Returns + +The latency or `GST_CLOCK_TIME_NONE` if the element does not sync + +Lets `Aggregator` sub-classes tell the baseclass what their internal +latency is. Will also post a LATENCY message on the bus so the pipeline +can reconfigure its global latency. + +Feature: `v1_14` + +## `min_latency` +minimum latency +## `max_latency` +maximum latency + +Sets the caps to be used on the src pad. + +Feature: `v1_14` + +## `caps` +The `gst::Caps` to set on the src pad. + +Pads managed by a `GstAggregor` subclass. + +This class used to live in gst-plugins-bad and was moved to core. + +Feature: `v1_14` + +# Implements + +[`AggregatorPadExt`](trait.AggregatorPadExt.html), [`gst::PadExt`](../gst/trait.PadExt.html), [`gst::ObjectExt`](../gst/trait.ObjectExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + +Trait containing all `AggregatorPad` methods. + +Feature: `v1_14` + +# Implementors + +[`AggregatorPad`](struct.AggregatorPad.html) + +Drop the buffer currently queued in `self`. + +Feature: `v1_14` + + +# Returns + +TRUE if there was a buffer queued in `self`, or FALSE if not. + + +Feature: `v1_14_1` + + +# Returns + +`true` if the pad has a buffer available as the next thing. + + +Feature: `v1_14` + + +# Returns + +`true` if the pad is EOS, otherwise `false`. + + +Feature: `v1_14` + + +# Returns + +A reference to the buffer in `self` or +NULL if no buffer was queued. You should unref the buffer after +usage. + +Steal the ref to the buffer currently queued in `self`. + +Feature: `v1_14` + + +# Returns + +The buffer in `self` or NULL if no buffer was + queued. You should unref the buffer after usage. `BaseSink` is the base class for sink elements in GStreamer, such as xvimagesink or filesink. It is a layer on top of `gst::Element` that provides a diff --git a/docs/gstreamer-check/docs.md b/docs/gstreamer-check/docs.md index e69de29bb..c2884d5f1 100644 --- a/docs/gstreamer-check/docs.md +++ b/docs/gstreamer-check/docs.md @@ -0,0 +1,308 @@ + + +GstTestClock is an implementation of `gst::Clock` which has different +behaviour compared to `gst::SystemClock`. Time for `gst::SystemClock` advances +according to the system time, while time for `TestClock` changes only +when `TestClock::set_time` or `TestClock::advance_time` are +called. `TestClock` provides unit tests with the possibility to +precisely advance the time in a deterministic manner, independent of the +system time or any other external factors. + +## Advancing the time of a `TestClock` + + +```C + #include + #include + + GstClock *clock; + GstTestClock *test_clock; + + clock = gst_test_clock_new (); + test_clock = GST_TEST_CLOCK (clock); + GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock))); + gst_test_clock_advance_time ( test_clock, 1 * GST_SECOND); + GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock))); + g_usleep (10 * G_USEC_PER_SEC); + GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock))); + gst_test_clock_set_time (test_clock, 42 * GST_SECOND); + GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock))); + ... +``` + +`gst::Clock` allows for setting up single shot or periodic clock notifications +as well as waiting for these notifications synchronously (using +`gst::Clock::id_wait`) or asynchronously (using `gst::Clock::id_wait_async` or +`gst::Clock::id_wait_async`). This is used by many GStreamer elements, +among them `GstBaseSrc` and `GstBaseSink`. + +`TestClock` keeps track of these clock notifications. By calling +`TestClock::wait_for_next_pending_id` or +`TestClock::wait_for_multiple_pending_ids` a unit tests may wait for the +next one or several clock notifications to be requested. Additionally unit +tests may release blocked waits in a controlled fashion by calling +`TestClock::process_next_clock_id`. This way a unit test can control the +inaccuracy (jitter) of clock notifications, since the test can decide to +release blocked waits when the clock time has advanced exactly to, or past, +the requested clock notification time. + +There are also interfaces for determining if a notification belongs to a +`TestClock` or not, as well as getting the number of requested clock +notifications so far. + +N.B.: When a unit test waits for a certain amount of clock notifications to +be requested in `TestClock::wait_for_next_pending_id` or +`TestClock::wait_for_multiple_pending_ids` then these functions may block +for a long time. If they block forever then the expected clock notifications +were never requested from `TestClock`, and so the assumptions in the code +of the unit test are wrong. The unit test case runner in gstcheck is +expected to catch these cases either by the default test case timeout or the +one set for the unit test by calling tcase_set_timeout\(\). + +The sample code below assumes that the element under test will delay a +buffer pushed on the source pad by some latency until it arrives on the sink +pad. Moreover it is assumed that the element will at some point call +`gst::Clock::id_wait` to synchronously wait for a specific time. The first +buffer sent will arrive exactly on time only delayed by the latency. The +second buffer will arrive a little late (7ms) due to simulated jitter in the +clock notification. + +## Demonstration of how to work with clock notifications and `TestClock` + + +```C + #include + #include + #include + + GstClockTime latency; + GstElement *element; + GstPad *srcpad; + GstClock *clock; + GstTestClock *test_clock; + GstBuffer buf; + GstClockID pending_id; + GstClockID processed_id; + + latency = 42 * GST_MSECOND; + element = create_element (latency, ...); + srcpad = get_source_pad (element); + + clock = gst_test_clock_new (); + test_clock = GST_TEST_CLOCK (clock); + gst_element_set_clock (element, clock); + + GST_INFO ("Set time, create and push the first buffer\n"); + gst_test_clock_set_time (test_clock, 0); + buf = create_test_buffer (gst_clock_get_time (clock), ...); + gst_assert_cmpint (gst_pad_push (srcpad, buf), ==, GST_FLOW_OK); + + GST_INFO ("Block until element is waiting for a clock notification\n"); + gst_test_clock_wait_for_next_pending_id (test_clock, &pending_id); + GST_INFO ("Advance to the requested time of the clock notification\n"); + gst_test_clock_advance_time (test_clock, latency); + GST_INFO ("Release the next blocking wait and make sure it is the one from element\n"); + processed_id = gst_test_clock_process_next_clock_id (test_clock); + g_assert (processed_id == pending_id); + g_assert_cmpint (GST_CLOCK_ENTRY_STATUS (processed_id), ==, GST_CLOCK_OK); + gst_clock_id_unref (pending_id); + gst_clock_id_unref (processed_id); + + GST_INFO ("Validate that element produced an output buffer and check its timestamp\n"); + g_assert_cmpint (get_number_of_output_buffer (...), ==, 1); + buf = get_buffer_pushed_by_element (element, ...); + g_assert_cmpint (GST_BUFFER_TIMESTAMP (buf), ==, latency); + gst_buffer_unref (buf); + GST_INFO ("Check that element does not wait for any clock notification\n"); + g_assert (!gst_test_clock_peek_next_pending_id (test_clock, NULL)); + + GST_INFO ("Set time, create and push the second buffer\n"); + gst_test_clock_advance_time (test_clock, 10 * GST_SECOND); + buf = create_test_buffer (gst_clock_get_time (clock), ...); + gst_assert_cmpint (gst_pad_push (srcpad, buf), ==, GST_FLOW_OK); + + GST_INFO ("Block until element is waiting for a new clock notification\n"); + (gst_test_clock_wait_for_next_pending_id (test_clock, &pending_id); + GST_INFO ("Advance past 7ms beyond the requested time of the clock notification\n"); + gst_test_clock_advance_time (test_clock, latency + 7 * GST_MSECOND); + GST_INFO ("Release the next blocking wait and make sure it is the one from element\n"); + processed_id = gst_test_clock_process_next_clock_id (test_clock); + g_assert (processed_id == pending_id); + g_assert_cmpint (GST_CLOCK_ENTRY_STATUS (processed_id), ==, GST_CLOCK_OK); + gst_clock_id_unref (pending_id); + gst_clock_id_unref (processed_id); + + GST_INFO ("Validate that element produced an output buffer and check its timestamp\n"); + g_assert_cmpint (get_number_of_output_buffer (...), ==, 1); + buf = get_buffer_pushed_by_element (element, ...); + g_assert_cmpint (GST_BUFFER_TIMESTAMP (buf), ==, + 10 * GST_SECOND + latency + 7 * GST_MSECOND); + gst_buffer_unref (buf); + GST_INFO ("Check that element does not wait for any clock notification\n"); + g_assert (!gst_test_clock_peek_next_pending_id (test_clock, NULL)); + ... +``` + +Since `TestClock` is only supposed to be used in unit tests it calls +`g_assert`, `g_assert_cmpint` or `g_assert_cmpuint` to validate all function +arguments. This will highlight any issues with the unit test code itself. + +# Implements + +[`gst::ClockExt`](../gst/trait.ClockExt.html), [`gst::ObjectExt`](../gst/trait.ObjectExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + +Creates a new test clock with its time set to zero. + +MT safe. + +# Returns + +a `TestClock` cast to `gst::Clock`. + +Creates a new test clock with its time set to the specified time. + +MT safe. +## `start_time` +a `gst::ClockTime` set to the desired start time of the clock. + +# Returns + +a `TestClock` cast to `gst::Clock`. + +Finds the latest time inside the list. + +MT safe. +## `pending_list` +List + of of pending `GstClockIDs` + +Advances the time of the `self` by the amount given by `delta`. The +time of `self` is monotonically increasing, therefore providing a +`delta` which is negative or zero is a programming error. + +MT safe. +## `delta` +a positive `gst::ClockTimeDiff` to be added to the time of the clock + +A "crank" consists of three steps: +1: Wait for a `gst::ClockID` to be registered with the `TestClock`. +2: Advance the `TestClock` to the time the `gst::ClockID` is waiting for. +3: Release the `gst::ClockID` wait. +A "crank" can be though of as the notion of +manually driving the clock forward to its next logical step. + +# Returns + +`true` if the crank was successful, `false` otherwise. + +MT safe. + +Retrieve the requested time for the next pending clock notification. + +MT safe. + +# Returns + +a `gst::ClockTime` set to the time of the next pending clock +notification. If no clock notifications have been requested +`GST_CLOCK_TIME_NONE` will be returned. + +Checks whether `self` was requested to provide the clock notification +given by `id`. + +MT safe. +## `id` +a `gst::ClockID` clock notification + +# Returns + +`true` if the clock has been asked to provide the given clock +notification, `false` otherwise. + +Determine the number of pending clock notifications that have been +requested from the `self`. + +MT safe. + +# Returns + +the number of pending clock notifications. + +Determines if the `pending_id` is the next clock notification scheduled to +be triggered given the current time of the `self`. + +MT safe. +## `pending_id` +a `gst::ClockID` clock +notification to look for + +# Returns + +`true` if `pending_id` is the next clock notification to be +triggered, `false` otherwise. + +Processes and releases the pending IDs in the list. + +MT safe. +## `pending_list` +List + of pending `GstClockIDs` + +MT safe. + +# Returns + +a `gst::ClockID` containing the next pending clock +notification. + +Sets the time of `self` to the time given by `new_time`. The time of +`self` is monotonically increasing, therefore providing a `new_time` +which is earlier or equal to the time of the clock as given by +`gst::ClockExt::get_time` is a programming error. + +MT safe. +## `new_time` +a `gst::ClockTime` later than that returned by `gst::ClockExt::get_time` + +Blocks until at least `count` clock notifications have been requested from +`self`. There is no timeout for this wait, see the main description of +`TestClock`. + +MT safe. +## `count` +the number of pending clock notifications to wait for +## `pending_list` +Address + of a `glib::List` pointer variable to store the list of pending `GstClockIDs` + that expired, or `None` + +Waits until a clock notification is requested from `self`. There is no +timeout for this wait, see the main description of `TestClock`. A reference +to the pending clock notification is stored in `pending_id`. + +MT safe. +## `pending_id` +`gst::ClockID` +with information about the pending clock notification + +Blocks until at least `count` clock notifications have been requested from +`self`. There is no timeout for this wait, see the main description of +`TestClock`. + +# Deprecated + +use `TestClock::wait_for_multiple_pending_ids` instead. +## `count` +the number of pending clock notifications to wait for + +When a `TestClock` is constructed it will have a certain start time set. +If the clock was created using `TestClock::new_with_start_time` then +this property contains the value of the `start_time` argument. If +`TestClock::new` was called the clock started at time zero, and thus +this property contains the value 0. + +When a `TestClock` is constructed it will have a certain start time set. +If the clock was created using `TestClock::new_with_start_time` then +this property contains the value of the `start_time` argument. If +`TestClock::new` was called the clock started at time zero, and thus +this property contains the value 0. diff --git a/docs/gstreamer-editing-services/docs.md b/docs/gstreamer-editing-services/docs.md index e69de29bb..32e1c2958 100644 --- a/docs/gstreamer-editing-services/docs.md +++ b/docs/gstreamer-editing-services/docs.md @@ -0,0 +1,2562 @@ + + +The Assets in the GStreamer Editing Services represent the resources +that can be used. You can create assets for any type that implements the `Extractable` +interface, for example `GESClips`, `Formatter`, and `TrackElement` do implement it. +This means that assets will represent for example a `GESUriClips`, `BaseEffect` etc, +and then you can extract objects of those types with the appropriate parameters from the asset +using the `AssetExt::extract` method: + + +```text +GESAsset *effect_asset; +GESEffect *effect; + +// You create an asset for an effect +effect_asset = ges_asset_request (GES_TYPE_EFFECT, "agingtv", NULL); + +// And now you can extract an instance of GESEffect from that asset +effect = GES_EFFECT (ges_asset_extract (effect_asset)); + +``` + +In that example, the advantages of having a `Asset` are that you can know what effects +you are working with and let your user know about the avalaible ones, you can add metadata +to the `Asset` through the `MetaContainer` interface and you have a model for your +custom effects. Note that `Asset` management is making easier thanks to the `Project` class. + +Each asset is represented by a pair of `extractable_type` and `id` (string). Actually the `extractable_type` +is the type that implements the `Extractable` interface, that means that for example for a `UriClip`, +the type that implements the `Extractable` interface is `Clip`. +The identifier represents different things depending on the `extractable_type` and you should check +the documentation of each type to know what the ID of `Asset` actually represents for that type. By default, +we only have one `Asset` per type, and the `id` is the name of the type, but this behaviour is overriden +to be more useful. For example, for GESTransitionClips, the ID is the vtype of the transition +you will extract from it (ie crossfade, box-wipe-rc etc..) For `Effect` the ID is the +`bin`-description property of the extracted objects (ie the gst-launch style description of the bin that +will be used). + +Each and every `Asset` is cached into GES, and you can query those with the `ges_list_assets` function. +Also the system will automatically register `GESAssets` for `GESFormatters` and `GESTransitionClips` +and standard effects (actually not implemented yet) and you can simply query those calling: + +```text + GList *formatter_assets, *tmp; + + // List all the transitions + formatter_assets = ges_list_assets (GES_TYPE_FORMATTER); + + // Print some infos about the formatter GESAsset + for (tmp = formatter_assets; tmp; tmp = tmp->next) { + g_print ("Name of the formatter: %s, file extension it produces: %s", + ges_meta_container_get_string (GES_META_CONTAINER (tmp->data), GES_META_FORMATTER_NAME), + ges_meta_container_get_string (GES_META_CONTAINER (tmp->data), GES_META_FORMATTER_EXTENSION)); + } + + g_list_free (transition_assets); + +``` + +You can request the creation of `GESAssets` using either `Asset::request` or +`Asset::request_async`. All the `GESAssets` are cached and thus any asset that has already +been created can be requested again without overhead. + +# Implements + +[`AssetExt`](trait.AssetExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + +Trait containing all `Asset` methods. + +# Implementors + +[`Asset`](struct.Asset.html), [`Project`](struct.Project.html) + +Sets an asset from the internal cache as needing reload. An asset needs reload +in the case where, for example, we were missing a GstPlugin to use it and that +plugin has been installed, or, that particular asset content as changed +meanwhile (in the case of the usage of proxies). + +Once an asset has been set as "needs reload", requesting that asset again +will lead to it being re discovered, and reloaded as if it was not in the +cache before. +## `extractable_type` +The `glib::Type` of the object that can be extracted from the + asset to be reloaded. +## `id` +The identifier of the asset to mark as needing reload + +# Returns + +`true` if the asset was in the cache and could be set as needing reload, +`false` otherwise. + +Create a `Asset` in the most simple cases, you should look at the `extractable_type` +documentation to see if that constructor can be called for this particular type + +As it is recommanded not to instanciate assets for GESUriClip synchronously, +it will not work with this method, but you can instead use the specific +`UriClipAsset::request_sync` method if you really want to. +## `extractable_type` +The `glib::Type` of the object that can be extracted from the new asset. +## `id` +The Identifier or `None` + +# Returns + +A reference to the wanted `Asset` or `None` + +Request a new `Asset` asyncronously, `callback` will be called when the materail is +ready to be used or if an error occured. + +Example of request of a GESAsset async: + +```text +// The request callback +static void +asset_loaded_cb (GESAsset * source, GAsyncResult * res, gpointer user_data) +{ + GESAsset *asset; + GError *error = NULL; + + asset = ges_asset_request_finish (res, &error); + if (asset) { + g_print ("The file: %s is usable as a FileSource", + ges_asset_get_id (asset)); + } else { + g_print ("The file: %s is *not* usable as a FileSource because: %s", + ges_asset_get_id (source), error->message); + } + + gst_object_unref (mfs); +} + +// The request: +ges_asset_request_async (GES_TYPE_URI_CLIP, some_uri, NULL, + (GAsyncReadyCallback) asset_loaded_cb, user_data); +``` +## `extractable_type` +The `glib::Type` of the object that can be extracted from the + new asset. The class must implement the `Extractable` interface. +## `id` +The Identifier of the asset we want to create. This identifier depends of the extractable, +type you want. By default it is the name of the class itself (or `None`), but for example for a +GESEffect, it will be the pipeline description, for a GESUriClip it +will be the name of the file, etc... You should refer to the documentation of the `Extractable` +type you want to create a `Asset` for. +## `cancellable` +optional `gio::Cancellable` object, `None` to ignore. +## `callback` +a `GAsyncReadyCallback` to call when the initialization is finished, +Note that the `source` of the callback will be the `Asset`, but you need to +make sure that the asset is properly loaded using the `Asset::request_finish` +method. This asset can not be used as is. +## `user_data` +The user data to pass when `callback` is called + +Finalize the request of an async `Asset` +## `res` +The `gio::AsyncResult` from which to get the newly created `Asset` + +# Returns + +The `Asset` previously requested + +Extracts a new `gobject::Object` from `asset`. The type of the object is +defined by the extractable-type of `asset`, you can check what +type will be extracted from `asset` using +`AssetExt::get_extractable_type` + +# Returns + +A newly created `Extractable` + + +# Returns + +The `glib::Error` of the asset or `None` if +the asset was loaded without issue + +Gets the type of object that can be extracted from `self` + +# Returns + +the type of object that can be extracted from `self` + +Gets the ID of a `Asset` + +# Returns + +The ID of `self` + + +# Returns + +The proxy in use for `self` + + +# Returns + +The `Asset` that is proxied by `self` + + +# Returns + +The list of proxies `self` has. Note that the default asset to be +used is always the first in that list. + +A proxying asset is an asset that can substitue the real `self`. For example if you +have a full HD `UriClipAsset` you might want to set a lower resolution (HD version +of the same file) as proxy. Note that when an asset is proxied, calling +`Asset::request` will actually return the proxy asset. +## `proxy` +The `Asset` that should be used as default proxy for `self` or +`None` if you want to use the currently set proxy. Note that an asset can proxy one and only +one other asset. + +# Returns + +`true` if `proxy` has been set on `self`, `false` otherwise. + +Removes `proxy` from the list of known proxies for `self`. +If `proxy` was the current proxy for `self`, stop using it. +## `proxy` +The `Asset` to stop considering as a proxy for `self` + +# Returns + +`true` if `proxy` was a known proxy for `self`, `false` otherwise. + + + +# Implements + +[`TrackElementExt`](trait.TrackElementExt.html), [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html) + +A `Clip` is a 'natural' object which controls one or more +`TrackElement`(s) in one or more `Track`(s). + +Keeps a reference to the `TrackElement`(s) it created and +sets/updates their properties. + +# Implements + +[`ClipExt`](trait.ClipExt.html), [`GESContainerExt`](trait.GESContainerExt.html), [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html) + +Trait containing all `Clip` methods. + +# Implementors + +[`Clip`](struct.Clip.html) + +Extracts a `TrackElement` from `asset` and adds it to the `self`. +Should only be called in order to add operations to a `Clip`, +ni other cases TrackElement are added automatically when adding the +`Clip`/`Asset` to a layer. + +Takes a reference on `track_element`. +## `asset` +a `Asset` with `GES_TYPE_TRACK_ELEMENT` as extractable_type + +# Returns + +Created `TrackElement` or NULL +if an error happened + +Finds the `TrackElement` controlled by `self` that is used in `track`. You +may optionally specify a GType to further narrow search criteria. + +Note: If many objects match, then the one with the highest priority will be +returned. +## `track` +a `Track` or NULL +## `type_` +a `glib::Type` indicating the type of track element you are looking +for or `G_TYPE_NONE` if you do not care about the track type. + +# Returns + +The `TrackElement` used by `track`, +else `None`. Unref after usage + +Finds all the `TrackElement` controlled by `self` that is used in `track`. You +may optionally specify a GType to further narrow search criteria. +## `track` +a `Track` or NULL +## `track_type` +a `TrackType` indicating the type of tracks in which elements +should be searched. +## `type_` +a `glib::Type` indicating the type of track element you are looking +for or `G_TYPE_NONE` if you do not care about the track type. + +# Returns + +a `glib::List` of the +`TrackElement` contained in `self`. +The refcount of the objects will be increased. The user will have to +unref each `TrackElement` and free the `glib::List`. + +Get the `Layer` to which this clip belongs. + +# Returns + +The `Layer` where this `self` is being +used, or `None` if it is not used on any layer. The caller should unref it +usage. + +Get the formats supported by `self`. + +# Returns + +The formats supported by `self`. + +Gets the index position of an effect. +## `effect` +The `BaseEffect` we want to get the top index from + +# Returns + +The top index of the effect, -1 if something went wrong. + +Get effects applied on `self` + +# Returns + +a `glib::List` of the +`BaseEffect` that are applied on `self` order by ascendant priorities. +The refcount of the objects will be increased. The user will have to +unref each `BaseEffect` and free the `glib::List`. + +Moves `self` to `layer`. If `self` is not in any layer, it adds it to +`layer`, else, it removes it from its current layer, and adds it to `layer`. +## `layer` +the new `Layer` + +# Returns + +`true` if `self` could be moved `false` otherwize + +Sets the formats supported by the file. +## `supportedformats` +the `TrackType` defining formats supported by `self` + +This is a convenience method that lets you set the index of a top effect. +## `effect` +The `BaseEffect` to move +## `newindex` +the new index at which to move the `effect` inside this +`Clip` + +# Returns + +`true` if `effect` was successfuly moved, `false` otherwise. + +The function modifies `self`, and creates another `Clip` so we have two +clips at the end, splitted at the time specified by `position`, as a position +in the timeline (not in the clip to be split). For example, if +ges_clip_split is called on a 4-second clip playing from 0:01.00 until +0:05.00, with a split position of 0:02.00, this will result in one clip of 1 +second and one clip of 3 seconds, not in two clips of 2 seconds. + +The newly created clip will be added to the same layer as `self` is in. This +implies that `self` must be in a `Layer` for the operation to be possible. + +This method supports clips playing at a different tempo than one second per +second. For example, splitting a clip with a `Effect` 'pitch tempo=1.5' +four seconds after it starts, will set the inpoint of the new clip to six +seconds after that of the clip to split. For this, the rate-changing +property must be registered using `EffectClass::register_rate_property`; +for the 'pitch' plugin, this is already done. +## `position` +a `gst::ClockTime` representing the timeline position at which to split + +# Returns + +The newly created `Clip` resulting +from the splitting or `None` if the clip can't be split. + +The GESLayer where this clip is being used. If you want to connect to its +notify signal you should connect to it with g_signal_connect_after as the +signal emission can be stop in the first fase. + +The formats supported by the clip. + +The formats supported by the clip. + +The `Container` base class. + +# Implements + +[`GESContainerExt`](trait.GESContainerExt.html), [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html) + +Trait containing all `Container` methods. + +# Implementors + +[`Clip`](struct.Clip.html), [`Container`](struct.Container.html), [`Group`](struct.Group.html) + +Groups the `Container`-s provided in `containers`. It creates a subclass +of `Container`, depending on the containers provided in `containers`. +Basically, if all the containers in `containers` should be contained in a same +clip (all the `TrackElement` they contain have the exact same +start/inpoint/duration and are in the same layer), it will create a `Clip` +otherwise a `Group` will be created +## `containers` +The +`Container` to group, they must all be in a same `Timeline` + +# Returns + +The `Container` (subclass) resulting of the +grouping + +Add the `TimelineElement` to the container. +## `child` +the `TimelineElement` + +# Returns + +`true` on success, `false` on failure. + +Edit `self` in the different exisiting `EditMode` modes. In the case of +slide, and roll, you need to specify a `Edge` +## `layers` +The layers you want the edit to + happen in, `None` means that the edition is done in all the + `GESLayers` contained in the current timeline. +## `new_layer_priority` +The priority of the layer `self` should land in. + If the layer you're trying to move the container to doesn't exist, it will + be created automatically. -1 means no move. +## `mode` +The `EditMode` in which the editition will happen. +## `edge` +The `Edge` the edit should happen on. +## `position` +The position at which to edit `self` (in nanosecond) + +# Returns + +`true` if the container as been edited properly, `false` if an error +occured + +Get the list of `TimelineElement` contained in `self` +The user is responsible for unreffing the contained objects +and freeing the list. +## `recursive` +Whether to recursively get children in `self` + +# Returns + +The list of +timeline element contained in `self`. + +Release the `child` from the control of `self`. +## `child` +the `TimelineElement` to release + +# Returns + +`true` if the `child` was properly released, else `false`. + +Ungroups the `TimelineElement` contained in this GESContainer, +creating new `Container` containing those `TimelineElement` +apropriately. +## `recursive` +Wether to recursively ungroup `self` + +# Returns + +The list of +`Container` resulting from the ungrouping operation +The user is responsible for unreffing the contained objects +and freeing the list. + +Will be emitted after a child was added to `container`. +Usually you should connect with `g_signal_connect_after` +as in the first emission stage, the signal emission might +get stopped internally. +## `element` +the `TimelineElement` that was added. + +Will be emitted after a child was removed from `container`. +## `element` +the `TimelineElement` that was removed. + +The span of priorities which this container occupies. + +The edges of an object contain in a `Timeline` or `Track` + +Represents the start of an object. + +Represents the end of an object. + +Represent the fact we are not workin with any edge of an + object. + +You can also find more explanation about the behaviour of those modes at: + trim, ripple and roll`` +and clip management``. + +The object is edited the normal way (default). + +The objects are edited in ripple mode. + The Ripple mode allows you to modify the beginning/end of a clip + and move the neighbours accordingly. This will change the overall + timeline duration. In the case of ripple end, the duration of the + clip being rippled can't be superior to its max_duration - inpoint + otherwise the action won't be executed. + +The object is edited in roll mode. + The Roll mode allows you to modify the position of an editing point + between two clips without modifying the inpoint of the first clip + nor the out-point of the second clip. This will not change the + overall timeline duration. + +The object is edited in trim mode. + The Trim mode allows you to modify the in-point/duration of a clip + without modifying its position in the timeline. + +The object is edited in slide mode. + The Slide mode allows you to modify the position of a clip in a + timeline without modifying its duration or its in-point, but will + modify the duration of the previous clip and in-point of the + following clip so does not modify the overall timeline duration. + (not implemented yet) + + + +# Implements + +[`EffectExt`](trait.EffectExt.html), [`BaseEffectExt`](trait.BaseEffectExt.html), [`TrackElementExt`](trait.TrackElementExt.html), [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html) + +Trait containing all `Effect` methods. + +# Implementors + +[`Effect`](struct.Effect.html) + +Creates a new `Effect` from the description of the bin. It should be +possible to determine the type of the effect through the element +'klass' metadata of the GstElements that will be created. +In that corner case, you should use: +`Asset::request` (GES_TYPE_EFFECT, "audio your ! bin ! description", NULL); +and extract that asset to be in full control. +## `bin_description` +The gst-launch like bin description of the effect + +# Returns + +a newly created `Effect`, or `None` if something went +wrong. + +The description of the effect bin with a gst-launch-style +pipeline description. + +Example: "videobalance saturation=1.5 hue=+0.5" + +The description of the effect bin with a gst-launch-style +pipeline description. + +Example: "videobalance saturation=1.5 hue=+0.5" + +FIXME: Long description needed + +# Implements + +[`ExtractableExt`](trait.ExtractableExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + +Trait containing all `Extractable` methods. + +# Implementors + +[`BaseEffect`](struct.BaseEffect.html), [`Clip`](struct.Clip.html), [`Container`](struct.Container.html), [`Effect`](struct.Effect.html), [`Extractable`](struct.Extractable.html), [`Group`](struct.Group.html), [`Layer`](struct.Layer.html), [`TimelineElement`](struct.TimelineElement.html), [`Timeline`](struct.Timeline.html), [`TrackElement`](struct.TrackElement.html), [`UriClip`](struct.UriClip.html) + +Method for getting an asset from a `Extractable` + +# Returns + +The `Asset` or `None` if none has +been set + + +# Returns + +The `id` of the associated `Asset`, free with `g_free` + +Method to set the asset which instantiated the specified object +## `asset` +The `Asset` to set + +# Returns + +`true` if `asset` could be set `false` otherwize + +A `Group` is an object which controls one or more +`GESClips` in one or more `Layer`(s). + +To instanciate a group, you should use the ges_container_group method, +this will be responsible for deciding what subclass of `Container` +should be instaciated to group the various `TimelineElement` passed +in parametter. + +# Implements + +[`GroupExt`](trait.GroupExt.html), [`GESContainerExt`](trait.GESContainerExt.html), [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html) + +Trait containing all `Group` methods. + +# Implementors + +[`Group`](struct.Group.html) + +Created a new empty `Group`, if you want to group several container +together, it is recommanded to use the `Container::group` method so the +proper subclass is selected. + +# Returns + +The new empty group. + +The duration (in nanoseconds) which will be used in the container + +The duration (in nanoseconds) which will be used in the container + +The in-point at which this `Group` will start outputting data +from its contents (in nanoseconds). + +Ex : an in-point of 5 seconds means that the first outputted buffer will +be the one located 5 seconds in the controlled resource. + +The in-point at which this `Group` will start outputting data +from its contents (in nanoseconds). + +Ex : an in-point of 5 seconds means that the first outputted buffer will +be the one located 5 seconds in the controlled resource. + +The maximum duration (in nanoseconds) of the `Group`. + +The maximum duration (in nanoseconds) of the `Group`. + +The position of the object in its container (in nanoseconds). + +The position of the object in its container (in nanoseconds). + +Responsible for the ordering of the various contained Clip(s). A +timeline layer has a "priority" property, which is used to manage the +priorities of individual Clips. Two layers should not have the +same priority within a given timeline. + +# Implements + +[`LayerExt`](trait.LayerExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html) + +Trait containing all `Layer` methods. + +# Implementors + +[`Layer`](struct.Layer.html) + +Creates a new `Layer`. + +# Returns + +A new `Layer` + +Creates Clip from asset, adds it to layer and +returns a reference to it. +## `asset` +The asset to add to +## `start` +The start value to set on the new `Clip`, +if `start` == GST_CLOCK_TIME_NONE, it will be set to +the current duration of `self` +## `inpoint` +The inpoint value to set on the new `Clip` +## `duration` +The duration value to set on the new `Clip` +## `track_types` +The `TrackType` to set on the the new `Clip` + +# Returns + +Created `Clip` + +Adds the given clip to the layer. Sets the clip's parent, and thus +takes ownership of the clip. + +An clip can only be added to one layer. + +Calling this method will construct and properly set all the media related +elements on `clip`. If you need to know when those objects (actually `TrackElement`) +are constructed, you should connect to the container::child-added signal which +is emited right after those elements are ready to be used. +## `clip` +the `Clip` to add. + +# Returns + +`true` if the clip was properly added to the layer, or `false` +if the `self` refuses to add the clip. + +Gets whether transitions are automatically added when objects +overlap or not. + +# Returns + +`true` if transitions are automatically added, else `false`. + +Get the clips this layer contains. + +# Returns + +a `glib::List` of +clips. The user is responsible for +unreffing the contained objects and freeing the list. + +Gets the clips which appear between `start` and `end` on `self`. +## `start` +start of the interval +## `end` +end of the interval + +# Returns + +a `glib::List` of clips intersecting [`start`, `end`) interval on `self`. + +Lets you retrieve the duration of the layer, which means +the end time of the last clip inside it + +# Returns + +The duration of a layer + +Get the priority of `self` within the timeline. + +# Returns + +The priority of the `self` within the timeline. + +Get the `Timeline` in which `Layer` currently is. + +# Returns + +the `Timeline` in which `Layer` +currently is or `None` if not in any timeline yet. + +Convenience method to check if `self` is empty (doesn't contain any clip), +or not. + +# Returns + +`true` if `self` is empty, `false` if it already contains at least +one `Clip` + +Removes the given `clip` from the `self` and unparents it. +Unparenting it means the reference owned by `self` on the `clip` will be +removed. If you wish to use the `clip` after this function, make sure you +call `gst::ObjectExt::ref` before removing it from the `self`. +## `clip` +the `Clip` to remove + +# Returns + +`true` if the clip could be removed, `false` if the layer does +not want to remove the clip. + +Sets the layer to the given `auto_transition`. See the documentation of the +property auto_transition for more information. +## `auto_transition` +whether the auto_transition is active + +Sets the layer to the given `priority`. See the documentation of the +priority property for more information. + +# Deprecated since 1.16 + +use `TimelineExt::move_layer` instead. This deprecation means +that you will not need to handle layer priorities at all yourself, GES +will make sure there is never 'gaps' between layer priorities. +## `priority` +the priority to set + +Will be emitted after the clip was added to the layer. +## `clip` +the `Clip` that was added. + +Will be emitted after the clip was removed from the layer. +## `clip` +the `Clip` that was removed + +Sets whether transitions are added automagically when clips overlap. + +Sets whether transitions are added automagically when clips overlap. + +The priority of the layer in the `Timeline`. 0 is the highest +priority. Conceptually, a `Timeline` is a stack of GESLayers, +and the priority of the layer represents its position in the stack. Two +layers should not have the same priority within a given GESTimeline. + +Note that the timeline needs to be commited (with `TimelineExt::commit`) +for the change to be taken into account. + +# Deprecated since 1.16 + +use `TimelineExt::move_layer` instead. This deprecation means +that you will not need to handle layer priorities at all yourself, GES +will make sure there is never 'gaps' between layer priorities. + +The priority of the layer in the `Timeline`. 0 is the highest +priority. Conceptually, a `Timeline` is a stack of GESLayers, +and the priority of the layer represents its position in the stack. Two +layers should not have the same priority within a given GESTimeline. + +Note that the timeline needs to be commited (with `TimelineExt::commit`) +for the change to be taken into account. + +# Deprecated since 1.16 + +use `TimelineExt::move_layer` instead. This deprecation means +that you will not need to handle layer priorities at all yourself, GES +will make sure there is never 'gaps' between layer priorities. + +`Pipeline` allows developers to view and render `Timeline` +in a simple fashion. +Its usage is inspired by the 'playbin' element from gst-plugins-base. + +# Implements + +[`GESPipelineExt`](trait.GESPipelineExt.html), [`gst::PipelineExt`](../gst/trait.PipelineExt.html), [`gst::ElementExt`](../gst/trait.ElementExt.html), [`gst::ObjectExt`](../gst/trait.ObjectExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + +Trait containing all `Pipeline` methods. + +# Implementors + +[`Pipeline`](struct.Pipeline.html) + +Creates a new conveninence `Pipeline`. + +# Returns + +the new `Pipeline`. + + +# Returns + +the `PipelineFlags` currently in use. + +Returns a `gst::Sample` with the currently playing image in the format specified by +caps. The caller should free the sample with `gst_sample_unref` when finished. If ANY +caps are specified, the information will be returned in the whatever format +is currently used by the sink. This information can be retrieve from caps +associated with the buffer. +## `caps` +caps specifying current format. Use `GST_CAPS_ANY` +for native size. + +# Returns + +a `gst::Sample` or `None` + +A convenience method for `GESPipelineExt::get_thumbnail` which +returns a buffer in 24-bit RGB, optionally scaled to the specified width +and height. If -1 is specified for either dimension, it will be left at +native size. You can retreive this information from the caps associated +with the buffer. + +The caller is responsible for unreffing the returned sample with +`gst_sample_unref`. +## `width` +the requested width or -1 for native size +## `height` +the requested height or -1 for native size + +# Returns + +a `gst::Sample` or `None` + +Obtains a pointer to playsink's audio sink element that is used for +displaying audio when the `Pipeline` is in `PipelineFlags::FullPreview` + +The caller is responsible for unreffing the returned element with +`gst::ObjectExt::unref`. + +# Returns + +a pointer to the playsink audio sink `gst::Element` + +Obtains a pointer to playsink's video sink element that is used for +displaying video when the `Pipeline` is in `PipelineFlags::FullPreview` + +The caller is responsible for unreffing the returned element with +`gst::ObjectExt::unref`. + +# Returns + +a pointer to the playsink video sink `gst::Element` + +Sets playsink's audio sink element that is used for displaying audio when +the `Pipeline` is in `PipelineFlags::FullPreview` +## `sink` +a audio sink `gst::Element` + +Sets playsink's video sink element that is used for displaying video when +the `Pipeline` is in `PipelineFlags::FullPreview` +## `sink` +a video sink `gst::Element` + +Saves the current frame to the specified `location`. +## `width` +the requested width or -1 for native size +## `height` +the requested height or -1 for native size +## `format` +a string specifying the desired mime type (for example, +image/jpeg) +## `location` +the path to save the thumbnail + +# Returns + +`true` if the thumbnail was properly save, else `false`. + +switches the `self` to the specified `mode`. The default mode when +creating a `Pipeline` is `PipelineFlags::FullPreview`. + +Note: The `self` will be set to `gst::State::Null` during this call due to +the internal changes that happen. The caller will therefore have to +set the `self` to the requested state after calling this method. +## `mode` +the `PipelineFlags` to use + +# Returns + +`true` if the mode was properly set, else `false`. + +Specify where the pipeline shall be rendered and with what settings. + +A copy of `profile` and `output_uri` will be done internally, the caller can +safely free those values afterwards. + +This method must be called before setting the pipeline mode to +`PipelineFlags::Render` +## `output_uri` +the URI to which the timeline will be rendered +## `profile` +the `gst_pbutils::EncodingProfile` to use to render the timeline. + +# Returns + +`true` if the settings were aknowledged properly, else `false` + +Sets the timeline to use in this pipeline. + +The reference to the `timeline` will be stolen by the `self`. +## `timeline` +the `Timeline` to set on the `self`. + +# Returns + +`true` if the `timeline` could be successfully set on the `self`, +else `false`. + +Audio sink for the preview. + +Audio sink for the preview. + +Pipeline mode. See `GESPipelineExt::set_mode` for more +info. + +Pipeline mode. See `GESPipelineExt::set_mode` for more +info. + +Timeline to use in this pipeline. See also +`GESPipelineExt::set_timeline` for more info. + +Timeline to use in this pipeline. See also +`GESPipelineExt::set_timeline` for more info. + +Video sink for the preview. + +Video sink for the preview. + +The `Project` is used to control a set of `Asset` and is a +`Asset` with `GES_TYPE_TIMELINE` as `extractable_type` itself. That +means that you can extract `Timeline` from a project as followed: + + +```text + GESProject *project; + GESTimeline *timeline; + + project = ges_project_new ("file:///path/to/a/valid/project/uri"); + + // Here you can connect to the various signal to get more infos about + // what is happening and recover from errors if possible + ... + + timeline = ges_asset_extract (GES_ASSET (project)); +``` + +The `Project` class offers a higher level API to handle `Asset`-s. +It lets you request new asset, and it informs you about new assets through +a set of signals. Also it handles problem such as missing files/missing +`gst::Element` and lets you try to recover from those. + +# Implements + +[`ProjectExt`](trait.ProjectExt.html), [`AssetExt`](trait.AssetExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + +Trait containing all `Project` methods. + +# Implementors + +[`Project`](struct.Project.html) + +Creates a new `Project` and sets its uri to `uri` if provided. Note that +if `uri` is not valid or `None`, the uri of the project will then be set +the first time you save the project. If you then save the project to +other locations, it will never be updated again and the first valid URI is +the URI it will keep refering to. +## `uri` +The uri to be set after creating the project. + +# Returns + +A newly created `Project` + +Adds a `Asset` to `self`, the project will keep a reference on +`asset`. +## `asset` +A `Asset` to add to `self` + +# Returns + +`true` if the asset could be added `false` it was already +in the project + +Adds `profile` to the project. It lets you save in what format +the project has been renders and keep a reference to those formats. +Also, those formats will be saves to the project file when possible. +## `profile` +A `gst_pbutils::EncodingProfile` to add to the project. If a profile with +the same name already exists, it will be replaced + +# Returns + +`true` if `profile` could be added, `false` otherwize + +Create and add a `Asset` to `self`. You should connect to the +"asset-added" signal to get the asset when it finally gets added to +`self` +## `id` +The id of the asset to create and add to `self` +## `extractable_type` +The `glib::Type` of the asset to create + +# Returns + +`true` if the asset started to be added `false` it was already +in the project + +Create and add a `Asset` to `self`. You should connect to the +"asset-added" signal to get the asset when it finally gets added to +`self` +## `id` +The id of the asset to create and add to `self` +## `extractable_type` +The `glib::Type` of the asset to create + +# Returns + +The newly created `Asset` or `None`. + +## `id` +The id of the asset to retrieve +## `extractable_type` +The extractable_type of the asset +to retrieve from `object` + +# Returns + +The `Asset` with +`id` or `None` if no asset with `id` as an ID + +Get the assets that are being loaded + +# Returns + +A set of loading asset +that will be added to `self`. Note that those Asset are *not* loaded yet, +and thus can not be used + +Retrieve the uri that is currently set on `self` + +# Returns + +a newly allocated string representing uri. + +List all `asset` contained in `self` filtering per extractable_type +as defined by `filter`. It copies the asset and thus will not be updated +in time. +## `filter` +Type of assets to list, `GES_TYPE_EXTRACTABLE` will list +all assets + +# Returns + +The list of +`Asset` the object contains + +Lists the encoding profile that have been set to `self`. The first one +is the latest added. + +# Returns + +The +list of `gst_pbutils::EncodingProfile` used in `self` + +Loads `self` into `timeline` +## `timeline` +A blank timeline to load `self` into + +# Returns + +`true` if the project could be loaded `false` otherwize. + +remove a `asset` to from `self`. +## `asset` +A `Asset` to remove from `self` + +# Returns + +`true` if the asset could be removed `false` otherwise + +Save the timeline of `self` to `uri`. You should make sure that `timeline` +is one of the timelines that have been extracted from `self` +(using ges_asset_extract (`self`);) +## `timeline` +The `Timeline` to save, it must have been extracted from `self` +## `uri` +The uri where to save `self` and `timeline` +## `formatter_asset` +The formatter asset to use or `None`. If `None`, +will try to save in the same format as the one from which the timeline as been loaded +or default to the formatter with highest rank +## `overwrite` +`true` to overwrite file if it exists + +# Returns + +`true` if the project could be save, `false` otherwize + +## `asset` +The `Asset` that has been added to `project` + +## `asset` +The `Asset` that started loading + +## `asset` +The `Asset` that has been removed from `project` + +Informs you that a `Asset` could not be created. In case of +missing GStreamer plugins, the error will be set to `GST_CORE_ERROR` +`gst::CoreError::MissingPlugin` +## `error` +The `glib::Error` defining the error that accured, might be `None` +## `id` +The `id` of the asset that failed loading +## `extractable_type` +The `extractable_type` of the asset that +failed loading + +## `timeline` +The `Timeline` that complete loading + + +```text +static gchar +source_moved_cb (GESProject *project, GError *error, GESAsset *asset_with_error) +{ + return g_strdup ("file:///the/new/uri.ogg"); +} + +static int +main (int argc, gchar ** argv) +{ + GESTimeline *timeline; + GESProject *project = ges_project_new ("file:///some/uri.xges"); + + g_signal_connect (project, "missing-uri", source_moved_cb, NULL); + timeline = ges_asset_extract (GES_ASSET (project)); +} +``` +## `error` +The error that happened +## `wrong_asset` +The asset with the wrong ID, you should us it and its content +only to find out what the new location is. + +# Returns + +The new URI of `wrong_asset` + +`Timeline` is the central object for any multimedia timeline. + +Contains a list of `Layer` which users should use to arrange the +various clips through time. + +The output type is determined by the `Track` that are set on +the `Timeline`. + +To save/load a timeline, you can use the `TimelineExt::load_from_uri` and +`TimelineExt::save_to_uri` methods to use the default format. If you wish + +Note that any change you make in the timeline will not actually be taken +into account until you call the `TimelineExt::commit` method. + +# Implements + +[`TimelineExt`](trait.TimelineExt.html), [`gst::ElementExt`](../gst/trait.ElementExt.html), [`gst::ObjectExt`](../gst/trait.ObjectExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html) + +Trait containing all `Timeline` methods. + +# Implementors + +[`Timeline`](struct.Timeline.html) + +Creates a new empty `Timeline`. + +# Returns + +The new timeline. + +Creates a new `Timeline` containing a raw audio and a +raw video track. + +# Returns + +The newly created `Timeline`. + +Creates a timeline from the given URI. +## `uri` +the URI to load from + +# Returns + +A new timeline if the uri was loaded +successfully, or `None` if the uri could not be loaded. + +Add the layer to the timeline. The reference to the `layer` will be stolen +by the `self`. +## `layer` +the `Layer` to add + +# Returns + +`true` if the layer was properly added, else `false`. + +Add a track to the timeline. The reference to the track will be stolen by the +pipeline. +## `track` +the `Track` to add + +# Returns + +`true` if the track was properly added, else `false`. + +Append a newly created `Layer` to `self` +Note that you do not own any reference to the returned layer. + +# Returns + +The newly created `Layer`, or the last (empty) +`Layer` of `self`. + +Commit all the pending changes of the clips contained in the +`self`. + +When changes happen in a timeline, they are not +directly executed in the non-linear engine. Call this method once you are +done with a set of changes and want it to be executed. + +The `Timeline::commited` signal will be emitted when the (possibly updated) +`gst::Pipeline` is ready to output data again, except if the state of the +timeline was `gst::State::Ready` or `gst::State::Null`. + +Note that all the pending changes will automatically be executed when the +timeline goes from `gst::State::Ready` to `gst::State::Paused`, which usually is +triggered by corresponding state changes in a containing `Pipeline`. + +You should not try to change the state of the timeline, seek it or add +tracks to it during a commit operation, that is between a call to this +function and after receiving the `Timeline::commited` signal. + +See `TimelineExt::commit_sync` if you don't want to bother with waiting +for the signal. + +# Returns + +`true` if pending changes were commited or `false` if nothing needed +to be commited + +Commit all the pending changes of the `GESClips` contained in the +`self`. + +Will return once the update is complete, that is when the +(possibly updated) `gst::Pipeline` is ready to output data again, or if the +state of the timeline was `gst::State::Ready` or `gst::State::Null`. + +This function will wait for any pending state change of the timeline by +calling `gst::ElementExt::get_state` with a `GST_CLOCK_TIME_NONE` timeout, you +should not try to change the state from another thread before this function +has returned. + +See `TimelineExt::commit` for more information. + +# Returns + +`true` if pending changes were commited or `false` if nothing needed +to be commited + +Gets whether transitions are automatically added when objects +overlap or not. + +# Returns + +`true` if transitions are automatically added, else `false`. + +Get the current duration of `self` + +# Returns + +The current duration of `self` + +Gets a `TimelineElement` contained in the timeline + +# Returns + +The `TimelineElement` or `None` if +not found. + +Get the list of `Group` present in the Timeline. + +# Returns + +the list of +`Group` that contain clips present in the timeline's layers. +Must not be changed. + +Retrieve the layer with `priority` as a priority +## `priority` +The priority of the layer to find + +# Returns + +A `Layer` or `None` if no layer with +`priority` was found + +Since 1.6 + +Get the list of `Layer` present in the Timeline. + +# Returns + +the list of +`Layer` present in the Timeline sorted by priority. +The caller should unref each Layer once he is done with them. + +Search the `gst::Pad` corresponding to the given `self`'s `track`. +## `track` +The `Track` + +# Returns + +The corresponding `gst::Pad` if it is +found, or `None` if there is an error. + +Gets the configured snapping distance of the timeline. See +the documentation of the property snapping_distance for more +information. + +# Returns + +The `snapping_distance` property of the timeline + +Search the `Track` corresponding to the given `self`'s `pad`. +## `pad` +The `gst::Pad` + +# Returns + +The corresponding `Track` if it is +found, or `None` if there is an error. + +Returns the list of `Track` used by the Timeline. + +# Returns + +A list of `Track`. +The caller should unref each track once he is done with them. + +Check whether a `Timeline` is empty or not + +# Returns + +`true` if the timeline is empty `false` otherwize + +Loads the contents of URI into the given timeline. +## `uri` +The URI to load from + +# Returns + +`true` if the timeline was loaded successfully, or `false` if the uri +could not be loaded. + +Moves `layer` at `new_layer_priority` meaning that `layer` +we land at that position in the stack of layers inside +the timeline. If `new_layer_priority` is superior than the number +of layers present in the time, it will move to the end of the +stack of layers. +## `layer` +The layer to move at `new_layer_priority` +## `new_layer_priority` +The index at which `layer` should land + +Paste `element` inside the timeline. `element` must have been +created using ges_timeline_element_copy with deep=TRUE set, +i.e. it must be a deep copy, otherwise it will fail. +## `element` +The `TimelineElement` to paste +## `position` +The position in the timeline the element should +be pasted to, meaning it will become the start of `element` +## `layer_priority` +The `Layer` to which the element should be pasted to. +-1 means paste to the same layer from which the `element` has been copied from. + +# Returns + +Shallow copy of the `element` pasted + +Removes the layer from the timeline. The reference that the `self` holds on +the layer will be dropped. If you wish to use the `layer` after calling this +method, you need to take a reference before calling. +## `layer` +the `Layer` to remove + +# Returns + +`true` if the layer was properly removed, else `false`. + +Remove the `track` from the `self`. The reference stolen when adding the +`track` will be removed. If you wish to use the `track` after calling this +function you must ensure that you have a reference to it. +## `track` +the `Track` to remove + +# Returns + +`true` if the `track` was properly removed, else `false`. + +Saves the timeline to the given location +## `uri` +The location to save to +## `formatter_asset` +The formatter asset to use or `None`. If `None`, +will try to save in the same format as the one from which the timeline as been loaded +or default to the formatter with highest rank +## `overwrite` +`true` to overwrite file if it exists + +# Returns + +`true` if the timeline was successfully saved to the given location, +else `false`. + +Sets the layer to the given `auto_transition`. See the documentation of the +property auto_transition for more information. +## `auto_transition` +whether the auto_transition is active + +Sets the `snapping_distance` of the timeline. See the documentation of the +property snapping_distance for more information. +## `snapping_distance` +whether the snapping_distance is active + +This signal will be emitted once the changes initiated by `TimelineExt::commit` +have been executed in the backend. Use `TimelineExt::commit_sync` if you +don't need to do anything in the meantime. + +Will be emitted after a new group is added to to the timeline. +## `group` +the `Group` + +Will be emitted after a group has been removed from the timeline. +## `group` +the `Group` +## `children` +a list of `Container` + +Will be emitted after a new layer is added to the timeline. +## `layer` +the `Layer` that was added to the timeline + +Will be emitted after the layer was removed from the timeline. +## `layer` +the `Layer` that was removed from the timeline + +## `clip` +The `Clip` on which `track_element` will land +## `track_element` +The `TrackElement` for which to choose the tracks it should land into + +# Returns + +a `glib::PtrArray` of `Track`-s where that object should be added + +Will be emitted after the track was added to the timeline. +## `track` +the `Track` that was added to the timeline + +Will be emitted after the track was removed from the timeline. +## `track` +the `Track` that was removed from the timeline + +Sets whether transitions are added automagically when clips overlap. + +Sets whether transitions are added automagically when clips overlap. + +Current duration (in nanoseconds) of the `Timeline` + +Distance (in nanoseconds) from which a moving object will snap +with it neighboors. 0 means no snapping. + +Distance (in nanoseconds) from which a moving object will snap +with it neighboors. 0 means no snapping. + +The GESTimelineElement base class implements the notion of timing as well +as priority. A GESTimelineElement can have a parent object which will be +responsible for controlling its timing properties. + +# Implements + +[`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html) + +Trait containing all `TimelineElement` methods. + +# Implementors + +[`Container`](struct.Container.html), [`TimelineElement`](struct.TimelineElement.html), [`TrackElement`](struct.TrackElement.html) + +Copies `self` +## `deep` +whether we want to create the elements `self` contains or not + +# Returns + +The newly create `TimelineElement`, copied from `self` + +Gets properties of a child of `self`. +## `first_property_name` +The name of the first property to get + +In general, a copy is made of the property contents and +the caller is responsible for freeing the memory by calling +`gobject::Value::unset`. + +Gets a property of a GstElement contained in `object`. + +Note that `TimelineElementExt::get_child_property` is really +intended for language bindings, `TimelineElementExt::get_child_properties` +is much more convenient for C programming. +## `property_name` +The name of the property +## `value` +return location for the property value, it will +be initialized if it is initialized with 0 + +# Returns + +`true` if the property was found, `false` otherwize + +Gets a property of a child of `self`. +## `pspec` +The `gobject::ParamSpec` that specifies the property you want to get +## `value` +return location for the value + +Gets a property of a child of `self`. If there are various child elements +that have the same property name, you can distinguish them using the following +syntax: 'ClasseName::property_name' as property name. If you don't, the +corresponding property of the first element found will be set. +## `first_property_name` +The name of the first property to get +## `var_args` +value for the first property, followed optionally by more +name/return location pairs, followed by NULL + + +# Returns + +The `duration` of `self` + + +# Returns + +The `inpoint` of `self` + + +# Returns + +The `maxduration` of `self` + +Returns a copy of the name of `self`. +Caller should `g_free` the return value after usage. + +# Returns + +The name of `self` + +Returns the parent of `self`. This function increases the refcount +of the parent object so you should `gst::ObjectExt::unref` it after usage. + +# Returns + +parent of `self`, this can be `None` if +`self` has no parent. unref after usage. + + +# Returns + +The `priority` of `self` + + +# Returns + +The `start` of `self` + +Returns the timeline of `self`. This function increases the refcount +of the timeline so you should `gst::ObjectExt::unref` it after usage. + +# Returns + +timeline of `self`, this can be `None` if +`self` has no timeline. unref after usage. + +Gets the toplevel `TimelineElement` controlling `self` + +# Returns + +The toplevel controlling parent of `self` + +Gets all the TrackTypes `self` will interact with + +Gets an array of `gobject::ParamSpec`* for all configurable properties of the +children of `self`. +## `n_properties` +return location for the length of the returned array + +# Returns + +an array of `gobject::ParamSpec`* which should be freed after use or +`None` if something went wrong + +Looks up which `element` and `pspec` would be effected by the given `name`. If various +contained elements have this property name you will get the first one, unless you +specify the class name in `name`. +## `prop_name` +name of the property to look up. You can specify the name of the + class as such: "ClassName::property-name", to guarantee that you get the + proper GParamSpec in case various GstElement-s contain the same property + name. If you don't do so, you will get the first element found, having + this property and the and the corresponding GParamSpec. +## `child` +pointer to a `gst::Element` that + takes the real object to set property on +## `pspec` +pointer to take the `gobject::ParamSpec` + describing the property + +# Returns + +TRUE if `element` and `pspec` could be found. FALSE otherwise. In that +case the values for `pspec` and `element` are not modified. Unref `element` after +usage. + +Paste `self` inside the timeline. `self` must have been created +using ges_timeline_element_copy with recurse=TRUE set, +otherwise it will fail. +## `paste_position` +The position in the timeline the element should +be copied to, meaning it will become the start of `self` + +# Returns + +Paste `self` copying the element + +Edits `self` in ripple mode. It allows you to modify the +start of `self` and move the following neighbours accordingly. +This will change the overall timeline duration. +## `start` +The new start of `self` in ripple mode. + +# Returns + +`true` if the self as been rippled properly, `false` if an error +occured + +Edits `self` in ripple mode. It allows you to modify the +duration of a `self` and move the following neighbours accordingly. +This will change the overall timeline duration. +## `end` +The new end (start + duration) of `self` in ripple mode. It will + basically only change the duration of `self`. + +# Returns + +`true` if the self as been rippled properly, `false` if an error +occured + +Edits `self` in roll mode. It allows you to modify the +duration of a `self` and trim (basicly change the start + inpoint +in this case) the following neighbours accordingly. +This will not change the overall timeline duration. +## `end` +The new end (start + duration) of `self` in roll mode + +# Returns + +`true` if the self as been rolled properly, `false` if an error +occured + +Edits `self` in roll mode. It allows you to modify the +start and inpoint of a `self` and "resize" (basicly change the duration +in this case) of the previous neighbours accordingly. +This will not change the overall timeline duration. +## `start` +The new start of `self` in roll mode, it will also adapat +the in-point of `self` according + +# Returns + +`true` if the self as been roll properly, `false` if an error +occured + +Sets a property of a child of `self`. If there are various child elements +that have the same property name, you can distinguish them using the following +syntax: 'ClasseName::property_name' as property name. If you don't, the +corresponding property of the first element found will be set. +## `first_property_name` +The name of the first property to set + +Sets a property of a child of `self` + +Note that `TimelineElementExt::set_child_property` is really +intended for language bindings, `TimelineElementExt::set_child_properties` +is much more convenient for C programming. +## `property_name` +The name of the property +## `value` +the value + +# Returns + +`true` if the property was set, `false` otherwize + +Sets a property of a child of `self`. +## `pspec` +The `gobject::ParamSpec` that specifies the property you want to set +## `value` +the value + +Sets a property of a child of `self`. If there are various child elements +that have the same property name, you can distinguish them using the following +syntax: 'ClasseName::property_name' as property name. If you don't, the +corresponding property of the first element found will be set. +## `first_property_name` +The name of the first property to set +## `var_args` +value for the first property, followed optionally by more +name/return location pairs, followed by NULL + +Set the duration of the object + +Note that if the timeline snap-distance property of the timeline containing +`self` is set, `self` will properly snap to its neighboors. +## `duration` +the duration in `gst::ClockTime` + +Set the in-point, that is the moment at which the `self` will start +outputting data from its contents. +## `inpoint` +the in-point in `gst::ClockTime` + +Set the maximun duration of the object +## `maxduration` +the maximum duration in `gst::ClockTime` + +Sets the name of object, or gives `self` a guaranteed unique name (if name is NULL). +This function makes a copy of the provided name, so the caller retains ownership +of the name it sent. +## `name` +The name `self` should take (if avalaible<) + +Sets the parent of `self` to `parent`. The parents needs to already +own a hard reference on `self`. +## `parent` +new parent of self + +# Returns + +`true` if `parent` could be set or `false` when `self` +already had a parent or `self` and `parent` are the same. + +Sets the priority of the object within the containing layer + +# Deprecated + +All priority management is done by GES itself now. +To set `Effect` priorities `ClipExt::set_top_effect_index` should +be used. +## `priority` +the priority + +Set the position of the object in its containing layer. + +Note that if the snapping-distance property of the timeline containing +`self` is set, `self` will properly snap to the edges around `start`. +## `start` +the position in `gst::ClockTime` + +Sets the timeline of `self` to `timeline`. +## `timeline` +The `Timeline` `self` is in + +# Returns + +`true` if `timeline` could be set or `false` when `timeline` +already had a timeline. + +Edits `self` in trim mode. It allows you to modify the +inpoint and start of `self`. +This will not change the overall timeline duration. + +Note that to trim the end of an self you can just set its duration. The same way +as this method, it will take into account the snapping-distance property of the +timeline in which `self` is. +## `start` +The new start of `self` in trim mode, will adapt the inpoint +of `self` accordingly + +# Returns + +`true` if the self as been trimmed properly, `false` if an error +occured + +The deep notify signal is used to be notified of property changes of all +the childs of `timeline_element` +## `prop_object` +the object that originated the signal +## `prop` +the property that changed + +The duration (in nanoseconds) which will be used in the container + +The duration (in nanoseconds) which will be used in the container + +The in-point at which this `TimelineElement` will start outputting data +from its contents (in nanoseconds). + +Ex : an in-point of 5 seconds means that the first outputted buffer will +be the one located 5 seconds in the controlled resource. + +The in-point at which this `TimelineElement` will start outputting data +from its contents (in nanoseconds). + +Ex : an in-point of 5 seconds means that the first outputted buffer will +be the one located 5 seconds in the controlled resource. + +The maximum duration (in nanoseconds) of the `TimelineElement`. + +The maximum duration (in nanoseconds) of the `TimelineElement`. + +The name of the object + +The name of the object + +The parent container of the object + +The parent container of the object + +The priority of the object. + +Setting GESTimelineElement priorities is deprecated +as all priority management is done by GES itself now. + +The priority of the object. + +Setting GESTimelineElement priorities is deprecated +as all priority management is done by GES itself now. + +Whether the element should be serialized. + +Whether the element should be serialized. + +The position of the object in its container (in nanoseconds). + +The position of the object in its container (in nanoseconds). + +The timeline in which `element` is + +The timeline in which `element` is + +Corresponds to one output format (i.e. audio OR video). + +Contains the compatible TrackElement(s). + +# Implements + +[`GESTrackExt`](trait.GESTrackExt.html), [`gst::ElementExt`](../gst/trait.ElementExt.html), [`gst::ObjectExt`](../gst/trait.ObjectExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + +Trait containing all `Track` methods. + +# Implementors + +[`Track`](struct.Track.html) + +Creates a new `Track` with the given `type_` and `caps`. + +The newly created track will steal a reference to the caps. If you wish to +use those caps elsewhere, you will have to take an extra reference. +## `type_` +The type of track +## `caps` +The caps to restrict the output of the track to. + +# Returns + +A new `Track`. + +Adds the given object to the track. Sets the object's controlling track, +and thus takes ownership of the `object`. + +An object can only be added to one track. +## `object` +the `TrackElement` to add + +# Returns + +`true` if the object was properly added. `false` if the track does not +want to accept the object. + +Commits all the pending changes of the TrackElement contained in the +track. + +When timing changes happen in a timeline, the changes are not +directly done inside NLE. This method needs to be called so any changes +on a clip contained in the timeline actually happen at the media +processing level. + +# Returns + +`true` if something as been commited `false` if nothing needed +to be commited + +Get the `gst::Caps` this track is configured to output. + +# Returns + +The `gst::Caps` this track is configured to output. + +Gets the `TrackElement` contained in `self` + +# Returns + +the list of +`TrackElement` present in the Track sorted by priority and start. + +Gets if the underlying `NleComposition` contains an expandable mixer. + +# Returns + +`True` if there is a mixer, `False` otherwise. + +Get the `Timeline` this track belongs to. Can be `None`. + +# Returns + +The `Timeline` this track belongs to. Can be `None`. + +Removes the object from the track and unparents it. +Unparenting it means the reference owned by `self` on the `object` will be +removed. If you wish to use the `object` after this function, make sure you +call `gst::ObjectExt::ref` before removing it from the `self`. +## `object` +the `TrackElement` to remove + +# Returns + +`true` if the object was removed, else `false` if the track +could not remove the object (like if it didn't belong to the track). + +Sets the function that should be used to create the GstElement used to fill gaps. +To avoid to provide such a function we advice you to use the +`AudioTrack::new` and `VideoTrack::new` constructor when possible. +## `func` +The `GESCreateElementForGapFunc` that will be used +to create `gst::Element` to fill gaps + +Sets if the `Track` should be mixing. +## `mixing` +TRUE if the track should be mixing, FALSE otherwise. + +Sets the given `caps` as the caps the track has to output. +## `caps` +the `gst::Caps` to set + +Sets `timeline` as the timeline controlling `self`. +## `timeline` +a `Timeline` + +Updates the restriction caps by modifying all the fields present in `caps` +in the original restriction caps. If for example the current restriction caps +are video/x-raw, format=I420, width=360 and `caps` is video/x-raw, format=RGB, +the restriction caps will be updated to video/x-raw, format=RGB, width=360. + +Modification happens for each structure in the new caps, and +one can add new fields or structures through that function. +## `caps` +the `gst::Caps` to update with + +Will be emitted after a track element was added to the track. +## `effect` +the `TrackElement` that was added. + +Will be emitted after a track element was removed from the track. +## `effect` +the `TrackElement` that was removed. + +Caps used to filter/choose the output stream. This is generally set to +a generic set of caps like 'video/x-raw' for raw video. + +Default value: `GST_CAPS_ANY`. + +Caps used to filter/choose the output stream. This is generally set to +a generic set of caps like 'video/x-raw' for raw video. + +Default value: `GST_CAPS_ANY`. + +Current duration of the track + +Default value: O + +Whether layer mixing is activated or not on the track. + +Whether layer mixing is activated or not on the track. + +Caps used to filter/choose the output stream. + +Default value: `GST_CAPS_ANY`. + +Caps used to filter/choose the output stream. + +Default value: `GST_CAPS_ANY`. + +Type of stream the track outputs. This is used when creating the `Track` +to specify in generic terms what type of content will be outputted. + +It also serves as a 'fast' way to check what type of data will be outputted +from the `Track` without having to actually check the `Track`'s caps +property. + +Type of stream the track outputs. This is used when creating the `Track` +to specify in generic terms what type of content will be outputted. + +It also serves as a 'fast' way to check what type of data will be outputted +from the `Track` without having to actually check the `Track`'s caps +property. + +`TrackElement` is the Base Class for any object that can be contained in a +`Track`. + +It contains the basic information as to the location of the object within +its container, like the start position, the inpoint, the duration and the +priority. + +# Implements + +[`TrackElementExt`](trait.TrackElementExt.html), [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html) + +Trait containing all `TrackElement` methods. + +# Implementors + +[`TrackElement`](struct.TrackElement.html) + +Looks for the properties defines with the various parametters and add +them to the hashtable of children properties. + +To be used by subclasses only +## `element` +The GstElement to retrieve properties from +## `wanted_categories` + +An array of categories of GstElement to +take into account (as defined in the factory meta "klass" field) +## `blacklist` +A +blacklist of elements factory names to not take into account +## `whitelist` +A list +of propery names to add as children properties + +Edit `self` in the different exisiting `EditMode` modes. In the case of +slide, and roll, you need to specify a `Edge` +## `layers` +The layers you want the edit to + happen in, `None` means that the edition is done in all the + `GESLayers` contained in the current timeline. + FIXME: This is not implemented yet. +## `mode` +The `EditMode` in which the edition will happen. +## `edge` +The `Edge` the edit should happen on. +## `position` +The position at which to edit `self` (in nanosecond) + +# Returns + +`true` if the object as been edited properly, `false` if an error +occured + + +# Returns + +A +`glib::HashTable` containing all property_name: GstControlBinding + +Gets properties of a child of `self`. + +# Deprecated + +Use `TimelineElementExt::get_child_properties` +## `first_property_name` +The name of the first property to get + +In general, a copy is made of the property contents and +the caller is responsible for freeing the memory by calling +`gobject::Value::unset`. + +Gets a property of a GstElement contained in `self`. + +Note that `TrackElement::get_child_property` is really +intended for language bindings, `TrackElement::get_child_properties` +is much more convenient for C programming. + +# Deprecated + +Use `TimelineElementExt::get_child_property` +## `property_name` +The name of the property +## `value` +return location for the property value, it will +be initialized if it is initialized with 0 + +# Returns + +`true` if the property was found, `false` otherwize + +Gets a property of a child of `self`. + +# Deprecated + +Use `TimelineElementExt::get_child_property_by_pspec` +## `pspec` +The `gobject::ParamSpec` that specifies the property you want to get +## `value` +return location for the value + +Gets a property of a child of `self`. If there are various child elements +that have the same property name, you can distinguish them using the following +syntax: 'ClasseName::property_name' as property name. If you don't, the +corresponding property of the first element found will be set. + +# Deprecated + +Use `TimelineElementExt::get_child_property_valist` +## `first_property_name` +The name of the first property to get +## `var_args` +value for the first property, followed optionally by more +name/return location pairs, followed by NULL + +Looks up the various controlled properties for that `TrackElement`, +and returns the `gst::ControlBinding` which controls `property_name`. +## `property_name` +The property_name to which the binding is associated. + +# Returns + +the `gst::ControlBinding` associated with +`property_name`, or `None` if that property is not controlled. + +Get the `gst::Element` this track element is controlling within GNonLin. + +# Returns + +the `gst::Element` this track element is controlling +within GNonLin. + +Get the NleObject object this object is controlling. + +# Deprecated + +use `TrackElementExt::get_nleobject` instead. + +# Returns + +the NleObject object this object is controlling. + +Get the GNonLin object this object is controlling. + +# Returns + +the GNonLin object this object is controlling. + +Get the `Track` to which this object belongs. + +# Returns + +The `Track` to which this object +belongs. Can be `None` if it is not in any track + +Lets you know if `self` will be used for playback and rendering, +or not. + +# Returns + +`true` if `self` is active, `false` otherwize + +Gets an array of `gobject::ParamSpec`* for all configurable properties of the +children of `self`. + +# Deprecated + +Use `TimelineElementExt::list_children_properties` +## `n_properties` +return location for the length of the returned array + +# Returns + +an array of `gobject::ParamSpec`* which should be freed after use or +`None` if something went wrong + +Looks up which `element` and `pspec` would be effected by the given `name`. If various +contained elements have this property name you will get the first one, unless you +specify the class name in `name`. + +# Deprecated + +Use `TimelineElementExt::lookup_child` +## `prop_name` +name of the property to look up. You can specify the name of the + class as such: "ClassName::property-name", to guarantee that you get the + proper GParamSpec in case various GstElement-s contain the same property + name. If you don't do so, you will get the first element found, having + this property and the and the corresponding GParamSpec. +## `element` +pointer to a `gst::Element` that + takes the real object to set property on +## `pspec` +pointer to take the `gobject::ParamSpec` + describing the property + +# Returns + +TRUE if `element` and `pspec` could be found. FALSE otherwise. In that +case the values for `pspec` and `element` are not modified. Unref `element` after +usage. + +Removes a `gst::ControlBinding` from `self`. +## `property_name` +The name of the property to control. + +# Returns + +`true` if the binding could be removed, `false` if an error +occured + +Sets the usage of the `self`. If `active` is `true`, the object will be used for +playback and rendering, else it will be ignored. +## `active` +visibility + +# Returns + +`true` if the property was toggled, else `false` + +Sets a property of a child of `self`. If there are various child elements +that have the same property name, you can distinguish them using the following +syntax: 'ClasseName::property_name' as property name. If you don't, the +corresponding property of the first element found will be set. + +# Deprecated + +Use `TimelineElementExt::set_child_properties` +## `first_property_name` +The name of the first property to set + +Sets a property of a GstElement contained in `self`. + +Note that `TrackElement::set_child_property` is really +intended for language bindings, `TrackElement::set_child_properties` +is much more convenient for C programming. + +# Deprecated + +use `TimelineElementExt::set_child_property` instead +## `property_name` +The name of the property +## `value` +the value + +# Returns + +`true` if the property was set, `false` otherwize + +Sets a property of a child of `self`. + +# Deprecated + +Use `ges_timeline_element_set_child_property_by_spec` +## `pspec` +The `gobject::ParamSpec` that specifies the property you want to set +## `value` +the value + +Sets a property of a child of `self`. If there are various child elements +that have the same property name, you can distinguish them using the following +syntax: 'ClasseName::property_name' as property name. If you don't, the +corresponding property of the first element found will be set. + +# Deprecated + +Use `TimelineElementExt::set_child_property_valist` +## `first_property_name` +The name of the first property to set +## `var_args` +value for the first property, followed optionally by more +name/return location pairs, followed by NULL + +Creates a `gst::ControlBinding` and adds it to the `gst::Element` concerned by the +property. Use the same syntax as `TrackElementExt::lookup_child` for +the property name. +## `source` +the `gst::ControlSource` to set on the binding. +## `property_name` +The name of the property to control. +## `binding_type` +The type of binding to create. Only "direct" is available for now. + +# Returns + +`true` if the binding could be created and added, `false` if an error +occured + +The control-binding-added signal is emitted each time a control binding +is added for a child property of `track_element` +## `control_binding` +the `gst::ControlBinding` that has been added + +The control-binding-removed signal is emitted each time a control binding +is removed for a child property of `track_element` +## `control_binding` +the `gst::ControlBinding` that has been removed + +Whether the object should be taken into account in the `Track` output. +If `false`, then its contents will not be used in the resulting track. + +Whether the object should be taken into account in the `Track` output. +If `false`, then its contents will not be used in the resulting track. + +Represents all the output streams from a particular uri. It is assumed that +the URI points to a file of some type. + +# Implements + +[`UriClipExt`](trait.UriClipExt.html), [`ClipExt`](trait.ClipExt.html), [`GESContainerExt`](trait.GESContainerExt.html), [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html) + +Trait containing all `UriClip` methods. + +# Implementors + +[`UriClip`](struct.UriClip.html) + +Creates a new `UriClip` for the provided `uri`. +## `uri` +the URI the source should control + +# Returns + +The newly created `UriClip`, or +`None` if there was an error. + +Get the location of the resource. + +# Returns + +The location of the resource. + +Lets you know if `self` is an image or not. + +# Returns + +`true` if `self` is a still image `false` otherwise. + +Lets you know if the audio track of `self` is muted or not. + +# Returns + +`true` if the audio track of `self` is muted, `false` otherwise. + +Sets whether the clip is a still image or not. +## `is_image` +`true` if `self` is a still image, `false` otherwise + +Sets whether the audio track of this clip is muted or not. +## `mute` +`true` to mute `self` audio track, `false` to unmute it + +Whether this uri clip represents a still image or not. This must be set +before create_track_elements is called. + +Whether this uri clip represents a still image or not. This must be set +before create_track_elements is called. + +Whether the sound will be played or not. + +Whether the sound will be played or not. + +The location of the file/resource to use. + +The location of the file/resource to use. + +The `UriClipAsset` is a special `Asset` that lets you handle +the media file to use inside the GStreamer Editing Services. It has APIs that +let you get information about the medias. Also, the tags found in the media file are +set as Metadatas of the Asser. + +# Implements + +[`UriClipAssetExt`](trait.UriClipAssetExt.html), [`AssetExt`](trait.AssetExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + +Trait containing all `UriClipAsset` methods. + +# Implementors + +[`UriClipAsset`](struct.UriClipAsset.html) + +Creates a `UriClipAsset` for `uri` + +Example of request of a GESUriClipAsset: + +```text +// The request callback +static void +filesource_asset_loaded_cb (GESAsset * source, GAsyncResult * res, gpointer user_data) +{ + GError *error = NULL; + GESUriClipAsset *filesource_asset; + + filesource_asset = GES_URI_CLIP_ASSET (ges_asset_request_finish (res, &error)); + if (filesource_asset) { + g_print ("The file: %s is usable as a FileSource, it is%s an image and lasts %" GST_TIME_FORMAT, + ges_asset_get_id (GES_ASSET (filesource_asset)) + ges_uri_clip_asset_is_image (filesource_asset) ? "" : " not", + GST_TIME_ARGS (ges_uri_clip_asset_get_duration (filesource_asset)); + } else { + g_print ("The file: %s is *not* usable as a FileSource because: %s", + ges_asset_get_id (source), error->message); + } + + gst_object_unref (mfs); +} + +// The request: +ges_uri_clip_asset_new (uri, (GAsyncReadyCallback) filesource_asset_loaded_cb, user_data); +``` +## `uri` +The URI of the file for which to create a `UriClipAsset` +## `cancellable` +optional `gio::Cancellable` object, `None` to ignore. +## `callback` +a `GAsyncReadyCallback` to call when the initialization is finished +## `user_data` +The user data to pass when `callback` is called + +Creates a `UriClipAsset` for `uri` syncronously. You should avoid +to use it in application, and rather create `UriClipAsset` asynchronously +## `uri` +The URI of the file for which to create a `UriClipAsset`. +You can also use multi file uris for `MultiFileSource`. + +# Returns + +A reference to the requested asset or +`None` if an error happened + +Gets duration of the file represented by `self` + +# Returns + +The duration of `self` + +Gets `gst_pbutils::DiscovererInfo` about the file + +# Returns + +`gst_pbutils::DiscovererInfo` of specified asset + +Get the GESUriSourceAsset `self` containes + +# Returns + +a +`glib::List` of `UriSourceAsset` + +Gets Whether the file represented by `self` is an image or not + +# Returns + +Whether the file represented by `self` is an image or not + +The duration (in nanoseconds) of the media file + +The duration (in nanoseconds) of the media file + +NOTE: You should never request such a `Asset` as they will be created automatically +by `UriClipAsset`-s. + +# Implements + +[`UriSourceAssetExt`](trait.UriSourceAssetExt.html), [`AssetExt`](trait.AssetExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + +Trait containing all `UriSourceAsset` methods. + +# Implementors + +[`UriSourceAsset`](struct.UriSourceAsset.html) + +Get the `UriClipAsset` `self_` is contained in + +# Returns + +a `UriClipAsset` + +Get the `gst_pbutils::DiscovererStreamInfo` user by `self` + +# Returns + +a `UriClipAsset` diff --git a/docs/gstreamer-pbutils/docs.md b/docs/gstreamer-pbutils/docs.md index e3fb09336..a3d723109 100644 --- a/docs/gstreamer-pbutils/docs.md +++ b/docs/gstreamer-pbutils/docs.md @@ -1,500 +1,747 @@ - -The `Discoverer` is a utility object which allows to get as much -information as possible from one or many URIs. + -It provides two APIs, allowing usage in blocking or non-blocking mode. -The blocking mode just requires calling `Discoverer::discover_uri` -with the URI one wishes to discover. +# Implements -The non-blocking mode requires a running `glib::MainLoop` iterating a -`glib::MainContext`, where one connects to the various signals, appends the -URIs to be processed (through `Discoverer::discover_uri_async`) and then -asks for the discovery to begin (through `Discoverer::start`). -By default this will use the GLib default main context unless you have -set a custom context using `glib::MainContext::push_thread_default`. +[`gst::ObjectExt`](../gst/trait.ObjectExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + +Creates a new `Player` instance that uses `signal_dispatcher` to dispatch +signals to some event loop system, or emits signals directly if NULL is +passed. See `PlayerGMainContextSignalDispatcher::new`. -All the information is returned in a `DiscovererInfo` structure. +Video is going to be rendered by `video_renderer`, or if `None` is provided +no special video set up will be done and some default handling will be +performed. +## `video_renderer` +GstPlayerVideoRenderer to use +## `signal_dispatcher` +GstPlayerSignalDispatcher to use + +# Returns + +a new `Player` instance + +## `config` +a `Player` configuration + +# Returns + +current position update interval in milliseconds + +Since 1.10 + +## `config` +a `Player` configuration + +# Returns + +`true` if accurate seeking is enabled + +Since 1.12 + +Return the user agent which has been configured using +`Player::config_set_user_agent` if any. +## `config` +a `Player` configuration + +# Returns + +the configured agent, or `None` +Since 1.10 + +set interval in milliseconds between two position-updated signals. +pass 0 to stop updating the position. +Since 1.10 +## `config` +a `Player` configuration +## `interval` +interval in ms + +Enable or disable accurate seeking. When enabled, elements will try harder +to seek as accurately as possible to the requested seek position. Generally +it will be slower especially for formats that don't have any indexes or +timestamp markers in the stream. + +If accurate seeking is disabled, elements will seek as close as the request +position without slowing down seeking too much. + +Accurate seeking is disabled by default. +## `config` +a `Player` configuration +## `accurate` +accurate seek or not + +Set the user agent to pass to the server if `player` needs to connect +to a server during playback. This is typically used when playing HTTP +or RTSP streams. + +Since 1.10 +## `config` +a `Player` configuration +## `agent` +the string to use as user agent + +## `info` +a `PlayerMediaInfo` + +# Returns + +A `glib::List` of +matching `PlayerAudioInfo`. + +## `info` +a `PlayerMediaInfo` + +# Returns + +A `glib::List` of +matching `PlayerSubtitleInfo`. + +## `info` +a `PlayerMediaInfo` + +# Returns + +A `glib::List` of +matching `PlayerVideoInfo`. + +Frees a `None` terminated array of `PlayerVisualization`. +## `viss` +a `None` terminated array of `PlayerVisualization` to free + + +# Returns + + + a `None` terminated array containing all available + visualizations. Use `Player::visualizations_free` after + usage. + +Retrieve the current value of audio-video-offset property + +# Returns + +The current value of audio-video-offset in nanoseconds + +Since 1.10 + +Retrieve the current value of the indicated `type_`. +## `type_` +`PlayerColorBalanceType` + +# Returns + +The current value of `type_`, between [0,1]. In case of + error -1 is returned. + +Get a copy of the current configuration of the player. This configuration +can either be modified and used for the `Player::set_config` call +or it must be freed after usage. + +# Returns + +a copy of the current configuration of `self`. Use +`gst::Structure::free` after usage or `Player::set_config`. + +Since 1.10 + +A Function to get current audio `PlayerAudioInfo` instance. + +# Returns + +current audio track. + +The caller should free it with `gobject::ObjectExt::unref` + +A Function to get current subtitle `PlayerSubtitleInfo` instance. + +# Returns + +current subtitle track. + +The caller should free it with `gobject::ObjectExt::unref` + +A Function to get current video `PlayerVideoInfo` instance. + +# Returns + +current video track. + +The caller should free it with `gobject::ObjectExt::unref` + + +# Returns + +Name of the currently enabled visualization. + `g_free` after usage. + +Retrieves the duration of the media stream that self represents. + +# Returns + +the duration of the currently-playing media stream, in +nanoseconds. + +A Function to get the current media info `PlayerMediaInfo` instance. + +# Returns + +media info instance. + +The caller should free it with `gobject::ObjectExt::unref` + +Retrieve the current value of the indicated `type_`. + +# Returns + +The current value of `type_`, Default: 0x00000000 "none + +Retrieve the current value of the indicated `type_`. + +# Returns + +The current value of `type_`, Default: -1 "none" + + +# Returns + +`true` if the currently-playing stream is muted. + + +# Returns + +The internal playbin instance + + +# Returns + +the absolute position time, in nanoseconds, of the +currently-playing stream. + + +# Returns + +current playback rate + +current subtitle URI + +# Returns + +URI of the current external subtitle. + `g_free` after usage. + +Gets the URI of the currently-playing stream. + +# Returns + +a string containing the URI of the +currently-playing stream. `g_free` after usage. + +Get a snapshot of the currently selected video stream, if any. The format can be +selected with `format` and optional configuration is possible with `config` +Currently supported settings are: +- width, height of type G_TYPE_INT +- pixel-aspect-ratio of type GST_TYPE_FRACTION + Except for GST_PLAYER_THUMBNAIL_RAW_NATIVE format, if no config is set, pixel-aspect-ratio would be 1/1 +## `format` +output format of the video snapshot +## `config` +Additional configuration + +# Returns + +Current video snapshot sample or `None` on failure + +Since 1.12 + +Returns the current volume level, as a percentage between 0 and 1. + +# Returns + +the volume as percentage between 0 and 1. + +Checks whether the `self` has color balance support available. + +# Returns + +`true` if `self` has color balance support. Otherwise, + `false`. + +Pauses the current stream. + +Request to play the loaded stream. + +Seeks the currently-playing stream to the absolute `position` time +in nanoseconds. +## `position` +position to seek in nanoseconds + +## `stream_index` +stream index + +# Returns + +`true` or `false` + +Sets the audio track `stream_idex`. + +Enable or disable the current audio track. +## `enabled` +TRUE or FALSE + +Sets audio-video-offset property by value of `offset` + +Since 1.10 +## `offset` +`gint64` in nanoseconds + +Sets the current value of the indicated channel `type_` to the passed +value. +## `type_` +`PlayerColorBalanceType` +## `value` +The new value for the `type_`, ranged [0,1] + +Set the configuration of the player. If the player is already configured, and +the configuration haven't change, this function will return `true`. If the +player is not in the GST_PLAYER_STATE_STOPPED, this method will return `false` +and active configuration will remain. + +`config` is a `gst::Structure` that contains the configuration parameters for +the player. + +This function takes ownership of `config`. +## `config` +a `gst::Structure` + +# Returns + +`true` when the configuration could be set. +Since 1.10 + +Sets the current value of the indicated mode `type_` to the passed +value. +## `flags` +The new value for the `type_` + +Sets the current value of the indicated mode `type_` to the passed +value. +## `mode` +The new value for the `type_` + +`true` if the currently-playing stream should be muted. +## `val` +Mute state the should be set + +Playback at specified rate +## `rate` +playback rate + +## `stream_index` +stream index + +# Returns + +`true` or `false` + +Sets the subtitle strack `stream_index`. + +Enable or disable the current subtitle track. +## `enabled` +TRUE or FALSE + +Sets the external subtitle URI. This should be combined with a call to +gst_player_set_subtitle_track_enabled(`self`, TRUE) so the subtitles are actually +rendered. +## `uri` +subtitle URI + +Sets the next URI to play. +## `uri` +next URI to play. + +## `stream_index` +stream index + +# Returns + +`true` or `false` + +Sets the video track `stream_index`. + +Enable or disable the current video track. +## `enabled` +TRUE or FALSE + +## `name` +visualization element obtained from +`Player::visualizations_get`() + +# Returns + +`true` if the visualizations was set correctly. Otherwise, +`false`. + +Enable or disable the visualization. +## `enabled` +TRUE or FALSE + +Sets the volume level of the stream as a percentage between 0 and 1. +## `val` +the new volume level, as a percentage between 0 and 1 + +Stops playing the current stream and resets to the first position +in the stream. + +`PlayerStreamInfo` specific to audio streams. + +# Implements + +[`PlayerStreamInfoExt`](trait.PlayerStreamInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + + +# Returns + +the audio bitrate in `PlayerAudioInfo`. + + +# Returns + +the number of audio channels in `PlayerAudioInfo`. + + +# Returns + +the language of the stream, or NULL if unknown. + + +# Returns + +the audio maximum bitrate in `PlayerAudioInfo`. + + +# Returns + +the audio sample rate in `PlayerAudioInfo`. + + +hue or color balance. + +brightness or black level. + +color saturation or chroma +gain. + +contrast or luma gain. + + +generic error. + + + +# Implements + +[`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`PlayerSignalDispatcherExt`](trait.PlayerSignalDispatcherExt.html) + +Creates a new GstPlayerSignalDispatcher that uses `application_context`, +or the thread default one if `None` is used. See `gst_player_new_full`. +## `application_context` +GMainContext to use or `None` + +# Returns + +the new GstPlayerSignalDispatcher + +Structure containing the media information of a URI. # Implements [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) - -Creates a new `Discoverer` with the provided timeout. -## `timeout` -timeout per file, in nanoseconds. Allowed are values between - one second (`GST_SECOND`) and one hour (3600 * `GST_SECOND`) + # Returns -The new `Discoverer`. -If an error occurred when creating the discoverer, `err` will be set -accordingly and `None` will be returned. If `err` is set, the caller must -free it when no longer needed using `glib::Error::free`. - -Synchronously discovers the given `uri`. - -A copy of `uri` will be made internally, so the caller can safely `g_free` -afterwards. -## `uri` -The URI to run on. +A `glib::List` of +matching `PlayerAudioInfo`. + # Returns -the result of the scanning. Can be `None` if an -error occurred. - -Appends the given `uri` to the list of URIs to discoverer. The actual -discovery of the `uri` will only take place if `Discoverer::start` has -been called. - -A copy of `uri` will be made internally, so the caller can safely `g_free` -afterwards. -## `uri` -the URI to add. +the container format. + # Returns -`true` if the `uri` was successfully appended to the list of pending -uris, else `false` - -Allow asynchronous discovering of URIs to take place. -A `glib::MainLoop` must be available for `Discoverer` to properly work in -asynchronous mode. - -Stop the discovery of any pending URIs and clears the list of -pending URIS (if any). - -Will be emitted in async mode when all information on a URI could be -discovered, or an error occurred. +duration of the media. + +Function to get the image (or preview-image) stored in taglist. +Application can use gst_sample_*`_` API's to get caps, buffer etc. -When an error occurs, `info` might still contain some partial information, -depending on the circumstances of the error. -## `info` -the results `DiscovererInfo` -## `error` -`glib::Error`, which will be non-NULL - if an error occurred during - discovery. You must not free - this `glib::Error`, it will be freed by - the discoverer. - -Will be emitted in async mode when all pending URIs have been processed. - -This signal is emitted after the source element has been created for, so -the URI being discovered, so it can be configured by setting additional -properties (e.g. set a proxy server for an http source, or set the device -and read speed for an audio cd source). +# Returns -This signal is usually emitted from the context of a GStreamer streaming -thread. -## `source` -source element - -Will be emitted when the discover starts analyzing the pending URIs - -The duration (in nanoseconds) after which the discovery of an individual -URI will timeout. +GstSample or NULL. + -If the discovery of a URI times out, the `DiscovererResult::Timeout` will be -set on the result flags. - -The duration (in nanoseconds) after which the discovery of an individual -URI will timeout. +# Returns + +number of audio streams. + + +# Returns + +number of total streams. + + +# Returns + +number of subtitle streams. + + +# Returns + +number of video streams. + + +# Returns + +A `glib::List` of +matching `PlayerStreamInfo`. + + +# Returns + +A `glib::List` of +matching `PlayerSubtitleInfo`. + + +# Returns + +the tags contained in media info. + + +# Returns + +the media title. + + +# Returns + +the URI associated with `PlayerMediaInfo`. + + +# Returns + +A `glib::List` of +matching `PlayerVideoInfo`. + + +# Returns + +`true` if the media is live. + + +# Returns + +`true` if the media is seekable. + -If the discovery of a URI times out, the `DiscovererResult::Timeout` will be -set on the result flags. - -`DiscovererStreamInfo` specific to audio streams. # Implements -[`DiscovererStreamInfoExt`](trait.DiscovererStreamInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) - +[`PlayerSignalDispatcherExt`](trait.PlayerSignalDispatcherExt.html) + +Trait containing all `PlayerSignalDispatcher` methods. + +# Implementors + +[`PlayerGMainContextSignalDispatcher`](struct.PlayerGMainContextSignalDispatcher.html), [`PlayerSignalDispatcher`](struct.PlayerSignalDispatcher.html) + + + +the player is stopped. + +the player is buffering. + +the player is paused. + +the player is currently playing a +stream. + +Base structure for information concering a media stream. Depending on +the stream type, one can find more media-specific information in +`PlayerVideoInfo`, `PlayerAudioInfo`, `PlayerSubtitleInfo`. + +# Implements + +[`PlayerStreamInfoExt`](trait.PlayerStreamInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + +Trait containing all `PlayerStreamInfo` methods. + +# Implementors + +[`PlayerAudioInfo`](struct.PlayerAudioInfo.html), [`PlayerStreamInfo`](struct.PlayerStreamInfo.html), [`PlayerSubtitleInfo`](struct.PlayerSubtitleInfo.html), [`PlayerVideoInfo`](struct.PlayerVideoInfo.html) + # Returns -the average or nominal bitrate of the stream in bits/second. - - -Feature: `v1_14` - +the `gst::Caps` of the stream. + +A string describing codec used in `PlayerStreamInfo`. # Returns -the channel-mask of the stream, refer to -`gst_audio_channel_positions_from_mask` for more -information. - +codec string or NULL on unknown. + +Function to get stream index from `PlayerStreamInfo` instance. # Returns -the number of channels in the stream. - +the stream index of this stream. + +Function to return human readable name for the stream type +of the given `self` (ex: "audio", "video", "subtitle") # Returns -the number of bits used per sample in each channel. - +a human readable name + + +# Returns + +the tags contained in this stream. + +`PlayerStreamInfo` specific to subtitle streams. + +# Implements + +[`PlayerStreamInfoExt`](trait.PlayerStreamInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + # Returns the language of the stream, or NULL if unknown. - - -# Returns - -the maximum bitrate of the stream in bits/second. - - -# Returns - -the sample rate of the stream in Hertz. - -`DiscovererStreamInfo` specific to container streams. + +`PlayerStreamInfo` specific to video streams. # Implements -[`DiscovererStreamInfoExt`](trait.DiscovererStreamInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) - +[`PlayerStreamInfoExt`](trait.PlayerStreamInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + # Returns -the list of -`DiscovererStreamInfo` this container stream offers. -Free with `DiscovererStreamInfo::list_free` after usage. - -Structure containing the information of a URI analyzed by `Discoverer`. +the current bitrate of video in `PlayerVideoInfo`. + +## `fps_n` +Numerator of frame rate +## `fps_d` +Denominator of frame rate + + +# Returns + +the height of video in `PlayerVideoInfo`. + + +# Returns + +the maximum bitrate of video in `PlayerVideoInfo`. + +Returns the pixel aspect ratio in `par_n` and `par_d` +## `par_n` +numerator +## `par_d` +denominator + + +# Returns + +the width of video in `PlayerVideoInfo`. + + # Implements -[`DiscovererInfoExt`](trait.DiscovererInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) - -Trait containing all `DiscovererInfo` methods. +[`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`PlayerVideoRendererExt`](trait.PlayerVideoRendererExt.html) + +## `window_handle` +Window handle to use or `None` + +## `window_handle` +Window handle to use or `None` +## `video_sink` +the custom video_sink element to be set for the video renderer + +# Returns + + + +Since 1.12 + +Tell an overlay that it has been exposed. This will redraw the current frame +in the drawable even if the pipeline is PAUSED. + +Return the currently configured render rectangle. See `PlayerVideoOverlayVideoRenderer::set_render_rectangle` +for details. +## `x` +the horizontal offset of the render area inside the window +## `y` +the vertical offset of the render area inside the window +## `width` +the width of the render area inside the window +## `height` +the height of the render area inside the window + + +# Returns + +The currently set, platform specific window +handle + +Configure a subregion as a video target within the window set by +`PlayerVideoOverlayVideoRenderer::set_window_handle`. If this is not +used or not supported the video will fill the area of the window set as the +overlay to 100%. By specifying the rectangle, the video can be overlaid to +a specific region of that window only. After setting the new rectangle one +should call `PlayerVideoOverlayVideoRenderer::expose` to force a +redraw. To unset the region pass -1 for the `width` and `height` parameters. + +This method is needed for non fullscreen video overlay in UI toolkits that +do not support subwindows. +## `x` +the horizontal offset of the render area inside the window +## `y` +the vertical offset of the render area inside the window +## `width` +the width of the render area inside the window +## `height` +the height of the render area inside the window + +Sets the platform specific window handle into which the video +should be rendered +## `window_handle` +handle referencing to the platform specific window + + + +# Implements + +[`PlayerVideoRendererExt`](trait.PlayerVideoRendererExt.html) + +Trait containing all `PlayerVideoRenderer` methods. # Implementors -[`DiscovererInfo`](struct.DiscovererInfo.html) - -Parses a `glib::Variant` as produced by `DiscovererInfoExt::to_variant` -back to a `DiscovererInfo`. -## `variant` -A `glib::Variant` to deserialize into a `DiscovererInfo`. +[`PlayerVideoOverlayVideoRenderer`](struct.PlayerVideoOverlayVideoRenderer.html), [`PlayerVideoRenderer`](struct.PlayerVideoRenderer.html) + +A `PlayerVisualization` descriptor. + +Makes a copy of the `PlayerVisualization`. The result must be +freed using `PlayerVisualization::free`. # Returns -A newly-allocated `DiscovererInfo`. - - -# Returns - -A copy of the `DiscovererInfo` - -Finds all the `DiscovererAudioInfo` contained in `self` - -# Returns - -A `glib::List` of -matching `DiscovererStreamInfo`. The caller should free it with -`DiscovererStreamInfo::list_free`. - -Finds all the `DiscovererContainerInfo` contained in `self` - -# Returns - -A `glib::List` of -matching `DiscovererStreamInfo`. The caller should free it with -`DiscovererStreamInfo::list_free`. - - -# Returns - -the duration of the URI in `gst::ClockTime` (nanoseconds). - - -Feature: `v1_14` - - -# Returns - -whether the URI is live. - - -# Deprecated - -This functions is deprecated since version 1.4, use -`DiscovererInfoExt::get_missing_elements_installer_details` - -# Returns - -Miscellaneous information stored as a `gst::Structure` -(for example: information about missing plugins). If you wish to use the -`gst::Structure` after the life-time of `self`, you will need to copy it. - -Get the installer details for missing elements - -# Returns - -An array of strings -containing informations about how to install the various missing elements -for `self` to be usable. If you wish to use the strings after the life-time -of `self`, you will need to copy them. - - -# Returns - -the result of the discovery as a `DiscovererResult`. - - -# Returns - -the whether the URI is seekable. - - -# Returns - -the structure (or topology) of the URI as a -`DiscovererStreamInfo`. -This structure can be traversed to see the original hierarchy. Unref with -`gst_discoverer_stream_info_unref` after usage. - - -# Returns - -the list of -all streams contained in the `info`. Free after usage -with `DiscovererStreamInfo::list_free`. - -Finds the `DiscovererStreamInfo` contained in `self` that match the -given `streamtype`. -## `streamtype` -a `glib::Type` derived from `DiscovererStreamInfo` - -# Returns - -A `glib::List` of -matching `DiscovererStreamInfo`. The caller should free it with -`DiscovererStreamInfo::list_free`. - -Finds all the `DiscovererSubtitleInfo` contained in `self` - -# Returns - -A `glib::List` of -matching `DiscovererStreamInfo`. The caller should free it with -`DiscovererStreamInfo::list_free`. - - -# Returns - -all tags contained in the URI. If you wish to use -the tags after the life-time of `self`, you will need to copy them. - - -# Returns - -TOC contained in the URI. If you wish to use -the TOC after the life-time of `self`, you will need to copy it. - - -# Returns - -the URI to which this information corresponds to. -Copy it if you wish to use it after the life-time of `self`. - -Finds all the `DiscovererVideoInfo` contained in `self` - -# Returns - -A `glib::List` of -matching `DiscovererStreamInfo`. The caller should free it with -`DiscovererStreamInfo::list_free`. - -Serializes `self` to a `glib::Variant` that can be parsed again -through `DiscovererInfo::from_variant`. - -Note that any `gst::Toc` (s) that might have been discovered will not be serialized -for now. -## `flags` -A combination of `DiscovererSerializeFlags` to specify -what needs to be serialized. - -# Returns - -A newly-allocated `glib::Variant` representing `self`. - -Result values for the discovery process. - -The discovery was successful - -the URI is invalid - -an error happened and the GError is set - -the discovery timed-out - -the discoverer was already discovering a file - -Some plugins are missing for full discovery - -Base structure for information concerning a media stream. Depending on the -stream type, one can find more media-specific information in -`DiscovererAudioInfo`, `DiscovererVideoInfo`, and -`DiscovererContainerInfo`. - -The `DiscovererStreamInfo` represents the topology of the stream. Siblings -can be iterated over with `DiscovererStreamInfoExt::get_next` and -`DiscovererStreamInfoExt::get_previous`. Children (sub-streams) of a -stream can be accessed using the `DiscovererContainerInfo` API. - -As a simple example, if you run `Discoverer` on an AVI file with one audio -and one video stream, you will get a `DiscovererContainerInfo` -corresponding to the AVI container, which in turn will have a -`DiscovererAudioInfo` sub-stream and a `DiscovererVideoInfo` sub-stream -for the audio and video streams respectively. - -# Implements - -[`DiscovererStreamInfoExt`](trait.DiscovererStreamInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) - -Trait containing all `DiscovererStreamInfo` methods. - -# Implementors - -[`DiscovererAudioInfo`](struct.DiscovererAudioInfo.html), [`DiscovererContainerInfo`](struct.DiscovererContainerInfo.html), [`DiscovererStreamInfo`](struct.DiscovererStreamInfo.html), [`DiscovererSubtitleInfo`](struct.DiscovererSubtitleInfo.html), [`DiscovererVideoInfo`](struct.DiscovererVideoInfo.html) - -Decrements the reference count of all contained `DiscovererStreamInfo` -and fress the `glib::List`. -## `infos` -a `glib::List` of `DiscovererStreamInfo` - - -# Returns - -the `gst::Caps` of the stream. Unref with -`gst_caps_unref` after usage. - - -# Deprecated - -This functions is deprecated since version 1.4, use -`DiscovererInfoExt::get_missing_elements_installer_details` - -# Returns - -additional information regarding the stream (for -example codec version, profile, etc..). If you wish to use the `gst::Structure` -after the life-time of `self` you will need to copy it. - - -# Returns - -the next `DiscovererStreamInfo` in a chain. `None` -for final streams. -Unref with `gst_discoverer_stream_info_unref` after usage. - - -# Returns - -the previous `DiscovererStreamInfo` in a chain. -`None` for starting points. Unref with `gst_discoverer_stream_info_unref` -after usage. - - -# Returns - -the stream ID of this stream. If you wish to -use the stream ID after the life-time of `self` you will need to copy it. - - -# Returns - -a human readable name for the stream type of the given `self` (ex : "audio", -"container",...). - - -# Returns - -the tags contained in this stream. If you wish to -use the tags after the life-time of `self` you will need to copy them. - - -# Returns - -the TOC contained in this stream. If you wish to -use the TOC after the life-time of `self` you will need to copy it. - -`DiscovererStreamInfo` specific to subtitle streams (this includes text and -image based ones). - -# Implements - -[`DiscovererStreamInfoExt`](trait.DiscovererStreamInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) - - -# Returns - -the language of the stream, or NULL if unknown. - -`DiscovererStreamInfo` specific to video streams (this includes images). - -# Implements - -[`DiscovererStreamInfoExt`](trait.DiscovererStreamInfoExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) - - -# Returns - -the average or nominal bitrate of the video stream in bits/second. - - -# Returns - -the depth in bits of the video stream. - - -# Returns - -the framerate of the video stream (denominator). - - -# Returns - -the framerate of the video stream (numerator). - - -# Returns - -the height of the video stream in pixels. - - -# Returns - -the maximum bitrate of the video stream in bits/second. - - -# Returns - -the Pixel Aspect Ratio (PAR) of the video stream (denominator). - - -# Returns - -the Pixel Aspect Ratio (PAR) of the video stream (numerator). - - -# Returns - -the width of the video stream in pixels. - - -# Returns - -`true` if the video stream corresponds to an image (i.e. only contains -one frame). - - -# Returns - -`true` if the stream is interlaced, else `false`. +an allocated copy of `self`. + +Frees a `PlayerVisualization`. diff --git a/docs/gstreamer-webrtc/docs.md b/docs/gstreamer-webrtc/docs.md index 2e3f5deb7..51c46b683 100644 --- a/docs/gstreamer-webrtc/docs.md +++ b/docs/gstreamer-webrtc/docs.md @@ -1,4 +1,9 @@ + +GST_WEBRTC_DTLS_SETUP_NONE: none +GST_WEBRTC_DTLS_SETUP_ACTPASS: actpass +GST_WEBRTC_DTLS_SETUP_ACTIVE: sendonly +GST_WEBRTC_DTLS_SETUP_PASSIVE: recvonly @@ -37,6 +42,14 @@ GST_WEBRTC_ICE_ROLE_CONTROLLING: controlling # Implements [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + +GST_WEBRTC_PEER_CONNECTION_STATE_NEW: new +GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTING: connecting +GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTED: connected +GST_WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED: disconnected +GST_WEBRTC_PEER_CONNECTION_STATE_FAILED: failed +GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED: closed +See http://w3c.github.io/webrtc-pc/`dom`-rtcpeerconnectionstate`` @@ -55,6 +68,7 @@ GST_WEBRTC_ICE_ROLE_CONTROLLING: controlling # Implements [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html) + GST_WEBRTC_SDP_TYPE_OFFER: offer GST_WEBRTC_SDP_TYPE_PRANSWER: pranswer @@ -62,7 +76,6 @@ GST_WEBRTC_SDP_TYPE_ANSWER: answer GST_WEBRTC_SDP_TYPE_ROLLBACK: rollback See http://w3c.github.io/webrtc-pc/`rtcsdptype``` -sdp: the `gst_sdp::SDPMessage` of the description See https://www.w3.org/TR/webrtc/`rtcsessiondescription`-class`` ## `type_` @@ -81,3 +94,26 @@ a new `WebRTCSessionDescription` from `type_` a new copy of `self` Free `self` and all associated resources + +GST_WEBRTC_SIGNALING_STATE_STABLE: stable +GST_WEBRTC_SIGNALING_STATE_CLOSED: closed +GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER: have-local-offer +GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER: have-remote-offer +GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER: have-local-pranswer +GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER: have-remote-pranswer +See http://w3c.github.io/webrtc-pc/`dom`-rtcsignalingstate`` + +GST_WEBRTC_STATS_CODEC: codec +GST_WEBRTC_STATS_INBOUND_RTP: inbound-rtp +GST_WEBRTC_STATS_OUTBOUND_RTP: outbound-rtp +GST_WEBRTC_STATS_REMOTE_INBOUND_RTP: remote-inbound-rtp +GST_WEBRTC_STATS_REMOTE_OUTBOUND_RTP: remote-outbound-rtp +GST_WEBRTC_STATS_CSRC: csrc +GST_WEBRTC_STATS_PEER_CONNECTION: peer-connectiion +GST_WEBRTC_STATS_DATA_CHANNEL: data-channel +GST_WEBRTC_STATS_STREAM: stream +GST_WEBRTC_STATS_TRANSPORT: transport +GST_WEBRTC_STATS_CANDIDATE_PAIR: candidate-pair +GST_WEBRTC_STATS_LOCAL_CANDIDATE: local-candidate +GST_WEBRTC_STATS_REMOTE_CANDIDATE: remote-candidate +GST_WEBRTC_STATS_CERTIFICATE: certificate diff --git a/docs/gstreamer/docs.md b/docs/gstreamer/docs.md index 258407e06..aeed3252b 100644 --- a/docs/gstreamer/docs.md +++ b/docs/gstreamer/docs.md @@ -693,7 +693,8 @@ Copy `size` bytes starting from `offset` in `self` to `dest`. ## `offset` the offset to extract ## `dest` -the destination address + + the destination address ## `size` the size to extract @@ -12157,8 +12158,9 @@ outside of the segment is extrapolated. When 1 is returned, `running_time` resulted in a positive position returned in `position`. -When this function returns -1, the returned `position` should be negated -to get the real negative segment position. +When this function returns -1, the returned `position` was < 0, and the value +in the position variable should be negated to get the real negative segment +position. ## `format` the format of the segment. ## `running_time`