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
MediaPortal 1 Plugins
OK, i really need some help from the remoting buffs in here.
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="MrSensitive" data-source="post: 22087" data-attributes="member: 10304"><p>please take a look at the following code snippet..</p><p>[code]</p><p>public int PlayAlbum(int AlbumID)</p><p> {</p><p> //Get all tracks from the album and initialize the playlistplayer?</p><p> PlayListPlayer.GetPlaylist(PlayListPlayer.PlayListType.PLAYLIST_MUSIC).Clear();</p><p> PlayListPlayer.CurrentPlaylist = PlayListPlayer.PlayListType.PLAYLIST_MUSIC;</p><p> PlayList.PlayListItem playlistItem = new PlayList.PlayListItem();</p><p> </p><p> playlistItem.Type = PlayList.PlayListItem.PlayListItemType.Audio;</p><p> playlistItem.FileName = @"M:\my Albums\Bjork - Homogenic\04 Bachelorette.mp3";</p><p> playlistItem.Description = "testing, testin 123";</p><p> playlistItem.Duration = 23;</p><p> PlayListPlayer.GetPlaylist(PlayListPlayer.PlayListType.PLAYLIST_MUSIC).Add(playlistItem);</p><p></p><p> PlayListPlayer.Play(0);</p><p> return 1;</p><p> }[/code]</p><p>this method is exposed in a remoting interface, but somehow it keeps failing. </p><p></p><p>it probably has to to with the fact that a singleton is being called (PlayListPlayer).</p><p></p><p>when I execute the method within the assembly itself, everithing works fine. </p><p>when I try to execute it using remoting, strange things happen.</p><p>sometimes it just works, most f the times a Syste.remoting exception occurs and sometimes the song plays, but it seems that it is running not in the Mediaportal context..</p><p></p><p>some programmers at work said somethng about PlaylistPlayer not being threadsafe.. but that is not really my cup of tea..</p><p></p><p>many thanks in advance.</p><p></p><p>(BTW, as soon as I get this stable, We can release a first version of MPBlue 8) )</p></blockquote><p></p>
[QUOTE="MrSensitive, post: 22087, member: 10304"] please take a look at the following code snippet.. [code] public int PlayAlbum(int AlbumID) { //Get all tracks from the album and initialize the playlistplayer? PlayListPlayer.GetPlaylist(PlayListPlayer.PlayListType.PLAYLIST_MUSIC).Clear(); PlayListPlayer.CurrentPlaylist = PlayListPlayer.PlayListType.PLAYLIST_MUSIC; PlayList.PlayListItem playlistItem = new PlayList.PlayListItem(); playlistItem.Type = PlayList.PlayListItem.PlayListItemType.Audio; playlistItem.FileName = @"M:\my Albums\Bjork - Homogenic\04 Bachelorette.mp3"; playlistItem.Description = "testing, testin 123"; playlistItem.Duration = 23; PlayListPlayer.GetPlaylist(PlayListPlayer.PlayListType.PLAYLIST_MUSIC).Add(playlistItem); PlayListPlayer.Play(0); return 1; }[/code] this method is exposed in a remoting interface, but somehow it keeps failing. it probably has to to with the fact that a singleton is being called (PlayListPlayer). when I execute the method within the assembly itself, everithing works fine. when I try to execute it using remoting, strange things happen. sometimes it just works, most f the times a Syste.remoting exception occurs and sometimes the song plays, but it seems that it is running not in the Mediaportal context.. some programmers at work said somethng about PlaylistPlayer not being threadsafe.. but that is not really my cup of tea.. many thanks in advance. (BTW, as soon as I get this stable, We can release a first version of MPBlue 8) ) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
OK, i really need some help from the remoting buffs in here.
Contact us
RSS
Top
Bottom