]> git.wh0rd.org - ICEs.git/blob - 136309/ice.ii.9
initial import
[ICEs.git] / 136309 / ice.ii.9
1 class Qt {
2 };
3 extern "C" {
4 }
5 class QObject: public Qt {
6 };
7 class QPaintDevice {
8 };
9 class QWidget : public QObject, public QPaintDevice {
10 };
11 class QThread : public Qt {
12 };
13 class QTime {
14 public: QTime() {
15 }
16 QTime addMSecs( int ms ) const;
17 unsigned ds;
18 };
19 extern "C" {
20 extern "C" {
21 extern "C" {
22 typedef union {
23 struct __pthread_mutex_s {
24 }
25 __data;
26 }
27 pthread_rwlockattr_t;
28 typedef union {
29 }
30 pthread_barrierattr_t;
31 }
32 }
33 extern "C" {
34 extern "C" {
35 typedef struct xine_stream_s xine_stream_t;
36 struct xine_post_s {
37 }
38 xine_post_api_t;
39 int xine_get_pos_length (xine_stream_t *stream, int *pos_stream, int *pos_time, int *length_time);
40 }
41 }
42 void xine_usec_sleep(unsigned usec);
43 }
44 class KXineWidget : public QWidget, private QThread {
45 QTime getLengthInfo();
46 static QTime msToTime(int msec);
47 xine_stream_t* m_xineStream;
48 };
49 QTime KXineWidget::getLengthInfo() {
50 int pos, time, length;
51 int t = 0, ret = 0;
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);
55 }
56 }
57 QTime KXineWidget::msToTime(int msec) {
58 QTime t;
59 t = t.addMSecs(msec);
60 return t;
61 }