@ -29,7 +29,7 @@
# include <tqcursor.h>
# include <tqimage.h>
# include <tqdatetime.h>
# include <t qt extcodec.h>
# include <t extcodec.h>
# include <xine/xineutils.h>
@ -153,14 +153,14 @@ KXineWidget::~KXineWidget()
{
debugOut ( " Unwire audio filters " ) ;
unwireAudioFilters ( ) ;
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . tq arg( m_visualPluginName ) ) ;
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . arg( m_visualPluginName ) ) ;
delete m_visualPlugin ;
m_visualPlugin = NULL ;
}
# else
if ( m_xinePost )
{
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . tq arg( m_visualPluginName ) ) ;
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . arg( m_visualPluginName ) ) ;
m_postAudioSource = xine_get_audio_source ( m_xineStream ) ;
xine_post_wire_audio_port ( m_postAudioSource , m_audioDriver ) ;
xine_post_dispose ( m_xineEngine , m_xinePost ) ;
@ -279,7 +279,7 @@ void KXineWidget::saveXineConfig()
xine_config_update_entry ( m_xineEngine , & config ) ;
}
debugOut ( TQString ( " Save xine config to: %1 " ) . tq arg( m_configFilePath ) ) ;
debugOut ( TQString ( " Save xine config to: %1 " ) . arg( m_configFilePath ) ) ;
xine_config_save ( m_xineEngine , m_configFilePath . ascii ( ) ) ;
}
@ -331,7 +331,7 @@ void KXineWidget::frameOutputCallback(void* p, int video_width, int video_height
/* frame size changed */
if ( ( video_width ! = vw - > m_videoFrameWidth ) | | ( video_height ! = vw - > m_videoFrameHeight ) )
{
debugOut ( TQString ( " New video frame size: %1x%2 - aspect ratio: %3 " ) . tq arg( video_width ) . tq arg( video_height ) . tq arg( video_aspect ) ) ;
debugOut ( TQString ( " New video frame size: %1x%2 - aspect ratio: %3 " ) . arg( video_width ) . arg( video_height ) . arg( video_aspect ) ) ;
vw - > m_videoFrameWidth = video_width ;
vw - > m_videoFrameHeight = video_height ;
vw - > m_videoAspect = video_aspect ;
@ -343,7 +343,7 @@ void KXineWidget::frameOutputCallback(void* p, int video_width, int video_height
{
vw - > m_newParentSize = vw - > parentWidget ( ) - > size ( ) - TQSize ( ( vw - > width ( ) - video_width ) , vw - > height ( ) - video_height ) ;
debugOut ( TQString ( " Resize video window to: %1x%2 " ) . tq arg( vw - > m_newParentSize . width ( ) ) . tq arg( vw - > m_newParentSize . height ( ) ) ) ;
debugOut ( TQString ( " Resize video window to: %1x%2 " ) . arg( vw - > m_newParentSize . width ( ) ) . arg( vw - > m_newParentSize . height ( ) ) ) ;
/* we should not do a resize() inside a xine thread,
but post an event to the main thread */
@ -391,7 +391,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent)
channels = xine_get_stream_info ( vw - > m_xineStream , XINE_STREAM_INFO_MAX_AUDIO_CHANNEL ) ;
for ( i = 0 ; i < channels ; i + + )
{
slang = TQString ( " %1. " ) . tq arg( i + 1 ) ;
slang = TQString ( " %1. " ) . arg( i + 1 ) ;
if ( xine_get_audio_lang ( vw - > m_xineStream , i , lang ) )
slang + = lang ;
tmp < < slang ;
@ -415,7 +415,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent)
channels = xine_get_stream_info ( vw - > m_xineStream , XINE_STREAM_INFO_MAX_SPU_CHANNEL ) ;
for ( i = 0 ; i < channels ; i + + )
{
slang = TQString ( " %1. " ) . tq arg( i + 1 ) ;
slang = TQString ( " %1. " ) . arg( i + 1 ) ;
if ( xine_get_spu_lang ( vw - > m_xineStream , i , lang ) )
slang + = lang ;
tmp < < slang ;
@ -472,7 +472,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent)
debugOut ( " xine event: dropped frames " ) ;
xine_dropped_frames_t * dropped = ( xine_dropped_frames_t * ) xineEvent - > data ;
warningOut ( TQString ( " Skipped frames: %1 - discarded frames: %2 " ) . tq arg( dropped - > skipped_frames / 10 ) . tq arg( dropped - > discarded_frames / 10 ) ) ;
warningOut ( TQString ( " Skipped frames: %1 - discarded frames: %2 " ) . arg( dropped - > skipped_frames / 10 ) . arg( dropped - > discarded_frames / 10 ) ) ;
break ;
}
@ -721,7 +721,7 @@ void KXineWidget::timerEvent( TQTimerEvent* tevent )
}
case TIMER_EVENT_NEW_STATUS :
{
emit signalXine tq Status( m_statusString ) ;
emit signalXine Status( m_statusString ) ;
break ;
}
case TIMER_EVENT_CHANGE_CURSOR :
@ -752,7 +752,7 @@ void KXineWidget::timerEvent( TQTimerEvent* tevent )
else
{
//restart
warningOut ( TQString ( " Message: '%1' was blocked! " ) . tq arg( m_xineMessage ) ) ;
warningOut ( TQString ( " Message: '%1' was blocked! " ) . arg( m_xineMessage ) ) ;
m_recentMessagesTimer . start ( 1500 ) ;
}
break ;
@ -795,7 +795,7 @@ void KXineWidget::videoDriverChangedCallback(void* p, xine_cfg_entry_t* entry)
int pos , time , length ;
debugOut ( TQString ( " New video driver: %1 " ) . tq arg( entry - > enum_values [ entry - > num_value ] ) ) ;
debugOut ( TQString ( " New video driver: %1 " ) . arg( entry - > enum_values [ entry - > num_value ] ) ) ;
if ( vw - > m_osd )
{
@ -835,7 +835,7 @@ void KXineWidget::videoDriverChangedCallback(void* p, xine_cfg_entry_t* entry)
vw - > unwireAudioFilters ( ) ;
if ( vw - > m_visualPlugin )
{
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . tq arg( vw - > m_visualPluginName ) ) ;
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . arg( vw - > m_visualPluginName ) ) ;
delete vw - > m_visualPlugin ;
vw - > m_visualPlugin = NULL ;
}
@ -855,7 +855,7 @@ void KXineWidget::videoDriverChangedCallback(void* p, xine_cfg_entry_t* entry)
if ( ! vw - > m_videoDriver )
{
vw - > m_xineError = i18n ( " Error: Can't init new Video Driver %1 - using %2! " ) . tq arg( entry - > enum_values [ entry - > num_value ] ) . tq arg( vw - > m_videoDriverName ) ;
vw - > m_xineError = i18n ( " Error: Can't init new Video Driver %1 - using %2! " ) . arg( entry - > enum_values [ entry - > num_value ] ) . arg( vw - > m_videoDriverName ) ;
TQApplication : : postEvent ( vw , new TQTimerEvent ( TIMER_EVENT_NEW_XINE_ERROR ) ) ;
playing = false ;
vw - > m_videoDriver = xine_open_video_driver ( vw - > m_xineEngine ,
@ -869,7 +869,7 @@ void KXineWidget::videoDriverChangedCallback(void* p, xine_cfg_entry_t* entry)
else
{
vw - > m_videoDriverName = entry - > enum_values [ entry - > num_value ] ;
vw - > m_statusString = i18n ( " Using Video Driver: %1 " ) . tq arg( vw - > m_videoDriverName ) ;
vw - > m_statusString = i18n ( " Using Video Driver: %1 " ) . arg( vw - > m_videoDriverName ) ;
TQApplication : : postEvent ( vw , new TQTimerEvent ( TIMER_EVENT_NEW_STATUS ) ) ;
}
@ -902,7 +902,7 @@ void KXineWidget::audioDriverChangedCallback(void* p, xine_cfg_entry_t* entry)
int pos , time , length ;
debugOut ( TQString ( " New audio driver: %1 " ) . tq arg( entry - > enum_values [ entry - > num_value ] ) ) ;
debugOut ( TQString ( " New audio driver: %1 " ) . arg( entry - > enum_values [ entry - > num_value ] ) ) ;
if ( vw - > m_osd )
{
@ -931,7 +931,7 @@ void KXineWidget::audioDriverChangedCallback(void* p, xine_cfg_entry_t* entry)
vw - > unwireAudioFilters ( ) ;
if ( vw - > m_visualPlugin )
{
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . tq arg( vw - > m_visualPluginName ) ) ;
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . arg( vw - > m_visualPluginName ) ) ;
delete vw - > m_visualPlugin ;
vw - > m_visualPlugin = NULL ;
}
@ -945,7 +945,7 @@ void KXineWidget::audioDriverChangedCallback(void* p, xine_cfg_entry_t* entry)
if ( ! vw - > m_audioDriver )
{
vw - > m_xineError = i18n ( " Error: Can't init new Audio Driver %1 - using %2! " ) . tq arg( entry - > enum_values [ entry - > num_value ] ) . tq arg( vw - > m_audioDriverName ) ;
vw - > m_xineError = i18n ( " Error: Can't init new Audio Driver %1 - using %2! " ) . arg( entry - > enum_values [ entry - > num_value ] ) . arg( vw - > m_audioDriverName ) ;
TQApplication : : postEvent ( vw , new TQTimerEvent ( TIMER_EVENT_NEW_XINE_ERROR ) ) ;
playing = false ;
vw - > m_audioDriver = xine_open_audio_driver ( vw - > m_xineEngine , vw - > m_audioDriverName . ascii ( ) , NULL ) ;
@ -953,7 +953,7 @@ void KXineWidget::audioDriverChangedCallback(void* p, xine_cfg_entry_t* entry)
else
{
vw - > m_audioDriverName = entry - > enum_values [ entry - > num_value ] ;
vw - > m_statusString = i18n ( " Using Audio Driver: %1 " ) . tq arg( vw - > m_audioDriverName ) ;
vw - > m_statusString = i18n ( " Using Audio Driver: %1 " ) . arg( vw - > m_audioDriverName ) ;
TQApplication : : postEvent ( vw , new TQTimerEvent ( TIMER_EVENT_NEW_STATUS ) ) ;
}
@ -1109,7 +1109,7 @@ bool KXineWidget::initXine()
if ( isXineReady ( ) )
return true ;
emit signalXine tq Status( i18n ( " Init xine... " ) ) ;
emit signalXine Status( i18n ( " Init xine... " ) ) ;
globalPosChanged ( ) ; /* get global pos of the window */
/**** INIT XINE DISPLAY ****/
@ -1148,18 +1148,18 @@ bool KXineWidget::initXine()
int count = 1 ;
debugOut ( " Xinerama extension present " ) ;
XineramaQueryScreens ( x11Display ( ) , & count ) ;
debugOut ( TQString ( " %1 screens detected " ) . tq arg( count ) ) ;
debugOut ( TQString ( " %1 screens detected " ) . arg( count ) ) ;
if ( count > 1 )
// multihead -> assuming square pixels
m_displayRatio = 1.0 ;
}
# endif
debugOut ( TQString ( " Display aspect ratio (v/h): %1 " ) . tq arg( m_displayRatio ) ) ; */
debugOut ( TQString ( " Display aspect ratio (v/h): %1 " ) . arg( m_displayRatio ) ) ; */
/**** INIT XINE ENGINE ****/
debugOut ( TQString ( " Using xine version %1 " ) . tq arg( xine_get_version_string ( ) ) ) ;
debugOut ( TQString ( " Using xine version %1 " ) . arg( xine_get_version_string ( ) ) ) ;
m_xineEngine = xine_new ( ) ;
if ( ! m_xineEngine )
@ -1209,7 +1209,7 @@ bool KXineWidget::initXine()
else
m_audioDriverName = m_audioChoices [ i ] ;
debugOut ( TQString ( " Use audio driver %1 " ) . tq arg( m_audioDriverName ) ) ;
debugOut ( TQString ( " Use audio driver %1 " ) . arg( m_audioDriverName ) ) ;
drivers = xine_list_video_output_plugins ( m_xineEngine ) ;
i = 0 ;
@ -1235,7 +1235,7 @@ bool KXineWidget::initXine()
else
m_videoDriverName = m_videoChoices [ i ] ;
debugOut ( TQString ( " Use video driver %1 " ) . tq arg( m_videoDriverName ) ) ;
debugOut ( TQString ( " Use video driver %1 " ) . arg( m_videoDriverName ) ) ;
m_mixerInfo = strdup ( i18n ( " Use software audio mixer " ) . local8Bit ( ) ) ;
m_softwareMixer = ( bool ) xine_config_register_bool ( m_xineEngine , " audio.mixer_software " , 1 , m_mixerInfo ,
@ -1307,7 +1307,7 @@ bool KXineWidget::initXine()
if ( ! m_videoDriver & & m_videoDriverName ! = " auto " )
{
emit signalXineError ( i18n ( " Can't init Video Driver '%1' - trying 'auto'... " ) . tq arg( m_videoDriverName ) ) ;
emit signalXineError ( i18n ( " Can't init Video Driver '%1' - trying 'auto'... " ) . arg( m_videoDriverName ) ) ;
m_videoDriverName = " auto " ;
m_videoDriver = xine_open_video_driver ( m_xineEngine ,
# ifndef HAVE_XCB
@ -1331,7 +1331,7 @@ bool KXineWidget::initXine()
if ( ! m_audioDriver & & m_audioDriverName ! = " auto " )
{
emit signalXineError ( i18n ( " Can't init Audio Driver '%1' - trying 'auto'... " ) . tq arg( m_audioDriverName ) ) ;
emit signalXineError ( i18n ( " Can't init Audio Driver '%1' - trying 'auto'... " ) . arg( m_audioDriverName ) ) ;
m_audioDriverName = " auto " ;
m_audioDriver = xine_open_audio_driver ( m_xineEngine , m_audioDriverName . ascii ( ) , NULL ) ;
}
@ -1377,7 +1377,7 @@ bool KXineWidget::initXine()
debugOut ( " xine init successful " ) ;
emit signalXine tq Status( i18n ( " Ready " ) ) ;
emit signalXine Status( i18n ( " Ready " ) ) ;
emit signalXineReady ( ) ;
/** something to play? **/
@ -1395,12 +1395,12 @@ void KXineWidget::initOSD()
{
if ( ! xine_osd_set_font ( m_osd , m_osdFont , fontsizetable [ m_osdSize ] ) )
{
debugOut ( TQString ( " Font ->%1<- specified for OSD doesn't exists. " ) . tq arg( m_osdFont ) ) ;
debugOut ( TQString ( " Font ->%1<- specified for OSD doesn't exists. " ) . arg( m_osdFont ) ) ;
free ( m_osdFont ) ;
m_osdFont = strdup ( " sans " ) ;
xine_osd_set_font ( m_osd , m_osdFont , fontsizetable [ m_osdSize ] ) ;
}
debugOut ( TQString ( " Font for OSD: %1 " ) . tq arg( m_osdFont ) ) ;
debugOut ( TQString ( " Font for OSD: %1 " ) . arg( m_osdFont ) ) ;
xine_osd_set_text_palette ( m_osd , XINE_TEXTPALETTE_WHITE_BLACK_TRANSPARENT , XINE_OSD_TEXT1 ) ;
m_osdUnscaled = ( xine_osd_get_capabilities ( m_osd ) & XINE_OSD_CAP_UNSCALED ) ;
if ( m_osdUnscaled )
@ -1428,7 +1428,7 @@ bool KXineWidget::playDvb()
{
if ( ! m_visualPlugin )
{
debugOut ( TQString ( " Init visual plugin: %1 " ) . tq arg( m_visualPluginName ) ) ;
debugOut ( TQString ( " Init visual plugin: %1 " ) . arg( m_visualPluginName ) ) ;
m_visualPlugin = new PostFilter ( m_visualPluginName , m_xineEngine , m_audioDriver , m_videoDriver , NULL ) ;
}
@ -1438,7 +1438,7 @@ bool KXineWidget::playDvb()
{
if ( m_visualPlugin )
{
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . tq arg( m_visualPluginName ) ) ;
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . arg( m_visualPluginName ) ) ;
delete m_visualPlugin ;
m_visualPlugin = NULL ;
}
@ -1508,7 +1508,7 @@ bool KXineWidget::playDvb()
m_posTimer . start ( 1000 ) ;
emit signalXinePlaying ( ) ;
emit signalXine tq Status( i18n ( " Playing " ) ) ;
emit signalXine Status( i18n ( " Playing " ) ) ;
return true ;
}
@ -1882,7 +1882,7 @@ bool KXineWidget::openDvb()
}
else fprintf ( stderr , " xine pipe opened %s \n " , m_trackURL . ascii ( ) ) ;
m_trackURL = " DVB " ;
emit signalXine tq Status( i18n ( " DVB: opening... " ) ) ;
emit signalXine Status( i18n ( " DVB: opening... " ) ) ;
TQTimer : : singleShot ( 0 , this , TQT_SLOT ( playDvb ( ) ) ) ;
return true ;
@ -1936,7 +1936,7 @@ void KXineWidget::slotPlay()
m_queue . remove ( m_queue . find ( m_trackURL ) ) ;
if ( m_trackURL ! = m_logoFile )
emit signalXine tq Status( i18n ( " Opening... " ) ) ;
emit signalXine Status( i18n ( " Opening... " ) ) ;
/* check for external subtitle file or save url */
m_trackSubtitleURL = TQString ( ) ;
@ -1978,7 +1978,7 @@ void KXineWidget::slotPlay()
if ( turl . startsWith ( " / " ) )
turl . prepend ( " file:// " ) ;
debugOut ( TQString ( " Playing: %1 " ) . tq arg( turl . local8Bit ( ) . data ( ) ) ) ;
debugOut ( TQString ( " Playing: %1 " ) . arg( turl . local8Bit ( ) . data ( ) ) ) ;
xine_set_param ( m_xineStream , XINE_PARAM_METRONOM_PREBUFFER , 12000 ) ;
if ( ! xine_open ( m_xineStream , TQFile : : encodeName ( turl ) ) ) {
@ -2002,7 +2002,7 @@ void KXineWidget::slotPlay()
{
if ( m_visualPluginName & & ( ! m_xinePost ) )
{
debugOut ( TQString ( " Init visual plugin: %1 " ) . tq arg( m_visualPluginName ) ) ;
debugOut ( TQString ( " Init visual plugin: %1 " ) . arg( m_visualPluginName ) ) ;
m_xinePost = xine_post_init ( m_xineEngine , m_visualPluginName , 0 ,
& m_audioDriver ,
& m_videoDriver ) ;
@ -2016,7 +2016,7 @@ void KXineWidget::slotPlay()
{
if ( m_xinePost )
{
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . tq arg( m_visualPluginName ) ) ;
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . arg( m_visualPluginName ) ) ;
m_postAudioSource = xine_get_audio_source ( m_xineStream ) ;
xine_post_wire_audio_port ( m_postAudioSource , m_audioDriver ) ;
xine_post_dispose ( m_xineEngine , m_xinePost ) ;
@ -2053,7 +2053,7 @@ void KXineWidget::slotPlay()
CodecUtf8 = TQTextCodec : : codecForName ( " UTF-8 " ) ;
TQString infotag ;
infotag = TQString : : tq fromLatin1( xine_get_meta_info ( m_xineStream , XINE_META_INFO_TITLE ) ) ;
infotag = TQString : : fromLatin1( xine_get_meta_info ( m_xineStream , XINE_META_INFO_TITLE ) ) ;
if ( currentUtf8Locale )
m_trackTitle = infotag ;
@ -2068,9 +2068,9 @@ void KXineWidget::slotPlay()
TQString trackArtist = NULL ;
TQString trackAlbum = NULL ;
TQString trackComment = NULL ;
trackArtist = TQString : : tq fromLatin1( xine_get_meta_info ( m_xineStream , XINE_META_INFO_ARTIST ) ) ;
trackAlbum = TQString : : tq fromLatin1( xine_get_meta_info ( m_xineStream , XINE_META_INFO_ALBUM ) ) ;
trackComment = TQString : : tq fromLatin1( xine_get_meta_info ( m_xineStream , XINE_META_INFO_COMMENT ) ) ;
trackArtist = TQString : : fromLatin1( xine_get_meta_info ( m_xineStream , XINE_META_INFO_ARTIST ) ) ;
trackAlbum = TQString : : fromLatin1( xine_get_meta_info ( m_xineStream , XINE_META_INFO_ALBUM ) ) ;
trackComment = TQString : : fromLatin1( xine_get_meta_info ( m_xineStream , XINE_META_INFO_COMMENT ) ) ;
if ( currentUtf8Locale )
{
m_trackArtist = trackArtist ;
@ -2157,9 +2157,9 @@ void KXineWidget::slotPlay()
{
emit signalXinePlaying ( ) ;
if ( hasSaveURL ( ) )
emit signalXine tq Status( i18n ( " Recording " ) ) ;
emit signalXine Status( i18n ( " Recording " ) ) ;
else
emit signalXine tq Status( i18n ( " Playing " ) ) ;
emit signalXine Status( i18n ( " Playing " ) ) ;
}
}
@ -2239,7 +2239,7 @@ void KXineWidget::sendXineError()
{
if ( m_trackURL ! = m_logoFile )
{
emit signalXine tq Status( i18n ( " Error " ) ) ;
emit signalXine Status( i18n ( " Error " ) ) ;
emit signalXineError ( error ) ;
}
else
@ -2248,7 +2248,7 @@ void KXineWidget::sendXineError()
else
{
errorOut ( error ) ;
errorOut ( TQString ( " Can't play: %1 - trying next " ) . tq arg( m_trackURL ) ) ;
errorOut ( TQString ( " Can't play: %1 - trying next " ) . arg( m_trackURL ) ) ;
TQTimer : : singleShot ( 0 , this , TQT_SLOT ( slotPlay ( ) ) ) ;
}
}
@ -2290,7 +2290,7 @@ void KXineWidget::showOSDMessage(const TQString& message, uint duration, int pri
return ;
prevOsdPriority = priority ;
//debugOut(TQString("OSD: draw text: %1"). tq arg(message));
//debugOut(TQString("OSD: draw text: %1"). arg(message));
xine_osd_clear ( m_osd ) ;
xine_osd_draw_text ( m_osd , 0 , 0 , message . local8Bit ( ) , XINE_OSD_TEXT1 ) ;
@ -2348,7 +2348,7 @@ void KXineWidget::slotCreateVideoFilter(const TQString& name, TQWidget* parent)
wireVideoFilters ( ) ;
# else
parent = parent ;
warningOut ( TQString ( " Not implemented [CreateVideoFilter %1] " ) . tq arg( name ) ) ;
warningOut ( TQString ( " Not implemented [CreateVideoFilter %1] " ) . arg( name ) ) ;
# endif
}
@ -2364,7 +2364,7 @@ void KXineWidget::slotCreateAudioFilter(const TQString& name, TQWidget* parent)
wireAudioFilters ( ) ;
# else
parent = parent ;
warningOut ( TQString ( " Not implemented [CreateAudioFilter %1] " ) . tq arg( name ) ) ;
warningOut ( TQString ( " Not implemented [CreateAudioFilter %1] " ) . arg( name ) ) ;
# endif
}
@ -2478,7 +2478,7 @@ void KXineWidget::wireAudioFilters()
{
if ( ! m_visualPlugin )
{
debugOut ( TQString ( " Init visual plugin: %1 " ) . tq arg( m_visualPluginName ) ) ;
debugOut ( TQString ( " Init visual plugin: %1 " ) . arg( m_visualPluginName ) ) ;
m_visualPlugin = new PostFilter ( m_visualPluginName , m_xineEngine , m_audioDriver , m_videoDriver , NULL ) ;
}
@ -2488,7 +2488,7 @@ void KXineWidget::wireAudioFilters()
{
if ( m_visualPlugin )
{
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . tq arg( m_visualPluginName ) ) ;
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . arg( m_visualPluginName ) ) ;
delete m_visualPlugin ;
m_visualPlugin = NULL ;
}
@ -2571,7 +2571,7 @@ TQStringList KXineWidget::getVisualPlugins() const
void KXineWidget : : slotSetVisualPlugin ( const TQString & visual )
{
if ( m_visualPluginName = = visual ) return ;
debugOut ( TQString ( " New visualization plugin: %1 " ) . tq arg( visual ) ) ;
debugOut ( TQString ( " New visualization plugin: %1 " ) . arg( visual ) ) ;
# ifndef USE_TQT_ONLY
unwireAudioFilters ( ) ;
@ -2660,7 +2660,7 @@ void KXineWidget::slotSetVolume(int vol)
if ( ! isXineReady ( ) ) return ;
if ( m_softwareMixer )
{
//debugOut(TQString("Set software amplification level: %1"). tq arg(vol));
//debugOut(TQString("Set software amplification level: %1"). arg(vol));
if ( m_volumeGain )
xine_set_param ( m_xineStream , XINE_PARAM_AUDIO_AMP_LEVEL , vol * 2 ) ;
else
@ -2668,10 +2668,10 @@ void KXineWidget::slotSetVolume(int vol)
}
else
{
//debugOut(TQString("Set audio mixer volume: %1"). tq arg(vol));
//debugOut(TQString("Set audio mixer volume: %1"). arg(vol));
xine_set_param ( m_xineStream , XINE_PARAM_AUDIO_VOLUME , vol ) ;
}
emit signalXine tq Status( i18n ( " Volume " ) + " : " + TQString : : number ( vol ) + " % " ) ;
emit signalXine Status( i18n ( " Volume " ) + " : " + TQString : : number ( vol ) + " % " ) ;
}
uint KXineWidget : : getVolume ( ) const
@ -2707,12 +2707,12 @@ void KXineWidget::slotToggleMute()
if ( xine_get_param ( m_xineStream , muteParam ) )
{
xine_set_param ( m_xineStream , muteParam , 0 ) ; /* mute off */
emit signalXine tq Status( i18n ( " Mute Off " ) ) ;
emit signalXine Status( i18n ( " Mute Off " ) ) ;
}
else
{
xine_set_param ( m_xineStream , muteParam , 1 ) ; /* mute on */
emit signalXine tq Status( i18n ( " Mute On " ) ) ;
emit signalXine Status( i18n ( " Mute On " ) ) ;
}
}
@ -2867,12 +2867,12 @@ void KXineWidget::slotStop()
TQTimer : : singleShot ( 0 , this , TQT_SLOT ( slotPlay ( ) ) ) ;
}
emit signalXine tq Status( i18n ( " Stop " ) ) ;
emit signalXine Status( i18n ( " Stop " ) ) ;
}
void KXineWidget : : slotSetAudiocdDevice ( const TQString & device )
{
debugOut ( TQString ( " Set AudioCD device to %1 " ) . tq arg( device ) ) ;
debugOut ( TQString ( " Set AudioCD device to %1 " ) . arg( device ) ) ;
xine_cfg_entry_t config ;
xine_config_lookup_entry ( m_xineEngine , " input.cdda_device " , & config ) ;
@ -2884,7 +2884,7 @@ void KXineWidget::slotSetAudiocdDevice(const TQString& device)
void KXineWidget : : slotSetVcdDevice ( const TQString & device )
{
debugOut ( TQString ( " Set VCD device to %1 " ) . tq arg( device ) ) ;
debugOut ( TQString ( " Set VCD device to %1 " ) . arg( device ) ) ;
xine_cfg_entry_t config ;
xine_config_lookup_entry ( m_xineEngine , " input.vcd_device " , & config ) ;
@ -2896,7 +2896,7 @@ void KXineWidget::slotSetVcdDevice(const TQString& device)
void KXineWidget : : slotSetDvdDevice ( const TQString & device )
{
debugOut ( TQString ( " Set DVD device to %1 " ) . tq arg( device ) ) ;
debugOut ( TQString ( " Set DVD device to %1 " ) . arg( device ) ) ;
xine_cfg_entry_t config ;
xine_config_lookup_entry ( m_xineEngine , " input.dvd_device " , & config ) ;
@ -2966,7 +2966,7 @@ void KXineWidget::setStreamSaveDir(const TQString& dir)
if ( ! xine_config_lookup_entry ( m_xineEngine , " misc.save_dir " , & config ) ) return ; /* older xine-lib */
debugOut ( TQString ( " Set misc.save_dir to: %1 " ) . tq arg( dir ) ) ;
debugOut ( TQString ( " Set misc.save_dir to: %1 " ) . arg( dir ) ) ;
config . str_value = TQFile : : encodeName ( dir ) . data ( ) ;
xine_config_update_entry ( m_xineEngine , & config ) ;
}
@ -2982,7 +2982,7 @@ const TQString KXineWidget::getStreamSaveDir()
void KXineWidget : : setBroadcasterPort ( const uint port )
{
debugOut ( TQString ( " Set broadcaster port to %1 " ) . tq arg( port ) ) ;
debugOut ( TQString ( " Set broadcaster port to %1 " ) . arg( port ) ) ;
xine_set_param ( m_xineStream , XINE_PARAM_BROADCASTER_PORT , port ) ;
}
@ -2997,7 +2997,7 @@ void KXineWidget::slotSpeedPause()
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_PAUSE ) ;
m_posTimer . stop ( ) ;
if ( m_currentSpeed ! = Undefined )
emit signalXine tq Status( i18n ( " Pause " ) ) ;
emit signalXine Status( i18n ( " Pause " ) ) ;
m_currentSpeed = Pause ;
}
}
@ -3007,7 +3007,7 @@ void KXineWidget::slotSpeedNormal()
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_NORMAL ) ;
m_posTimer . start ( 200 ) ;
m_currentSpeed = Normal ;
emit signalXine tq Status( i18n ( " Playing " ) + " " ) ;
emit signalXine Status( i18n ( " Playing " ) + " " ) ;
}
void KXineWidget : : slotSpeedFaster ( )
@ -3018,7 +3018,7 @@ void KXineWidget::slotSpeedFaster()
{
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_FAST_4 ) ;
m_currentSpeed = Fast2 ;
emit signalXine tq Status( i18n ( " Fast Forward %1 " ) . tq arg( " x2 " ) ) ;
emit signalXine Status( i18n ( " Fast Forward %1 " ) . arg( " x2 " ) ) ;
break ;
}
case Fast2 :
@ -3035,14 +3035,14 @@ void KXineWidget::slotSpeedFaster()
{
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_SLOW_2 ) ;
m_currentSpeed = Slow1 ;
emit signalXine tq Status( i18n ( " Slow Motion %1 " ) . tq arg( " x1 " ) ) ;
emit signalXine Status( i18n ( " Slow Motion %1 " ) . arg( " x1 " ) ) ;
break ;
}
default :
{
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_FAST_2 ) ;
m_currentSpeed = Fast1 ;
emit signalXine tq Status( i18n ( " Fast Forward %1 " ) . tq arg( " x1 " ) ) ;
emit signalXine Status( i18n ( " Fast Forward %1 " ) . arg( " x1 " ) ) ;
break ;
}
}
@ -3056,7 +3056,7 @@ void KXineWidget::slotSpeedSlower()
{
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_SLOW_4 ) ;
m_currentSpeed = Slow2 ;
emit signalXine tq Status( i18n ( " Slow Motion %1 " ) . tq arg( " x2 " ) ) ;
emit signalXine Status( i18n ( " Slow Motion %1 " ) . arg( " x2 " ) ) ;
break ;
}
case Slow2 :
@ -3073,14 +3073,14 @@ void KXineWidget::slotSpeedSlower()
{
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_FAST_2 ) ;
m_currentSpeed = Fast1 ;
emit signalXine tq Status( i18n ( " Fast Forward %1 " ) . tq arg( " x1 " ) ) ;
emit signalXine Status( i18n ( " Fast Forward %1 " ) . arg( " x1 " ) ) ;
break ;
}
default :
{
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_SLOW_2 ) ;
m_currentSpeed = Slow1 ;
emit signalXine tq Status( i18n ( " Slow Motion %1 " ) . tq arg( " x1 " ) ) ;
emit signalXine Status( i18n ( " Slow Motion %1 " ) . arg( " x1 " ) ) ;
break ;
}
}
@ -3093,14 +3093,14 @@ TQString KXineWidget::getSupportedExtensions() const
void KXineWidget : : slotSetAudioChannel ( int ch )
{
debugOut ( TQString ( " Switch to audio channel %1 " ) . tq arg( ch - 1 ) ) ;
debugOut ( TQString ( " Switch to audio channel %1 " ) . arg( ch - 1 ) ) ;
xine_set_param ( m_xineStream , XINE_PARAM_AUDIO_CHANNEL_LOGICAL , ch - 1 ) ;
}
void KXineWidget : : slotSetSubtitleChannel ( int ch )
{
debugOut ( TQString ( " Switch to subtitle channel %1 " ) . tq arg( ch - 1 ) ) ;
debugOut ( TQString ( " Switch to subtitle channel %1 " ) . arg( ch - 1 ) ) ;
xine_set_param ( m_xineStream , XINE_PARAM_SPU_CHANNEL , ch - 1 ) ;
}
@ -3306,7 +3306,7 @@ void KXineWidget::slotSetDeinterlaceConfig(const TQString& config)
if ( m_deinterlaceFilter )
m_deinterlaceFilter - > setConfig ( config ) ;
# else
warningOut ( TQString ( " Not implemented [SetDeinterlaceConfig %1] " ) . tq arg( config ) ) ;
warningOut ( TQString ( " Not implemented [SetDeinterlaceConfig %1] " ) . arg( config ) ) ;
# endif
}
@ -3318,7 +3318,7 @@ void KXineWidget::slotToggleDeinterlace()
if ( m_deinterlaceFilter )
{
m_deinterlaceEnabled = ! m_deinterlaceEnabled ;
debugOut ( TQString ( " Deinterlace enabled: %1 " ) . tq arg( m_deinterlaceEnabled ) ) ;
debugOut ( TQString ( " Deinterlace enabled: %1 " ) . arg( m_deinterlaceEnabled ) ) ;
if ( m_deinterlaceEnabled ) s = i18n ( " Deinterlace: on " ) ;
else s = i18n ( " Deinterlace: off " ) ;
showOSDMessage ( s , 2000 ) ;
@ -3343,31 +3343,31 @@ void KXineWidget::slotToggleDeinterlace()
void KXineWidget : : slotAspectRatioAuto ( )
{
xine_set_param ( m_xineStream , XINE_PARAM_VO_ASPECT_RATIO , XINE_VO_ASPECT_AUTO ) ;
emit signalXine tq Status( i18n ( " Aspect Ratio " ) + " : " + i18n ( " Auto " ) ) ;
emit signalXine Status( i18n ( " Aspect Ratio " ) + " : " + i18n ( " Auto " ) ) ;
}
void KXineWidget : : slotAspectRatio4_3 ( )
{
xine_set_param ( m_xineStream , XINE_PARAM_VO_ASPECT_RATIO , XINE_VO_ASPECT_4_3 ) ;
emit signalXine tq Status( i18n ( " Aspect Ratio " ) + " : " + i18n ( " 4:3 " ) ) ;
emit signalXine Status( i18n ( " Aspect Ratio " ) + " : " + i18n ( " 4:3 " ) ) ;
}
void KXineWidget : : slotAspectRatioAnamorphic ( )
{
xine_set_param ( m_xineStream , XINE_PARAM_VO_ASPECT_RATIO , XINE_VO_ASPECT_ANAMORPHIC ) ;
emit signalXine tq Status( i18n ( " Aspect Ratio " ) + " : " + i18n ( " 16:9 " ) ) ;
emit signalXine Status( i18n ( " Aspect Ratio " ) + " : " + i18n ( " 16:9 " ) ) ;
}
void KXineWidget : : slotAspectRatioSquare ( )
{
xine_set_param ( m_xineStream , XINE_PARAM_VO_ASPECT_RATIO , XINE_VO_ASPECT_SQUARE ) ;
emit signalXine tq Status( i18n ( " Aspect Ratio " ) + " : " + i18n ( " 1:1 " ) ) ;
emit signalXine Status( i18n ( " Aspect Ratio " ) + " : " + i18n ( " 1:1 " ) ) ;
}
void KXineWidget : : slotAspectRatioDVB ( )
{
xine_set_param ( m_xineStream , XINE_PARAM_VO_ASPECT_RATIO , XINE_VO_ASPECT_DVB ) ;
emit signalXine tq Status( i18n ( " Aspect Ratio " ) + " : " + i18n ( " 2.11:1 " ) ) ;
emit signalXine Status( i18n ( " Aspect Ratio " ) + " : " + i18n ( " 2.11:1 " ) ) ;
}
void KXineWidget : : slotZoomOutX ( )
@ -3376,7 +3376,7 @@ void KXineWidget::slotZoomOutX()
{
m_currentZoomX - = 5 ;
xine_set_param ( m_xineStream , XINE_PARAM_VO_ZOOM_X , m_currentZoomX ) ;
emit signalXine tq Status( i18n ( " Zoom X " ) + " : " + TQString : : number ( m_currentZoomX ) + " % " ) ;
emit signalXine Status( i18n ( " Zoom X " ) + " : " + TQString : : number ( m_currentZoomX ) + " % " ) ;
}
}
@ -3386,7 +3386,7 @@ void KXineWidget::slotZoomInX()
{
m_currentZoomX + = 5 ;
xine_set_param ( m_xineStream , XINE_PARAM_VO_ZOOM_X , m_currentZoomX ) ;
emit signalXine tq Status( i18n ( " Zoom X " ) + " : " + TQString : : number ( m_currentZoomX ) + " % " ) ;
emit signalXine Status( i18n ( " Zoom X " ) + " : " + TQString : : number ( m_currentZoomX ) + " % " ) ;
}
}
@ -3396,7 +3396,7 @@ void KXineWidget::slotZoomOutY()
{
m_currentZoomY - = 5 ;
xine_set_param ( m_xineStream , XINE_PARAM_VO_ZOOM_Y , m_currentZoomY ) ;
emit signalXine tq Status( i18n ( " Zoom Y " ) + " : " + TQString : : number ( m_currentZoomY ) + " % " ) ;
emit signalXine Status( i18n ( " Zoom Y " ) + " : " + TQString : : number ( m_currentZoomY ) + " % " ) ;
}
}
@ -3406,7 +3406,7 @@ void KXineWidget::slotZoomInY()
{
m_currentZoomY + = 5 ;
xine_set_param ( m_xineStream , XINE_PARAM_VO_ZOOM_Y , m_currentZoomY ) ;
emit signalXine tq Status( i18n ( " Zoom Y " ) + " : " + TQString : : number ( m_currentZoomY ) + " % " ) ;
emit signalXine Status( i18n ( " Zoom Y " ) + " : " + TQString : : number ( m_currentZoomY ) + " % " ) ;
}
}
@ -3418,7 +3418,7 @@ void KXineWidget::slotZoomOut()
m_currentZoomX = m_currentZoomY = m_currentZoom ;
xine_set_param ( m_xineStream , XINE_PARAM_VO_ZOOM_X , m_currentZoom ) ;
xine_set_param ( m_xineStream , XINE_PARAM_VO_ZOOM_Y , m_currentZoom ) ;
emit signalXine tq Status( i18n ( " Zoom " ) + " : " + TQString : : number ( m_currentZoom ) + " % " ) ;
emit signalXine Status( i18n ( " Zoom " ) + " : " + TQString : : number ( m_currentZoom ) + " % " ) ;
}
}
@ -3430,7 +3430,7 @@ void KXineWidget::slotZoomIn()
m_currentZoomX = m_currentZoomY = m_currentZoom ;
xine_set_param ( m_xineStream , XINE_PARAM_VO_ZOOM_X , m_currentZoom ) ;
xine_set_param ( m_xineStream , XINE_PARAM_VO_ZOOM_Y , m_currentZoom ) ;
emit signalXine tq Status( i18n ( " Zoom " ) + " : " + TQString : : number ( m_currentZoom ) + " % " ) ;
emit signalXine Status( i18n ( " Zoom " ) + " : " + TQString : : number ( m_currentZoom ) + " % " ) ;
}
}
@ -3440,7 +3440,7 @@ void KXineWidget::slotZoomOff()
xine_set_param ( m_xineStream , XINE_PARAM_VO_ZOOM_Y , 100 ) ;
m_currentZoom = 100 ;
m_currentZoomX = m_currentZoomY = m_currentZoom ;
emit signalXine tq Status( i18n ( " Zoom " ) + " : " + TQString : : number ( m_currentZoom ) + " % " ) ;
emit signalXine Status( i18n ( " Zoom " ) + " : " + TQString : : number ( m_currentZoom ) + " % " ) ;
}
TQTime KXineWidget : : getLengthInfo ( )
@ -3513,37 +3513,37 @@ void KXineWidget::getspuOffset(int& spuOffset) const
void KXineWidget : : slotSetHue ( int hue )
{
xine_set_param ( m_xineStream , XINE_PARAM_VO_HUE , hue ) ;
emit signalXine tq Status( i18n ( " Hue " ) + " : " + TQString : : number ( ( hue * 100 ) / 65535 ) + " % " ) ;
emit signalXine Status( i18n ( " Hue " ) + " : " + TQString : : number ( ( hue * 100 ) / 65535 ) + " % " ) ;
}
void KXineWidget : : slotSetSaturation ( int sat )
{
xine_set_param ( m_xineStream , XINE_PARAM_VO_SATURATION , sat ) ;
emit signalXine tq Status( i18n ( " Saturation " ) + " : " + TQString : : number ( ( sat * 100 ) / 65535 ) + " % " ) ;
emit signalXine Status( i18n ( " Saturation " ) + " : " + TQString : : number ( ( sat * 100 ) / 65535 ) + " % " ) ;
}
void KXineWidget : : slotSetContrast ( int contrast )
{
xine_set_param ( m_xineStream , XINE_PARAM_VO_CONTRAST , contrast ) ;
emit signalXine tq Status( i18n ( " Contrast " ) + " : " + TQString : : number ( ( contrast * 100 ) / 65535 ) + " % " ) ;
emit signalXine Status( i18n ( " Contrast " ) + " : " + TQString : : number ( ( contrast * 100 ) / 65535 ) + " % " ) ;
}
void KXineWidget : : slotSetBrightness ( int bright )
{
xine_set_param ( m_xineStream , XINE_PARAM_VO_BRIGHTNESS , bright ) ;
emit signalXine tq Status( i18n ( " Brightness " ) + " : " + TQString : : number ( ( bright * 100 ) / 65535 ) + " % " ) ;
emit signalXine Status( i18n ( " Brightness " ) + " : " + TQString : : number ( ( bright * 100 ) / 65535 ) + " % " ) ;
}
void KXineWidget : : slotSetAVOffset ( int av )
{
xine_set_param ( m_xineStream , XINE_PARAM_AV_OFFSET , av ) ;
emit signalXine tq Status( i18n ( " Audio/Video Offset " ) + " : " + TQString : : number ( av / 90 ) + i18n ( " msec " ) ) ;
emit signalXine Status( i18n ( " Audio/Video Offset " ) + " : " + TQString : : number ( av / 90 ) + i18n ( " msec " ) ) ;
}
void KXineWidget : : slotSetSpuOffset ( int spu )
{
xine_set_param ( m_xineStream , XINE_PARAM_SPU_OFFSET , spu ) ;
emit signalXine tq Status( i18n ( " Subtitle Offset " ) + " : " + TQString : : number ( spu / 90 ) + i18n ( " msec " ) ) ;
emit signalXine Status( i18n ( " Subtitle Offset " ) + " : " + TQString : : number ( spu / 90 ) + i18n ( " msec " ) ) ;
}
@ -3786,7 +3786,7 @@ TQImage KXineWidget::getScreenshot() const
else
height = ( int ) ( ( double ) height / scaleFactor + 0.5 ) ;
debugOut ( TQString ( " Screenshot: scale picture from %1x%2 to %3x%4 " ) . tq arg( screenShot . width ( ) ) . tq arg( screenShot . height ( ) ) . tq arg( width ) . tq arg( height ) ) ;
debugOut ( TQString ( " Screenshot: scale picture from %1x%2 to %3x%4 " ) . arg( screenShot . width ( ) ) . arg( screenShot . height ( ) ) . arg( width ) . arg( height ) ) ;
screenShot = screenShot . smoothScale ( width , height ) ;
delete [ ] rgbPile ;
@ -3849,7 +3849,7 @@ void KXineWidget::getScreenshot(uchar*& rgb32BitData, int& videoWidth, int& vide
break ;
default :
{
warningOut ( TQString ( " Screenshot: Format %1 not supportet! " ) . tq arg( ( char * ) & format ) ) ;
warningOut ( TQString ( " Screenshot: Format %1 not supportet! " ) . arg( ( char * ) & format ) ) ;
delete [ ] yuv ;
return ;
}
@ -3880,7 +3880,7 @@ void KXineWidget::getScreenshot(uchar*& rgb32BitData, int& videoWidth, int& vide
desired_ratio = 4.0 / 3.0 ;
break ;
default :
warningOut ( TQString ( " Screenshot: Unknown aspect ratio: %1 - using 4:3 " ) . tq arg( ratio ) ) ;
warningOut ( TQString ( " Screenshot: Unknown aspect ratio: %1 - using 4:3 " ) . arg( ratio ) ) ;
case XINE_VO_ASPECT_STQUARE :
debugOut ( " Screenshot: got video aspect: 1:1 " ) ;
desired_ratio = image_ratio ;
@ -3888,7 +3888,7 @@ void KXineWidget::getScreenshot(uchar*& rgb32BitData, int& videoWidth, int& vide
}
*/
debugOut ( TQString ( " Screenshot: using scale factor: %1 " ) . tq arg( m_videoAspect ) ) ;
debugOut ( TQString ( " Screenshot: using scale factor: %1 " ) . arg( m_videoAspect ) ) ;
scaleFactor = m_videoAspect ;
delete [ ] yuv ;