[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/phonon
From: Helio Chissini de Castro <helio () kde ! org>
Date: 2008-08-21 16:28:24
Message-ID: 1219336104.962622.25093.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 850483 by helio:
- Added credits on CMakefiles
- Fixed invalid tr calls
- Restore volumefader_plugin translations
- fix check of 64 bits and uncommented error check
- removed private qt namespace on xine, just gstreamer are allowed to use
M +1 -0 cmake/FindGObject.cmake
M +1 -0 cmake/FindGStreamer.cmake
M +1 -0 cmake/FindXCB.cmake
M +1 -0 cmake/FindXine.cmake
M +18 -0 xine/CMakeLists.txt
M +0 -2 xine/backend.cpp
M +0 -2 xine/backend.h
M +1 -1 xine/bytestream.h
M +2 -2 xine/mediaobject.cpp
M +0 -1 xine/mediaobject.h
M +14 -8 xine/volumefader_plugin.cpp
M +5 -5 xine/xinestream.cpp
--- trunk/kdesupport/phonon/cmake/FindGObject.cmake #850482:850483
@@ -6,6 +6,7 @@
# GOBJECT_LIBRARIES - the libraries needed to use GObject
# GOBJECT_DEFINITIONS - Compiler switches required for using GObject
+# Copyright (c) 2008 Helio Chissini de Castro, <helio@kde.org>
# (c)2006, Tim Beaulen <tbscope@gmail.com>
--- trunk/kdesupport/phonon/cmake/FindGStreamer.cmake #850482:850483
@@ -6,6 +6,7 @@
# GSTREAMER_LIBRARIES - the libraries needed to use GStreamer
# GSTREAMER_DEFINITIONS - Compiler switches required for using GStreamer
+# Copyright (c) 2008 Helio Chissini de Castro, <helio@kde.org>
# (c)2006, Tim Beaulen <tbscope@gmail.com>
# TODO: Other versions --> GSTREAMER_X_Y_FOUND (Example: GSTREAMER_0_8_FOUND and \
GSTREAMER_0_10_FOUND etc)
--- trunk/kdesupport/phonon/cmake/FindXCB.cmake #850482:850483
@@ -6,6 +6,7 @@
# LIBXCB_INCLUDE_DIR - the libxcb include dir
# LIBXCB_DEFINITIONS - compiler switches required for using libxcb
+# Copyright (c) 2008 Helio Chissini de Castro, <helio@kde.org>
# Copyright (c) 2007, Matthias Kretz, <kretz@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
--- trunk/kdesupport/phonon/cmake/FindXine.cmake #850482:850483
@@ -8,6 +8,7 @@
# XINE_LIBRARY - The libraries needed to use XINE
# XINE_XCB_FOUND - libxine can use XCB for video output
+# Copyright (c) 2008 Helio Chissini de Castro, <helio@kde.org>
# Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org>
# Copyright (c) 2006, Matthias Kretz, <kretz@kde.org>
#
--- trunk/kdesupport/phonon/xine/CMakeLists.txt #850482:850483
@@ -2,6 +2,24 @@
include_directories(${XINE_INCLUDE_DIR})
+if (UNIX)
+ check_cxx_source_compiles("
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == \
1) ? 1 : -1]; + int main() { return 0; }
+" _OFFT_IS_64BIT)
+
+ if (NOT _OFFT_IS_64BIT)
+ add_definitions(-D_FILE_OFFSET_BITS=64)
+ endif (NOT _OFFT_IS_64BIT)
+endif (UNIX)
+
set(phonon_xine_SRCS
sinknode.cpp
sourcenode.cpp
--- trunk/kdesupport/phonon/xine/backend.cpp #850482:850483
@@ -49,8 +49,6 @@
#include <QtCore/QVariant>
#include <QtCore/QtPlugin>
-QT_BEGIN_NAMESPACE
-
Q_EXPORT_PLUGIN2(phonon_xine, Phonon::Xine::Backend)
static Phonon::Xine::Backend *s_instance = 0;
--- trunk/kdesupport/phonon/xine/backend.h #850482:850483
@@ -37,8 +37,6 @@
#include <phonon/objectdescription.h>
#include <phonon/backendinterface.h>
-QT_BEGIN_NAMESPACE
-
namespace Phonon
{
namespace Xine
--- trunk/kdesupport/phonon/xine/bytestream.h #850482:850483
@@ -37,7 +37,7 @@
#include <cstdlib>
#include <QObject>
-//extern const char Error__off_t_needs_to_have_64_bits[sizeof(off_t) == 8 ? 1 : -1];
+extern const char Error__off_t_needs_to_have_64_bits[sizeof(off_t) == 8 ? 1 : -1];
namespace Phonon
{
--- trunk/kdesupport/phonon/xine/mediaobject.cpp #850482:850483
@@ -32,6 +32,7 @@
#include <QMultiMap>
#include <QtDebug>
#include <QMetaType>
+#include <QUrl>
#include <cmath>
#include "xinethread.h"
@@ -356,8 +357,7 @@
qFatal( "do not ever use kbytestream:/ URLs with MediaObject!" );
m_shouldFakeBufferingOnPlay = false;
m_stream->setMrl(QByteArray());
- QString msg( tr( "Cannot open media data at '<i>%1</i>'" ).arg( \
source.url().toString( QUrl::RemovePassword ) ) );
- m_stream->setError(Phonon::NormalError, msg);
+ m_stream->setError(Phonon::NormalError, tr( "Cannot open media data at \
'<i>%1</i>'" ).arg( source.url().toString( QUrl::RemovePassword ) )); return;
}
switch (how) {
--- trunk/kdesupport/phonon/xine/mediaobject.h #850482:850483
@@ -34,7 +34,6 @@
#include <QHash>
#include <QMultiMap>
#include <QPointer>
-#include <QUrl>
#include <xine.h>
#include "sourcenode.h"
--- trunk/kdesupport/phonon/xine/volumefader_plugin.cpp #850482:850483
@@ -18,6 +18,12 @@
*/
+#ifndef I18N_NOOP
+#define I18N_NOOP( x ) x
+#endif
+
+
+#include <QObject>
#include <phonon/volumefadereffect.h>
#include <cmath>
@@ -133,10 +139,10 @@
*/
static char *enum_fadeCurve[] = { "Fade3Decibel", "Fade6Decibel", "Fade9Decibel", \
"Fade12Decibel", NULL }; START_PARAM_DESCR(kvolumefader_parameters_t)
-PARAM_ITEM(POST_PARAM_TYPE_INT, fadeCurve, enum_fadeCurve, 0.0, 0.0, 0, "fade \
curve")
-PARAM_ITEM(POST_PARAM_TYPE_DOUBLE, currentVolume, NULL, 0.0, maxVolume, 0, "current \
volume")
-PARAM_ITEM(POST_PARAM_TYPE_DOUBLE, fadeTo, NULL, 0.0, maxVolume, 0, "volume to fade \
to")
-PARAM_ITEM(POST_PARAM_TYPE_INT, fadeTime, NULL, 0.0, 10000.0, 0, "fade time in \
milliseconds") +PARAM_ITEM(POST_PARAM_TYPE_INT, fadeCurve, enum_fadeCurve, 0.0, 0.0, \
0, I18N_NOOP ( "fade curve") ) +PARAM_ITEM(POST_PARAM_TYPE_DOUBLE, currentVolume, \
NULL, 0.0, maxVolume, 0, I18N_NOOP( "current volume") ) \
+PARAM_ITEM(POST_PARAM_TYPE_DOUBLE, fadeTo, NULL, 0.0, maxVolume, 0, I18N_NOOP( \
"volume to fade to") ) +PARAM_ITEM(POST_PARAM_TYPE_INT, fadeTime, NULL, 0.0, 10000.0, \
0, I18N_NOOP( "fade time in milliseconds") ) END_PARAM_DESCR(param_descr)
static int set_parameters (xine_post_t *this_gen, void *param_gen)
@@ -225,14 +231,14 @@
static char *get_help ()
{
static QByteArray helpText(
- "Normalizes audio by maximizing the volume without distorting "
+ QObject::tr( "Normalizes audio by maximizing the volume without \
distorting " "the sound.\n"
"\n"
"Parameters:\n"
" method: 1: use a single sample to smooth the variations via "
"the standard weighted mean over past samples (default); 2: use "
"several samples to smooth the variations via the standard "
- "weighted mean over past samples.\n" );
+ "weighted mean over past samples.\n" ).toUtf8() );
return helpText.data();
}
@@ -428,7 +434,7 @@
#define NEED_DESCRIPTION_FUNCTION 0
#endif
-#define PLUGIN_DESCRIPTION "Fade in or fade out with different fade curves"
+#define PLUGIN_DESCRIPTION I18N_NOOP( "Fade in or fade out with different fade \
curves" ) #define PLUGIN_IDENTIFIER "KVolumeFader"
#if NEED_DESCRIPTION_FUNCTION
@@ -441,7 +447,7 @@
static char *kvolumefader_get_description(post_class_t *class_gen)
{
Q_UNUSED(class_gen);
- static QByteArray description( PLUGIN_DESCRIPTION );
+ static QByteArray description( QObject::tr( PLUGIN_DESCRIPTION ).toUtf8() );
return description.data();
}
#endif
--- trunk/kdesupport/phonon/xine/xinestream.cpp #850482:850483
@@ -251,7 +251,7 @@
#ifdef DISABLE_FILE_MRLS
if (m_mrl.startsWith("file:/")) {
qDebug() << "faked xine_open failed for m_mrl =" << m_mrl.constData();
- error(Phonon::NormalError, tr( QString( "Cannot open media data at \
'<i>%1</i>'" ).arg( m_mrl.constData())) ); + error(Phonon::NormalError, tr( \
"Cannot open media data at '<i>%1</i>'" ).arg( m_mrl.constData())); return false;
}
#endif
@@ -265,13 +265,13 @@
// hmm?
abort();
case XINE_ERROR_NO_INPUT_PLUGIN:
- error(Phonon::NormalError, QString( tr( "Cannot find input plugin for \
MRL [%1]" ) ).arg( m_mrl.constData()) ); + error(Phonon::NormalError, tr( \
"Cannot find input plugin for MRL [%1]" ).arg( m_mrl.constData()) ); break;
case XINE_ERROR_NO_DEMUX_PLUGIN:
if (m_mrl.startsWith("kbytestream:/")) {
error(Phonon::FatalError, "Cannot find demultiplexer plugin for the \
given media data"); } else {
- error(Phonon::FatalError, QString( tr( "Cannot find demultiplexer \
plugin for MRL [%1]" ) ).arg( m_mrl.constData())); + \
error(Phonon::FatalError, tr( "Cannot find demultiplexer plugin for MRL [%1]" ).arg( \
m_mrl.constData())); }
break;
default:
@@ -620,7 +620,7 @@
// called from main thread
void XineStream::gaplessSwitchTo(const QUrl &url)
{
- gaplessSwitchTo(url.toString().toUtf8());
+ gaplessSwitchTo(url.toEncoded());
}
// called from main thread
@@ -1567,7 +1567,7 @@
// called from main thread
void XineStream::setUrl(const QUrl &url)
{
- setMrl(url.toString().toUtf8());
+ setMrl(url.toEncoded());
}
// called from main thread
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic