]> git.wh0rd.org - ICEs.git/blob - 136309/ice.ii.8
initial import
[ICEs.git] / 136309 / ice.ii.8
1 struct __attribute__((visibility("default"))) QShared {
2 typedef struct __locale_struct {
3 }
4 *__locale_t;
5 };
6 class __attribute__((visibility("default"))) Qt {
7 };
8 extern "C" {
9 __extension__ typedef struct {
10 }
11 __fsid_t;
12 }
13 class __attribute__((visibility("default"))) QObject: public Qt {
14 };
15 class __attribute__((visibility("default"))) QPaintDevice {
16 };
17 class __attribute__((visibility("default"))) QWidget : public QObject, public QPaintDevice {
18 };
19 class __attribute__((visibility("default"))) QThread : public Qt {
20 };
21 class __attribute__((visibility("default"))) QTime {
22 public: QTime() {
23 }
24 QTime addMSecs( int ms ) const;
25 unsigned ds;
26 };
27 extern "C" {
28 extern "C" {
29 extern "C" {
30 typedef union {
31 }
32 pthread_attr_t;
33 typedef struct __pthread_internal_slist {
34 }
35 __pthread_slist_t;
36 typedef union {
37 struct __pthread_mutex_s {
38 __extension__ union {
39 };
40 }
41 __data;
42 }
43 pthread_mutexattr_t;
44 typedef union {
45 }
46 pthread_rwlockattr_t;
47 typedef union {
48 }
49 pthread_barrierattr_t;
50 }
51 }
52 extern "C" {
53 extern "C" {
54 typedef struct xine_stream_s xine_stream_t;
55 struct xine_post_s {
56 }
57 xine_post_api_t;
58 int xine_get_pos_length (xine_stream_t *stream, int *pos_stream, int *pos_time, int *length_time);
59 typedef struct {
60 }
61 xine_mrl_t;
62 typedef struct {
63 }
64 xine_dropped_frames_t;
65 typedef enum {
66 XINE_TVSYSTEM_PAL = 0, XINE_TVSYSTEM_NTSC }
67 xine_tvsystem;
68 }
69 }
70 void xine_usec_sleep(unsigned usec);
71 }
72 class KXineWidget : public QWidget, private QThread {
73 QTime getLengthInfo();
74 static QTime msToTime(int msec);
75 xine_stream_t* m_xineStream;
76 };
77 QTime KXineWidget::getLengthInfo() {
78 int pos, time, length;
79 int t = 0, ret = 0;
80 while(((ret = xine_get_pos_length(m_xineStream, &pos, &time, &length)) == 0) && (++t < 5)) xine_usec_sleep(100000);
81 if ( (ret != 0) && (length > 0) ) {
82 return msToTime(length);
83 }
84 }
85 QTime KXineWidget::msToTime(int msec) {
86 QTime t;
87 t = t.addMSecs(msec);
88 return t;
89 }