OBS User unknown 2007-01-15 23:19:20 +00:00 committed by Git OBS Bridge
commit 40a257c796
17 changed files with 3672 additions and 0 deletions

26
.gitattributes vendored Normal file
View File

@ -0,0 +1,26 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
## Specific LFS patterns
logo.ogg filter=lfs diff=lfs merge=lfs -text
logo04.mpg filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

19
adjust-mimetypes.diff Normal file
View File

@ -0,0 +1,19 @@
--- kaffeine/src/kaffeine.desktop
+++ kaffeine/src/kaffeine.desktop 2005/09/05 06:49:48
@@ -15,3 +15,3 @@
Icon=kaffeine
-MimeType=application/x-ogg;audio/basic;audio/vnd.rn-realaudio;audio/x-aiff;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-wma;audio/x-ogg;audio/x-pn-realaudio;audio/x-pn-realaudio-plugin;audio/x-scpls;audio/x-wav;audio/x-flac;video/x-matroska;audio/x-matroska;video/mpeg;video/msvideo;video/quicktime;video/vnd.rn-realvideo;video/x-avi;video/x-fli;video/x-flic;video/x-ms-asf;video/x-ms-wmv;video/x-msvideo;application/x-mplayer2;application/smil;application/x-kaffeine;audio/x-musepack;
+MimeType=application/x-ogg;audio/basic;audio/x-aiff;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-wma;audio/x-ogg;audio/x-scpls;audio/x-wav;audio/x-flac;video/x-matroska;audio/x-matroska;video/mpeg;video/msvideo;video/quicktime;video/x-avi;video/x-fli;video/x-flic;video/x-ms-asf;video/x-ms-wmv;video/x-msvideo;application/x-mplayer2;application/smil;application/x-kaffeine;audio/x-musepack;
Name=Kaffeine
--- kaffeine/src/player-parts/xine-part/xine_part.desktop 2006/12/04 15:36:24 1.1
+++ kaffeine/src/player-parts/xine-part/xine_part.desktop 2006/12/04 15:40:06
@@ -1,7 +1,8 @@
[Desktop Entry]
Encoding=UTF-8
Icon=kaffeine
-MimeType=application/x-ogg;audio/basic;audio/vnd.rn-realaudio;audio/x-aiff;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-wma;audio/x-ogg;audio/x-pn-realaudio;audio/x-pn-realaudio-plugin;audio/x-scpls;audio/x-wav;audio/x-flac;video/x-matroska;audio/x-matroska;video/mpeg;video/msvideo;video/quicktime;video/vnd.rn-realvideo;video/x-avi;video/x-fli;video/x-flic;video/x-ms-asf;video/x-ms-asf-plugin;video/x-ms-wmv;video/x-msvideo;application/x-mplayer2;application/smil;application/x-kaffeine;audio/x-musepack;
+#removed on SUSE: audio/vnd.rn-realaudio; audio/x-pn-realaudio;audio/x-pn-realaudio-plugin; video/vnd.rn-realvideo;
+MimeType=application/x-ogg;audio/basic;audio/x-aiff;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-wma;audio/x-ogg;audio/x-scpls;audio/x-wav;audio/x-flac;video/x-matroska;audio/x-matroska;video/mpeg;video/msvideo;video/quicktime;video/x-avi;video/x-fli;video/x-flic;video/x-ms-asf;video/x-ms-asf-plugin;video/x-ms-wmv;video/x-msvideo;application/x-mplayer2;application/smil;application/x-kaffeine;audio/x-musepack;
Name=Kaffeine-Xine
Name[nb]=Kaffeine Xine
Comment=A Kaffeine engine based on xine.

2129
cs.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
--- po/de.po 2006/11/27 09:58:23 1.1
+++ po/de.po 2006/11/27 09:58:55
@@ -1936,7 +1936,7 @@
#: kaffeine.cpp:193
msgid "Player Window"
-msgstr "Wiedergabe-Fenster andocken"
+msgstr "Wiedergabe-Fenster"
#: kaffeine.cpp:219
msgid "Supported Media Formats"

3
kaffeine-0.8.3.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:42719f4eab6a27a06ec247369424f5a9d796fca74672573c467d024983a861b2
size 2940941

View File

@ -0,0 +1,472 @@
--- configure.in 2006/12/05 09:02:33 1.1
+++ configure.in 2006/12/05 09:08:44
@@ -222,10 +222,10 @@
if test "$with_gstreamer" != "no" ; then
AC_MSG_CHECKING([for GStreamer])
- if "$PKG_CONFIG" --exists "gstreamer-0.8 >= 0.8.4" "gstreamer-interfaces-0.8 >= 0.8.4" ; then
+ if "$PKG_CONFIG" --exists "gstreamer-0.10 >= 0.10.4" "gstreamer-plugins-base-0.10 >= 0.10.4" ; then
with_gstreamer=yes
- CFLAGS_GSTREAMER=`"$PKG_CONFIG" --cflags gstreamer-0.8 gstreamer-interfaces-0.8`
- LIB_GSTREAMER=`"$PKG_CONFIG" --libs gstreamer-0.8 gstreamer-interfaces-0.8`
+ CFLAGS_GSTREAMER=`"$PKG_CONFIG" --cflags gstreamer-0.10 gstreamer-plugins-base-0.10`
+ LIB_GSTREAMER="`"$PKG_CONFIG" --libs gstreamer-0.10 gstreamer-plugins-base-0.10` -lgstinterfaces-0.10"
AC_MSG_RESULT([yes])
else
with_gstreamer=no
--- kaffeine/configure.in.in 2006/12/05 09:02:33 1.1
+++ kaffeine/configure.in.in 2006/12/05 09:10:36
@@ -142,10 +142,10 @@
if test "$with_gstreamer" != "no" ; then
AC_MSG_CHECKING([for GStreamer])
- if "$PKG_CONFIG" --exists "gstreamer-0.8 >= 0.8.4" "gstreamer-interfaces-0.8 >= 0.8.4" ; then
+ if "$PKG_CONFIG" --exists "gstreamer-0.10 >= 0.10.4" "gstreamer-plugins-base-0.10 >= 0.10.4" ; then
with_gstreamer=yes
- CFLAGS_GSTREAMER=`"$PKG_CONFIG" --cflags gstreamer-0.8 gstreamer-interfaces-0.8`
- LIB_GSTREAMER=`"$PKG_CONFIG" --libs gstreamer-0.8 gstreamer-interfaces-0.8`
+ CFLAGS_GSTREAMER=`"$PKG_CONFIG" --cflags gstreamer-0.10 gstreamer-plugins-base-0.10`
+ LIB_GSTREAMER="`"$PKG_CONFIG" --libs gstreamer-0.10 gstreamer-plugins-base-0.10` -lgstinterfaces-0.10"
AC_MSG_RESULT([yes])
else
with_gstreamer=no
--- kaffeine/src/player-parts/gstreamer-part/gstreamer_part.cpp
+++ kaffeine/src/player-parts/gstreamer-part/gstreamer_part.cpp
@@ -361,6 +361,7 @@
}
gchar *uri = g_strdup(url.local8Bit());
kdDebug() << "GStreamerPart: play URL: " << uri << endl;
+ g_message ("GST Uri %s", uri);
g_object_set(G_OBJECT(m_play), "uri", uri, NULL);
g_free(uri);
@@ -386,7 +387,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)
@@ -421,12 +422,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));
@@ -545,7 +546,8 @@
emit setStatusBarText(i18n("Mute") + ": " + i18n("On"));
else
emit setStatusBarText(i18n("Mute") + ": " + i18n("Off"));
- g_object_set(G_OBJECT(m_audiosink), "mute", m_mute, NULL);
+ // FIXME this is not really muting
+ g_object_set(G_OBJECT(m_play), "volume", m_mute ? 0.0 : 2.0, NULL);
}
void GStreamerPart::gstStateChanged()
@@ -702,9 +704,51 @@
GstElement* visual = gst_element_factory_make (name.ascii(), "visualization");
if (visual)
{
- g_object_set(G_OBJECT (m_play), "vis-plugin", visual, NULL);
- g_object_unref(m_visual);
- m_visual = visual;
+ GstElement *vis_bin, *vis_capsfilter = NULL;
+ GstPad *pad = NULL;
+ GstCaps *caps = NULL;
+
+ vis_capsfilter = gst_element_factory_make ("capsfilter", "vis_capsfilter");
+ if (!GST_IS_ELEMENT (vis_capsfilter)) {
+ kdWarning() << "GStreamer: Initialization of visualization capsfilter failed (" << name << ")" << endl;
+ }
+
+ vis_bin = gst_bin_new ("vis_bin");
+ if (!GST_IS_ELEMENT (vis_bin)) {
+ kdWarning() << "GStreamer: Initialization of visualization bin failed (" << name << ")" << endl;
+ }
+
+ gst_bin_add_many (GST_BIN (vis_bin), visual, vis_capsfilter, NULL);
+
+ /* Sink ghostpad */
+ pad = gst_element_get_pad (visual, "sink");
+ gst_element_add_pad (vis_bin, gst_ghost_pad_new ("sink", pad));
+ gst_object_unref (pad);
+
+ /* Source ghostpad, link with visual */
+ pad = gst_element_get_pad (vis_capsfilter, "src");
+ gst_element_add_pad (vis_bin, gst_ghost_pad_new ("src", pad));
+ gst_element_link_pads (visual, "src", vis_capsfilter, "sink");
+ gst_object_unref (pad);
+
+ /* Get allowed output caps from visualisation element */
+ pad = gst_element_get_pad (visual, "src");
+ caps = gst_pad_get_allowed_caps (pad);
+ gst_object_unref (pad);
+
+ if (caps && !gst_caps_is_fixed (caps)) {
+ g_object_set (vis_capsfilter, "caps", caps, NULL);
+ }
+
+ GST_DEBUG ("visualisation caps: %" GST_PTR_FORMAT, caps);
+ if (GST_IS_CAPS (caps)) {
+ gst_caps_unref (caps);
+ }
+
+ g_object_set(G_OBJECT (m_play), "vis-plugin", vis_bin, NULL);
+ if (m_visual)
+ g_object_unref(m_visual);
+ m_visual = vis_bin;
m_visualPluginName = name;
}
else
@@ -877,27 +921,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)
{
@@ -912,7 +950,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");
@@ -967,21 +1005,20 @@
/*
* Visualization
*/
- kdDebug() << "GStreamerPart: Using visualization plugin: " << m_visualPluginName << endl;
- if (m_visualPluginName != "none")
- {
- m_visual = gst_element_factory_make (m_visualPluginName.ascii(), "visualization");
- if (!m_visual)
- kdWarning() << "GStreamer: Initialization of visualization plugin failed" << endl;
- }
+ slotSetVisualPlugin (m_visualPluginName);
- g_object_set(G_OBJECT(m_play), "video-sink", m_videosink, "audio-sink", m_audiosink, "vis-plugin", m_visual, NULL);
+ g_object_set(G_OBJECT(m_play), "video-sink", m_videosink, "audio-sink", m_audiosink, 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;
@@ -989,23 +1026,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;
@@ -1052,21 +1094,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/src/player-parts/gstreamer-part/gstreamer_part.h
+++ kaffeine/src/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/src/player-parts/gstreamer-part/timer.cpp
+++ kaffeine/src/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/src/player-parts/gstreamer-part/timer.h
+++ kaffeine/src/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/src/player-parts/gstreamer-part/video.cpp
+++ kaffeine/src/player-parts/gstreamer-part/video.cpp
@@ -35,7 +35,7 @@
#include <kmenubar.h>
#include <kdebug.h>
-#include <gst/xoverlay/xoverlay.h>
+#include <gst/interfaces/xoverlay.h>
#include "video.h"
@@ -45,9 +45,14 @@
VideoWindow::VideoWindow(QWidget *parent, GstElement *_element, GstElement *_play)
: QWidget (parent), m_width(0), m_height(0), m_aspectRatio(AUTO)
{
+ GstBus *bus;
+
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);
gst_object_ref(GST_OBJECT (_element));
m_element = _element;
@@ -132,7 +137,7 @@
setGeometry();
}
-void VideoWindow::newState(GstElementState old_state, GstElementState new_state)
+void VideoWindow::newState(GstState old_state, GstState new_state)
{
if (old_state <= GST_STATE_READY && new_state >= GST_STATE_PAUSED)
{
@@ -153,14 +158,14 @@
if (strstr(val->value_name, "VIDEO"))
{
- g_object_get (info, "object", &pad, NULL);
- pad = (GstPad *) GST_PAD_REALIZE (pad);
+ g_object_get (info, "pad", &pad, NULL);
if (GST_PAD_CAPS (pad))
{
cb_capsset(pad, NULL, this);
}
else
{
+ /* FIXME Where does this map to now? */
g_signal_connect(pad, "notify::caps", G_CALLBACK(cb_capsset), this);
}
}
@@ -303,9 +308,12 @@
/***************** CALLBACKS ********************/
-void VideoWindow::cb_state(GstElement */*play*/, GstElementState old_state, GstElementState new_state, gpointer data)
+void VideoWindow::cb_state(GstBus */*bus*/, GstMessage *message, gpointer data)
{
+ GstState old_state, new_state;
+
//kdDebug() << "VideoWindow: state changed callback" << endl;
+ gst_message_parse_state_changed(message, &old_state, &new_state, NULL);
((VideoWindow *)data)->newState (old_state, new_state);
}
--- kaffeine/src/player-parts/gstreamer-part/video.h
+++ kaffeine/src/player-parts/gstreamer-part/video.h
@@ -51,7 +51,7 @@
SQUARE
};
- void newState (GstElementState old_state, GstElementState new_state);
+ void newState (GstState old_state, GstState new_state);
void newCapsset (const GstCaps *caps);
void refresh();
@@ -91,7 +91,7 @@
private:
//callbacks
- static void cb_state (GstElement *play, GstElementState old_state, GstElementState new_state, gpointer data);
+ static void cb_state (GstBus *bus, GstMessage *message, gpointer data);
static void cb_capsset (GstPad *pad, GParamSpec *pspec, gpointer data);
private:

76
kaffeine-media.diff Normal file
View File

@ -0,0 +1,76 @@
Index: kaffeine/kaffeineapp.cpp
===================================================================
--- kaffeine/src/kaffeineapp.cpp.orig
+++ kaffeine/src/kaffeineapp.cpp
@@ -61,19 +62,42 @@ int KaffeineApp::newInstance()
if (args->count())
for (int i = 0; i < args->count(); i++ )
{
- url = QFile::decodeName(args->arg(i));
- // relative file names
- if ((url.left(1) != "/") && (!url.contains(":/")) && (url.lower() != "dvd") && (url.lower() != "vcd")
- && (url.lower() != "audiocd") && (url.lower() != "cdda"))
- url = path.absFilePath(url);
+ KURL u = KIO::NetAccess::mostLocalURL(args->url(i), 0);
+ if (u.isLocalFile())
+ url = path.absFilePath(u.path());
+ else
+ url = u.url();
urls.append(url);
}
+ QString device = args->getOption("device");
+ if (device == "default")
+ device = QString::null;
+ else if (device.startsWith("media:/") || device.startsWith("system:/media/"))
+ {
+ if (device.startsWith("system:/media/"))
+ {
+ device = device.mid(14);
+ device = device.prepend("media:/");
+ }
+ KURL devicePath(device);
+ DCOPRef mediamanager("kded","mediamanager");
+ DCOPReply reply = mediamanager.call("properties(QString)",devicePath.path(-1).mid(1));
+ if (reply.isValid())
+ {
+ QStringList properties = reply;
+ device = properties[5];
+ }
+ else
+ device = QString::null;
+ }
+
if (m_kaffeine) /* still running */
{
kdDebug() << "KaffeineApp: Kaffeine is still running..." << endl;
if (urls.count() > 0) /* send urls to running instance */
{
+ m_kaffeine->setDevice(device);
m_kaffeine->loadTMP(urls);
QTimer::singleShot(300, m_kaffeine, SLOT(slotSwitchToPlayerWindow())); // delay for feeling only
}
@@ -92,23 +116,6 @@ int KaffeineApp::newInstance()
if (args->isSet("verbose"))
engineParameters.append("verbose=\"True\"");
- QString device = args->getOption("device");
- if (device == "default")
- device = QString::null;
- else if (device.startsWith("media:/"))
- {
- KURL devicePath(device);
- DCOPRef mediamanager("kded","mediamanager");
- DCOPReply reply = mediamanager.call("properties(QString)",devicePath.path(-1).mid(1));
- if (reply.isValid())
- {
- QStringList properties = reply;
- device = properties[5];
- }
- else
- device = QString::null;
- }
-
m_kaffeine = new Kaffeine(urls, engineParameters, device, args->isSet("play"), args->isSet("fullscreen"),
args->isSet("wizard"), 0, "kaffeine_mainview");
m_kaffeine->show();

30
kaffeine-quote-subs.patch Normal file
View File

@ -0,0 +1,30 @@
--- kaffeine/src/input/audiobrowser/playlist.cpp
+++ kaffeine/src/input/audiobrowser/playlist.cpp
@@ -1895,7 +1895,12 @@
{
QString subList;
for(unsigned int i=0; i<tmp->subtitles().count(); i++)
- subList += tmp->subtitles()[i] + "&";
+ {
+ QString sub = tmp->subtitles()[i];
+ sub.replace('%', "%25");
+ sub.replace('&', "%26");
+ subList += sub + "&";
+ }
entry.setAttribute("subs", subList);
}
--- kaffeine/src/player-parts/kaffeine-part/playlistimport.cpp
+++ kaffeine/src/player-parts/kaffeine-part/playlistimport.cpp
@@ -69,7 +69,11 @@
int currentSub = -1;
if ((!att.value("subs").isNull()) && (!att.value("subs").isEmpty()))
+ {
subs = QStringList::split("&",att.value("subs"),false);
+ subs.gres("%26", "&");
+ subs.gres("%25", "%");
+ }
if ((!att.value("subs").isNull()) && (!att.value("subs").isEmpty()))
{
bool ok;

400
kaffeine.changes Normal file
View File

@ -0,0 +1,400 @@
-------------------------------------------------------------------
Mon Dec 4 16:33:29 CET 2006 - stbinner@suse.de
- update to version 0.8.3:
* DVB: selectAll button in scandialog
* DVB: save channels list sort order
* DVB: added "Current channel" button in epg window
* xine-part: shortcuts for delay/advance subtitles (ctrl+alt+right/left)
* xine-part: fixed wmv seeking.
* xine-part: save and restore video settings (hue,saturation,contrast,brightness)
* DVB: OSD warning when timeshift hd<300MB
* added: option to start in minimal mode + dcop call.
* added: "Open Dir" starts playing dvd from dir if dir points to a dvd image.
* added: playing dvd iso files.
* DVB: auto rename channels when adding to list
* Disc: fixed crash trying to play while encoding
* Disc: Ask user for cddb close matches
* fixed: session issue.
* fixed: better screensaver disabling method (no interfering key presses anymore).
* DVB: fixed scanning services sharing same pmt.
* DVB: added H/V (C band mutipoint) lnb settings.
* DVB: improved device detection.
* DVB: added : "int dvbSNR( int device )" dcop call.
* fixed: crash when quit from systray.
-------------------------------------------------------------------
Mon Nov 27 11:36:05 CET 2006 - stbinner@suse.de
- fix one faulty German translation
-------------------------------------------------------------------
Sat Nov 25 14:00:25 CET 2006 - coolo@suse.de
- fix autoconf setup for translations (#223736)
-------------------------------------------------------------------
Mon Nov 13 15:53:35 CET 2006 - wstephenson@suse.de
- fix DVD playback warning dialog logic
-------------------------------------------------------------------
Mon Nov 13 13:29:42 CET 2006 - wstephenson@suse.de
- fix DVD playback warning URL
-------------------------------------------------------------------
Thu Nov 9 15:11:36 CET 2006 - stbinner@suse.de
- fix array subscript out of range (#212476)
-------------------------------------------------------------------
Sat Sep 9 19:24:25 CEST 2006 - stbinner@suse.de
- update to version 0.8.2:
* fixed: removed statusBar.
* Disc: bigendian fix.
* DVB: added current programm OSD progress bar
* DVB: speed up OSD
* DVB: fixed timer edit bug
* DVB: added dvbNewTimer dcop func.
* DVB: allow overlapping timers to start.
* fixed: make sure to load xine_part instead of old kaffeine_part.
* xine_part: removed empty audio/subtitles channels.
* Kaffeine_part(s): added an entry in context menu to toggle
minimal mode.
* Playlist: added a "Clear Current Playlist" menu entry.
* Playlist: autodownload cover now optional.
* fixed: update google fetcher.
* fixed: allow toggling from/to player/playlist even in fullscreen.
* DVB: show SNR value for scanned channels, so a dvb-t user can
choose the best one.
* DVB: selectable channels icons (rigth click on a channel name
in the list)
* DVB: added "Scheduled" button in EPG window.
* DVB: add dvb-t 8mhz autoscan mode for devices that support it.
* fixed: switch to player window if mime does not contain "audio"
* xine_part: block messages when filename contains "#"
* DVB: cicam support, by Christoph Pfister * Systray: reversed
mouse wheel behaviour.
* Playlist: added a KURLComboBox to file browser.
* DVB: fixed fast zap lock.
* fixed: reduced minimum window size.
* Playlist: autoselect subtitle when unique.
-------------------------------------------------------------------
Thu Aug 24 15:36:02 CEST 2006 - stbinner@suse.de
- fix ability to switch back to kaffeine player engine (#159367)
-------------------------------------------------------------------
Thu Aug 17 11:28:15 CEST 2006 - stbinner@suse.de
- fix x-mplayer2.desktop file conflict with kdelibs3
-------------------------------------------------------------------
Fri Jul 21 18:44:44 CEST 2006 - schwab@suse.de
- Quote '&' in subtitle names in playlist [KDE#131180].
-------------------------------------------------------------------
Sun Jun 4 11:01:33 CEST 2006 - coolo@suse.de
- allow Novell translations
-------------------------------------------------------------------
Mon May 15 17:27:48 CEST 2006 - stbinner@suse.de
- update to version 0.8.1
* fixed: configure check for cdparanoia.
* Disc: force playing dvd/vcd with engine's default drive if
kded_mediamanager fails to identify it.
* kaffeine-part: plug dvd nav actions
* DVB: write to fifo from a thread to circumvent deadlocks when
xine stops (or fails) reading.
* kaffeine-part: set skip forward/backward to 20s (to avoid
"skating" when seeking in divx)
* DVB: avoid negative freq value.
* fixed: system:/media urls
* fixed: include qapplication.h instead of qapp.h
* fixed: use memcpy instead of mempcpy(gnu only) in ogg encoder.
* fixed: ogg encoder makefile.
-------------------------------------------------------------------
Mon Apr 10 03:46:16 CEST 2006 - jpr@suse.de
- Improve gstreamer 0.10 by getting visualization to work
-------------------------------------------------------------------
Sun Apr 9 16:46:30 CEST 2006 - jpr@suse.de
- Move gstreamer part to 0.10
-------------------------------------------------------------------
Fri Mar 24 16:04:00 CET 2006 - dmueller@suse.de
- fix buffer overflow (#156952, CVE-2006-0051)
-------------------------------------------------------------------
Sat Mar 18 12:22:54 CET 2006 - coolo@suse.de
- fixed another case of system:/ problem (playing mp3s from CD
would "download" the file first)
-------------------------------------------------------------------
Thu Feb 16 18:47:50 CET 2006 - coolo@suse.de
- backported SVN fix for system:/ URLs (#150527)
-------------------------------------------------------------------
Wed Jan 25 21:32:57 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Thu Jan 12 15:00:30 CET 2006 - stbinner@suse.de
- Update URL in "DVDs cannot be played" messagebox to working one
- Better check if xine-lib packaged by SUSE is installed
-------------------------------------------------------------------
Sat Oct 22 19:30:22 CEST 2005 - schwab@suse.de
- More finegraned locking.
-------------------------------------------------------------------
Sat Sep 17 01:53:27 CEST 2005 - schwab@suse.de
- Fix missing mutex [#106044].
-------------------------------------------------------------------
Wed Sep 7 17:54:52 CEST 2005 - schwab@suse.de
- Fix undefined operation.
-------------------------------------------------------------------
Tue Sep 6 10:50:31 CEST 2005 - adrian@suse.de
- update to version 0.7.1
* new translations
* crash fix with empty DVB lists in EPG handler
-------------------------------------------------------------------
Mon Sep 5 08:50:20 CEST 2005 - adrian@suse.de
- enable kaffeine kpart again, but do not associate any mimetypes
(#115242)
-------------------------------------------------------------------
Tue Aug 30 13:32:46 CEST 2005 - adrian@suse.de
- disable kaffeine kpart (#11406)
- disable some possible illegal links
- do not create system tray icon by default
-------------------------------------------------------------------
Sun Aug 7 14:08:43 CEST 2005 - adrian@suse.de
- update to version 0.7
* improved DVB support
* optional Gstreamer support via kaffeine-gstreamer package
* media:/ slave support
- remove xine-mad dependency
-------------------------------------------------------------------
Fri Aug 5 12:29:56 CEST 2005 - coolo@suse.de
- some proofreading for our patches
-------------------------------------------------------------------
Wed Mar 30 09:57:40 CEST 2005 - adrian@suse.de
- add czech translation from Klara
-------------------------------------------------------------------
Thu Mar 24 08:46:59 CET 2005 - adrian@suse.de
- update to version 0.6
* DVB support merged from kaxtv
-------------------------------------------------------------------
Fri Mar 11 14:19:09 CET 2005 - adrian@suse.de
- remove too late XInitThread() call in kpart, which can cause a
crash (#72072)
-------------------------------------------------------------------
Wed Mar 2 09:03:28 CET 2005 - adrian@suse.de
- add DVD warning dialog again
-------------------------------------------------------------------
Thu Feb 17 13:57:05 CET 2005 - adrian@suse.de
- menu entry moved to xdg dir
-------------------------------------------------------------------
Mon Jan 3 15:02:47 CET 2005 - coolo@suse.de
- fix installation of german man page
-------------------------------------------------------------------
Mon Jan 3 13:26:20 CET 2005 - adrian@suse.de
- update to version 0.5 final
-------------------------------------------------------------------
Wed Dec 22 17:11:53 CET 2004 - ro@suse.de
- only package english manpage for now
-------------------------------------------------------------------
Wed Nov 10 11:00:02 CET 2004 - adrian@suse.de
- update to version 0.5rc2
-------------------------------------------------------------------
Wed Oct 6 16:08:43 CEST 2004 - adrian@suse.de
- update to version 0.5rc1
-------------------------------------------------------------------
Wed Sep 29 16:46:28 CEST 2004 - adrian@suse.de
- fix broken desktop file syntax
-------------------------------------------------------------------
Wed Sep 29 13:27:34 CEST 2004 - adrian@suse.de
- fix handling from streams
-------------------------------------------------------------------
Sun Sep 26 20:43:29 CEST 2004 - adrian@suse.de
- adjust mimetypes to KDE 3.3 mimetypes
- remove realplayer support, the Helix plugin is not supported atm.
-------------------------------------------------------------------
Thu Aug 19 10:59:44 CEST 2004 - adrian@suse.de
- use the logo codec file in theora format on SuSE 9.2 and later
-------------------------------------------------------------------
Wed Jun 2 11:07:07 CEST 2004 - adrian@suse.de
- update to version 0.4.3b
-------------------------------------------------------------------
Mon May 3 13:54:37 CEST 2004 - adrian@suse.de
- update to version 0.4.3
* obsoletes XInitThread patch
-------------------------------------------------------------------
Fri Apr 16 09:42:06 CEST 2004 - adrian@suse.de
- apply crash fix from Helio
-------------------------------------------------------------------
Tue Apr 13 18:09:40 CEST 2004 - adrian@suse.de
- update to version 0.4.2
-------------------------------------------------------------------
Mon Apr 5 11:33:17 CEST 2004 - adrian@suse.de
- update czech translations
-------------------------------------------------------------------
Tue Mar 16 14:14:07 CET 2004 - adrian@suse.de
- replace logo video. DivX4 won't work with our xine.
-------------------------------------------------------------------
Sat Feb 21 21:57:50 CET 2004 - adrian@suse.de
- remove Music from Categories
-------------------------------------------------------------------
Mon Jan 19 13:46:11 CET 2004 - adrian@suse.de
- update to version 0.4.1
-------------------------------------------------------------------
Sun Nov 16 19:46:21 CET 2003 - adrian@suse.de
- update to final 0.4 version
-------------------------------------------------------------------
Fri Nov 7 13:36:24 CET 2003 - adrian@suse.de
- fix build
- update to pre-0.4 snapshot
-------------------------------------------------------------------
Wed Oct 1 15:23:30 CEST 2003 - adrian@suse.de
- use --nofork in desktop file or temporary files are get
removed to early
-------------------------------------------------------------------
Sun Sep 21 21:48:47 CEST 2003 - adrian@suse.de
- implement the message box different. It can get translated now
and it solves also a crash in some cases. (#30224)
-------------------------------------------------------------------
Fri Sep 19 18:13:55 CEST 2003 - adrian@suse.de
- from #31052
* fix possible crash on quit
* ask explizit for the "none" audio driver, if "auto" fails.
-------------------------------------------------------------------
Fri Sep 19 13:30:34 CEST 2003 - adrian@suse.de
- add czech translation
-------------------------------------------------------------------
Thu Sep 18 17:43:37 CEST 2003 - varkoly@suse.de
- add hungarian translation
-------------------------------------------------------------------
Sat Sep 6 10:44:17 CEST 2003 - adrian@suse.de
- higher priority
- fix position change on pause
-------------------------------------------------------------------
Fri Sep 5 08:18:22 CEST 2003 - adrian@suse.de
- justify Categories
-------------------------------------------------------------------
Mon Aug 25 00:10:49 CEST 2003 - adrian@suse.de
- fix configure script to detect libXtest -> no DPMS anymore during
playing
-------------------------------------------------------------------
Sat Aug 23 23:53:44 CEST 2003 - adrian@suse.de
- drop some delete calls, which are reported as invalid by valgrind
seems that fixes the crashes
-------------------------------------------------------------------
Mon Jul 28 13:51:16 CEST 2003 - adrian@suse.de
- use new macro name for %suse_update_desktop_file
-------------------------------------------------------------------
Mon Jul 28 11:35:27 CEST 2003 - adrian@suse.de
- add Categories
-------------------------------------------------------------------
Wed Jul 16 13:07:01 CEST 2003 - adrian@suse.de
- initial package of version 0.3.2

60
kaffeine.diff Normal file
View File

@ -0,0 +1,60 @@
--- kaffeine/src/kaffeine.desktop
+++ kaffeine/src/kaffeine.desktop 2005/09/06 09:01:52
@@ -19,3 +19,4 @@
Name[sv]=Kaffeine
Terminal=false
Type=Application
+InitialPreference=4
--- kaffeine/src/player-parts/xine-part/kxinewidget.cpp
+++ kaffeine/src/player-parts/xine-part/kxinewidget.cpp 2005/09/06 09:01:52
@@ -1069,8 +1069,8 @@
globalPosChanged(); /* get global pos of the window */
/**** INIT XINE DISPLAY ****/
-
- XInitThreads();
+ // too late, it will crash for sure
+ // XInitThreads();
m_xineDisplay = XOpenDisplay( getenv("DISPLAY") );
--- kaffeine/src/instwizard.cpp
+++ kaffeine/src/instwizard.cpp 2005/09/06 09:01:52
@@ -106,8 +106,7 @@
if (entries.count())
info << "<font color=\"DarkGreen\">" << i18n("Ok.") << "</font>";
else
- info << "<font color=\"DarkRed\">" << i18n("No WIN32 codecs found in /usr/lib/win32. You're not able to play Windows Media 9 files, newer Real Media files and some less common formats. Download the codecs here:")
- << " <a href=\"http://www1.mplayerhq.hu/homepage/design7/codecs.html\">http://www.mplayerhq.hu</a>.</font>";
+ info << "<font color=\"DarkRed\">" << i18n("No WIN32 codecs found in /usr/lib/win32. You're not able to play Windows Media 9 files, newer Real Media files and some less common formats.");
//LIBDVDCSS
info << "<br><hr><b>" << "libdvdcss" << "...</b><br>";
@@ -131,8 +130,7 @@
}
}
if (!dvdcss)
- info << "<font color=\"DarkRed\">" << i18n("libdvdcss not found. You're not able to play encrypted (most commercial) DVD's. You can get the library here (but using it may violate copyright regulations of your country!):")
- << " <a href=\"http://developers.videolan.org/libdvdcss/\">http://developers.videolan.org/libdvdcss</a>.</font>";
+ info << "<font color=\"DarkRed\">" << i18n("libdvdcss not found. You're not able to play encrypted (most commercial) DVD's.");
else
info << "<font color=\"DarkGreen\">" << i18n("Ok.") << "</font>";
@@ -172,8 +170,7 @@
file.open(IO_ReadOnly);
QTextStream stream(&file);
info << "<font color=\"DarkBlue\">" << i18n("Found") << ": " << stream.readLine() << ". </font>"
- << i18n("The xine-lib shipped by SuSE \"may lack certain features because of legal requirements (potential patent violation)\". You should use the packages from here:")
- << " <a href=\"http://packman.links2linux.de/?action=124\">http://packman.links2linux.de</a>.";
+ << i18n("The xine-lib shipped by SuSE \"may lack certain features because of legal requirements (potential patent violation)\".");
file.close();
}
else
--- configure.in.in.orig 2006-11-25 13:52:25.000000000 +0100
+++ configure.in.in 2006-11-25 13:52:42.000000000 +0100
@@ -1,4 +1,5 @@
#MIN_CONFIG(3.3)
+AM_INIT_AUTOMAKE(kaffeine, "0.8.2")
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
if test "$build_arts" = "yes"; then

354
kaffeine.spec Normal file
View File

@ -0,0 +1,354 @@
#
# spec file for package kaffeine (Version 0.8.3)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: kaffeine
BuildRequires: cdparanoia kdelibs3-devel xine-devel xine-lib
%if %suse_version > 1001
BuildRequires: gstreamer010-plugins-base-devel
%else
BuildRequires: gstreamer-plugins-devel
%endif
URL: http://kaffeine.sourceforge.net/
License: GNU General Public License (GPL)
Group: Productivity/Multimedia/Video/Players
Summary: Xine-Based Multimedia Player
Version: 0.8.3
Release: 1
%define rversion %version
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: kdelibs3 >= %( echo `rpm -q --queryformat '%{VERSION}' kdelibs3`)
Provides: kaxtv
Obsoletes: kaxtv
Source0: %name-%rversion.tar.bz2
Source3: logo04.mpg
Source4: logo.ogg
Source5: cs.po
Patch0: %name.diff
Patch1: adjust-mimetypes.diff
Patch2: messagebox-dvd.diff
Patch4: mutex.diff
Patch5: kaffeine-media.diff
Patch7: kaffeine-gstreamer-0-10.patch
Patch8: kaffeine-quote-subs.patch
Patch10: fix-german-translation.diff
%description
Kaffeine plays all files and devices supported by Xine. For example,
MPEG files, AVI (if the codec being used is supported by Xine), MP3,
and Ogg Vorbis. It also handles Video CDs, DVDs, and DVB cards.
Authors:
--------
Jürgen Kofler <kaffeine@gmx.net>
%package gstreamer
Group: Productivity/Multimedia/Video/Players
Summary: Multimedia Player using Gstreamer
%description gstreamer
This plugin enables Kaffeine to play via the Gstreamer framework
instead of Xine.
The gstreamer backend can only get used for the visualization of audio
sources.
Authors:
--------
Jürgen Kofler <kaffeine@gmx.net>
%prep
%setup -q -n %name-%rversion
%patch
%patch1
%patch2
%patch4
#%patch5
%if %suse_version > 1001
%patch7
%endif
%patch8
%patch10
cp %SOURCE5 po/
. /etc/opt/kde3/common_options
update_admin
%build
. /etc/opt/kde3/common_options
./configure $configkde --disable-final
make %{?jobs:-j%jobs}
%install
. /etc/opt/kde3/common_options
make DESTDIR=${RPM_BUILD_ROOT} $INSTALL_TARGET
kde_post_install
#
%if %suse_version > 910
install -m 0644 %SOURCE4 $RPM_BUILD_ROOT/opt/kde3/share/apps/kaffeine/logo.avi
%else
install -m 0644 %SOURCE3 $RPM_BUILD_ROOT/opt/kde3/share/apps/kaffeine/logo.avi
%endif
# -r to get rid of Music
%suse_update_desktop_file -r kaffeine KDE AudioVideo Player Video
rm -rf $RPM_BUILD_ROOT/opt/kde3/share/locale/xx
rm $RPM_BUILD_ROOT/opt/kde3/share/mimelnk/application/x-mplayer2.desktop
%find_lang %name
%post
%run_ldconfig
%postun
%run_ldconfig
%files -f %name.lang
%defattr(-,root,root)
/opt/kde3/bin/*
/opt/kde3/include/kaffeine
/opt/kde3/%_lib/lib*
/opt/kde3/%_lib/kde3/libxinepart.*
/opt/kde3/%_lib/kde3/libkaffeineoggvorbis.*
/opt/kde3/share/appl*/*/*
/opt/kde3/share/apps/kaffeine
/opt/kde3/share/apps/konqueror
/opt/kde3/share/apps/profiles
/opt/kde3/share/icons/*
/opt/kde3/share/mimelnk/*/*.desktop
/opt/kde3/share/services/xine_part.desktop
/opt/kde3/share/services/kaffeineoggvorbis.desktop
/opt/kde3/share/servicetypes/kaffeineaudioencoder.desktop
/opt/kde3/share/servicetypes/kaffeinedvbplugin.desktop
/opt/kde3/share/doc/HTML/en/kaffeine
%if %suse_version < 930
%doc %lang(zh_CN) /opt/kde3/share/doc/HTML/zh_CN
%endif
%files gstreamer
%defattr(-,root,root)
/opt/kde3/%_lib/kde3/libgstreamerpart.*
/opt/kde3/share/apps/gstreamerpart
/opt/kde3/share/services/gstreamer_part.desktop
%changelog -n kaffeine
* Mon Dec 04 2006 - stbinner@suse.de
- update to version 0.8.3:
* DVB: selectAll button in scandialog
* DVB: save channels list sort order
* DVB: added "Current channel" button in epg window
* xine-part: shortcuts for delay/advance subtitles (ctrl+alt+right/left)
* xine-part: fixed wmv seeking.
* xine-part: save and restore video settings (hue,saturation,contrast,brightness)
* DVB: OSD warning when timeshift hd<300MB
* added: option to start in minimal mode + dcop call.
* added: "Open Dir" starts playing dvd from dir if dir points to a dvd image.
* added: playing dvd iso files.
* DVB: auto rename channels when adding to list
* Disc: fixed crash trying to play while encoding
* Disc: Ask user for cddb close matches
* fixed: session issue.
* fixed: better screensaver disabling method (no interfering key presses anymore).
* DVB: fixed scanning services sharing same pmt.
* DVB: added H/V (C band mutipoint) lnb settings.
* DVB: improved device detection.
* DVB: added : "int dvbSNR( int device )" dcop call.
* fixed: crash when quit from systray.
* Mon Nov 27 2006 - stbinner@suse.de
- fix one faulty German translation
* Sat Nov 25 2006 - coolo@suse.de
- fix autoconf setup for translations (#223736)
* Mon Nov 13 2006 - wstephenson@suse.de
- fix DVD playback warning dialog logic
* Mon Nov 13 2006 - wstephenson@suse.de
- fix DVD playback warning URL
* Thu Nov 09 2006 - stbinner@suse.de
- fix array subscript out of range (#212476)
* Sat Sep 09 2006 - stbinner@suse.de
- update to version 0.8.2:
* fixed: removed statusBar.
* Disc: bigendian fix.
* DVB: added current programm OSD progress bar
* DVB: speed up OSD
* DVB: fixed timer edit bug
* DVB: added dvbNewTimer dcop func.
* DVB: allow overlapping timers to start.
* fixed: make sure to load xine_part instead of old kaffeine_part.
* xine_part: removed empty audio/subtitles channels.
* Kaffeine_part(s): added an entry in context menu to toggle
minimal mode.
* Playlist: added a "Clear Current Playlist" menu entry.
* Playlist: autodownload cover now optional.
* fixed: update google fetcher.
* fixed: allow toggling from/to player/playlist even in fullscreen.
* DVB: show SNR value for scanned channels, so a dvb-t user can
choose the best one.
* DVB: selectable channels icons (rigth click on a channel name
in the list)
* DVB: added "Scheduled" button in EPG window.
* DVB: add dvb-t 8mhz autoscan mode for devices that support it.
* fixed: switch to player window if mime does not contain "audio"
* xine_part: block messages when filename contains "#"
* DVB: cicam support, by Christoph Pfister * Systray: reversed
mouse wheel behaviour.
* Playlist: added a KURLComboBox to file browser.
* DVB: fixed fast zap lock.
* fixed: reduced minimum window size.
* Playlist: autoselect subtitle when unique.
* Thu Aug 24 2006 - stbinner@suse.de
- fix ability to switch back to kaffeine player engine (#159367)
* Thu Aug 17 2006 - stbinner@suse.de
- fix x-mplayer2.desktop file conflict with kdelibs3
* Fri Jul 21 2006 - schwab@suse.de
- Quote '&' in subtitle names in playlist [KDE#131180].
* Sun Jun 04 2006 - coolo@suse.de
- allow Novell translations
* Mon May 15 2006 - stbinner@suse.de
- update to version 0.8.1
* fixed: configure check for cdparanoia.
* Disc: force playing dvd/vcd with engine's default drive if
kded_mediamanager fails to identify it.
* kaffeine-part: plug dvd nav actions
* DVB: write to fifo from a thread to circumvent deadlocks when
xine stops (or fails) reading.
* kaffeine-part: set skip forward/backward to 20s (to avoid
"skating" when seeking in divx)
* DVB: avoid negative freq value.
* fixed: system:/media urls
* fixed: include qapplication.h instead of qapp.h
* fixed: use memcpy instead of mempcpy(gnu only) in ogg encoder.
* fixed: ogg encoder makefile.
* Mon Apr 10 2006 - jpr@suse.de
- Improve gstreamer 0.10 by getting visualization to work
* 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
- fixed another case of system:/ problem (playing mp3s from CD
would "download" the file first)
* Thu Feb 16 2006 - coolo@suse.de
- backported SVN fix for system:/ URLs (#150527)
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Jan 12 2006 - stbinner@suse.de
- Update URL in "DVDs cannot be played" messagebox to working one
- Better check if xine-lib packaged by SUSE is installed
* Sat Oct 22 2005 - schwab@suse.de
- More finegraned locking.
* Sat Sep 17 2005 - schwab@suse.de
- Fix missing mutex [#106044].
* Wed Sep 07 2005 - schwab@suse.de
- Fix undefined operation.
* Tue Sep 06 2005 - adrian@suse.de
- update to version 0.7.1
* new translations
* crash fix with empty DVB lists in EPG handler
* Mon Sep 05 2005 - adrian@suse.de
- enable kaffeine kpart again, but do not associate any mimetypes
(#115242)
* Tue Aug 30 2005 - adrian@suse.de
- disable kaffeine kpart (#11406)
- disable some possible illegal links
- do not create system tray icon by default
* Sun Aug 07 2005 - adrian@suse.de
- update to version 0.7
* improved DVB support
* optional Gstreamer support via kaffeine-gstreamer package
* media:/ slave support
- remove xine-mad dependency
* Fri Aug 05 2005 - coolo@suse.de
- some proofreading for our patches
* Wed Mar 30 2005 - adrian@suse.de
- add czech translation from Klara
* Thu Mar 24 2005 - adrian@suse.de
- update to version 0.6
* DVB support merged from kaxtv
* Fri Mar 11 2005 - adrian@suse.de
- remove too late XInitThread() call in kpart, which can cause a
crash (#72072)
* Wed Mar 02 2005 - adrian@suse.de
- add DVD warning dialog again
* Thu Feb 17 2005 - adrian@suse.de
- menu entry moved to xdg dir
* Mon Jan 03 2005 - coolo@suse.de
- fix installation of german man page
* Mon Jan 03 2005 - adrian@suse.de
- update to version 0.5 final
* Wed Dec 22 2004 - ro@suse.de
- only package english manpage for now
* Wed Nov 10 2004 - adrian@suse.de
- update to version 0.5rc2
* Wed Oct 06 2004 - adrian@suse.de
- update to version 0.5rc1
* Wed Sep 29 2004 - adrian@suse.de
- fix broken desktop file syntax
* Wed Sep 29 2004 - adrian@suse.de
- fix handling from streams
* Sun Sep 26 2004 - adrian@suse.de
- adjust mimetypes to KDE 3.3 mimetypes
- remove realplayer support, the Helix plugin is not supported atm.
* Thu Aug 19 2004 - adrian@suse.de
- use the logo codec file in theora format on SuSE 9.2 and later
* Wed Jun 02 2004 - adrian@suse.de
- update to version 0.4.3b
* Mon May 03 2004 - adrian@suse.de
- update to version 0.4.3
* obsoletes XInitThread patch
* Fri Apr 16 2004 - adrian@suse.de
- apply crash fix from Helio
* Tue Apr 13 2004 - adrian@suse.de
- update to version 0.4.2
* Mon Apr 05 2004 - adrian@suse.de
- update czech translations
* Tue Mar 16 2004 - adrian@suse.de
- replace logo video. DivX4 won't work with our xine.
* Sat Feb 21 2004 - adrian@suse.de
- remove Music from Categories
* Mon Jan 19 2004 - adrian@suse.de
- update to version 0.4.1
* Sun Nov 16 2003 - adrian@suse.de
- update to final 0.4 version
* Fri Nov 07 2003 - adrian@suse.de
- fix build
- update to pre-0.4 snapshot
* Wed Oct 01 2003 - adrian@suse.de
- use --nofork in desktop file or temporary files are get
removed to early
* Sun Sep 21 2003 - adrian@suse.de
- implement the message box different. It can get translated now
and it solves also a crash in some cases. (#30224)
* Fri Sep 19 2003 - adrian@suse.de
- from #31052
* fix possible crash on quit
* ask explizit for the "none" audio driver, if "auto" fails.
* Fri Sep 19 2003 - adrian@suse.de
- add czech translation
* Thu Sep 18 2003 - varkoly@suse.de
- add hungarian translation
* Sat Sep 06 2003 - adrian@suse.de
- higher priority
- fix position change on pause
* Fri Sep 05 2003 - adrian@suse.de
- justify Categories
* Mon Aug 25 2003 - adrian@suse.de
- fix configure script to detect libXtest -> no DPMS anymore during
playing
* Sat Aug 23 2003 - adrian@suse.de
- drop some delete calls, which are reported as invalid by valgrind
seems that fixes the crashes
* Mon Jul 28 2003 - adrian@suse.de
- use new macro name for %%suse_update_desktop_file
* Mon Jul 28 2003 - adrian@suse.de
- add Categories
* Wed Jul 16 2003 - adrian@suse.de
- initial package of version 0.3.2

3
logo.ogg Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b5f74c2240c97c81f52be560a8555c1633f5165266e065cc27ec859e38f02ce0
size 117033

3
logo04.mpg Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a701a06fac079d1b253c123a0ac78301e1e09b6afa4376cc8882f954d8c6c370
size 312561

27
messagebox-dvd.diff Normal file
View File

@ -0,0 +1,27 @@
--- kaffeine/src/input/disc/disc.cpp 2006/03/28 11:51:04 1.1
+++ kaffeine/src/input/disc/disc.cpp 2006/03/28 11:57:23
@@ -583,6 +583,12 @@
if ( !device.isEmpty() )
mrl.setURL( QString("dvd://%1").arg(device) );
else {
+
+ if ( !QFile::exists("/usr/share/xine/mad") && QFile::exists("/usr/share/doc/packages/xine/README.SuSE") ) {
+ KMessageBox::sorry(0, i18n("This version of Xine (used by Kaffeine) has only a reduced\nset of supported codecs. It is not able to play DVDs.\nRead http://en.opensuse.org/XINE for further details."), QString::null, KMessageBox::AllowLink);
+ return;
+ }
+
DCOPRef mediamanager("kded","mediamanager");
DCOPReply reply = mediamanager.call("fullList()");
if ( reply.isValid() ) {
--- po/de.po 2006/12/05 09:33:47 1.15
+++ po/de.po 2006/12/05 09:34:21
@@ -3210,6 +3210,9 @@
msgid "DummyPart"
msgstr "DummyPart"
+msgid "This version of Xine (used by Kaffeine) has only a reduced\nset of supported codecs. It is not able to play DVDs.\nPlease read http://portal.suse.com/sdb/en/2003/09/xine_dvd.html for further details."
+msgstr "Diese Version von Xine (wird von Kaffeine benutzt) hat nur\neine limitierte Anzahl von Codecs. Daher ist es nicht möglich eine DVD anzusehen.\nBitte lesen Sie diese Seite http://en.opensuse.org/XINE für weitere Informationen."
+
#~ msgid "These channels already exist and were not added:"
#~ msgstr "Diese Kanäle existieren bereits und werden nicht hinzugefügt:"

58
mutex.diff Normal file
View File

@ -0,0 +1,58 @@
--- kaffeine/src/player-parts/xine-part/kxinewidget.cpp
+++ kaffeine/src/player-parts/xine-part/kxinewidget.cpp
@@ -395,9 +395,10 @@
{
debugOut("xine event: channels changed");
int i,j,channels;
- char* lang = new char[128];
+ char lang[128];
QString num;
+ vw->m_mutex.lock();
vw->m_audioCh.clear();
vw->m_audioCh.append(i18n("auto"));
vw->m_subCh.clear();
@@ -424,8 +425,6 @@
vw->m_subCh << i18n("Ch ") + num.setNum(j+1);
}
- delete [] lang;
-
vw->m_currentAudio = xine_get_param(vw->m_xineStream, XINE_PARAM_AUDIO_CHANNEL_LOGICAL) + 1;
vw->m_currentSub = xine_get_param(vw->m_xineStream, XINE_PARAM_SPU_CHANNEL) + 1;
@@ -444,6 +443,7 @@
//check if stream is seekable
vw->m_trackIsSeekable = (bool)xine_get_stream_info(vw->m_xineStream, XINE_STREAM_INFO_SEEKABLE);
+ vw->m_mutex.unlock();
QApplication::postEvent(vw, new QTimerEvent(TIMER_EVENT_NEW_CHANNELS));
break;
}
@@ -701,7 +701,9 @@
}
case TIMER_EVENT_NEW_CHANNELS:
{
+ m_mutex.lock();
emit signalNewChannels(m_audioCh, m_subCh, m_currentAudio, m_currentSub);
+ m_mutex.unlock();
break;
}
case TIMER_EVENT_NEW_TITLE:
--- kaffeine/src/player-parts/xine-part/kxinewidget.h
+++ kaffeine/src/player-parts/xine-part/kxinewidget.h
@@ -47,5 +47,6 @@
#include <qtimer.h>
+#include <qmutex.h>
#include <qptrlist.h>
#include <X11/Xlib.h>
#include <xine.h>
@@ -441,6 +442,7 @@
bool m_trackHasAudio;
bool m_trackHasChapters;
bool m_trackIsSeekable;
+ QMutex m_mutex;
/* dvb */
signals:

0
ready Normal file
View File