mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-23 09:04:15 +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_SUBST(GSTPB_PLUGINS_DIR)
|
||||||
AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
|
AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
|
||||||
|
|
||||||
dnl check for gstreamer-profile
|
dnl check for gstreamer-pbutils
|
||||||
PKG_CHECK_MODULES(GST_PROFILE, gstreamer-profile-$GST_MAJORMINOR, HAVE_GST_PROFILE="yes", HAVE_GST_PROFILE="no")
|
PKG_CHECK_MODULES(GST_PBUTILS, gstreamer-pbutils-$GST_MAJORMINOR, HAVE_GST_PBUTILS="yes", HAVE_GST_PBUTILS="no")
|
||||||
if test "x$HAVE_GST_PROFILE" != "xyes"; then
|
if test "x$HAVE_GST_PBUTILS" != "xyes"; then
|
||||||
AC_ERROR([gst-profile is required for rendering support])
|
AC_ERROR([gst-pbutils is required for rendering support])
|
||||||
fi
|
fi
|
||||||
AC_SUBST(GST_PROFILE_LIBS)
|
AC_SUBST(GST_PBUTILS_LIBS)
|
||||||
AC_SUBST(GST_PROFILE_CFLAGS)
|
AC_SUBST(GST_PBUTILS_CFLAGS)
|
||||||
|
|
||||||
dnl check for gstreamer-discoverer
|
dnl check for gstreamer-discoverer
|
||||||
PKG_CHECK_MODULES(GST_DISCOVERER, gstreamer-discoverer-$GST_MAJORMINOR, HAVE_GST_DISCOVERER="yes", HAVE_GST_DISCOVERER="no")
|
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-screenshot.h \
|
||||||
ges-utils.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_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_PROFILE_LIBS) $(GST_DISCOVERER_LIBS) $(GST_CONTROLLER_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS)
|
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 = -lgstprofile-@GST_MAJORMINOR@ $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
|
libges_@GST_MAJORMINOR@_la_LDFLAGS = -lgstpbutils-@GST_MAJORMINOR@ $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
|
||||||
|
|
||||||
DISTCLEANFILE = $(CLEANFILES)
|
DISTCLEANFILE = $(CLEANFILES)
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/profile/gstfactorylists.h>
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "ges-screenshot.h"
|
#include "ges-screenshot.h"
|
||||||
|
@ -94,56 +93,44 @@ create_element (const gchar * factory_name, GstElement ** element,
|
||||||
GstElement *
|
GstElement *
|
||||||
get_encoder (GstCaps * caps)
|
get_encoder (GstCaps * caps)
|
||||||
{
|
{
|
||||||
GValueArray *encoders = NULL;
|
GList *encoders = NULL;
|
||||||
GValueArray *filtered = NULL;
|
GList *filtered = NULL;
|
||||||
GValue *factory_value = NULL;
|
|
||||||
GstElementFactory *factory = NULL;
|
GstElementFactory *factory = NULL;
|
||||||
GstElement *encoder;
|
GstElement *encoder = NULL;
|
||||||
|
|
||||||
encoders =
|
encoders =
|
||||||
gst_factory_list_get_elements (GST_FACTORY_LIST_ENCODER |
|
gst_element_factory_list_get_elements (GST_ELEMENT_FACTORY_LIST_ENCODER |
|
||||||
GST_FACTORY_LIST_IMAGE, GST_RANK_NONE);
|
GST_ELEMENT_FACTORY_LIST_MEDIA_IMAGE, GST_RANK_NONE);
|
||||||
|
|
||||||
GST_INFO ("got factory list %p", encoders);
|
GST_INFO ("got factory list %p", encoders);
|
||||||
gst_factory_list_debug (encoders);
|
gst_plugin_feature_list_debug (encoders);
|
||||||
if (!(encoders && encoders->n_values))
|
if (encoders == NULL)
|
||||||
goto fail;
|
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_INFO ("got filtered list %p", filtered);
|
||||||
gst_factory_list_debug (filtered);
|
gst_plugin_feature_list_debug (filtered);
|
||||||
if (!(filtered && filtered->n_values))
|
if (filtered == NULL)
|
||||||
goto fail;
|
goto beach;
|
||||||
|
|
||||||
factory_value = g_value_array_get_nth (filtered, 0);
|
factory = (GstElementFactory *) filtered->data;
|
||||||
factory = (GstElementFactory *) g_value_get_object (factory_value);
|
|
||||||
|
|
||||||
GST_INFO ("got factory %p", factory);
|
GST_INFO ("got factory %p", factory);
|
||||||
if (!factory)
|
if (!factory)
|
||||||
goto fail;
|
goto beach;
|
||||||
encoder = gst_element_factory_create (factory, NULL);
|
encoder = gst_element_factory_create (factory, NULL);
|
||||||
|
|
||||||
GST_INFO ("created encoder element %p, %s", encoder,
|
GST_INFO ("created encoder element %p, %s", encoder,
|
||||||
gst_element_get_name (encoder));
|
gst_element_get_name (encoder));
|
||||||
|
|
||||||
if (!encoder)
|
beach:
|
||||||
goto fail;
|
if (filtered)
|
||||||
|
gst_plugin_feature_list_free (filtered);
|
||||||
g_value_array_free (filtered);
|
if (encoders)
|
||||||
g_value_array_free (encoders);
|
gst_plugin_feature_list_free (encoders);
|
||||||
gst_object_unref (factory);
|
|
||||||
|
|
||||||
return encoder;
|
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 */
|
/* takes ownership of the input buffer */
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include <gst/profile/gstprofile.h>
|
#include <gst/pbutils/gstprofile.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ ges_timeline_init (GESTimeline * self)
|
||||||
self);
|
self);
|
||||||
g_signal_connect (self->discoverer, "discovered",
|
g_signal_connect (self->discoverer, "discovered",
|
||||||
G_CALLBACK (discoverer_discovered_cb), self);
|
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 <ges/ges.h>
|
||||||
#include <gst/profile/gstprofile.h>
|
#include <gst/pbutils/gstprofile.h>
|
||||||
#include <gst/discoverer/gstdiscoverer.h>
|
#include <gst/discoverer/gstdiscoverer.h>
|
||||||
|
|
||||||
GstDiscovererInformation *get_info_for_file (GstDiscoverer * disco,
|
GstDiscovererInformation *get_info_for_file (GstDiscoverer * disco,
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include <gst/profile/gstprofile.h>
|
#include <gst/pbutils/gstprofile.h>
|
||||||
|
|
||||||
GstEncodingProfile *make_ogg_vorbis_profile (void);
|
GstEncodingProfile *make_ogg_vorbis_profile (void);
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <glib/gstdio.h>
|
#include <glib/gstdio.h>
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include <gst/profile/gstprofile.h>
|
#include <gst/pbutils/gstprofile.h>
|
||||||
#include <regex.h>
|
#include <regex.h>
|
||||||
|
|
||||||
/* GLOBAL VARIABLE */
|
/* GLOBAL VARIABLE */
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include <gst/profile/gstprofile.h>
|
#include <gst/pbutils/gstprofile.h>
|
||||||
#include <regex.h>
|
#include <regex.h>
|
||||||
|
|
||||||
/* GLOBAL VARIABLE */
|
/* GLOBAL VARIABLE */
|
||||||
|
|
Loading…
Reference in a new issue