- November 14, 2004
- 614
- 7
Hi,
The following patch at sourceforge is a fix for the following two bugs:
The source of the problem lies with the IsRadio property from AudioPlayerWMP9.cs and appears g_Player.cs in public static bool Play(string strFile). The first thing this method does, is check if the player is playing radio. if so, then playback of radio is stopped (by sending GUIMessage.MessageType.GUI_MSG_RECORDER_STOP_RADIO). Now look at the code for the IsRadio property in AudioPlayerWMP9.cs. The first time a stream is played, the _currentFile doesn't contain a URL to a stream. Any subsequent calls to IsRadio will result in true being returned, and g_Player.Play(strFile) to send the earlier mentioned message to stop playback. IMO the solution is to remove the IsRadio override altogether, since AudioPlayerWMP9.cs will never be playing radio.
Bug 2 discussion:
After playback of a trailer/video stream has ended, void SongEnded(bool bManualStop) is (eventually) called. Here the call to GUIGraphicsContext.IsFullScreenVideo=false; is commented out. This is probably so, that if one's playing music, the fullscreen visualization isn't switched back to windowed mode. The OnVideoWindowChanged() handler in g_Player is only effective when the player is still playing and still has an active video window (HasVideo property). So, the (conditional) switch to windowed video should be made in AudioPlayerWMP9.SongEnded(bool bManualStop) before playback is actually stopped. The solution to the problem is to to add the following code in top of this method:
This addition only switches from fullscreen to windowed mode once playback has ended if the AudioPlayerWMP9 is _not_ playing regular audio.
The above changes are tested for playback of music, internet radio streams, video streams and the my trailers plugin.
Kind regards,
Michel
The following patch at sourceforge is a fix for the following two bugs:
1 My Trailers plugin won't play another trailer after
the first trailer has been played. The same
goes for internet radio/video streams.
2 My Trailers plugin shows a black screen after a
trailer is finished playing. Although you hear the
navigation sounds (and you can see the window title
changing), the screen stays black.
The source of the problem lies with the IsRadio property from AudioPlayerWMP9.cs and appears g_Player.cs in public static bool Play(string strFile). The first thing this method does, is check if the player is playing radio. if so, then playback of radio is stopped (by sending GUIMessage.MessageType.GUI_MSG_RECORDER_STOP_RADIO). Now look at the code for the IsRadio property in AudioPlayerWMP9.cs. The first time a stream is played, the _currentFile doesn't contain a URL to a stream. Any subsequent calls to IsRadio will result in true being returned, and g_Player.Play(strFile) to send the earlier mentioned message to stop playback. IMO the solution is to remove the IsRadio override altogether, since AudioPlayerWMP9.cs will never be playing radio.
Bug 2 discussion:
After playback of a trailer/video stream has ended, void SongEnded(bool bManualStop) is (eventually) called. Here the call to GUIGraphicsContext.IsFullScreenVideo=false; is commented out. This is probably so, that if one's playing music, the fullscreen visualization isn't switched back to windowed mode. The OnVideoWindowChanged() handler in g_Player is only effective when the player is still playing and still has an active video window (HasVideo property). So, the (conditional) switch to windowed video should be made in AudioPlayerWMP9.SongEnded(bool bManualStop) before playback is actually stopped. The solution to the problem is to to add the following code in top of this method:
Code:
if (!Utils.IsAudio(_currentFile))
GUIGraphicsContext.IsFullScreenVideo = false;
The above changes are tested for playback of music, internet radio streams, video streams and the my trailers plugin.
Kind regards,
Michel