mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
GES: Add a new utility file
API : ges_timeline_new_audio_video()
This commit is contained in:
parent
d56616ecfa
commit
3b8ea491d7
5 changed files with 93 additions and 2 deletions
|
@ -97,6 +97,7 @@ ges_track_filesource_get_type
|
|||
GESTimeline
|
||||
GESTimelineClass
|
||||
ges_timeline_new
|
||||
ges_timeline_new_audio_video
|
||||
ges_timeline_add_layer
|
||||
ges_timeline_remove_layer
|
||||
ges_timeline_add_track
|
||||
|
|
|
@ -21,7 +21,8 @@ libges_@GST_MAJORMINOR@_la_SOURCES = \
|
|||
ges-track.c \
|
||||
ges-track-object.c \
|
||||
ges-track-source.c \
|
||||
ges-track-filesource.c
|
||||
ges-track-filesource.c \
|
||||
ges-utils.c
|
||||
|
||||
libges_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/ges/
|
||||
libges_@GST_MAJORMINOR@include_HEADERS = \
|
||||
|
@ -40,7 +41,8 @@ libges_@GST_MAJORMINOR@include_HEADERS = \
|
|||
ges-track.h \
|
||||
ges-track-object.h \
|
||||
ges-track-source.h \
|
||||
ges-track-filesource.h
|
||||
ges-track-filesource.h \
|
||||
ges-utils.h
|
||||
|
||||
|
||||
libges_@GST_MAJORMINOR@_la_CFLAGS = -I$(top_srcdir) $(GST_PROFILE_CFLAGS) $(GST_DISCOVERER_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
|
||||
|
|
52
ges/ges-utils.c
Normal file
52
ges/ges-utils.c
Normal file
|
@ -0,0 +1,52 @@
|
|||
/* GStreamer Editing Services
|
||||
* Copyright (C) 2010 Edward Hervey <edward.hervey@collabora.co.uk>
|
||||
*
|
||||
* 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., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* SECTION:ges-utils
|
||||
* @short_description: Convenience methods
|
||||
*
|
||||
*/
|
||||
|
||||
#include "gesmarshal.h"
|
||||
#include "ges-internal.h"
|
||||
#include "ges-timeline.h"
|
||||
#include "ges-track.h"
|
||||
#include "ges-timeline-layer.h"
|
||||
#include "ges.h"
|
||||
|
||||
GESTimeline *
|
||||
ges_timeline_new_audio_video (void)
|
||||
{
|
||||
GESTrack *tracka, *trackv;
|
||||
GESTimeline *timeline;
|
||||
|
||||
/* This is our main GESTimeline */
|
||||
timeline = ges_timeline_new ();
|
||||
|
||||
tracka = ges_track_audio_raw_new ();
|
||||
trackv = ges_track_video_raw_new ();
|
||||
|
||||
if (!ges_timeline_add_track (timeline, trackv) ||
|
||||
!ges_timeline_add_track (timeline, tracka)) {
|
||||
g_object_unref (timeline);
|
||||
timeline = NULL;
|
||||
}
|
||||
|
||||
return timeline;
|
||||
}
|
34
ges/ges-utils.h
Normal file
34
ges/ges-utils.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/* GStreamer Editing Services
|
||||
* Copyright (C) 2010 Edward Hervey <edward.hervey@collabora.co.uk>
|
||||
*
|
||||
* 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., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef _GES_UTILS
|
||||
#define _GES_UTILS
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gst/gst.h>
|
||||
#include <ges/ges-types.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GESTimeline * ges_timeline_new_audio_video ();
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* _GES_UTILS */
|
||||
|
|
@ -41,6 +41,8 @@
|
|||
#include <ges/ges-timeline-file-source.h>
|
||||
#include <ges/ges-track-filesource.h>
|
||||
|
||||
#include <ges/ges-utils.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
void ges_init (void);
|
||||
|
|
Loading…
Reference in a new issue