Version: (using Devel) Installed from: Compiled sources OS: Linux When starting dragonplayer it always has the same size. You have to resize it every time it's opened with a new video file. It should resize to the video's resolution or something smaller that fits on the desktop if the video has a too high resolution for the desktop.
Accepted
First step is we need a function to get the media size. we need to use: xine_get_stream_info(xine_stream_t *stream, XINE_STREAM_INFO_VIDEO_WIDTH ) xine_get_stream_info(xine_stream_t *stream, XINE_STREAM_INFO_VIDEO_HEIGHT ) Again it will be better to implement this in Phonon, as a function of MediaObject, that returns a QSize of the media. A library change means this won't get in till 4.2. I'll try and get on IRC and ask someone in Phonon. Should it be in phonon? Should we hack it into this release of Dragon using xine calls? Discuss.
*** Bug 164643 has been marked as a duplicate of this bug. ***
Fixed. NOTE: may sometime appear not fixed as if you have open a file that you opened before the fix there will be an entry in your config file specifying the minimal window size as the size to open at.
I'm still seeing this in 4.1.86 (using unofficial Debian packages from kde42.debian.net at version 4:4.1.86+svn901128-0r1). An additional report is at https://bugs.kde.org/show_bug.cgi?id=179368. Is this actually fixed in 4.2 or left for 4.3? Surprisingly, amarok is mentioned prominently in the debugging output: georg@vaio:~/Media/TODO/Stuff$ dragon -v Qt: 4.4.3 KDE: 4.1.86 (KDE 4.1.86 (KDE 4.2 >= 20081221)) Dragon Player: 2.0 georg@vaio:~/Media/TODO/Stuff$ dragon --debug Ameriquest\ -\ Don\'t\ Judge\ To\ Quickly\ 1.wmv amarok: BEGIN: Codeine::MainWindow::MainWindow() amarok: BEGIN: Codeine::VideoWindow::VideoWindow(QWidget*) dragonplayer(11436) Phonon::KdePlatformPlugin::createBackend: using backend: "Xine" amarok: END__: Codeine::VideoWindow::VideoWindow(QWidget*) - Took 0.47s amarok: BEGIN: void Codeine::MainWindow::setupActions() amarok: END__: void Codeine::MainWindow::setupActions() - Took 0.0028s dragonplayer(11436): Attempt to use QAction "aspect_ratio_menu" with KXMLGUIFactory! dragonplayer(11436): Attempt to use QAction "audio_channels_menu" with KXMLGUIFactory! dragonplayer(11436): Attempt to use QAction "subtitle_channels_menu" with KXMLGUIFactory! amarok: BEGIN: void Codeine::MainWindow::init() amarok: registering root? true amarok: BEGIN: void Codeine::MainWindow::engineStateChanged(Engine::State) amarok: BEGIN: State: Empty amarok: updated actions amarok: updated menus amarok: updated statusbar amarok: update position slider amarok: screensaver on amarok: set titles amarok: dbus: stopped amarok: END__: State: Empty - Took 0.0019s amarok: END__: void Codeine::MainWindow::engineStateChanged(Engine::State) - Took 0.0024s amarok: BEGIN: bool Codeine::MainWindow::open(const KUrl&) amarok: KUrl("file:///home/georg/Media/TODO/Stuff/Ameriquest - Don't Judge To Quickly 1.wmv") amarok: BEGIN: bool Codeine::VideoWindow::load(const KUrl&) amarok: BEGIN: void Codeine::VideoWindow::eject() amarok: END__: void Codeine::VideoWindow::eject() - Took 0.16s amarok: detected mimetype: "video/x-ms-wmv" amarok: END__: bool Codeine::VideoWindow::load(const KUrl&) - Took 0.21s amarok: BEGIN: void Codeine::VideoWindow::setAudioChannel(int) amarok: using index: 254087844 returned desc has index: -1 amarok: END__: void Codeine::VideoWindow::setAudioChannel(int) - Took 0.00069s amarok: BEGIN: void Codeine::VideoWindow::setSubtitle(int) amarok: using index: 254087844 returned desc has index: -1 amarok: END__: void Codeine::VideoWindow::setSubtitle(int) - Took 0.00073s amarok: BEGIN: bool Codeine::VideoWindow::play(qint64) amarok: BEGIN: void Codeine::VideoWindow::seek(qint64) amarok: END__: void Codeine::VideoWindow::seek(qint64) - Took 0.00037s amarok: END__: bool Codeine::VideoWindow::play(qint64) - Took 0.0013s amarok: END__: bool Codeine::MainWindow::open(const KUrl&) - Took 0.22s
*** Bug 179368 has been marked as a duplicate of this bug. ***
Seems you're right. I've been testing SVN Dragonplayer against KDE4.1 libraries - and that works perfectly so I assumed all was good. However it seems to be an issue against new KDE libraries. It's not running any of the "stateChanged" method in the videoWidget class from the looks of your debug output. Will upgrade my KDE and investigate heavily tomorrow night.
I've updated to KDE4.2 beta 2 packages (KUbuntu PPA) and it is behaving exactly as intended - I'm also getting the debug output that I would expect - with the important lines. amarok: chapters: 0 titles: 0 amarok: going from "Buffering" to "Playing" ... amarok: adjusting size to video resolution N.B it says amarok because we're using Amarok's debug library. As it was only for debugging no-one got round to changing it. I probably should, but that's a separate issue.
Maybe it has something to do with the configuration file? If I remove ~/.kde4/share/config/dragonplayerrc it works fine for exactly one run (see below). For the second run, the size is back to tiny (and there's also no audio, but let's not focus on that for now). Note that I'm not seeing any of the debug lines you mentioned before in my debugging output, so maybe they're just no part of my version of dragonplayer (which remains unchanged since my previous post). First run (everything fine): amarok: BEGIN: Codeine::MainWindow::MainWindow() amarok: BEGIN: Codeine::VideoWindow::VideoWindow(QWidget*) dragonplayer(8228) Phonon::KdePlatformPlugin::createBackend: using backend: "Xine" amarok: END__: Codeine::VideoWindow::VideoWindow(QWidget*) - Took 0.47s amarok: BEGIN: void Codeine::MainWindow::setupActions() amarok: END__: void Codeine::MainWindow::setupActions() - Took 0.0027s dragonplayer(8228): Attempt to use QAction "aspect_ratio_menu" with KXMLGUIFactory! dragonplayer(8228): Attempt to use QAction "audio_channels_menu" with KXMLGUIFactory! dragonplayer(8228): Attempt to use QAction "subtitle_channels_menu" with KXMLGUIFactory! amarok: BEGIN: void Codeine::MainWindow::init() amarok: registering root? true amarok: BEGIN: void Codeine::MainWindow::engineStateChanged(Engine::State) amarok: BEGIN: State: Empty amarok: updated actions amarok: updated menus amarok: updated statusbar amarok: update position slider amarok: screensaver on amarok: set titles amarok: dbus: stopped amarok: END__: State: Empty - Took 0.0016s amarok: END__: void Codeine::MainWindow::engineStateChanged(Engine::State) - Took 0.002s amarok: BEGIN: bool Codeine::MainWindow::open(const KUrl&) amarok: KUrl("file:///home/georg/Media/Trailers/The Lord of the Rings - The Fellowship of the Ring.mov") amarok: BEGIN: bool Codeine::VideoWindow::load(const KUrl&) amarok: BEGIN: void Codeine::VideoWindow::eject() amarok: END__: void Codeine::VideoWindow::eject() - Took 0.16s amarok: detected mimetype: "video/quicktime" amarok: END__: bool Codeine::VideoWindow::load(const KUrl&) - Took 0.22s amarok: BEGIN: bool Codeine::VideoWindow::play(qint64) amarok: END__: bool Codeine::VideoWindow::play(qint64) - Took 0.00067s amarok: END__: bool Codeine::MainWindow::open(const KUrl&) - Took 0.23s dragonplayerrc after first run: Brightness=0 Contrast=0 Hue=0 IsVideo=false Preferred Size=100,30 Saturation=0 [General] Recent Urls[$e]=file://$HOME/Media/Trailers/The Lord of the Rings - The Fellowship of the Ring.mov TimeFormat=1 Volume=1 [MainWindow] Height 800=306 State=AAAA/wAAAAD9AAAAAAAAAeAAAADMAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAWAG0AYQBpAG4AVABvAG8AbABCAGEAcgEAAAAAAAAB4AAAAAAAAAAA Width 1280=480 [Phonon::AudioOutput] Dragon Player_Volume=1 [file:///home/georg/Media/Trailers/The Lord of the Rings - The Fellowship of the Ring.mov] AudioChannel=185758821 Brightness=0 Contrast=0 Hue=0 IsVideo=true Position=3880 Saturation=0 Subtitle=185758821 Second run (tiny video, no sound): amarok: BEGIN: Codeine::MainWindow::MainWindow() amarok: BEGIN: Codeine::VideoWindow::VideoWindow(QWidget*) dragonplayer(8293) Phonon::KdePlatformPlugin::createBackend: using backend: "Xine" amarok: END__: Codeine::VideoWindow::VideoWindow(QWidget*) - Took 0.47s amarok: BEGIN: void Codeine::MainWindow::setupActions() amarok: END__: void Codeine::MainWindow::setupActions() - Took 0.0028s dragonplayer(8293): Attempt to use QAction "aspect_ratio_menu" with KXMLGUIFactory! dragonplayer(8293): Attempt to use QAction "audio_channels_menu" with KXMLGUIFactory! dragonplayer(8293): Attempt to use QAction "subtitle_channels_menu" with KXMLGUIFactory! amarok: BEGIN: void Codeine::MainWindow::init() amarok: registering root? true amarok: BEGIN: void Codeine::MainWindow::engineStateChanged(Engine::State) amarok: BEGIN: State: Empty amarok: updated actions amarok: updated menus amarok: updated statusbar amarok: update position slider amarok: screensaver on amarok: set titles amarok: dbus: stopped amarok: END__: State: Empty - Took 0.0012s amarok: END__: void Codeine::MainWindow::engineStateChanged(Engine::State) - Took 0.0015s amarok: BEGIN: bool Codeine::MainWindow::open(const KUrl&) amarok: KUrl("file:///home/georg/Media/Trailers/The Lord of the Rings - The Fellowship of the Ring.mov") amarok: BEGIN: bool Codeine::VideoWindow::load(const KUrl&) amarok: BEGIN: void Codeine::VideoWindow::eject() amarok: END__: void Codeine::VideoWindow::eject() - Took 0.16s amarok: detected mimetype: "video/quicktime" amarok: END__: bool Codeine::VideoWindow::load(const KUrl&) - Took 0.2s amarok: BEGIN: void Codeine::VideoWindow::setAudioChannel(int) amarok: using index: 185758821 returned desc has index: -1 amarok: END__: void Codeine::VideoWindow::setAudioChannel(int) - Took 0.013s amarok: BEGIN: void Codeine::VideoWindow::setSubtitle(int) amarok: using index: 185758821 returned desc has index: -1 amarok: END__: void Codeine::VideoWindow::setSubtitle(int) - Took 0.00069s amarok: BEGIN: bool Codeine::VideoWindow::play(qint64) amarok: BEGIN: void Codeine::VideoWindow::seek(qint64) amarok: END__: void Codeine::VideoWindow::seek(qint64) - Took 0.00038s amarok: END__: bool Codeine::VideoWindow::play(qint64) - Took 0.0013s amarok: END__: bool Codeine::MainWindow::open(const KUrl&) - Took 0.24s dragonplayerrc after second run: Brightness=0 Contrast=0 Hue=0 IsVideo=false Preferred Size=100,30 Saturation=0 [General] Recent Urls[$e]=file://$HOME/Media/Trailers/The Lord of the Rings - The Fellowship of the Ring.mov TimeFormat=1 Volume=1 [MainWindow] Height 800=120 State=AAAA/wAAAAD9AAAAAAAAAeAAAAASAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAWAG0AYQBpAG4AVABvAG8AbABCAGEAcgEAAAAAAAAB4AAAAAAAAAAA Width 1280=480 [Phonon::AudioOutput] Dragon Player_Volume=1 [file:///home/georg/Media/Trailers/The Lord of the Rings - The Fellowship of the Ring.mov] AudioChannel=185758820 Brightness=0 Contrast=0 Hue=0 IsVideo=true Position=5419 Saturation=0 Subtitle=185758820
George can you clarify something. The first time you open a unique video it is the correct (video resolution) size. If you open a video you have opened a second time only then does it have the wrong size. Any previously unopened video opens at the correct size. If so I think I've got the cause. Dragon code stores the name of recent files in Recent Urls[$e]=file://$HOME/Media/Trailers/T... Each entry in this comma separated list has it's own config group entry [file:///home/georg/Media/Trailers/The Lord of the Ri...] This contains the details on how to restore the file. Somehow KUrl() has put $HOME in one place /home/george in another. This has caused DragonPlayer to get confused over whether it has a details on how to restore the settings or not. It also seems to have spewn these settings into the core of the file without being in any group. I should hopefully be able to fix this when I have the code in front of me tonight. Thanks.
I tracked it down to the Position value in [file:///xyz]. If set to a non-zero value, the video starts playing with a tiny size. Changing that line to "Position=0" makes the video play as it should. I guess some initialization is skipped if the video isn't played from the very start. BTW (and I'm just guessing here), the values for AudioChannel and Subtitle (both set to 185758820) also look suspiciously like uninitialized memory. Maybe you could have a look once you get to work on the code. Finally, when DragonPlayer is started for the first time without any arguments, i.e. without playing any video, it also starts as a tiny window. Maybe it would be a good choice to have larger default values for the initial default window size.
Finally found it! When loading a file with a position saved, the first thing Dragon does is seek to the position before playing. However before it does this it is set to paused then set to playing. This means the phonon status' emitted aren't stopped->playing it's stopped->paused->playing This skips the init step to resize the window when it thinks "playing has started" - as we don't want it resizing just because a user has paused it (a previous bug) Often Phonon will emit (for me on my slow laptop) stopped->paused->buffering->playing which worked as expected, hence the intermittent behaviour. I intend to backport the patch to 4.2, though I can't promised 4.2.0
SVN commit 913716 by davidedmundson: BUG:163099 Video window sometimes doesn't resize when opening a file with a restore position. M +3 -5 videoWindow.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=913716
With my Dragon player, when I open *any* video file, it starts the movie with the video resized to less than one inch square. Every time I open a video I have to manually increase the size of the window. Is my experience related to this bug or did I discover a different one? Please let me know if I should be following this bug report or filing a different one. Thank you!
With my Dragon player, when I open *any* video file, it starts the movie with the video resized to less than one inch square. Every time I open a video I have to manually increase the size of the window. Is my experience related to this bug or did I discover a different one? Please let me know if I should be following this bug report or filing a different one. Thank you! Also, is there a temporary work around that I can use while I'm waiting for the update?
Jeremy LaCroix , you are in the right place. i have the same issue.
SVN commit 921398 by davidedmundson: Backport all the fixes made to Dragonplayer after 4.2.0 Same as trunk revision 918684 except "reset video settings" feature not backported as includes new translation add a check for unistd.h to the buildsystem. and include unistd.h in dragonplayer/src/app/videoWindow.cpp, for usleep. Fixed crash when loading Video after using VideoSettings Dialog, and VideoSettings dialog now only accessible if playing a Video file BUG:177623 BUG:165249 Check channel validity before setting audio channel. BUG: 171301 Fixes bug 171301 by adding a "Restore defaults" button to video settings dialog and looking for the "valueChanged" signal instead of "sliderMoved" for the Vdeo settings slider, ensuring that it will recognise all movements, not just those caused by dragging with mouse When track finished pushing "play" now restarts track Support for additional MediaSource state 'empty' BUG:163099 Video window sometimes doesn't resize when opening a file with a restore position. Supress powermanager from sleeping when playing a file Replace all references to CODEINE with DRAGONPLAYER Remove unused code. Fixed compile warning Implements TheStream::prettyTitle() and removes two unused signals statusMessage(const QString &) and titleChanged(const QString &) (Now obsolete due to MediaObject::metaDataChanged()) Code tidy up by Paul B Fix pause button in DragonPart Enable position slider based on seekableChanged phonon signal Fix compile extra ';' Revert dbus FileChanged signal broken in last commit Fix compiler warning on inline consts Remove all of custom Engine::State enum and replace with Phonon::State General refactor of state changing M +4 -2 app/actions.cpp M +2 -2 app/actions.h M +2 -2 app/adjustSizeButton.h M +2 -2 app/discSelectionDialog.h M +3 -5 app/extern.h M +2 -2 app/fullScreenAction.h M +2 -2 app/fullScreenToolBarHandler.h M +2 -2 app/listView.cpp M +52 -22 app/mainWindow.cpp M +13 -4 app/mainWindow.h M +3 -7 app/part.cpp M +4 -4 app/part.h M +2 -2 app/partToolBar.h M +2 -2 app/playDialog.h M +5 -5 app/playlistFile.cpp M +2 -2 app/playlistFile.h M +22 -3 app/recentlyPlayedList.cpp M +21 -0 app/recentlyPlayedList.h M +99 -137 app/stateChange.cpp M +23 -3 app/theStream.cpp M +5 -4 app/theStream.h M +40 -72 app/videoWindow.cpp M +16 -11 app/videoWindow.h M +33 -47 codeine.h M +3 -3 dbus/playerDbusHandler.cpp M +2 -2 dbus/playerDbusHandler.h M +2 -2 dbus/rootDbusHandler.h M +3 -3 dbus/trackListDbusHandler.cpp M +2 -2 dbus/trackListDbusHandler.h M +10 -17 debug.h M +3 -3 messageBox.h WebSVN link: http://websvn.kde.org/?view=rev&revision=921398
Somewhere in that giant chunk of text it says that I've backported the bug fix to KDE 4.2 so it should be in 4.2.1 It would be super if you guys could test it. apt-get build-dep kdemultimedia-kde4 svn co svn://anonsvn.kde.org/home/kde/branches/KDE/4.2/kdemultimedia cd kdemultimedia mkdir build cd build cmake .. cd dragonplayer make cd src/app ./dragon delete ~/.kde/share/config/dragonplayerrc too