]> git.tdb.fi Git - xinema.git/blobdiff - remote/qml/pages/PlaybackPage.qml
Display the various bits of info only if they are available
[xinema.git] / remote / qml / pages / PlaybackPage.qml
index 24817c697e6a4a5cef40bb96d3cf3e11a9bbe9ff..9bca145752dc8d31dc99a1d66a4afcc5b9d26061 100644 (file)
@@ -1,6 +1,7 @@
 import QtQuick 2.0
 import Sailfish.Silica 1.0
 import fi.mikkosoft.xinema 0.1
+import "../components"
 
 Page
 {
@@ -29,6 +30,32 @@ Page
                        wrapMode: Text.WordWrap
                }
 
+               Column
+               {
+                       width: parent.width
+                       spacing: Theme.paddingSmall
+
+                       StreamInfo
+                       {
+                               visible: streamControl.videoSize.width && streamControl.videoSize.height
+                               property string size: streamControl.videoSize.width+"×"+streamControl.videoSize.height
+                               property string fps: " @ "+streamControl.framerate.toFixed(2)+"fps"
+                               text: (streamControl.framerate ? size+fps : size)
+                       }
+
+                       StreamInfo
+                       {
+                               visible: streamControl.videoCodec
+                               text: streamControl.videoCodec
+                       }
+
+                       StreamInfo
+                       {
+                               visible: streamControl.audioCodec
+                               text: streamControl.audioCodec
+                       }
+               }
+
                Slider
                {
                        id: slider
@@ -82,6 +109,30 @@ Page
                }
        }
 
+       Column
+       {
+               width: parent.width
+               spacing: Theme.paddingLarge
+               anchors.bottom: page.bottom
+               anchors.bottomMargin: 2*Theme.paddingLarge
+
+               ChannelSelect
+               {
+                       id: audioSelect
+                       label: "Audio"
+                       channels: streamControl.audioChannels
+                       onCurrentChannelChanged: streamControl.currentAudioChannel = currentChannel
+               }
+
+               ChannelSelect
+               {
+                       id: spuSelect
+                       label: "Subtitles"
+                       channels: streamControl.spuChannels
+                       onCurrentChannelChanged: streamControl.currentSpuChannel = currentChannel
+               }
+       }
+
        StreamControl
        {
                id: streamControl
@@ -91,5 +142,7 @@ Page
                        if(!slider.down)
                                slider.value = position;
                }
+               onCurrentAudioChannelChanged: audioSelect.currentChannel = streamControl.currentAudioChannel;
+               onCurrentSpuChannelChanged: spuSelect.currentChannel = streamControl.currentSpuChannel;
        }
 }