summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp34
-rw-r--r--noncore/multimedia/opieplayer2/lib.h4
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
@@ -294,12 +294,40 @@ unseekable, but it should never occur!! Mr. Murphy ? :) ) */
return -1;
}
+/* info about current stream */
+QSize Lib::videoSize()const
+{
+ if (!m_initialized||!hasVideo()) return QSize(0,0);
+ int width = xine_get_stream_info(m_stream,XINE_STREAM_INFO_VIDEO_WIDTH);
+ int height = xine_get_stream_info(m_stream,XINE_STREAM_INFO_VIDEO_HEIGHT);
+ return QSize(width,height);
+}
+
+
bool Lib::isSeekable() const {
assert( m_initialized );
return xine_get_stream_info( m_stream, XINE_STREAM_INFO_SEEKABLE );
}
+bool Lib::hasVideo() const {
+ assert( m_initialized );
+
+ return xine_get_stream_info( m_stream, XINE_STREAM_INFO_HAS_VIDEO);
+}
+
+int Lib::audioBitrate()const
+{
+ if (!m_initialized) return 0;
+ return xine_get_stream_info( m_stream, XINE_STREAM_INFO_AUDIO_BITRATE);
+}
+int Lib::videoBitrate()const
+{
+ if (!m_initialized||!hasVideo()) return 0;
+ return xine_get_stream_info( m_stream, XINE_STREAM_INFO_VIDEO_BITRATE);
+}
+/* end info block */
+
void Lib::seekTo( int time ) {
assert( m_initialized );
@@ -391,12 +419,6 @@ bool Lib::isShowingVideo() const {
return ::null_is_showing_video( m_videoOutput );
}
-bool Lib::hasVideo() const {
- assert( m_initialized );
-
- return xine_get_stream_info( m_stream, 18 );
-}
-
void Lib::showVideoFullScreen( bool fullScreen ) {
assert( m_initialized );
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
@@ -171,6 +171,10 @@ namespace XINE {
void setWidget( XineVideoWidget *widget );
+ QSize videoSize()const;
+ int audioBitrate()const;
+ int videoBitrate()const;
+
signals:
void stopped();