[Xfce4-commits] [apps/xfburn] 01/01: Adapting gstreamer 1.0 api (work in progress)
noreply at xfce.org
noreply at xfce.org
Thu Mar 26 23:01:07 CET 2015
This is an automated email from the git hooks/post-receive script.
squisher pushed a commit to branch master
in repository apps/xfburn.
commit 5052d5761386e470fe0cdd6a799c1ee77be80c64
Author: David Mohr <david at mcbf.net>
Date: Thu Mar 26 16:00:34 2015 -0600
Adapting gstreamer 1.0 api (work in progress)
The filter of the link to the required audio format does not work.
---
configure.in.in | 8 ++++----
xfburn/xfburn-transcoder-gst.c | 22 ++++++++++++----------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/configure.in.in b/configure.in.in
index 9c1b5d2..0bf3b4d 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -3,13 +3,13 @@ dnl $Id$
dnl Version information
m4_define([xfburn_version_major], [0])
m4_define([xfburn_version_minor], [5])
-m4_define([xfburn_version_micro], [2])
+m4_define([xfburn_version_micro], [3])
m4_define([xfburn_version_build], [@REVISION@])
m4_define([xfburn_version_tag], [])
m4_define([xfburn_version], [xfburn_version_major().xfburn_version_minor().xfburn_version_micro()ifelse(xfburn_version_tag(), [git], [xfburn_version_tag()-xfburn_version_build()], [xfburn_version_tag()])])
dnl Initialize autoconf
-AC_COPYRIGHT([Copyright (c) 2005-2008 Jean-François Wauthy <pollux at xfce.org>, 2008-2014 David Mohr <david at mcbf.net>])
+AC_COPYRIGHT([Copyright (c) 2005-2008 Jean-François Wauthy <pollux at xfce.org>, 2008-2015 David Mohr <david at mcbf.net>])
AC_INIT([xfburn], [xfburn_version], [xfburn at xfce.org])
dnl Initialize automake
@@ -48,9 +48,9 @@ dnl *** Optional support for gstreamer ***
dnl **************************************
dnl (based on xfce4-mixer (trunk at 27735)
dnl XDT_CHECK_OPTIONAL_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.2])
-XDT_CHECK_OPTIONAL_PACKAGE([GST], [gstreamer-0.10], [0.10.2], [gstreamer], [GStreamer support for burning audio])
+XDT_CHECK_OPTIONAL_PACKAGE([GST], [gstreamer-1.0], [1.0.0], [gstreamer], [GStreamer support for burning audio])
if test x"$GST_FOUND" == x"yes"; then
- XDT_CHECK_PACKAGE([GST_PBUTILS], [gstreamer-pbutils-0.10], [0.10.2])
+ XDT_CHECK_PACKAGE([GST_PBUTILS], [gstreamer-pbutils-1.0], [1.0])
fi
diff --git a/xfburn/xfburn-transcoder-gst.c b/xfburn/xfburn-transcoder-gst.c
index c2d4e2b..6ee7d02 100644
--- a/xfburn/xfburn-transcoder-gst.c
+++ b/xfburn/xfburn-transcoder-gst.c
@@ -89,7 +89,7 @@ static gboolean query_and_signal_duration (XfburnTranscoderGst *trans);
/* gstreamer support functions */
static gboolean bus_call (GstBus *bus, GstMessage *msg, gpointer data);
-static void on_pad_added (GstElement *element, GstPad *pad, gboolean last, gpointer data);
+static void on_pad_added (GstElement *element, GstPad *pad, gpointer data);
#ifdef DEBUG_GST
static void cb_handoff (GstElement *element, GstBuffer *buffer, gpointer data);
@@ -314,7 +314,7 @@ create_pipeline (XfburnTranscoderGst *trans)
gst_element_link (resample, conv2);
/* setup caps for raw pcm data */
- caps = gst_caps_new_simple ("audio/x-raw-int",
+ caps = gst_caps_new_simple ("audio/x-raw",
"rate", G_TYPE_INT, 44100,
"channels", G_TYPE_INT, 2,
"endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
@@ -324,7 +324,9 @@ create_pipeline (XfburnTranscoderGst *trans)
NULL);
#if DEBUG_GST > 0 && DEBUG > 0
- if (!gst_element_link_filtered (conv2, id, caps)) {
+ // TODO without the filter it does work but I'm not sure the audio format is correct
+ //if (!gst_element_link_filtered (conv2, id, caps)) {
+ if (!gst_element_link (conv2, id)) {
#else
if (!gst_element_link_filtered (conv2, sink, caps)) {
#endif
@@ -341,7 +343,7 @@ create_pipeline (XfburnTranscoderGst *trans)
g_signal_connect (id, "handoff", G_CALLBACK (cb_handoff), id);
#endif
- g_signal_connect (decoder, "new-decoded-pad", G_CALLBACK (on_pad_added), trans);
+ g_signal_connect (decoder, "pad-added", G_CALLBACK (on_pad_added), trans);
}
static void
@@ -447,7 +449,7 @@ query_and_signal_duration (XfburnTranscoderGst *trans)
//guint secs;
fmt = GST_FORMAT_TIME;
- if (!gst_element_query_duration (priv->pipeline, &fmt, &priv->duration)) {
+ if (!gst_element_query_duration (priv->pipeline, fmt, &priv->duration)) {
return FALSE;
}
@@ -605,7 +607,7 @@ bus_call (GstBus *bus, GstMessage *msg, gpointer data)
break;
}
- case GST_MESSAGE_DURATION: {
+ case GST_MESSAGE_DURATION_CHANGED: {
switch (priv->state) {
case XFBURN_TRANSCODER_GST_STATE_IDLE:
@@ -654,7 +656,7 @@ bus_call (GstBus *bus, GstMessage *msg, gpointer data)
}
static void
-on_pad_added (GstElement *element, GstPad *pad, gboolean last, gpointer data)
+on_pad_added (GstElement *element, GstPad *pad, gpointer data)
{
XfburnTranscoderGst *trans = XFBURN_TRANSCODER_GST (data);
XfburnTranscoderGstPrivate *priv= XFBURN_TRANSCODER_GST_GET_PRIVATE (trans);
@@ -677,7 +679,7 @@ on_pad_added (GstElement *element, GstPad *pad, gboolean last, gpointer data)
#endif
// check disc type
- caps = gst_pad_get_caps (pad);
+ caps = gst_pad_query_caps (pad, NULL);
str = gst_caps_get_structure (caps, 0);
if (!g_strrstr (gst_structure_get_name (str), "audio")) {
GstStructure *msg_struct;
@@ -696,7 +698,7 @@ on_pad_added (GstElement *element, GstPad *pad, gboolean last, gpointer data)
"%s",
_(error_msg));
- msg_struct = gst_structure_new ("no-audio-content", NULL);
+ msg_struct = gst_structure_new_empty ("no-audio-content");
msg = gst_message_new_application (GST_OBJECT (element), msg_struct);
@@ -745,7 +747,7 @@ get_description (XfburnTranscoder *trans)
static void
cb_handoff (GstElement *element, GstBuffer *buffer, gpointer data)
{
- guint size = GST_BUFFER_SIZE (buffer);
+ guint size = gst_buffer_get_size (buffer);
#if DEBUG_GST > 2
static int i = 0;
const int step = 30;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list