5 class QObject: public Qt {
9 class QWidget : public QObject, public QPaintDevice {
11 class QThread : public Qt {
16 QTime addMSecs( int ms ) const;
23 struct __pthread_mutex_s {
30 pthread_barrierattr_t;
35 typedef struct xine_stream_s xine_stream_t;
39 int xine_get_pos_length (xine_stream_t *stream, int *pos_stream, int *pos_time, int *length_time);
42 void xine_usec_sleep(unsigned usec);
44 class KXineWidget : public QWidget, private QThread {
45 QTime getLengthInfo();
46 static QTime msToTime(int msec);
47 xine_stream_t* m_xineStream;
49 QTime KXineWidget::getLengthInfo() {
50 int pos, time, length;
52 while(((ret = xine_get_pos_length(m_xineStream, &pos, &time, &length)) == 0) && (++t < 5)) xine_usec_sleep(100000);
53 if ( (ret != 0) && (length > 0) ) {
54 return msToTime(length);
57 QTime KXineWidget::msToTime(int msec) {