@ -153,14 +153,14 @@ KXineWidget::~KXineWidget()
{
{
debugOut ( " Unwire audio filters " ) ;
debugOut ( " Unwire audio filters " ) ;
unwireAudioFilters ( ) ;
unwireAudioFilters ( ) ;
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . tq arg( m_visualPluginName ) ) ;
debugOut ( TQString ( " Dispose visual plugin: %1 " ) . arg( m_visualPluginName ) ) ;
delete m_visualPlugin ;
delete m_visualPlugin ;
m_visualPlugin = NULL ;
m_visualPlugin = NULL ;
}
}
# else
# else
if ( m_xinePost )
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 ) ;
m_postAudioSource = xine_get_audio_source ( m_xineStream ) ;
xine_post_wire_audio_port ( m_postAudioSource , m_audioDriver ) ;
xine_post_wire_audio_port ( m_postAudioSource , m_audioDriver ) ;
xine_post_dispose ( m_xineEngine , m_xinePost ) ;
xine_post_dispose ( m_xineEngine , m_xinePost ) ;
@ -279,7 +279,7 @@ void KXineWidget::saveXineConfig()
xine_config_update_entry ( m_xineEngine , & config ) ;
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 ( ) ) ;
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 */
/* frame size changed */
if ( ( video_width ! = vw - > m_videoFrameWidth ) | | ( video_height ! = vw - > m_videoFrameHeight ) )
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_videoFrameWidth = video_width ;
vw - > m_videoFrameHeight = video_height ;
vw - > m_videoFrameHeight = video_height ;
vw - > m_videoAspect = video_aspect ;
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 ) ;
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,
/* we should not do a resize() inside a xine thread,
but post an event to the main 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 ) ;
channels = xine_get_stream_info ( vw - > m_xineStream , XINE_STREAM_INFO_MAX_AUDIO_CHANNEL ) ;
for ( i = 0 ; i < channels ; i + + )
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 ) )
if ( xine_get_audio_lang ( vw - > m_xineStream , i , lang ) )
slang + = lang ;
slang + = lang ;
tmp < < slang ;
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 ) ;
channels = xine_get_stream_info ( vw - > m_xineStream , XINE_STREAM_INFO_MAX_SPU_CHANNEL ) ;
for ( i = 0 ; i < channels ; i + + )
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 ) )
if ( xine_get_spu_lang ( vw - > m_xineStream , i , lang ) )
slang + = lang ;
slang + = lang ;
tmp < < slang ;
tmp < < slang ;
@ -472,7 +472,7 @@ void KXineWidget::xineEventListener(void *p, const xine_event_t* xineEvent)
debugOut ( " xine event: dropped frames " ) ;
debugOut ( " xine event: dropped frames " ) ;
xine_dropped_frames_t * dropped = ( xine_dropped_frames_t * ) xineEvent - > data ;
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 ;
break ;
}
}
@ -752,7 +752,7 @@ void KXineWidget::timerEvent( TQTimerEvent* tevent )
else
else
{
{
//restart
//restart
warningOut ( TQString ( " Message: '%1' was blocked! " ) . tq arg( m_xineMessage ) ) ;
warningOut ( TQString ( " Message: '%1' was blocked! " ) . arg( m_xineMessage ) ) ;
m_recentMessagesTimer . start ( 1500 ) ;
m_recentMessagesTimer . start ( 1500 ) ;
}
}
break ;
break ;
@ -795,7 +795,7 @@ void KXineWidget::videoDriverChangedCallback(void* p, xine_cfg_entry_t* entry)
int pos , time , length ;
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 )
if ( vw - > m_osd )
{
{
@ -835,7 +835,7 @@ void KXineWidget::videoDriverChangedCallback(void* p, xine_cfg_entry_t* entry)
vw - > unwireAudioFilters ( ) ;
vw - > unwireAudioFilters ( ) ;
if ( vw - > m_visualPlugin )
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 ;
delete vw - > m_visualPlugin ;
vw - > m_visualPlugin = NULL ;
vw - > m_visualPlugin = NULL ;
}
}
@ -855,7 +855,7 @@ void KXineWidget::videoDriverChangedCallback(void* p, xine_cfg_entry_t* entry)
if ( ! vw - > m_videoDriver )
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 ) ) ;
TQApplication : : postEvent ( vw , new TQTimerEvent ( TIMER_EVENT_NEW_XINE_ERROR ) ) ;
playing = false ;
playing = false ;
vw - > m_videoDriver = xine_open_video_driver ( vw - > m_xineEngine ,
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
else
{
{
vw - > m_videoDriverName = entry - > enum_values [ entry - > num_value ] ;
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 ) ) ;
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 ;
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 )
if ( vw - > m_osd )
{
{
@ -931,7 +931,7 @@ void KXineWidget::audioDriverChangedCallback(void* p, xine_cfg_entry_t* entry)
vw - > unwireAudioFilters ( ) ;
vw - > unwireAudioFilters ( ) ;
if ( vw - > m_visualPlugin )
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 ;
delete vw - > m_visualPlugin ;
vw - > m_visualPlugin = NULL ;
vw - > m_visualPlugin = NULL ;
}
}
@ -945,7 +945,7 @@ void KXineWidget::audioDriverChangedCallback(void* p, xine_cfg_entry_t* entry)
if ( ! vw - > m_audioDriver )
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 ) ) ;
TQApplication : : postEvent ( vw , new TQTimerEvent ( TIMER_EVENT_NEW_XINE_ERROR ) ) ;
playing = false ;
playing = false ;
vw - > m_audioDriver = xine_open_audio_driver ( vw - > m_xineEngine , vw - > m_audioDriverName . ascii ( ) , NULL ) ;
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
else
{
{
vw - > m_audioDriverName = entry - > enum_values [ entry - > num_value ] ;
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 ) ) ;
TQApplication : : postEvent ( vw , new TQTimerEvent ( TIMER_EVENT_NEW_STATUS ) ) ;
}
}
@ -1148,18 +1148,18 @@ bool KXineWidget::initXine()
int count = 1 ;
int count = 1 ;
debugOut ( " Xinerama extension present " ) ;
debugOut ( " Xinerama extension present " ) ;
XineramaQueryScreens ( x11Display ( ) , & count ) ;
XineramaQueryScreens ( x11Display ( ) , & count ) ;
debugOut ( TQString ( " %1 screens detected " ) . tq arg( count ) ) ;
debugOut ( TQString ( " %1 screens detected " ) . arg( count ) ) ;
if ( count > 1 )
if ( count > 1 )
// multihead -> assuming square pixels
// multihead -> assuming square pixels
m_displayRatio = 1.0 ;
m_displayRatio = 1.0 ;
}
}
# endif
# 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 ****/
/**** 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 ( ) ;
m_xineEngine = xine_new ( ) ;
if ( ! m_xineEngine )
if ( ! m_xineEngine )
@ -1209,7 +1209,7 @@ bool KXineWidget::initXine()
else
else
m_audioDriverName = m_audioChoices [ i ] ;
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 ) ;
drivers = xine_list_video_output_plugins ( m_xineEngine ) ;
i = 0 ;
i = 0 ;
@ -1235,7 +1235,7 @@ bool KXineWidget::initXine()
else
else
m_videoDriverName = m_videoChoices [ i ] ;
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_mixerInfo = strdup ( i18n ( " Use software audio mixer " ) . local8Bit ( ) ) ;
m_softwareMixer = ( bool ) xine_config_register_bool ( m_xineEngine , " audio.mixer_software " , 1 , m_mixerInfo ,
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 " )
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_videoDriverName = " auto " ;
m_videoDriver = xine_open_video_driver ( m_xineEngine ,
m_videoDriver = xine_open_video_driver ( m_xineEngine ,
# ifndef HAVE_XCB
# ifndef HAVE_XCB
@ -1331,7 +1331,7 @@ bool KXineWidget::initXine()
if ( ! m_audioDriver & & m_audioDriverName ! = " auto " )
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_audioDriverName = " auto " ;
m_audioDriver = xine_open_audio_driver ( m_xineEngine , m_audioDriverName . ascii ( ) , NULL ) ;
m_audioDriver = xine_open_audio_driver ( m_xineEngine , m_audioDriverName . ascii ( ) , NULL ) ;
}
}
@ -1395,12 +1395,12 @@ void KXineWidget::initOSD()
{
{
if ( ! xine_osd_set_font ( m_osd , m_osdFont , fontsizetable [ m_osdSize ] ) )
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 ) ;
free ( m_osdFont ) ;
m_osdFont = strdup ( " sans " ) ;
m_osdFont = strdup ( " sans " ) ;
xine_osd_set_font ( m_osd , m_osdFont , fontsizetable [ m_osdSize ] ) ;
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 ) ;
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 ) ;
m_osdUnscaled = ( xine_osd_get_capabilities ( m_osd ) & XINE_OSD_CAP_UNSCALED ) ;
if ( m_osdUnscaled )
if ( m_osdUnscaled )
@ -1428,7 +1428,7 @@ bool KXineWidget::playDvb()
{
{
if ( ! m_visualPlugin )
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 ) ;
m_visualPlugin = new PostFilter ( m_visualPluginName , m_xineEngine , m_audioDriver , m_videoDriver , NULL ) ;
}
}
@ -1438,7 +1438,7 @@ bool KXineWidget::playDvb()
{
{
if ( m_visualPlugin )
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 ;
delete m_visualPlugin ;
m_visualPlugin = NULL ;
m_visualPlugin = NULL ;
}
}
@ -1978,7 +1978,7 @@ void KXineWidget::slotPlay()
if ( turl . startsWith ( " / " ) )
if ( turl . startsWith ( " / " ) )
turl . prepend ( " file:// " ) ;
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 ) ;
xine_set_param ( m_xineStream , XINE_PARAM_METRONOM_PREBUFFER , 12000 ) ;
if ( ! xine_open ( m_xineStream , TQFile : : encodeName ( turl ) ) ) {
if ( ! xine_open ( m_xineStream , TQFile : : encodeName ( turl ) ) ) {
@ -2002,7 +2002,7 @@ void KXineWidget::slotPlay()
{
{
if ( m_visualPluginName & & ( ! m_xinePost ) )
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_xinePost = xine_post_init ( m_xineEngine , m_visualPluginName , 0 ,
& m_audioDriver ,
& m_audioDriver ,
& m_videoDriver ) ;
& m_videoDriver ) ;
@ -2016,7 +2016,7 @@ void KXineWidget::slotPlay()
{
{
if ( m_xinePost )
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 ) ;
m_postAudioSource = xine_get_audio_source ( m_xineStream ) ;
xine_post_wire_audio_port ( m_postAudioSource , m_audioDriver ) ;
xine_post_wire_audio_port ( m_postAudioSource , m_audioDriver ) ;
xine_post_dispose ( m_xineEngine , m_xinePost ) ;
xine_post_dispose ( m_xineEngine , m_xinePost ) ;
@ -2248,7 +2248,7 @@ void KXineWidget::sendXineError()
else
else
{
{
errorOut ( error ) ;
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 ( ) ) ) ;
TQTimer : : singleShot ( 0 , this , TQT_SLOT ( slotPlay ( ) ) ) ;
}
}
}
}
@ -2290,7 +2290,7 @@ void KXineWidget::showOSDMessage(const TQString& message, uint duration, int pri
return ;
return ;
prevOsdPriority = priority ;
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_clear ( m_osd ) ;
xine_osd_draw_text ( m_osd , 0 , 0 , message . local8Bit ( ) , XINE_OSD_TEXT1 ) ;
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 ( ) ;
wireVideoFilters ( ) ;
# else
# else
parent = parent ;
parent = parent ;
warningOut ( TQString ( " Not implemented [CreateVideoFilter %1] " ) . tq arg( name ) ) ;
warningOut ( TQString ( " Not implemented [CreateVideoFilter %1] " ) . arg( name ) ) ;
# endif
# endif
}
}
@ -2364,7 +2364,7 @@ void KXineWidget::slotCreateAudioFilter(const TQString& name, TQWidget* parent)
wireAudioFilters ( ) ;
wireAudioFilters ( ) ;
# else
# else
parent = parent ;
parent = parent ;
warningOut ( TQString ( " Not implemented [CreateAudioFilter %1] " ) . tq arg( name ) ) ;
warningOut ( TQString ( " Not implemented [CreateAudioFilter %1] " ) . arg( name ) ) ;
# endif
# endif
}
}
@ -2478,7 +2478,7 @@ void KXineWidget::wireAudioFilters()
{
{
if ( ! m_visualPlugin )
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 ) ;
m_visualPlugin = new PostFilter ( m_visualPluginName , m_xineEngine , m_audioDriver , m_videoDriver , NULL ) ;
}
}
@ -2488,7 +2488,7 @@ void KXineWidget::wireAudioFilters()
{
{
if ( m_visualPlugin )
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 ;
delete m_visualPlugin ;
m_visualPlugin = NULL ;
m_visualPlugin = NULL ;
}
}
@ -2571,7 +2571,7 @@ TQStringList KXineWidget::getVisualPlugins() const
void KXineWidget : : slotSetVisualPlugin ( const TQString & visual )
void KXineWidget : : slotSetVisualPlugin ( const TQString & visual )
{
{
if ( m_visualPluginName = = visual ) return ;
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
# ifndef USE_TQT_ONLY
unwireAudioFilters ( ) ;
unwireAudioFilters ( ) ;
@ -2660,7 +2660,7 @@ void KXineWidget::slotSetVolume(int vol)
if ( ! isXineReady ( ) ) return ;
if ( ! isXineReady ( ) ) return ;
if ( m_softwareMixer )
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 )
if ( m_volumeGain )
xine_set_param ( m_xineStream , XINE_PARAM_AUDIO_AMP_LEVEL , vol * 2 ) ;
xine_set_param ( m_xineStream , XINE_PARAM_AUDIO_AMP_LEVEL , vol * 2 ) ;
else
else
@ -2668,7 +2668,7 @@ void KXineWidget::slotSetVolume(int vol)
}
}
else
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 ) ;
xine_set_param ( m_xineStream , XINE_PARAM_AUDIO_VOLUME , vol ) ;
}
}
emit signalXineStatus ( i18n ( " Volume " ) + " : " + TQString : : number ( vol ) + " % " ) ;
emit signalXineStatus ( i18n ( " Volume " ) + " : " + TQString : : number ( vol ) + " % " ) ;
@ -2872,7 +2872,7 @@ void KXineWidget::slotStop()
void KXineWidget : : slotSetAudiocdDevice ( const TQString & device )
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_cfg_entry_t config ;
xine_config_lookup_entry ( m_xineEngine , " input.cdda_device " , & 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 )
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_cfg_entry_t config ;
xine_config_lookup_entry ( m_xineEngine , " input.vcd_device " , & 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 )
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_cfg_entry_t config ;
xine_config_lookup_entry ( m_xineEngine , " input.dvd_device " , & 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 */
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 ( ) ;
config . str_value = TQFile : : encodeName ( dir ) . data ( ) ;
xine_config_update_entry ( m_xineEngine , & config ) ;
xine_config_update_entry ( m_xineEngine , & config ) ;
}
}
@ -2982,7 +2982,7 @@ const TQString KXineWidget::getStreamSaveDir()
void KXineWidget : : setBroadcasterPort ( const uint port )
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 ) ;
xine_set_param ( m_xineStream , XINE_PARAM_BROADCASTER_PORT , port ) ;
}
}
@ -3018,7 +3018,7 @@ void KXineWidget::slotSpeedFaster()
{
{
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_FAST_4 ) ;
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_FAST_4 ) ;
m_currentSpeed = Fast2 ;
m_currentSpeed = Fast2 ;
emit signalXineStatus ( i18n ( " Fast Forward %1 " ) . tq arg( " x2 " ) ) ;
emit signalXineStatus ( i18n ( " Fast Forward %1 " ) . arg( " x2 " ) ) ;
break ;
break ;
}
}
case Fast2 :
case Fast2 :
@ -3035,14 +3035,14 @@ void KXineWidget::slotSpeedFaster()
{
{
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_SLOW_2 ) ;
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_SLOW_2 ) ;
m_currentSpeed = Slow1 ;
m_currentSpeed = Slow1 ;
emit signalXineStatus ( i18n ( " Slow Motion %1 " ) . tq arg( " x1 " ) ) ;
emit signalXineStatus ( i18n ( " Slow Motion %1 " ) . arg( " x1 " ) ) ;
break ;
break ;
}
}
default :
default :
{
{
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_FAST_2 ) ;
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_FAST_2 ) ;
m_currentSpeed = Fast1 ;
m_currentSpeed = Fast1 ;
emit signalXineStatus ( i18n ( " Fast Forward %1 " ) . tq arg( " x1 " ) ) ;
emit signalXineStatus ( i18n ( " Fast Forward %1 " ) . arg( " x1 " ) ) ;
break ;
break ;
}
}
}
}
@ -3056,7 +3056,7 @@ void KXineWidget::slotSpeedSlower()
{
{
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_SLOW_4 ) ;
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_SLOW_4 ) ;
m_currentSpeed = Slow2 ;
m_currentSpeed = Slow2 ;
emit signalXineStatus ( i18n ( " Slow Motion %1 " ) . tq arg( " x2 " ) ) ;
emit signalXineStatus ( i18n ( " Slow Motion %1 " ) . arg( " x2 " ) ) ;
break ;
break ;
}
}
case Slow2 :
case Slow2 :
@ -3073,14 +3073,14 @@ void KXineWidget::slotSpeedSlower()
{
{
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_FAST_2 ) ;
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_FAST_2 ) ;
m_currentSpeed = Fast1 ;
m_currentSpeed = Fast1 ;
emit signalXineStatus ( i18n ( " Fast Forward %1 " ) . tq arg( " x1 " ) ) ;
emit signalXineStatus ( i18n ( " Fast Forward %1 " ) . arg( " x1 " ) ) ;
break ;
break ;
}
}
default :
default :
{
{
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_SLOW_2 ) ;
xine_set_param ( m_xineStream , XINE_PARAM_SPEED , XINE_SPEED_SLOW_2 ) ;
m_currentSpeed = Slow1 ;
m_currentSpeed = Slow1 ;
emit signalXineStatus ( i18n ( " Slow Motion %1 " ) . tq arg( " x1 " ) ) ;
emit signalXineStatus ( i18n ( " Slow Motion %1 " ) . arg( " x1 " ) ) ;
break ;
break ;
}
}
}
}
@ -3093,14 +3093,14 @@ TQString KXineWidget::getSupportedExtensions() const
void KXineWidget : : slotSetAudioChannel ( int ch )
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 ) ;
xine_set_param ( m_xineStream , XINE_PARAM_AUDIO_CHANNEL_LOGICAL , ch - 1 ) ;
}
}
void KXineWidget : : slotSetSubtitleChannel ( int ch )
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 ) ;
xine_set_param ( m_xineStream , XINE_PARAM_SPU_CHANNEL , ch - 1 ) ;
}
}
@ -3306,7 +3306,7 @@ void KXineWidget::slotSetDeinterlaceConfig(const TQString& config)
if ( m_deinterlaceFilter )
if ( m_deinterlaceFilter )
m_deinterlaceFilter - > setConfig ( config ) ;
m_deinterlaceFilter - > setConfig ( config ) ;
# else
# else
warningOut ( TQString ( " Not implemented [SetDeinterlaceConfig %1] " ) . tq arg( config ) ) ;
warningOut ( TQString ( " Not implemented [SetDeinterlaceConfig %1] " ) . arg( config ) ) ;
# endif
# endif
}
}
@ -3318,7 +3318,7 @@ void KXineWidget::slotToggleDeinterlace()
if ( m_deinterlaceFilter )
if ( m_deinterlaceFilter )
{
{
m_deinterlaceEnabled = ! m_deinterlaceEnabled ;
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 " ) ;
if ( m_deinterlaceEnabled ) s = i18n ( " Deinterlace: on " ) ;
else s = i18n ( " Deinterlace: off " ) ;
else s = i18n ( " Deinterlace: off " ) ;
showOSDMessage ( s , 2000 ) ;
showOSDMessage ( s , 2000 ) ;
@ -3786,7 +3786,7 @@ TQImage KXineWidget::getScreenshot() const
else
else
height = ( int ) ( ( double ) height / scaleFactor + 0.5 ) ;
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 ) ;
screenShot = screenShot . smoothScale ( width , height ) ;
delete [ ] rgbPile ;
delete [ ] rgbPile ;
@ -3849,7 +3849,7 @@ void KXineWidget::getScreenshot(uchar*& rgb32BitData, int& videoWidth, int& vide
break ;
break ;
default :
default :
{
{
warningOut ( TQString ( " Screenshot: Format %1 not supportet! " ) . tq arg( ( char * ) & format ) ) ;
warningOut ( TQString ( " Screenshot: Format %1 not supportet! " ) . arg( ( char * ) & format ) ) ;
delete [ ] yuv ;
delete [ ] yuv ;
return ;
return ;
}
}
@ -3880,7 +3880,7 @@ void KXineWidget::getScreenshot(uchar*& rgb32BitData, int& videoWidth, int& vide
desired_ratio = 4.0 / 3.0 ;
desired_ratio = 4.0 / 3.0 ;
break ;
break ;
default :
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 :
case XINE_VO_ASPECT_STQUARE :
debugOut ( " Screenshot: got video aspect: 1:1 " ) ;
debugOut ( " Screenshot: got video aspect: 1:1 " ) ;
desired_ratio = image_ratio ;
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 ;
scaleFactor = m_videoAspect ;
delete [ ] yuv ;
delete [ ] yuv ;