home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
[patch] Two fixes: AudioPlayerWMP9.cs for trailers/streams
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="scoop" data-source="post: 32210" data-attributes="member: 10498"><p>Hi,</p><p></p><p>The <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1399874&group_id=107397&atid=647927" target="_blank">following patch at sourceforge</a> is a fix for the following two bugs:</p><ul> <li data-xf-list-type="ul"><br /> 1 My Trailers plugin won't play another trailer after<br /> the first trailer has been played. The same<br /> goes for internet radio/video streams.<br /> <br /> 2 My Trailers plugin shows a black screen after a<br /> trailer is finished playing. Although you hear the<br /> navigation sounds (and you can see the window title<br /> changing), the screen stays black.</li> </ul><p><strong><u>Bug 1 discussion:</u></strong></p><p>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.</p><p></p><p><strong><u>Bug 2 discussion:</u></strong></p><p>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:</p><p>[code] if (!Utils.IsAudio(_currentFile))</p><p> GUIGraphicsContext.IsFullScreenVideo = false;</p><p>[/code]</p><p>This addition only switches from fullscreen to windowed mode once playback has ended if the AudioPlayerWMP9 is _not_ playing regular audio.</p><p></p><p></p><p>The above changes are tested for playback of music, internet radio streams, video streams and the my trailers plugin.</p><p></p><p>Kind regards,</p><p>Michel</p></blockquote><p></p>
[QUOTE="scoop, post: 32210, member: 10498"] Hi, The [url=http://sourceforge.net/tracker/index.php?func=detail&aid=1399874&group_id=107397&atid=647927]following patch at sourceforge[/url] is a fix for the following two bugs: [list] 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. [/list] [b][u]Bug 1 discussion:[/u][/b] 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. [b][u]Bug 2 discussion:[/u][/b] 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; [/code] 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 [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
[patch] Two fixes: AudioPlayerWMP9.cs for trailers/streams
Contact us
RSS
Top
Bottom