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: 473181" data-attributes="member: 71550"><p>Right, after looking the right place I got it going, I'm having a bit of a problem with starting playback though, as it crashes the client, I don't know what I'm missing.</p><p></p><p>I get the file (local drive on server, multiseat) and translates that into RTSP (at least I think so) and tries to start playback.</p><p></p><p>[CODE] private void oneClickPlayRecordings()</p><p> {</p><p> try</p><p> {</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("test");</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> string fileName = recordings[dlg.SelectedId].FileName.ToString();</p><p> Log.Info(fileName);</p><p> g_Player.Stop(true);</p><p> string fileRTSP = RemoteControl.Instance.GetUrlForFile(fileName);</p><p> Log.Info("PowerPlay - try to fetch stream " + fileRTSP);</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> }</p><p></p><p> }</p><p> catch (Exception ex)</p><p> {</p><p> Log.Error("PowerPlay - Error(4): " + ex.Message + "( " + ex.StackTrace + " )");</p><p> }</p><p></p><p> }[/CODE]</p><p></p><p>I would really appreciate any help on the matter, the TVPlugin looks really complicated but I only need to start playback of a recording - not all the other stuff.</p><p></p><p><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /></p></blockquote><p></p>
[QUOTE="pilehave, post: 473181, member: 71550"] Right, after looking the right place I got it going, I'm having a bit of a problem with starting playback though, as it crashes the client, I don't know what I'm missing. I get the file (local drive on server, multiseat) and translates that into RTSP (at least I think so) and tries to start playback. [CODE] private void oneClickPlayRecordings() { try { GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); if (dlg == null) return; dlg.Reset(); dlg.SetHeading("test"); 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) { string fileName = recordings[dlg.SelectedId].FileName.ToString(); Log.Info(fileName); g_Player.Stop(true); string fileRTSP = RemoteControl.Instance.GetUrlForFile(fileName); Log.Info("PowerPlay - try to fetch stream " + fileRTSP); if (g_Player.Play(fileRTSP, g_Player.MediaType.Recording)) { g_Player.SeekAbsolute(0); g_Player.ShowFullScreenWindow(); } } } catch (Exception ex) { Log.Error("PowerPlay - Error(4): " + ex.Message + "( " + ex.StackTrace + " )"); } }[/CODE] I would really appreciate any help on the matter, the TVPlugin looks really complicated but I only need to start playback of a recording - not all the other stuff. :thx: [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
TVDatabase.GetRecordedTV question
Contact us
RSS
Top
Bottom