mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
Update to moved gst-convenience
This commit is contained in:
parent
abf8b696a5
commit
d76535bc59
9 changed files with 35 additions and 48 deletions
12
configure.ac
12
configure.ac
|
@ -156,13 +156,13 @@ GSTPB_PLUGINS_DIR=`$PKG_CONFIG gstreamer-plugins-base-$GST_MAJORMINOR --variable
|
|||
AC_SUBST(GSTPB_PLUGINS_DIR)
|
||||
AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
|
||||
|
||||
dnl check for gstreamer-profile
|
||||
PKG_CHECK_MODULES(GST_PROFILE, gstreamer-profile-$GST_MAJORMINOR, HAVE_GST_PROFILE="yes", HAVE_GST_PROFILE="no")
|
||||
if test "x$HAVE_GST_PROFILE" != "xyes"; then
|
||||
AC_ERROR([gst-profile is required for rendering support])
|
||||
dnl check for gstreamer-pbutils
|
||||
PKG_CHECK_MODULES(GST_PBUTILS, gstreamer-pbutils-$GST_MAJORMINOR, HAVE_GST_PBUTILS="yes", HAVE_GST_PBUTILS="no")
|
||||
if test "x$HAVE_GST_PBUTILS" != "xyes"; then
|
||||
AC_ERROR([gst-pbutils is required for rendering support])
|
||||
fi
|
||||
AC_SUBST(GST_PROFILE_LIBS)
|
||||
AC_SUBST(GST_PROFILE_CFLAGS)
|
||||
AC_SUBST(GST_PBUTILS_LIBS)
|
||||
AC_SUBST(GST_PBUTILS_CFLAGS)
|
||||
|
||||
dnl check for gstreamer-discoverer
|
||||
PKG_CHECK_MODULES(GST_DISCOVERER, gstreamer-discoverer-$GST_MAJORMINOR, HAVE_GST_DISCOVERER="yes", HAVE_GST_DISCOVERER="no")
|
||||
|
|
|
@ -76,9 +76,9 @@ libges_@GST_MAJORMINOR@include_HEADERS = \
|
|||
ges-screenshot.h \
|
||||
ges-utils.h
|
||||
|
||||
libges_@GST_MAJORMINOR@_la_CFLAGS = -I$(top_srcdir) $(GST_PROFILE_CFLAGS) $(GST_DISCOVERER_CFLAGS) $(GST_CONTROLLER_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
|
||||
libges_@GST_MAJORMINOR@_la_LIBADD = $(GST_PROFILE_LIBS) $(GST_DISCOVERER_LIBS) $(GST_CONTROLLER_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS)
|
||||
libges_@GST_MAJORMINOR@_la_LDFLAGS = -lgstprofile-@GST_MAJORMINOR@ $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
|
||||
libges_@GST_MAJORMINOR@_la_CFLAGS = -I$(top_srcdir) $(GST_PBUTILS_CFLAGS) $(GST_DISCOVERER_CFLAGS) $(GST_CONTROLLER_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
|
||||
libges_@GST_MAJORMINOR@_la_LIBADD = $(GST_PBUTILS_CFLAGS) $(GST_DISCOVERER_LIBS) $(GST_CONTROLLER_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS)
|
||||
libges_@GST_MAJORMINOR@_la_LDFLAGS = -lgstpbutils-@GST_MAJORMINOR@ $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
|
||||
|
||||
DISTCLEANFILE = $(CLEANFILES)
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/profile/gstfactorylists.h>
|
||||
#include <glib-object.h>
|
||||
#include <string.h>
|
||||
#include "ges-screenshot.h"
|
||||
|
@ -94,56 +93,44 @@ create_element (const gchar * factory_name, GstElement ** element,
|
|||
GstElement *
|
||||
get_encoder (GstCaps * caps)
|
||||
{
|
||||
GValueArray *encoders = NULL;
|
||||
GValueArray *filtered = NULL;
|
||||
GValue *factory_value = NULL;
|
||||
GList *encoders = NULL;
|
||||
GList *filtered = NULL;
|
||||
GstElementFactory *factory = NULL;
|
||||
GstElement *encoder;
|
||||
GstElement *encoder = NULL;
|
||||
|
||||
encoders =
|
||||
gst_factory_list_get_elements (GST_FACTORY_LIST_ENCODER |
|
||||
GST_FACTORY_LIST_IMAGE, GST_RANK_NONE);
|
||||
gst_element_factory_list_get_elements (GST_ELEMENT_FACTORY_LIST_ENCODER |
|
||||
GST_ELEMENT_FACTORY_LIST_MEDIA_IMAGE, GST_RANK_NONE);
|
||||
|
||||
GST_INFO ("got factory list %p", encoders);
|
||||
gst_factory_list_debug (encoders);
|
||||
if (!(encoders && encoders->n_values))
|
||||
goto fail;
|
||||
gst_plugin_feature_list_debug (encoders);
|
||||
if (encoders == NULL)
|
||||
goto beach;
|
||||
|
||||
filtered = gst_factory_list_filter (encoders, caps, GST_PAD_SRC, FALSE);
|
||||
filtered =
|
||||
gst_element_factory_list_filter (encoders, caps, GST_PAD_SRC, FALSE);
|
||||
GST_INFO ("got filtered list %p", filtered);
|
||||
gst_factory_list_debug (filtered);
|
||||
if (!(filtered && filtered->n_values))
|
||||
goto fail;
|
||||
gst_plugin_feature_list_debug (filtered);
|
||||
if (filtered == NULL)
|
||||
goto beach;
|
||||
|
||||
factory_value = g_value_array_get_nth (filtered, 0);
|
||||
factory = (GstElementFactory *) g_value_get_object (factory_value);
|
||||
factory = (GstElementFactory *) filtered->data;
|
||||
|
||||
GST_INFO ("got factory %p", factory);
|
||||
if (!factory)
|
||||
goto fail;
|
||||
goto beach;
|
||||
encoder = gst_element_factory_create (factory, NULL);
|
||||
|
||||
GST_INFO ("created encoder element %p, %s", encoder,
|
||||
gst_element_get_name (encoder));
|
||||
|
||||
if (!encoder)
|
||||
goto fail;
|
||||
|
||||
g_value_array_free (filtered);
|
||||
g_value_array_free (encoders);
|
||||
gst_object_unref (factory);
|
||||
beach:
|
||||
if (filtered)
|
||||
gst_plugin_feature_list_free (filtered);
|
||||
if (encoders)
|
||||
gst_plugin_feature_list_free (encoders);
|
||||
|
||||
return encoder;
|
||||
|
||||
fail:
|
||||
if (encoders)
|
||||
g_value_array_free (encoders);
|
||||
if (filtered)
|
||||
g_value_array_free (filtered);
|
||||
if (factory)
|
||||
gst_object_unref (factory);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* takes ownership of the input buffer */
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include <glib-object.h>
|
||||
#include <ges/ges.h>
|
||||
#include <gst/profile/gstprofile.h>
|
||||
#include <gst/pbutils/gstprofile.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ ges_timeline_init (GESTimeline * self)
|
|||
self);
|
||||
g_signal_connect (self->discoverer, "discovered",
|
||||
G_CALLBACK (discoverer_discovered_cb), self);
|
||||
gst_discoverer_start (self->discoverer);
|
||||
gst_discoverer_start (self->discoverer, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
#include <ges/ges.h>
|
||||
#include <gst/profile/gstprofile.h>
|
||||
#include <gst/pbutils/gstprofile.h>
|
||||
#include <gst/discoverer/gstdiscoverer.h>
|
||||
|
||||
GstDiscovererInformation *get_info_for_file (GstDiscoverer * disco,
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
#include <ges/ges.h>
|
||||
#include <gst/profile/gstprofile.h>
|
||||
#include <gst/pbutils/gstprofile.h>
|
||||
|
||||
GstEncodingProfile *make_ogg_vorbis_profile (void);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <glib.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <ges/ges.h>
|
||||
#include <gst/profile/gstprofile.h>
|
||||
#include <gst/pbutils/gstprofile.h>
|
||||
#include <regex.h>
|
||||
|
||||
/* GLOBAL VARIABLE */
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <string.h>
|
||||
#include <glib.h>
|
||||
#include <ges/ges.h>
|
||||
#include <gst/profile/gstprofile.h>
|
||||
#include <gst/pbutils/gstprofile.h>
|
||||
#include <regex.h>
|
||||
|
||||
/* GLOBAL VARIABLE */
|
||||
|
|
Loading…
Reference in a new issue