Hello community,
here is the log from the commit of package kaffeine
checked in at Sun Apr 9 20:34:32 CEST 2006.
--------
--- KDE/kaffeine/kaffeine.changes 2006-03-24 16:04:18.000000000 +0100
+++ kaffeine/kaffeine.changes 2006-04-09 16:46:43.000000000 +0200
@@ -1,0 +2,5 @@
+Sun Apr 9 16:46:30 CEST 2006 - jpr@suse.de
+
+- Move gstreamer part to 0.10
+
+-------------------------------------------------------------------
New:
----
kaffeine-gstreamer-0-10.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kaffeine.spec ++++++
--- /var/tmp/diff_new_pack.d3hYbR/_old 2006-04-09 20:34:20.000000000 +0200
+++ /var/tmp/diff_new_pack.d3hYbR/_new 2006-04-09 20:34:20.000000000 +0200
@@ -11,13 +11,13 @@
# norootforbuild
Name: kaffeine
-BuildRequires: gstreamer-plugins-devel kdelibs3-devel xine-devel xine-lib
+BuildRequires: gstreamer010-plugins-base-devel kdelibs3-devel xine-devel xine-lib
URL: http://kaffeine.sourceforge.net/
License: GPL
Group: Productivity/Multimedia/Video/Players
Summary: Xine-Based Multimedia Player
Version: 0.7.1
-Release: 18
+Release: 20
%define rversion %version
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: kdelibs3 >= %( echo `rpm -q --queryformat '%{VERSION}' kdelibs3`)
@@ -34,6 +34,7 @@
Patch4: mutex.diff
Patch5: kaffeine-media.diff
Patch6: kaffeine-0.7.x-CVE-2006-0051.patch
+Patch7: kaffeine-gstreamer-0-10.patch
%description
Kaffeine plays all files and devices supported by Xine. For example,
@@ -72,6 +73,7 @@
%patch4
%patch5
%patch6
+%patch7
cp %SOURCE5 po/
. /etc/opt/kde3/common_options
update_admin
@@ -128,6 +130,8 @@
/opt/kde3/share/services/gstreamer_part.desktop
%changelog -n kaffeine
+* Sun Apr 09 2006 - jpr@suse.de
+- Move gstreamer part to 0.10
* Fri Mar 24 2006 - dmueller@suse.de
- fix buffer overflow (#156952, CVE-2006-0051)
* Sat Mar 18 2006 - coolo@suse.de
++++++ kaffeine-gstreamer-0-10.patch ++++++
--- configure.in
+++ configure.in
@@ -146,14 +146,14 @@
dnl And we can also ask for the right version of gstreamer
have_gst=no
- GST_MAJORMINOR=0.8
- GST_REQ=0.8.4
+ GST_MAJORMINOR=0.10
+ GST_REQ=0.10.4
PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ
- gstreamer-interfaces-$GST_MAJORMINOR >= $GST_REQ,
- have_gst=yes,have_gst=no)
+ gstreamer-base-$GST_MAJORMINOR,
+ have_gst=yes,have_gst=no)
- PKG_CHECK_MODULES(GST_PLUGINS, gstreamer-plugins-$GST_MAJORMINOR >= $GST_REQ, \
+ PKG_CHECK_MODULES(GST_PLUGINS, gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ, \
have_gst_plugins=yes,have_gst_plugins=no)
dnl Give error if we don't have gstreamer
@@ -161,7 +161,7 @@
LIB_GST=""
CFLAGS_GST=""
else
- LIB_GST=$GST_LIBS
+ LIB_GST="$GST_LIBS -lgstinterfaces-$GST_MAJORMINDOR"
CFLAGS_GST=$GST_CFLAGS
AC_SUBST(LIB_GST)
AC_SUBST(CFLAGS_GST)
--- configure.in.in
+++ configure.in.in
@@ -81,14 +81,14 @@
dnl And we can also ask for the right version of gstreamer
have_gst=no
- GST_MAJORMINOR=0.8
- GST_REQ=0.8.4
+ GST_MAJORMINOR=0.10
+ GST_REQ=0.10.4
PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ
- gstreamer-interfaces-$GST_MAJORMINOR >= $GST_REQ,
- have_gst=yes,have_gst=no)
+ gstreamer-base-$GST_MAJORMINOR,
+ have_gst=yes,have_gst=no)
- PKG_CHECK_MODULES(GST_PLUGINS, gstreamer-plugins-$GST_MAJORMINOR >= $GST_REQ, \
+ PKG_CHECK_MODULES(GST_PLUGINS, gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ, \
have_gst_plugins=yes,have_gst_plugins=no)
dnl Give error if we don't have gstreamer
@@ -96,7 +96,7 @@
LIB_GST=""
CFLAGS_GST=""
else
- LIB_GST=$GST_LIBS
+ LIB_GST="$GST_LIBS -lgstinterfaces-$GST_MAJORMINOR"
CFLAGS_GST=$GST_CFLAGS
AC_SUBST(LIB_GST)
AC_SUBST(CFLAGS_GST)
--- kaffeine/player-parts/gstreamer-part/gstreamer_part.cpp
+++ kaffeine/player-parts/gstreamer-part/gstreamer_part.cpp
@@ -358,7 +358,7 @@
g_object_set(G_OBJECT(m_play), "suburi", NULL, NULL);
}
- if (gst_element_set_state(m_play, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
+ if (!gst_element_set_state(m_play, GST_STATE_PLAYING))
{
// KMessageBox::error(0, i18n("Playback failed. Reason unknown."));
// if (m_url != m_logoPath)
@@ -393,12 +393,12 @@
gst_object_unref(GST_OBJECT (cdda));
return;
}
- if (gst_element_set_state(cdda, GST_STATE_PAUSED) != GST_STATE_SUCCESS)
+ if (!gst_element_set_state(cdda, GST_STATE_PAUSED))
{
gst_object_unref(GST_OBJECT (cdda));
return;
}
- if (!gst_pad_query (gst_element_get_pad(cdda, "src"), GST_QUERY_TOTAL, &fmt, &tracks))
+ if (!gst_element_query_duration (cdda, &fmt, &tracks))
{
gst_element_set_state(cdda, GST_STATE_NULL);
gst_object_unref(GST_OBJECT (cdda));
@@ -849,27 +849,21 @@
*/
bool GStreamerPart::initGStreamer()
{
- if (!gst_init_check(NULL, NULL))
+ GstBus *bus;
+
+ if (!gst_init_check(NULL, NULL, NULL))
{
KMessageBox::error(0, i18n("GStreamer could not be initialized!"));
return false;
}
- // Check if registry exists
- GstElement* dummy = gst_element_factory_make("fakesink", "fakesink");
- if (!dummy || !gst_scheduler_factory_make( NULL, GST_ELEMENT(dummy)))
- {
- KMessageBox::error(0, i18n("Missing GStreamer-registry! Did you forget to run <b>gst-register</b> (as root) after installation?"));
- return false;
- }
-
/* check GStreamer version */
- guint maj, min, mic;
- gst_version(&maj, &min, &mic);
- kdDebug() << "GStreamerPart: Found GStreamer version " << maj << "." << min << "." << mic << endl << endl;
+ guint maj, min, mic, nan;
+ gst_version(&maj, &min, &mic, &nan);
+ kdDebug() << "GStreamerPart: Found GStreamer version " << maj << "." << min << "." << mic << "." << nan << endl << endl;
/* check for visualization plugins */
- GList* factories = gst_registry_pool_feature_list(GST_TYPE_ELEMENT_FACTORY);
+ GList* factories = gst_registry_get_feature_list (gst_registry_get_default (), GST_TYPE_ELEMENT_FACTORY);
QString name, cat;
while (factories)
{
@@ -884,7 +878,7 @@
m_videoPluginList.append(name);
factories = g_list_next(factories);
}
- g_list_free(factories);
+ gst_plugin_feature_list_free(factories);
/* initialize GStreamer objects */
m_play = gst_element_factory_make ("playbin", "player");
@@ -950,10 +944,15 @@
g_object_set(G_OBJECT(m_play), "video-sink", m_videosink, "audio-sink", m_audiosink, "vis-plugin", m_visual, NULL);
//subtitle font
//g_object_set(G_OBJECT(m_play), "subtitle-font-desc", "sans normal 14", NULL);
- g_signal_connect(m_play, "error", G_CALLBACK (cb_error), this);
- g_signal_connect(m_play, "found-tag", G_CALLBACK (cb_foundtag), this);
- g_signal_connect(m_play, "eos", G_CALLBACK (cb_eos), this);
- g_signal_connect(m_play, "state-change", G_CALLBACK (cb_state), this);
+
+ bus = gst_element_get_bus(m_play);
+ gst_bus_add_signal_watch(bus);
+ g_signal_connect(bus, "message::error", G_CALLBACK (cb_error), this);
+ g_signal_connect(bus, "message::tag", G_CALLBACK (cb_foundtag), this);
+ g_signal_connect(bus, "message::eos", G_CALLBACK (cb_eos), this);
+ g_signal_connect(bus, "message::state-changed", G_CALLBACK (cb_state), this);
+
+ /* FIXME Where is this signal now */
g_signal_connect(m_play, "notify::source", G_CALLBACK(got_source), this);
gst_element_set_state(m_play, GST_STATE_READY);
return true;
@@ -961,23 +960,28 @@
/******************* CALLBACKS ************************/
-void GStreamerPart::cb_error(GstElement* /*play*/, GstElement* /*src*/, GError *err, const char *debug, gpointer data)
+void GStreamerPart::cb_error(GstBus* /*bus*/, GstMessage *message, gpointer data)
{
GStreamerPart* gp = (GStreamerPart*)data;
+ GError *err = NULL;
+
+ gst_message_parse_error (message, &err, NULL);
gp->m_errorMsg = err->message;
- gp->m_errorDetails = debug;
+ gp->m_errorDetails = "";
QApplication::postEvent(gp, new QTimerEvent(TIMER_EVENT_ERROR));
}
-void GStreamerPart::cb_foundtag(GstElement* /*play*/, GstElement* /*src*/, const GstTagList *taglist, gpointer data)
+void GStreamerPart::cb_foundtag(GstBus* /*bus*/, GstMessage *message, gpointer data)
{
GStreamerPart* gp = (GStreamerPart*)data;
+ GstTagList *taglist;
kdDebug() << " Received meta tags..." << endl;
char* string;
guint intVal = 0;
bool success = false;
+ gst_message_parse_tag (message, &taglist);
if (gst_tag_list_get_string(taglist, GST_TAG_TITLE, &string) && string)
{
gp->m_title = string;
@@ -1024,21 +1028,25 @@
gp->m_videoCodec = string;
//kdDebug() << "GStreamerPart: 'Video Codec': " << string << endl;
}
-
+ gst_tag_list_free(taglist);
+
if (success)
QApplication::postEvent(gp, new QTimerEvent(TIMER_EVENT_FOUND_TAG));
}
-void GStreamerPart::cb_eos (GstElement* /*play*/, gpointer data)
+void GStreamerPart::cb_eos (GstBus* /*bus*/, GstMessage* /*message*/, gpointer data)
{
GStreamerPart* gp = (GStreamerPart*)data;
QApplication::postEvent(gp, new QTimerEvent(TIMER_EVENT_PLAYBACK_FINISHED));
}
-void GStreamerPart::cb_state(GstElement* /*play*/, GstElementState /*old_state*/, GstElementState new_state, gpointer data)
+void GStreamerPart::cb_state(GstBus* /*bus*/, GstMessage *message, gpointer data)
{
+ GstState old_state, new_state;
+
//kdDebug() << "GStreamerPart: state changed callback" << endl;
GStreamerPart* gp = (GStreamerPart*)data;
+ gst_message_parse_state_changed(message, &old_state, &new_state, NULL);
gp->m_newState = new_state;
QApplication::postEvent(gp, new QTimerEvent(TIMER_EVENT_NEW_STATE));
}
--- kaffeine/player-parts/gstreamer-part/gstreamer_part.h
+++ kaffeine/player-parts/gstreamer-part/gstreamer_part.h
@@ -102,10 +102,10 @@
void setAudioSink(QString sinkName);
//callbacks
- static void cb_error (GstElement *play, GstElement *src, GError *err, const char *debug, gpointer data);
- static void cb_foundtag (GstElement *play, GstElement *src, const GstTagList *list, gpointer data);
- static void cb_eos (GstElement *play, gpointer data);
- static void cb_state (GstElement *play, GstElementState old_state, GstElementState new_state, gpointer data);
+ static void cb_error (GstBus *bus, GstMessage *message, gpointer data);
+ static void cb_foundtag (GstBus *bus, GstMessage *message, gpointer data);
+ static void cb_eos (GstBus *bus, GstMessage *message, gpointer data);
+ static void cb_state (GstBus *bus, GstMessage *message, gpointer data);
static void got_source (GstElement* play, GParamSpec* pspec, gpointer data);
private:
@@ -113,7 +113,7 @@
GstElement* m_videosink;
GstElement* m_audiosink;
GstElement* m_visual;
- GstElementState m_newState;
+ GstState m_newState;
VideoWindow* m_video;
Timer* m_timer;
--- kaffeine/player-parts/gstreamer-part/timer.cpp
+++ kaffeine/player-parts/gstreamer-part/timer.cpp
@@ -40,6 +40,8 @@
Timer::Timer(GstElement *_play) : QObject()
{
+ GstBus *bus;
+
m_label = new QLabel("0:00 / 0:00", 0);
m_slider = new QSlider(Qt::Horizontal, 0);
m_slider->setMinValue(0);
@@ -49,7 +51,10 @@
gst_object_ref(GST_OBJECT(_play));
m_play = _play;
- g_signal_connect(m_play, "state-change", G_CALLBACK (cb_state), this);
+
+ bus = gst_element_get_bus(m_play);
+ gst_bus_add_signal_watch(bus);
+ g_signal_connect(bus, "message::state-changed", G_CALLBACK (cb_state), this);
m_pos = GST_CLOCK_TIME_NONE;
m_len = GST_CLOCK_TIME_NONE;
@@ -77,9 +82,8 @@
/* do actual seek */
gint64 val = m_slider->value ();
- gst_element_seek (m_play, (GstSeekType) (GST_SEEK_METHOD_SET |
- GST_FORMAT_TIME | GST_SEEK_FLAG_FLUSH),
- val * GST_SECOND);
+ gst_element_seek (m_play, 1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
+ GST_SEEK_TYPE_SET, val * GST_SECOND, GST_SEEK_TYPE_NONE, -1);
}
static char *niceTime(guint64 t)
@@ -130,7 +134,7 @@
/* get media m_length if not yet known */
if (!GST_CLOCK_TIME_IS_VALID (m_len))
{
- if (gst_element_query (m_play, GST_QUERY_TOTAL, &fmt, &t))
+ if (gst_element_query_duration (m_play, &fmt, &t))
{
m_len = t;
m_len_change = TRUE;
@@ -139,7 +143,7 @@
}
/* get m_position in the media now */
- if (!gst_element_query (m_play, GST_QUERY_POSITION, &fmt, &t))
+ if (!gst_element_query_position (m_play, &fmt, &t))
return;
if (!GST_CLOCK_TIME_IS_VALID (m_pos) || (int) (m_pos / GST_SECOND) != (int) (t / GST_SECOND))
@@ -173,7 +177,7 @@
m_slider->setValue (m_pos / GST_SECOND);
}
-void Timer::newState(GstElementState old_state, GstElementState new_state)
+void Timer::newState(GstState old_state, GstState new_state)
{
if (old_state <= GST_STATE_PAUSED && new_state >= GST_STATE_PLAYING)
{
@@ -207,8 +211,11 @@
/************ CALLBACKS ****************/
-void Timer::cb_state(GstElement* /*play*/, GstElementState old_state, GstElementState new_state, gpointer data)
+void Timer::cb_state(GstBus */*bus*/, GstMessage *message, gpointer data)
{
+ GstState old_state, new_state;
+
+ gst_message_parse_state_changed (message, &old_state, &new_state, NULL);
((Timer*)data)->newState(old_state, new_state);
}
--- kaffeine/player-parts/gstreamer-part/timer.h
+++ kaffeine/player-parts/gstreamer-part/timer.h
@@ -63,10 +63,10 @@
void slotEndseek();
private:
- void newState(GstElementState old_state, GstElementState new_state);
+ void newState(GstState old_state, GstState new_state);
//callbacks
- static void cb_state (GstElement* play, GstElementState old_state, GstElementState new_state, gpointer data);
+ static void cb_state (GstBus*, GstMessage *message, gpointer data);
private:
QTimer *m_timer;
--- kaffeine/player-parts/gstreamer-part/video.cpp
+++ kaffeine/player-parts/gstreamer-part/video.cpp
@@ -35,7 +35,7 @@
#include