Fixed FTBFS with xine 1.2.10. The use of the xine scope plugin is currently

disabled when xine >= 1.2.10 is detected.

Additional info:
The xine scope plugin is statically linked and therefore written by
accessing internal xine data that are no longer publicly available from
xine 1.2.10.
To add back the scope plugin functionality, the plugin will have to be
converted into a dynamically linked one and further work done to fix the
logic of the plugin itself.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 4 years ago
parent 088b37ef3c
commit b51af279c4
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -146,16 +146,19 @@ VideoWindow::init()
xine_osd_set_text_palette( m_osd, XINE_TEXTPALETTE_WHITE_BLACK_TRANSPARENT, XINE_OSD_TEXT1 );
}
#ifndef XINE_SAFE_MODE
#ifndef XINE_SAFE_MODE
#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) || \
(XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION == 2 && XINE_SUB_VERSION < 10)
debug() << "scope_plugin_new()\n";
m_scope = scope_plugin_new( m_xine, m_audioPort );
#endif
//FIXME this one seems to make seeking unstable for Codeine, perhaps
xine_set_param( m_stream, XINE_PARAM_METRONOM_PREBUFFER, 6000 ); //less buffering, faster seeking..
// causes an abort currently
//xine_trick_mode( m_stream, XINE_TRICK_MODE_SEEK_TO_TIME, 1 );
#endif
#endif
{
@ -266,11 +269,14 @@ VideoWindow::load( const KURL &url )
// FIXME leaves one erroneous buffer
timerEvent( 0 );
#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) || \
(XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION == 2 && XINE_SUB_VERSION < 10)
if( m_scope ) {
xine_post_out_t *source = xine_get_audio_source( m_stream );
xine_post_in_t *target = (xine_post_in_t*)xine_post_input( m_scope, const_cast<char*>("audio in") );
xine_post_wire( source, target );
}
#endif
#endif
announceStateChange();
@ -572,6 +578,8 @@ VideoWindow::scope()
if( xine_get_status( m_stream ) != XINE_STATUS_PLAY )
return scope;
#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) || \
(XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION == 2 && XINE_SUB_VERSION < 10)
//prune the buffer list and update the m_current_vpts timestamp
timerEvent( 0 );
@ -618,6 +626,7 @@ VideoWindow::scope()
m_current_vpts = best_node->vpts_end;
m_current_vpts++; //FIXME needs to be done for some reason, or you get situations where it uses same buffer again and again
}
#endif
return scope;
}
@ -625,6 +634,8 @@ VideoWindow::scope()
void
VideoWindow::timerEvent( TQTimerEvent* )
{
#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) || \
(XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION == 2 && XINE_SUB_VERSION < 10)
/// here we prune the buffer list regularly
#ifndef XINE_SAFE_MODE
MyNode * const first_node = myList->next;
@ -650,6 +661,7 @@ VideoWindow::timerEvent( TQTimerEvent* )
prev = node;
}
#endif
#endif
}
void

@ -61,6 +61,8 @@ scope_port_close( xine_audio_port_t *port_gen, xine_stream_t *stream )
static void
scope_port_put_buffer( xine_audio_port_t *port_gen, audio_buffer_t *buf, xine_stream_t *stream )
{
#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) || \
(XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION == 2 && XINE_SUB_VERSION < 10)
MyNode *new_node;
const int num_samples = buf->num_frames * myChannels;
@ -95,6 +97,7 @@ scope_port_put_buffer( xine_audio_port_t *port_gen, audio_buffer_t *buf, xine_st
* NOTE this is thread-safe due to the way we handle the list in the GUI thread */
new_node->next = myList->next;
myList->next = new_node;
#endif
#undef port
}
@ -137,12 +140,15 @@ scope_plugin_new( xine_t *xine, xine_audio_port_t *audio_target )
this->dispose = scope_dispose;
}
#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) || \
(XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION == 2 && XINE_SUB_VERSION < 10)
/* code is straight from xine_init_post()
can't use that function as it only dlopens the plugins
and our plugin is statically linked in */
post_plugin->running_ticket = xine->port_ticket;
post_plugin->xine = xine;
#endif
return &post_plugin->xine_post;
}

Loading…
Cancel
Save