summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/lib.cpp
authorsimon <simon>2002-12-02 11:21:24 (UTC)
committer simon <simon>2002-12-02 11:21:24 (UTC)
commit5a7c8386e4d526558becf2553912eb42a42107ee (patch) (unidiff)
treebe3ebf33bf8cff012c25883adeda9427f4787698 /noncore/multimedia/opieplayer2/lib.cpp
parentb2532533a8a28680db967a45090a3ba1dd53ed73 (diff)
downloadopie-5a7c8386e4d526558becf2553912eb42a42107ee.zip
opie-5a7c8386e4d526558becf2553912eb42a42107ee.tar.gz
opie-5a7c8386e4d526558becf2553912eb42a42107ee.tar.bz2
- made the version functions static and some other functions constant that
are constant by design
Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp56
1 files changed, 31 insertions, 25 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 1ac9809..77dab9a 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -139,18 +139,21 @@ QCString Lib::version() {
139} 139}
140 140
141int Lib::majorVersion() { 141int Lib::majorVersion() {
142 xine_get_version ( &m_major_version, &m_minor_version, &m_sub_version ); 142 int major, minor, sub;
143 return m_major_version; 143 xine_get_version ( &major, &minor, &sub );
144 return major;
144} 145}
145 146
146int Lib::minorVersion() { 147int Lib::minorVersion() {
147 xine_get_version ( &m_major_version, &m_minor_version, &m_sub_version ); 148 int major, minor, sub;
148 return m_minor_version; 149 xine_get_version ( &major, &minor, &sub );
150 return minor;
149} 151}
150 152
151int Lib::subVersion() { 153int Lib::subVersion() {
152 xine_get_version ( &m_major_version, &m_minor_version, &m_sub_version ); 154 int major, minor, sub;
153 return m_sub_version; 155 xine_get_version ( &major, &minor, &sub );
156 return sub;
154} 157}
155 158
156int Lib::play( const QString& fileName, int startPos, int start_time ) { 159int Lib::play( const QString& fileName, int startPos, int start_time ) {
@@ -170,7 +173,7 @@ void Lib::pause() {
170 xine_set_param( m_stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE ); 173 xine_set_param( m_stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE );
171} 174}
172 175
173int Lib::speed() { 176int Lib::speed() const {
174 return xine_get_param ( m_stream, XINE_PARAM_SPEED ); 177 return xine_get_param ( m_stream, XINE_PARAM_SPEED );
175} 178}
176 179
@@ -178,26 +181,29 @@ void Lib::setSpeed( int speed ) {
178 xine_set_param ( m_stream, XINE_PARAM_SPEED, speed ); 181 xine_set_param ( m_stream, XINE_PARAM_SPEED, speed );
179} 182}
180 183
181int Lib::status() { 184int Lib::status() const {
182 return xine_get_status( m_stream ); 185 return xine_get_status( m_stream );
183} 186}
184 187
185int Lib::currentPosition() { 188int Lib::currentPosition() const {
186 xine_get_pos_length( m_stream, &m_pos, &m_time, &m_length ); 189 int pos, time, length;
187 return m_pos; 190 xine_get_pos_length( m_stream, &pos, &time, &length );
191 return pos;
188} 192}
189 193
190int Lib::currentTime() { 194int Lib::currentTime() const {
191 xine_get_pos_length( m_stream, &m_pos, &m_time, &m_length ); 195 int pos, time, length;
192 return m_time/1000; 196 xine_get_pos_length( m_stream, &pos, &time, &length );
197 return time/1000;
193} 198}
194 199
195int Lib::length() { 200int Lib::length() const {
196 xine_get_pos_length( m_stream, &m_pos, &m_time, &m_length ); 201 int pos, time, length;
197 return m_length/1000; 202 xine_get_pos_length( m_stream, &pos, &time, &length );
203 return length/1000;
198} 204}
199 205
200bool Lib::isSeekable() { 206bool Lib::isSeekable() const {
201 return xine_get_stream_info( m_stream, XINE_STREAM_INFO_SEEKABLE ); 207 return xine_get_stream_info( m_stream, XINE_STREAM_INFO_SEEKABLE );
202} 208}
203 209
@@ -208,16 +214,16 @@ void Lib::seekTo( int time ) {
208} 214}
209 215
210 216
211Frame Lib::currentFrame() { 217Frame Lib::currentFrame() const {
212 Frame frame; 218 Frame frame;
213 return frame; 219 return frame;
214}; 220};
215 221
216QString Lib::metaInfo( int number) { 222QString Lib::metaInfo( int number) const {
217 return xine_get_meta_info( m_stream, number ); 223 return xine_get_meta_info( m_stream, number );
218} 224}
219 225
220int Lib::error() { 226int Lib::error() const {
221 return xine_get_error( m_stream ); 227 return xine_get_error( m_stream );
222}; 228};
223 229
@@ -244,11 +250,11 @@ void Lib::setShowVideo( bool video ) {
244 ::null_set_show_video( m_videoOutput, video ); 250 ::null_set_show_video( m_videoOutput, video );
245} 251}
246 252
247bool Lib::isShowingVideo() { 253bool Lib::isShowingVideo() const {
248 return ::null_is_showing_video( m_videoOutput ); 254 return ::null_is_showing_video( m_videoOutput );
249} 255}
250 256
251bool Lib::hasVideo() { 257bool Lib::hasVideo() const {
252 return xine_get_stream_info( m_stream, 18 ); 258 return xine_get_stream_info( m_stream, 18 );
253} 259}
254 260
@@ -256,7 +262,7 @@ void Lib::showVideoFullScreen( bool fullScreen ) {
256 ::null_set_fullscreen( m_videoOutput, fullScreen ); 262 ::null_set_fullscreen( m_videoOutput, fullScreen );
257} 263}
258 264
259bool Lib::isVideoFullScreen() { 265bool Lib::isVideoFullScreen() const {
260 return ::null_is_fullscreen( m_videoOutput ); 266 return ::null_is_fullscreen( m_videoOutput );
261} 267}
262 268
@@ -270,7 +276,7 @@ void Lib::setGamma( int value ) {
270 ::null_set_videoGamma( m_videoOutput, value ); 276 ::null_set_videoGamma( m_videoOutput, value );
271} 277}
272 278
273bool Lib::isScaling() { 279bool Lib::isScaling() const {
274 return ::null_is_scaling( m_videoOutput ); 280 return ::null_is_scaling( m_videoOutput );
275} 281}
276 282