author | alwin <alwin> | 2005-04-12 13:33:37 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-04-12 13:33:37 (UTC) |
commit | 6df2eb36803e072ea9db62153b762250742610f0 (patch) (unidiff) | |
tree | 5e80ac2c581ffe19478110233dbd93ae1977f99f | |
parent | 81b7ea55be071eab5f8b4afd2c4c291dee365545 (diff) | |
download | opie-6df2eb36803e072ea9db62153b762250742610f0.zip opie-6df2eb36803e072ea9db62153b762250742610f0.tar.gz opie-6df2eb36803e072ea9db62153b762250742610f0.tar.bz2 |
some usefull xine-helpers
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 34 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.h | 4 |
2 files changed, 32 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index 9f7a9c5..4ae8490 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp | |||
@@ -296,2 +296,12 @@ unseekable, but it should never occur!! Mr. Murphy ? :) ) */ | |||
296 | 296 | ||
297 | /* info about current stream */ | ||
298 | QSize Lib::videoSize()const | ||
299 | { | ||
300 | if (!m_initialized||!hasVideo()) return QSize(0,0); | ||
301 | int width = xine_get_stream_info(m_stream,XINE_STREAM_INFO_VIDEO_WIDTH); | ||
302 | int height = xine_get_stream_info(m_stream,XINE_STREAM_INFO_VIDEO_HEIGHT); | ||
303 | return QSize(width,height); | ||
304 | } | ||
305 | |||
306 | |||
297 | bool Lib::isSeekable() const { | 307 | bool Lib::isSeekable() const { |
@@ -302,2 +312,20 @@ bool Lib::isSeekable() const { | |||
302 | 312 | ||
313 | bool Lib::hasVideo() const { | ||
314 | assert( m_initialized ); | ||
315 | |||
316 | return xine_get_stream_info( m_stream, XINE_STREAM_INFO_HAS_VIDEO); | ||
317 | } | ||
318 | |||
319 | int Lib::audioBitrate()const | ||
320 | { | ||
321 | if (!m_initialized) return 0; | ||
322 | return xine_get_stream_info( m_stream, XINE_STREAM_INFO_AUDIO_BITRATE); | ||
323 | } | ||
324 | int Lib::videoBitrate()const | ||
325 | { | ||
326 | if (!m_initialized||!hasVideo()) return 0; | ||
327 | return xine_get_stream_info( m_stream, XINE_STREAM_INFO_VIDEO_BITRATE); | ||
328 | } | ||
329 | /* end info block */ | ||
330 | |||
303 | void Lib::seekTo( int time ) { | 331 | void Lib::seekTo( int time ) { |
@@ -393,8 +421,2 @@ bool Lib::isShowingVideo() const { | |||
393 | 421 | ||
394 | bool Lib::hasVideo() const { | ||
395 | assert( m_initialized ); | ||
396 | |||
397 | return xine_get_stream_info( m_stream, 18 ); | ||
398 | } | ||
399 | |||
400 | void Lib::showVideoFullScreen( bool fullScreen ) { | 422 | void Lib::showVideoFullScreen( bool fullScreen ) { |
diff --git a/noncore/multimedia/opieplayer2/lib.h b/noncore/multimedia/opieplayer2/lib.h index 2f5bf86..2607193 100644 --- a/noncore/multimedia/opieplayer2/lib.h +++ b/noncore/multimedia/opieplayer2/lib.h | |||
@@ -173,2 +173,6 @@ namespace XINE { | |||
173 | 173 | ||
174 | QSize videoSize()const; | ||
175 | int audioBitrate()const; | ||
176 | int videoBitrate()const; | ||
177 | |||
174 | signals: | 178 | signals: |