mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-13 20:06:35 +00:00
a342d14ba9
It introduces a `reverse` property at the `nlesource` level which will basically reverse playback of the clip. We guarantee that outside that clip, the data flow looks like it was playing forward as we add an 'identity' element with `single-segment=true`. This start making use of the newly introduced concept of `CHILD_PROP_FLAG_SET_ON_ALL_INSTANCES` as it is natural that doing `source_clip.set_child_property("reverse", True)` will make the whole clip go reverse, meaning that all the GESSource children properties will be set. To set an individual source "reverse" child property as the desired effect. Fixes: https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/issues/24 Depends on: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/451 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/918>
68 lines
2.1 KiB
C
68 lines
2.1 KiB
C
/* GStreamer
|
|
* Copyright (C) 2001 Wim Taymans <wim.taymans@gmail.com>
|
|
* 2004-2008 Edward Hervey <bilboed@bilboed.com>
|
|
*
|
|
* nlesource.h: Header for base NleSource
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
* Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
|
|
#ifndef __NLE_SOURCE_H__
|
|
#define __NLE_SOURCE_H__
|
|
|
|
#include <gst/gst.h>
|
|
#include "nleobject.h"
|
|
|
|
G_BEGIN_DECLS
|
|
#define NLE_TYPE_SOURCE \
|
|
(nle_source_get_type())
|
|
#define NLE_SOURCE(obj) \
|
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),NLE_TYPE_SOURCE,NleSource))
|
|
#define NLE_SOURCE_CLASS(klass) \
|
|
(G_TYPE_CHECK_CLASS_CAST((klass),NLE_TYPE_SOURCE,NleSourceClass))
|
|
#define NLE_SOURCE_GET_CLASS(obj) \
|
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), NLE_TYPE_SOURCE, NleSourceClass))
|
|
#define NLE_IS_SOURCE(obj) \
|
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),NLE_TYPE_SOURCE))
|
|
#define NLE_IS_SOURCE_CLASS(obj) \
|
|
(G_TYPE_CHECK_CLASS_TYPE((klass),NLE_TYPE_SOURCE))
|
|
typedef struct _NleSourcePrivate NleSourcePrivate;
|
|
|
|
struct _NleSource
|
|
{
|
|
NleObject parent;
|
|
gboolean reverse;
|
|
gboolean pending_reverse;
|
|
|
|
/* controlled source element, acces with gst_bin_[add|remove]_element */
|
|
GstElement *element;
|
|
|
|
NleSourcePrivate *priv;
|
|
};
|
|
|
|
struct _NleSourceClass
|
|
{
|
|
NleObjectClass parent_class;
|
|
|
|
/* control_element() takes care of controlling the given element */
|
|
gboolean (*control_element) (NleSource * source, GstElement * element);
|
|
};
|
|
|
|
GType nle_source_get_type (void) G_GNUC_INTERNAL;
|
|
|
|
G_END_DECLS
|
|
#endif /* __NLE_SOURCE_H__ */
|