Opened 16 years ago

Closed 16 years ago

#4222 closed enhancement (fixed)

Update MythMusic to continue playing in the background after exiting it.

Reported by: paulh Owned by: paulh
Priority: minor Milestone: 0.21
Component: mythmusic Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description (last modified by paulh)

This is a preview patch that I would like anyone who is interested in this feature to test and provide some feedback.

It allows you to start a playlist playing in MythMusic then exit and use other parts of myth while continuing to play music in the background.

When you exit the MythMusic playback screen you are given the option to exit and stop playing or exit and continue playing. If you choose to continue playing you can then use other parts of Myth while your music is still playing.

When a new track starts and you are not in the main music playback screen a mini popup player is shown for a few seconds then disappears. While the mini player is on screen you can press Escape to remove it or press SELECT and it will stay on screen until you press escape. There is also a new jump point that will instantly show the mini player anywhere in Myth except when playing tv/video etc. While the miniplayer is on screen you can use most of the key bindings available in the main playback screen to change tracks, fast forward, rewind, pause, stop, mute the audio, increase/decrease the volume etc. Like other part of Myth the miniplayer is fully themeable.

TODO:

CD track playback works but returning to the main playback screen always rescans the CD and starts playing from the first track again rather that continuing where it left of.

Attachments (15)

4222-v1.patch (68.6 KB) - added by paulh 16 years ago.
Patch to allow MythMusic to play in the background
miniplayer_background.png (1.4 KB) - added by paulh 16 years ago.
This new image should be copied to mythplugins/mythmusic/mythmusic/images/miniplayer_background.png
gdbfrontend.txt (11.7 KB) - added by Mike Rice <mikerice1969@…> 16 years ago.
gdbfrontend2.txt (1.9 KB) - added by otto at kolsi dot fi 16 years ago.
4222-v2.patch (74.0 KB) - added by paulh 16 years ago.
Updated patch
4222-v3.patch (75.1 KB) - added by paulh 16 years ago.
Updated patch (requires mythtv >= r14969 to be installed)
Miniplayer-AlbumArtProblem.jpg (35.9 KB) - added by otto at kolsi dot fi 16 years ago.
072-musichide.patch (4.2 KB) - added by Bill <cizek@…> 16 years ago.
073-musicselect.patch (967 bytes) - added by Bill <cizek@…> 16 years ago.
074-isplaying.patch (348 bytes) - added by Bill <cizek@…> 16 years ago.
4222-v4.patch (112.7 KB) - added by paulh 16 years ago.
Updated patch
084-progbar.patch (585 bytes) - added by Bill <cizek@…> 16 years ago.
Add Progress Bar to the Mini-player for the default-wide theme
miniplayer_play_binding.diff (1.6 KB) - added by Roo <roo.watt@…> 16 years ago.
Add play keybinding to miniplayer
miniplayer_stop_release_device.diff (490 bytes) - added by Roo <roo.watt@…> 16 years ago.
Stopped miniplayer LiveTV audio fix
mythnews_thread.patch (445 bytes) - added by drdaz 16 years ago.
patch to mythnews to launch browser as a background process

Download all attachments as: .zip

Change History (74)

Changed 16 years ago by paulh

Attachment: 4222-v1.patch added

Patch to allow MythMusic to play in the background

Changed 16 years ago by paulh

Attachment: miniplayer_background.png added

This new image should be copied to mythplugins/mythmusic/mythmusic/images/miniplayer_background.png

comment:1 Changed 16 years ago by otto at kolsi dot fi

Tested this with two machines. No problems when applying & compiling patch. So far the miniplayer/background play seems to work very well. Nice work, this is much needed enhancement :) I identified two issues:

  • When miniplayer is closed with esc, there's this line in logs. Not sure if it is related or is nothing to worry about: "Could not find widget to detach"
  • When MythMusic is playing music in the background and MythFrontend is exited, there's a segfault (not that big deal because you are exiting mfe anyway).

comment:2 in reply to:  1 ; Changed 16 years ago by paulh

Replying to otto at kolsi dot fi:

Tested this with two machines. No problems when applying & compiling patch. So far the miniplayer/background play seems to work very well. Nice work, this is much needed enhancement :) I identified two issues:

Thanks for testing.

When miniplayer is closed with esc, there's this line in logs. Not sure if it is related or is nothing to worry about: "Could not find widget to detach"

This is actually harmless. We detach the dialog before its displayed so when the MythDialog? destructor I think tries to detach it again it fails. The virtual keyboard displays the same message as well. There's no point fixing this because that code will be removed if/when things start to move over to the new UI anyway.

When MythMusic is playing music in the background and MythFrontend is exited, there's a segfault (not that big deal because you are exiting mfe anyway).

This is not so good :-(

I don't seem to get any segfault when MythFrontend exits. Any chance you could get a backtrace so I know what area of the code I should be looking at?

comment:3 in reply to:  2 Changed 16 years ago by Mike Rice <mikerice1969@…>

Replying to paulh:

Replying to otto at kolsi dot fi:

Tested this with two machines. No problems when applying & compiling patch. So far the miniplayer/background play seems to work very well. Nice work, this is much needed enhancement :) I identified two issues:

Thanks for testing.

When miniplayer is closed with esc, there's this line in logs. Not sure if it is related or is nothing to worry about: "Could not find widget to detach"

This is actually harmless. We detach the dialog before its displayed so when the MythDialog? destructor I think tries to detach it again it fails. The virtual keyboard displays the same message as well. There's no point fixing this because that code will be removed if/when things start to move over to the new UI anyway.

When MythMusic is playing music in the background and MythFrontend is exited, there's a segfault (not that big deal because you are exiting mfe anyway).

This is not so good :-(

I don't seem to get any segfault when MythFrontend exits. Any chance you could get a backtrace so I know what area of the code I should be looking at?

I tested and it looks like it is working fairly well. I'll put it on my main frontend and give it a bit more workout.

I can reproduce the seg fault on exit. I've attached my log. Hope it helps.

Changed 16 years ago by Mike Rice <mikerice1969@…>

Attachment: gdbfrontend.txt added

comment:4 Changed 16 years ago by dbatt@…

A great enhancement. Seems to work well. Seg faults if hitting "play" on an album folder or artist folder on my combined fe/be, but works ok on playlists or playing the first track within an album. Will try and attach a log of seg fault.

With reference to pause/stopping playback when entering playback of video/tv, It might be nice to provide a choice to instead mute the video/tv audio (if that's possible to do), allowing one to listen to music and watch the TV muted, which some of us like to do, ie, watching sport.

I'll continue to test.

comment:5 Changed 16 years ago by Benoît LORAND <benoit.lorand@…>

Great !!

I have installed it yesterday and it's working properly for me. But it there possible to allow change volume in mythgallery ?

Thanks a lot, there's many time i would like this function.

Changed 16 years ago by otto at kolsi dot fi

Attachment: gdbfrontend2.txt added

comment:6 in reply to:  2 ; Changed 16 years ago by otto at kolsi dot fi

Replying to paulh:

When MythMusic is playing music in the background and MythFrontend is exited, there's a segfault (not that big deal because you are exiting mfe anyway).

This is not so good :-(

I don't seem to get any segfault when MythFrontend exits. Any chance you could get a backtrace so I know what area of the code I should be looking at?

I've also attached frontend backtrace. I'm not sure if it's a proper one, there's not so much info.

Earlier when I tested I only used wireless keyboard. Now I've also used remote/LIRC and there I have problem. I can enable the miniplayer with the remote but after that no normal MythMusic commands get through. Only remote key that miniplayer accepts is ESC. And when ESC is pressed, it is sort of interpreted twice. So miniplayer is not only closed but immediately frontend is also about to be closed (second ESC).

At the same the keyboard is working properly. How to diagnose this further?

Changed 16 years ago by paulh

Attachment: 4222-v2.patch added

Updated patch

comment:7 Changed 16 years ago by paulh

Attached an updated patch.

  • Shutdown and delete the music player in an orderly fashion when exiting MythFrontend - should hopefully fix the segfault when exiting MythFrontend.
  • Fix the segfault when pressing select on an artist or album in the music tree.
  • Add some feed back in the mini player when changing volume, muting, changing repeat mode and shuffle mode.

comment:8 in reply to:  5 Changed 16 years ago by paulh

Replying to Benoît LORAND <benoit.lorand@blorand.org>:

I have installed it yesterday and it's working properly for me. But it there possible to allow change volume in mythgallery ?

The mini popup player will allow you to change the volume anywhere. At the moment the jump point to call the popup doesn't quite work properly because it always takes you back to the main menu.

comment:9 in reply to:  6 Changed 16 years ago by paulh

Replying to otto at kolsi dot fi:

Earlier when I tested I only used wireless keyboard. Now I've also used remote/LIRC and there I have problem. I can enable the miniplayer with the remote but after that no normal MythMusic commands get through. Only remote key that miniplayer accepts is ESC. And when ESC is pressed, it is sort of interpreted twice. So miniplayer is not only closed but immediately frontend is also about to be closed (second ESC).

At the same the keyboard is working properly. How to diagnose this further?

I'm going to have to see if I can reproduce this. My dev box doesn't currently have lirc setup so all my testing was done with a keyboard. The player uses the same techniques as the virtual keyboard so I wasn't expecting any problems using a remote. Anyone else tested it and is using a remote?

comment:10 Changed 16 years ago by paulh

(In [14969]) Allow jump points that don't return to the main menu before jumping.

This adds a new REG_JUMPEX macro to mythmainwindow.h that adds an extra parameter that allows you to indicate whether a jump point should return to the main menu before jumping. It will be used by the jump point that shows the popup mini player in MythMusic.

This requires a 'make clean' and rebuild of the plugins.

Refs #4222.

Changed 16 years ago by paulh

Attachment: 4222-v3.patch added

Updated patch (requires mythtv >= r14969 to be installed)

comment:11 Changed 16 years ago by paulh

Description: modified (diff)

Attached an updated patch. You need to update mythtv to r14969 or later for this patch to compile.

  • Fixes the mini popup player not working with a remote.
  • The jump point to show the popup player now doesn't return you to the main menu before showing it.
  • Fixed the visualizer not working after returning to the main playback screen after playing music in the background. There's a couple of seconds delay before the visualizer catches up with the audio output but thats better than no visualizer at all :-)

comment:12 Changed 16 years ago by Matt Rude <mythtv@…>

I applied the patch today, things went smoothly. Thanks. But I do have a few problems. I have noticed that if I play music while in the menu screens, I loose sound on my recordings once I do decide to watch TV. This happens both when I stop the music before starting the recording or just pressing OK will leave the music playing but show the recording. If I go back to "Play Music" and exit and stop the music TV works fine.

Also I was using "Resume mode" = "Exact" for some long radio recordings and as of the last build that feature no longer works. I have no idea if this patch has anything to do with it, but it's a small price to pay for the new patch.

Thanks -Matt

comment:13 Changed 16 years ago by otto at kolsi dot fi

Tested v3 patch and now remote is working, also exit segfault seems to be gone. Couple of (new?) issues:

  • It looks like if you edit song rating when in miniplayer, the rating is not saved to DB. This works still in main player.
  • Most of the time the Last Play time is not updated to DB.
  • When in miniplayer, the album art image is about right size and it is in right place. But "under" it is the album art area and that is a bit too large, there is extra black bars in both under and right side of the album art image.

comment:14 in reply to:  13 ; Changed 16 years ago by paulh

Replying to otto at kolsi dot fi:

  • When in miniplayer, the album art image is about right size and it is in right place. But "under" it is the album art area and that is a bit too large, there is extra black bars in both under and right side of the album art image.

What resolution are you using and are you using a normal or wide theme?

comment:15 in reply to:  14 ; Changed 16 years ago by otto at kolsi dot fi

Replying to paulh:

  • When in miniplayer, the album art image is about right size and it is in right place. But "under" it is the album art area and that is a bit too large, there is extra black bars in both under and right side of the album art image.

What resolution are you using and are you using a normal or wide theme?

I'm using 1360x768 (native res of my LCD tv) and blootubelite-wide theme. I'll attach a picture that shows the problem. With normal MythMusic player this issue does not exist.

Changed 16 years ago by otto at kolsi dot fi

comment:16 Changed 16 years ago by Bill <cizek@…>

Really sweet patch, Paul.

I've attached a few patches I made to my system on top of v3:

072-musichide.patch - stop background music playback when I switch to watching Live or recorded TV.

073-musicselect.patch - Play the first song of a group if you select an artist or album. Mythmusic used to do this but it's changed in your patch and doesn't work with the miniplayer, anyway. This patch makes it work with the miniplayer.

074-isplaying.patch - isPlaying wasn't initialized in the MusicPlayer? class constructor. This caused problems first time into Mythmusic (specifically, the visualizer would start without any music playing, and the Resume mode was ignored)

Thanks for the patch. This is really cool. -Bill

Changed 16 years ago by Bill <cizek@…>

Attachment: 072-musichide.patch added

Changed 16 years ago by Bill <cizek@…>

Attachment: 073-musicselect.patch added

Changed 16 years ago by Bill <cizek@…>

Attachment: 074-isplaying.patch added

comment:17 in reply to:  16 Changed 16 years ago by paulh

Replying to Bill <cizek@rcn.com>:

I've attached a few patches I made to my system on top of v3:

Thanks for testing and the patches Bill.

072-musichide.patch - stop background music playback when I switch to watching Live or recorded TV.

I've already got this working using a slightly different method. I just send MythEvents? when playback starts and ends. The music player listens out for these events and starts/stops as appropriate. Thanks anyway :-)

073-musicselect.patch - Play the first song of a group if you select an artist or album. Mythmusic used to do this but it's changed in your patch and doesn't work with the miniplayer, anyway. This patch makes it work with the miniplayer.

074-isplaying.patch - isPlaying wasn't initialized in the MusicPlayer? class constructor. This caused problems first time into Mythmusic (specifically, the visualizer would start without any music playing, and the Resume mode was ignored)

I'll apply these to my local tree and hopefully sometime later today I'll roll out a new v4 patch for testing.

comment:18 in reply to:  15 Changed 16 years ago by paulh

Replying to otto at kolsi dot fi:

I'm using 1360x768 (native res of my LCD tv) and blootubelite-wide theme. I'll attach a picture that shows the problem. With normal MythMusic player this issue does not exist.

Thanks for the info. Using your settings I could reproduce the problem. There should really be a wide version of the miniplayer window definition added to the default wide MythMusic theme file but for now I have a simple fix that will allow the default one to work for both. I should have a new patch ready for later today.

comment:19 in reply to:  description Changed 16 years ago by benklop@…

TODO:

Test the Repeat and Shuffle modes are working correctly.

I have been using this patch for a few hours now and can verify that at least shuffle, and i think repeat, is working fine. I have to say that I love this patch and I think I will probably end up using this as my main mythmusic interface and just enter the mythmusic plugin when I need to change my playlist. Thanks!

Oh, a possible thought: it would be cool to eventually use mythmusic visualizations as a kind of screensaver that is activated after sitting in the menu for a certain amount of time. it could be deactivated by any keypress...

thanks again, I am watching with great intrest!

comment:20 Changed 16 years ago by paulh

(In [15019]) This adds two new convenience functions to MythContext that sends PLAYBACK_START and PLAYBACK_END MythEvents? to any listeners. tv_play is updated to send out these events when playback starts/ends.

The new music player will use these events to know when it should stop playing and release the audio output to allow playback of recordings or live tv etc.

Afraid it bumps the plugin api again so a rebuild of the plugins is required.

Refs #4222.

Changed 16 years ago by paulh

Attachment: 4222-v4.patch added

Updated patch

comment:21 Changed 16 years ago by paulh

Description: modified (diff)

Attached an updated patch.

  • Fix Otto's cover art image resize problem.
  • Stop the music player when either live TV or a recording is playing and then restart it when playback finishes. Should also fix Matt's disappearing audio problem after using the music player. This needs MythTV to be updated to r15019 or later for it to work properly.
  • All resume modes should now be working.
  • All repeat modes should now be working.
  • I think all the shuffle modes are working OK.
  • Hopefully fix the star ratings, play count & last play metadata not being saved/synced between the miniplayer and the main player. Still needs testing.

comment:22 Changed 16 years ago by Robin Gilks <g8ecj@…>

Running with V4 patch on r15019 has a problem with jump-points in MythGallery.

Enter MythMusic, start music playing, exit with play continue, enter MythGallery, navigate down the tree a level or two and press MythMusic jump-point.

Goes to the top of the MythGallery tree but doesn't exit until ESC pressed and then obeys the jump-point into MythMusic.

comment:23 in reply to:  22 Changed 16 years ago by paulh

Replying to Robin Gilks <g8ecj@gilks.org>:

Running with V4 patch on r15019 has a problem with jump-points in MythGallery.

Enter MythMusic, start music playing, exit with play continue, enter MythGallery, navigate down the tree a level or two and press MythMusic jump-point.

Goes to the top of the MythGallery tree but doesn't exit until ESC pressed and then obeys the jump-point into MythMusic.

Are you sure it worked before this patch?

It looks like a bug in MythGallery with the way it handles ESCAPE key presses rather than something caused by this patch. It should be easy to fix I'll take a look at it anyway.

comment:24 Changed 16 years ago by otto at kolsi dot fi

With v4 patch there are two minor issues:

  • if you have stopped music in miniplayer -> go to watch recording and exit back to menu -> miniplayer starts automatically to play when IMHO it should remain in stopped state
  • if you stop song in miniplayer sort of reduced song info is shown -> close the miniplayer with esc -> bring it up again and now the player does not show the same info but question mark icon. Selecting PLAY however starts the correct song and then the correct info is shown.

comment:25 Changed 16 years ago by paulh

Resolution: fixed
Status: newclosed

(In [15091]) Allow MythMusic to continue playing in the background after exiting.

When you exit the MythMusic playback screen you are given the option to exit and stop playing or exit and continue playing. If you choose to continue playing you can then use other parts of Myth while your music is still playing.

When a new track starts and you are not in the main music playback screen a mini popup player is shown for a few seconds then disappears. While the mini player is on screen you can press ESCAPE to remove it or press SELECT and it will stay on screen until you press ESCAPE. There is also a new jump point (not bound to anything by default) that will instantly show the mini player anywhere in Myth. While the miniplayer is on screen you can use most of the key bindings available in the main playback screen to change tracks, fast forward, rewind, pause, stop, mute the audio, increase/decrease the volume etc. Like other part of Myth the miniplayer is fully themeable.

Thanks to Otto, Mike, Benoit, Robin, Bill and anyone else I may have forgot for testing and providing some feed back.

Note to testers: I changed the name of the jump point to "Show Music Miniplayer" so you will have to remove the binding on the old jump point and set it again on the new one.

Closes #4222.

comment:26 Changed 16 years ago by paulh

(In [15092]) Make the popup miniplayer in MythMusic also use the position of the 'player_container' as well as it's size.

Allows theme makers to determine where on the screen is the best place to show the popup for their theme rather than hardcode the placement to the top center of the screen.

Refs #4222.

comment:27 Changed 16 years ago by paulh

(In [15093]) A quick no frills version of the miniplayer window for the default wide theme.

Refs #4222.

comment:28 Changed 16 years ago by paulh

(In [15096]) Make the MythMusic mini-player window completely borderless.

Refs #4222.

comment:29 Changed 16 years ago by Robin Gilks <g8ecj@…>

Resolution: fixed
Status: closednew

If 'media monitoring' is turned on and 'automatically play CD' is checked in setup then MythMusic hangs when entering 'Play Music'. The 'Loading Music' banner fills to 100% and closes leaving a 'Please Wait' in the main window that never goes away. Only way out is to kill the process.

Without media monitor it appears to still monitor the CD as it goes into MM all on its own or into MythVideo? if a DVD is inserted (but thats probably another ticket!) but otherwise doesn't hang up.

comment:30 Changed 16 years ago by paulh

(In [15104]) Add a couple of features to the MythMusic mini-player requested by Stuart M.

  • Adds support for an optional progress bar. Also adds the progress bar to main playback screen in the default theme file.
  • Adds support for an optional 'volume_text' text area that displays the current volume level. You can change the format of the text string displayed using the <value> element. It uses standard QString formating where '%1' will be replaced by the current volume. See the commented out examples in the default music-ui.xml file.

Any volunteers to port these UI changes to the default-wide/music-ui.xml theme?

Refs #4222.

comment:31 Changed 16 years ago by paulh

(In [15116]) Use despatchNow() to send the PLAYBACK_START/PLAYBACK_END messages so they are despatched immediately rather than added to the event queue otherwise the music player may not receive the PLAYBACK_START event before the other player starts especially if an external player is used.

Refs #4222.

comment:32 Changed 16 years ago by paulh

(In [15117]) Stop the music player when playing videos in MythNews?.

Refs #4222.

comment:33 Changed 16 years ago by paulh

(In [15118]) Stop the music player when playing videos/DVDs in MythVideo?.

Refs #4222.

Changed 16 years ago by Bill <cizek@…>

Attachment: 084-progbar.patch added

Add Progress Bar to the Mini-player for the default-wide theme

comment:34 Changed 16 years ago by paulh

(In [15201]) Add the position bar to the mini-music player and the main playback screen in the default wide theme file.

Refs #4222.

comment:35 Changed 16 years ago by stuartm

Couple of issues I've noticed in testing this.

If you stop playback in mythmusic then exit it still asks if you want to stop/continue, IMHO the menu shouldn't be shown at all in this case.

If you use the miniplayer jumppoint before going into mythmusic the miniplayer is displayed but is empty. This is just cosmetic mostly but possible solutions are: we allow the miniplayer to start playback without going into mythmusic; don't show the miniplayer at all or display a message telling the user to start mythmusic first.

comment:36 in reply to:  35 Changed 16 years ago by paulh

Replying to stuartm:

Couple of issues I've noticed in testing this.

If you stop playback in mythmusic then exit it still asks if you want to stop/continue, IMHO the menu shouldn't be shown at all in this case.

I'll fix this shortly.

If you use the miniplayer jumppoint before going into mythmusic the miniplayer is displayed but is empty. This is just cosmetic mostly but possible solutions are: we allow the miniplayer to start playback without going into mythmusic; don't show the miniplayer at all or display a message telling the user to start mythmusic first.

Ideally you should be able to start the player without having to go to the main playback screen but at the moment it's not possible to know exactly what the current playlist should be. You'd think it would just be the active play list from the DB but that isn't always the case - the user could have been playing tracks from the 'All My Music' part of the music tree so the active playlist isn't correct.

If you and the other devs agree at some point I'd like to change things so that when tracks, albums or artist etc are selected in the 'All My Music' part of the tree they get added to the active playlist rather that just start playing them possibly with an option to replace, insert or append them like you can in other parts of MythMusic.

comment:37 Changed 16 years ago by paulh

Resolution: fixed
Status: newclosed

(In [15203]) Don't ask if you want to continue playing if the music player is stopped.

Fixes #4222.

comment:38 Changed 16 years ago by Bill <cizek@…>

FWIW Paul: I've created ticket 4353 with a few settings for the new miniplayer.

comment:39 Changed 16 years ago by otto at kolsi dot fi

Miniplayer stops and resumes playback if internal player is used to play videos in MythVideo?. But if external app (e.g. mplayer) is used for playback this does not happen. Would it be possible to at least stop the music playback.. not sure how easy it would be to do the resume also?

comment:40 Changed 16 years ago by Roo <roo.watt@…>

Resolution: fixed
Status: closednew

Add play keybinding to the miniplayer, same as the main player. Patch attached.

I noticed that the play no longer restarts the track that is currently playing, I think this may be a deliberate change but have not looked further into it.

Changed 16 years ago by Roo <roo.watt@…>

Add play keybinding to miniplayer

comment:41 Changed 16 years ago by Roo <roo.watt@…>

Firstly thanks for the mini player Paul, it is a killer. It will allow me to finish ripping the rest of the CDs I have as I can now listen to music while ripping :D

Two issues I have noticed since using the Mini player:

  • The Show Mini Player jupmpoint is not available from the "Ripping CD" screen when ripping a CD.
  • The mini layer popup causes the "Rip completed successfuly" popup to not to respond to SELECT to dismiss the popup. ESCAPE will dismiss the popup though.

I have not looked into either issue.

comment:42 in reply to:  39 Changed 16 years ago by paulh

Replying to otto at kolsi dot fi:

Miniplayer stops and resumes playback if internal player is used to play videos in MythVideo?. But if external app (e.g. mplayer) is used for playback this does not happen. Would it be possible to at least stop the music playback.. not sure how easy it would be to do the resume also?

Ah - I thought I'd already done this. Looks like there are different playback routines for the old MythDVD part and MythVideo?. I'll fix this shortly.

comment:43 in reply to:  40 Changed 16 years ago by paulh

Replying to Roo <roo.watt@gmail.com>:

Add play keybinding to the miniplayer, same as the main player. Patch attached.

I noticed that the play no longer restarts the track that is currently playing, I think this may be a deliberate change but have not looked further into it.

Replying to Roo <roo.watt@gmail.com>:

Add play keybinding to the miniplayer, same as the main player. Patch attached.

I noticed that the play no longer restarts the track that is currently playing, I think this may be a deliberate change but have not looked further into it.

TBH I'm not sure what PLAY is supposed to do! I've always used PAUSE which either pauses if it's playing or starts playing if it's paused/stopped.

comment:44 in reply to:  41 Changed 16 years ago by paulh

Replying to Roo <roo.watt@gmail.com>:

Firstly thanks for the mini player Paul, it is a killer. It will allow me to finish ripping the rest of the CDs I have as I can now listen to music while ripping :D

Two issues I have noticed since using the Mini player:

  • The Show Mini Player jupmpoint is not available from the "Ripping CD" screen when ripping a CD.

Jump points are deliberately disabled while ripping a CD because they can cause all sorts problems. It could be possible to only allow the jump point to show the mini-player to work but it isn't something I want to spend time on. If you provide a patch I will take a look at it :-)

  • The mini layer popup causes the "Rip completed successfuly" popup to not to respond to SELECT to dismiss the popup. ESCAPE will dismiss the popup though.

No idea about this. Sound like a focus problem are you using a window manager?

I have not looked into either issue.

comment:45 Changed 16 years ago by paulh

(In [15341]) Add 'PLAY' keybinding to the music mini-player. Patch from Roo.

Refs #4222.

comment:46 Changed 16 years ago by paulh

(In [15343]) Stop the music player when playing a video in MythVideo? when using an external player.

Refs #4222.

comment:47 Changed 16 years ago by paulh

Resolution: fixed
Status: newclosed

comment:48 Changed 16 years ago by Roo <roo.watt@…>

Replying to paulh:

Jump points are deliberately disabled while ripping a CD because they can cause all sorts problems. It could be possible to only allow the jump point to show the mini-player to work but it isn't something I want to spend time on. If you provide a patch I will take a look at it :-)

I realised that later today, when I was driving. I may look at a patch as I will use the miniplayer a lot when ripping the remaining few hundred CDs :) Otherwise it is no biggy.

  • The mini layer popup causes the "Rip completed successfuly" popup to not to respond to SELECT to dismiss the popup. ESCAPE will dismiss the popup though.

No idea about this. Sound like a focus problem are you using a window manager?

It does, but I am using a window manager. Actually I intended on stating that when I commented but obviously forgot.

comment:49 Changed 16 years ago by Roo <roo.watt@…>

Resolution: fixed
Status: closednew

I noticed that when stopping the miniplayer and entering LiveTV that I had no sound.

The frontend logs showed that there was an error opening the audio device, it seems that not all audio devices have this problem as testing on my laptop didn't show the problem.

I discussed this with "iamlindro" in IRC and he was kind enough to test and confirm this bug. He also added that mplayer was having problems when launched via mythvideo.

Changed 16 years ago by Roo <roo.watt@…>

Stopped miniplayer LiveTV audio fix

comment:50 Changed 16 years ago by paulh

(In [15382]) Make sure the music player deletes its AudioOutput? even if the player is stopped when a PLAYBACK_START event is received.

Refs #4222.

comment:51 in reply to:  49 ; Changed 16 years ago by paulh

Replying to Roo <roo.watt@gmail.com>:

I noticed that when stopping the miniplayer and entering LiveTV that I had no sound.

The frontend logs showed that there was an error opening the audio device, it seems that not all audio devices have this problem as testing on my laptop didn't show the problem.

I depends on your sound devices driver and/or card capabilities whether you see this problem. If it only allows one stream to be played at a time then you can get this problem.

I discussed this with "iamlindro" in IRC and he was kind enough to test and confirm this bug. He also added that mplayer was having problems when launched via mythvideo.

Can you please try updating and try again. Let me know if it fixes it for you.

comment:52 in reply to:  51 Changed 16 years ago by Roo <roo.watt@…>

Replying to paulh:

Replying to Roo <roo.watt@gmail.com>:

I noticed that when stopping the miniplayer and entering LiveTV that I had no sound.

Can you please try updating and try again. Let me know if it fixes it for you.

Paul, I updated and tested and [15382] seems to fix my problems.

Thanks.

comment:53 Changed 16 years ago by paulh

Resolution: fixed
Status: newclosed

comment:54 Changed 16 years ago by anonymous

Resolution: fixed
Status: closednew

It appears as though the mini-player won't change tracks while viewing a web page in MythBrowser? at present. I have checked this in both the MythNews? and MythBrowser? plain; playback is halted until MythBrowser? is closed (to the feed / story selection screen in the case of 'News and to the page selection screen in the case of 'Browser).

This is the case regardless of whether the popup is enabled.

My MythPlugins? is current SVN as of about 10 mins ago, and MythTV is from 7 days ago.

comment:55 in reply to:  54 Changed 16 years ago by paulh

Replying to anonymous:

It appears as though the mini-player won't change tracks while viewing a web page in MythBrowser? at present. I have checked this in both the MythNews? and MythBrowser? plain; playback is halted until MythBrowser? is closed (to the feed / story selection screen in the case of 'News and to the page selection screen in the case of 'Browser).

This is the case regardless of whether the popup is enabled.

My MythPlugins? is current SVN as of about 10 mins ago, and MythTV is from 7 days ago.

The mini player needs to receive events to know when a track has finished. Unfortunately anything that stops these events being dispatched will cause the player to pause at the end of a track until these events get processed.

The reason MythBrowser? in particular causes this problem is because it is not a proper plugin but is in fact a separate application which when it's run causes the main thread in the FE to pause stopping the events from being dispatched.

comment:56 Changed 16 years ago by drdaz

That was me as anonymous; forgot to add my username ;-)

Attaching a really quick and nasty patch for mythnews which launches mythbrowser as a background process, thus allowing the main FE thread to continue processing events. There are almost certainly better ways to achieve this, but I don't know C++. This seems to achieve an acceptable result for me, so I thought I'd share.

It's not ideal, the mini-player popup doesn't appear while viewing a page, but that's entirely secondary for my purposes. Also this only addresses the issue for mythnews, although I'm sure something similar could be done for 'normal' mythbrowser. Could this approach be useful? Is there any reason why mythbrowser shouldn't allow the main FE thread to continue?

Changed 16 years ago by drdaz

Attachment: mythnews_thread.patch added

patch to mythnews to launch browser as a background process

comment:57 Changed 16 years ago by paulh

(In [16153]) Fix a feature? of the background music player were if an external program is run like mythbrowser using myth_system() the music will stop at the end of the current track and will only resume again when the external program is exited.

To work around this this commit adds an additional flag to myth_system that allows you to run a command waiting for it to finish but doesn't block the parent thread so it can continue dispatching messages etc.

It also updates MythBrowser? and MythNews? to call myth_system() with the new flag and blocks all input while the external program is running.

Refs #4222.

comment:58 Changed 16 years ago by paulh

(In [16154]) Merge mythtv part of [16153] from trunk.

Fix a feature? of the background music player were if an external program is run like mythbrowser using myth_system() the music will stop at the end of the current track and will only resume again when the external program is exited.

To work around this this commit adds an additional flag to myth_system that allows you to run a command waiting for it to finish but doesn't block the parent thread so it can continue dispatching messages etc.

It also updates MythBrowser? and MythNews? to call myth_system() with the new flag and blocks all input while the external program is running.

Refs #4222.

comment:59 Changed 16 years ago by paulh

Resolution: fixed
Status: newclosed

(In [16155]) Merge mythplugins part of [16153] from trunk.

Fix a feature? of the background music player were if an external program is run like mythbrowser using myth_system() the music will stop at the end of the current track and will only resume again when the external program is exited.

To work around this this commit adds an additional flag to myth_system that allows you to run a command waiting for it to finish but doesn't block the parent thread so it can continue dispatching messages etc.

It also updates MythBrowser? and MythNews? to call myth_system() with the new flag and blocks all input while the external program is running.

Closes #4222.

Note: See TracTickets for help on using tickets.