Hi Guys,
I had a quick play with the BT box last night (its been a while) as I was thinking about the possibility of playing MKV or TS files with the box.
Anyway when I was playing video with it last time and creating a new VIDEO object I was getting menu corruption when leaving the about page, and the box seemed to be in an unstable state.
Last night I discovered a nice static class 'MediaSessionManager' which seems the box uses for playing all types of media, including the DVB-T, VOD stuff etc.
In the AboutPage class add:
using Microsoft.TV2.Media;
In the OnSelect_NetworkInfo method I added the following line:
MediaSessionManager.TuneToWMSURL("test", false, g, "mms://qstream-wm.qbrick.com/00237/kkv08.wmv");
This now plays wmv from the C# very reliably with no corruption to the menu system or any other unusual effects.
MediaSessionManager also has a few other TUNE methods which call the lower classes for VOD and DVR and LIVE playback.
I am going to look into the VOD and DVR playback classes to see if it is possible to playback video from a file on the hard disk.
I did try a few things like:
MediaSessionManager.TuneToWMSURL("test", false, g, @"file:\Hard Disk 2\EK06981.asf");
MediaSessionManager.TuneToWMSURL("test", false, g, @"file://\Hard Disk 2\EK06981.asf");
MediaSessionManager.TuneToWMSURL("test", false, g, @"file://Hard Disk 2/EK06981.asf");
But it seemed to generate an error of:
strWmsErrorDesc "Playlist not open"
Mick
You probably tried this too but I think a file url needs an extra "/"
something like "file:///Hard Disk 2/EK06981.asf"
I found out that its "Hard Disk2" and not "Hard disk 2" (no space)
I managed to get a mp3 file playing from disk with the following:
string url = @"file:\\\Hard Disk2\Heart.mp3";
string str = TV2Client.GenerateTuneOpID();
TV2Event theEvent = new TV2Event("AV.Request.Tune");
theEvent.Add("TuneOpID", str);
if (url.EndsWith(".mp3", StringComparison.OrdinalIgnoreCase))
{
theEvent.Add("ServiceID", "mp3://" + url);
}
else
{
theEvent.Add("ServiceID", "wms://" + url);
}
theEvent.Add("PipeID", "AVPipeTunerSession");
theEvent.Add("url", url);
TV2EventServer.DispatchEngineEvent(theEvent);
Mick