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!)
TVDatabase.GetRecordedTV question
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="pilehave" data-source="post: 474349" data-attributes="member: 71550"><p>Oh, well that's pretty similar to what i stubled around with late last night, and it looks like it almost works, although I loose something in the process, as I cannot control playback or go back and forth between windows...my code is called like this:</p><p></p><p>[CODE]</p><p>GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU);</p><p> if (dlg == null) return;</p><p> dlg.Reset();</p><p> dlg.SetHeading("Recorded TV");</p><p> int counter = 0;</p><p></p><p> IList<Recording> recordings = Recording.ListAll();</p><p> foreach (Recording rec in recordings)</p><p> {</p><p> counter++;</p><p> GUIListItem item = new GUIListItem();</p><p> item.Label = rec.StartTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat);</p><p> item.Label2 = rec.Title;</p><p> item.PinImage = "";</p><p> dlg.Add(item);</p><p> }</p><p></p><p>dlg.DoModal(GUIWindowManager.ActiveWindow);</p><p>if (dlg.SelectedId > 0)</p><p>{</p><p>//I can track in the log that this works as expected, which is to read the filename of the selected recording</p><p>GUIWindowManager.SendThreadCallbackAndWait(StopPlayback, 0, 0, recordings[dlg.SelectedId].FileName);</p><p>}</p><p>[/CODE]</p><p></p><p>(recordings[dlg.SelectedId].FileName is an object containing the actual filename, something like D:\MP Recordings\MyRecording.ts)</p><p></p><p>The function called, looks like this:</p><p></p><p>[CODE] private int StopPlayback(int p1, int p2, object d)</p><p> {</p><p> if (g_Player.Playing)</p><p> {</p><p> g_Player.Stop(true);</p><p> }</p><p> string fileName = d.ToString();</p><p> string fileRTSP = RemoteControl.Instance.GetUrlForFile(fileName);</p><p> Log.Info("PowerPlay - try to fetch stream " + fileRTSP); //This works</p><p> if (g_Player.Play(fileRTSP, g_Player.MediaType.Recording))</p><p> {</p><p> g_Player.SeekAbsolute(0);</p><p> g_Player.ShowFullScreenWindow();</p><p> }</p><p></p><p> return 0;</p><p> }[/CODE]</p><p></p><p>This is stolen from somewhere in MediaPortal and looks like it could work, and playback is actually started in fullscreen, but it is like as if focus is lost somehow...I can pause the new stream, will try and post logs when I get home (no tv-card at work!).</p><p></p><p>One issue with the above code is that it is RTSP only (multiseat) but I don't really care as TVE2 is being dumped anyway.</p></blockquote><p></p>
[QUOTE="pilehave, post: 474349, member: 71550"] Oh, well that's pretty similar to what i stubled around with late last night, and it looks like it almost works, although I loose something in the process, as I cannot control playback or go back and forth between windows...my code is called like this: [CODE] GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); if (dlg == null) return; dlg.Reset(); dlg.SetHeading("Recorded TV"); int counter = 0; IList<Recording> recordings = Recording.ListAll(); foreach (Recording rec in recordings) { counter++; GUIListItem item = new GUIListItem(); item.Label = rec.StartTime.ToString("t", CultureInfo.CurrentCulture.DateTimeFormat); item.Label2 = rec.Title; item.PinImage = ""; dlg.Add(item); } dlg.DoModal(GUIWindowManager.ActiveWindow); if (dlg.SelectedId > 0) { //I can track in the log that this works as expected, which is to read the filename of the selected recording GUIWindowManager.SendThreadCallbackAndWait(StopPlayback, 0, 0, recordings[dlg.SelectedId].FileName); } [/CODE] (recordings[dlg.SelectedId].FileName is an object containing the actual filename, something like D:\MP Recordings\MyRecording.ts) The function called, looks like this: [CODE] private int StopPlayback(int p1, int p2, object d) { if (g_Player.Playing) { g_Player.Stop(true); } string fileName = d.ToString(); string fileRTSP = RemoteControl.Instance.GetUrlForFile(fileName); Log.Info("PowerPlay - try to fetch stream " + fileRTSP); //This works if (g_Player.Play(fileRTSP, g_Player.MediaType.Recording)) { g_Player.SeekAbsolute(0); g_Player.ShowFullScreenWindow(); } return 0; }[/CODE] This is stolen from somewhere in MediaPortal and looks like it could work, and playback is actually started in fullscreen, but it is like as if focus is lost somehow...I can pause the new stream, will try and post logs when I get home (no tv-card at work!). One issue with the above code is that it is RTSP only (multiseat) but I don't really care as TVE2 is being dumped anyway. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
TVDatabase.GetRecordedTV question
Contact us
RSS
Top
Bottom