initial import
[ICEs.git] / 136309 / ice.ii.6
1 typedef unsigned uint;
2 struct __attribute__((visibility("default"))) QShared {
3 typedef struct __locale_struct {
4 }
5 *__locale_t;
6 };
7 class __attribute__((visibility("default"))) Qt {
8 };
9 extern "C" {
10 __extension__ typedef struct {
11 }
12 __fsid_t;
13 }
14 class __attribute__((visibility("default"))) QObject: public Qt {
15 };
16 class __attribute__((visibility("default"))) QPaintDevice {
17 };
18 class __attribute__((visibility("default"))) QWidget : public QObject, public QPaintDevice {
19 };
20 class __attribute__((visibility("default"))) QThread : public Qt {
21 };
22 class __attribute__((visibility("default"))) QTime {
23 public: QTime() {
24 }
25 QTime addMSecs( int ms ) const;
26 uint ds;
27 };
28 extern "C" {
29 extern "C" {
30 extern "C" {
31 typedef struct {
32 }
33 __sigset_t;
34 struct timespec {
35 };
36 struct timeval {
37 };
38 typedef struct {
39 }
40 fd_set;
41 extern "C" {
42 }
43 __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) throw () {
44 }
45 typedef union {
46 }
47 pthread_attr_t;
48 typedef struct __pthread_internal_slist {
49 }
50 __pthread_slist_t;
51 typedef union {
52 struct __pthread_mutex_s {
53 __extension__ union {
54 };
55 }
56 __data;
57 }
58 pthread_mutexattr_t;
59 typedef union {
60 struct {
61 }
62 __data;
63 }
64 pthread_cond_t;
65 typedef union {
66 }
67 pthread_condattr_t;
68 typedef union {
69 struct {
70 }
71 __data;
72 }
73 pthread_rwlockattr_t;
74 typedef union {
75 }
76 pthread_barrierattr_t;
77 }
78 }
79 extern "C" {
80 extern "C" {
81 typedef struct xine_stream_s xine_stream_t;
82 struct xine_post_s {
83 };
84 struct xine_post_in_s {
85 };
86 typedef struct {
87 }
88 xine_post_api_descr_t;
89 typedef struct {
90 }
91 xine_post_api_t;
92 int xine_get_pos_length (xine_stream_t *stream, int *pos_stream, int *pos_time, int *length_time);
93 typedef struct {
94 }
95 xine_mrl_t;
96 typedef struct {
97 }
98 fb_visual_t;
99 struct xine_health_check_s {
100 };
101 struct xine_cfg_entry_s {
102 };
103 typedef struct {
104 }
105 xine_event_t;
106 typedef struct {
107 }
108 xine_format_change_data_t;
109 typedef struct {
110 }
111 xine_progress_data_t;
112 typedef struct {
113 }
114 xine_set_mpeg_data_t;
115 typedef struct {
116 }
117 xine_dropped_frames_t;
118 typedef enum {
119 XINE_TVSYSTEM_PAL = 0, XINE_TVSYSTEM_NTSC }
120 xine_tvsystem;
121 }
122 }
123 void xine_usec_sleep(unsigned usec);
124 }
125 class KXineWidget : public QWidget, private QThread {
126 QTime getLengthInfo();
127 static QTime msToTime(int msec);
128 xine_stream_t* m_xineStream;
129 };
130 QTime KXineWidget::getLengthInfo() {
131 int pos, time, length;
132 int t = 0, ret = 0;
133 while(((ret = xine_get_pos_length(m_xineStream, &pos, &time, &length)) == 0) && (++t < 5)) xine_usec_sleep(100000);
134 if ( (ret != 0) && (length > 0) ) {
135 return msToTime(length);
136 }
137 }
138 QTime KXineWidget::msToTime(int msec) {
139 QTime t;
140 t = t.addMSecs(msec);
141 return t;
142 }