author | harlekin <harlekin> | 2002-08-18 23:15:50 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-18 23:15:50 (UTC) |
commit | d92fbca743e676182a8f33ae4c28044031143fb0 (patch) (unidiff) | |
tree | 557b19a000a897e46ed1a8e18a4fdd41aa199e0d /noncore/multimedia/opieplayer2/lib.cpp | |
parent | bec883a38720a1e1a975e5474a3085d149cf935c (diff) | |
download | opie-d92fbca743e676182a8f33ae4c28044031143fb0.zip opie-d92fbca743e676182a8f33ae4c28044031143fb0.tar.gz opie-d92fbca743e676182a8f33ae4c28044031143fb0.tar.bz2 |
small fixes regarding shoutcast, but for now user need to have http:// anything / as shoutcast url
Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index 39364ab..3a82a50 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp | |||
@@ -120,98 +120,98 @@ Lib::Lib(XineVideoWidget* widget) { | |||
120 | } | 120 | } |
121 | null_display_handler( m_videoOutput, | 121 | null_display_handler( m_videoOutput, |
122 | xine_display_frame, | 122 | xine_display_frame, |
123 | this ); | 123 | this ); |
124 | 124 | ||
125 | m_xine = xine_init( m_videoOutput, | 125 | m_xine = xine_init( m_videoOutput, |
126 | m_audioOutput, m_config ); | 126 | m_audioOutput, m_config ); |
127 | // install the event handler | 127 | // install the event handler |
128 | xine_register_event_listener( m_xine, xine_event_handler, this ); | 128 | xine_register_event_listener( m_xine, xine_event_handler, this ); |
129 | } | 129 | } |
130 | 130 | ||
131 | Lib::~Lib() { | 131 | Lib::~Lib() { |
132 | delete m_config; | 132 | delete m_config; |
133 | xine_remove_event_listener( m_xine, xine_event_handler ); | 133 | xine_remove_event_listener( m_xine, xine_event_handler ); |
134 | xine_exit( m_xine ); | 134 | xine_exit( m_xine ); |
135 | delete m_videoOutput; | 135 | delete m_videoOutput; |
136 | //delete m_audioOutput; | 136 | //delete m_audioOutput; |
137 | 137 | ||
138 | } | 138 | } |
139 | 139 | ||
140 | void Lib::resize ( const QSize &s ) | 140 | void Lib::resize ( const QSize &s ) |
141 | { | 141 | { |
142 | if ( s. width ( ) && s. height ( )) { | 142 | if ( s. width ( ) && s. height ( )) { |
143 | ::null_set_gui_width( m_videoOutput, s. width() ); | 143 | ::null_set_gui_width( m_videoOutput, s. width() ); |
144 | ::null_set_gui_height(m_videoOutput, s. height() ); | 144 | ::null_set_gui_height(m_videoOutput, s. height() ); |
145 | } | 145 | } |
146 | } | 146 | } |
147 | 147 | ||
148 | QCString Lib::version() { | 148 | QCString Lib::version() { |
149 | QCString str( xine_get_str_version() ); | 149 | QCString str( xine_get_str_version() ); |
150 | return str; | 150 | return str; |
151 | }; | 151 | }; |
152 | 152 | ||
153 | int Lib::majorVersion() { | 153 | int Lib::majorVersion() { |
154 | return xine_get_major_version(); | 154 | return xine_get_major_version(); |
155 | } | 155 | } |
156 | int Lib::minorVersion() { | 156 | int Lib::minorVersion() { |
157 | return xine_get_minor_version(); | 157 | return xine_get_minor_version(); |
158 | }; | 158 | }; |
159 | 159 | ||
160 | int Lib::subVersion() { | 160 | int Lib::subVersion() { |
161 | return xine_get_sub_version(); | 161 | return xine_get_sub_version(); |
162 | } | 162 | } |
163 | int Lib::play( const QString& fileName, | 163 | int Lib::play( const QString& fileName, |
164 | int startPos, | 164 | int startPos, |
165 | int start_time ) { | 165 | int start_time ) { |
166 | QString str = fileName.stripWhiteSpace(); | 166 | QString str = fileName.stripWhiteSpace(); |
167 | //workaround OpiePlayer bug | 167 | //workaround OpiePlayer bug |
168 | if (str.right(1) == QString::fromLatin1("/") ) | 168 | //f (str.right(1) == QString::fromLatin1("/") ) |
169 | str = str.mid( str.length() -1 ); | 169 | // str = str.mid( str.length() -1 ); |
170 | return xine_play( m_xine, QFile::encodeName(str.utf8() ).data(), | 170 | return xine_play( m_xine, QFile::encodeName(str.utf8() ).data(), |
171 | startPos, start_time); | 171 | startPos, start_time); |
172 | } | 172 | } |
173 | void Lib::stop() { | 173 | void Lib::stop() { |
174 | qDebug("<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>"); | 174 | qDebug("<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>"); |
175 | xine_stop(m_xine ); | 175 | xine_stop(m_xine ); |
176 | } | 176 | } |
177 | void Lib::pause(){ | 177 | void Lib::pause(){ |
178 | xine_set_speed( m_xine, SPEED_PAUSE ); | 178 | xine_set_speed( m_xine, SPEED_PAUSE ); |
179 | } | 179 | } |
180 | int Lib::speed() { | 180 | int Lib::speed() { |
181 | return xine_get_speed( m_xine ); | 181 | return xine_get_speed( m_xine ); |
182 | } | 182 | } |
183 | void Lib::setSpeed( int speed ) { | 183 | void Lib::setSpeed( int speed ) { |
184 | xine_set_speed( m_xine, speed ); | 184 | xine_set_speed( m_xine, speed ); |
185 | } | 185 | } |
186 | int Lib::status(){ | 186 | int Lib::status(){ |
187 | return xine_get_status( m_xine ); | 187 | return xine_get_status( m_xine ); |
188 | } | 188 | } |
189 | int Lib::currentPosition(){ | 189 | int Lib::currentPosition(){ |
190 | return xine_get_current_position( m_xine ); | 190 | return xine_get_current_position( m_xine ); |
191 | } | 191 | } |
192 | int Lib::currentTime() { | 192 | int Lib::currentTime() { |
193 | return xine_get_current_time( m_xine ); | 193 | return xine_get_current_time( m_xine ); |
194 | }; | 194 | }; |
195 | int Lib::length() { | 195 | int Lib::length() { |
196 | return xine_get_stream_length( m_xine ); | 196 | return xine_get_stream_length( m_xine ); |
197 | } | 197 | } |
198 | bool Lib::isSeekable() { | 198 | bool Lib::isSeekable() { |
199 | return xine_is_stream_seekable(m_xine); | 199 | return xine_is_stream_seekable(m_xine); |
200 | } | 200 | } |
201 | Frame Lib::currentFrame() { | 201 | Frame Lib::currentFrame() { |
202 | Frame frame; | 202 | Frame frame; |
203 | return frame; | 203 | return frame; |
204 | }; | 204 | }; |
205 | int Lib::error() { | 205 | int Lib::error() { |
206 | return xine_get_error( m_xine ); | 206 | return xine_get_error( m_xine ); |
207 | }; | 207 | }; |
208 | void Lib::handleXineEvent( xine_event_t* t ) { | 208 | void Lib::handleXineEvent( xine_event_t* t ) { |
209 | if ( t->type == XINE_EVENT_PLAYBACK_FINISHED ) | 209 | if ( t->type == XINE_EVENT_PLAYBACK_FINISHED ) |
210 | emit stopped(); | 210 | emit stopped(); |
211 | } | 211 | } |
212 | void Lib::setShowVideo( bool video ) { | 212 | void Lib::setShowVideo( bool video ) { |
213 | m_video = video; | 213 | m_video = video; |
214 | ::null_set_show_video( m_videoOutput, video ); | 214 | ::null_set_show_video( m_videoOutput, video ); |
215 | } | 215 | } |
216 | bool Lib::isShowingVideo() { | 216 | bool Lib::isShowingVideo() { |
217 | return ::null_is_showing_video( m_videoOutput ); | 217 | return ::null_is_showing_video( m_videoOutput ); |