NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 37 38 39 40 41 … 93 Next »
Getting LiveTV Details

 
  • 0 Vote(s) - 0 Average
Getting LiveTV Details
ralphy
Offline

Senior Member

Posts: 255
Threads: 51
Joined: Nov 2006
#1
2007-12-02, 01:29 AM
What is the best way to get details of the LiveTV currently playing including, Program description, start time, end time? Channel Name and Number come through as an event notification, but I have not been able to get any GBPVRPublic methods or properties to get the other details. (Perhaps I'm using the wrong ones, or trying them the wrong way)

So I extract these details directly from the database. The problem is that I suspect that this might be the cause of some random pausing and stuttering during LiveTV playback, since I assume that the connection.Open() (see below) locks the database for exclusive access until connection.Close() is called and maybe PVRX2 is waiting to gain access too. For my code, this takes between 150-200mS, and is done every 30 seconds, since the program details will change at the end of a show, and I want to get the current information.



Code:
connection = DatabaseHelperFactory.getDbProviderFactory().CreateConnection();
connection.ConnectionString=GBPVRInfo.GBPVRDBConnectionString;
connection.Open();

Could a locked database be the cause of the stuttering?
How can I best get the data I want from the database?
Can I open the database non-exclusively/readonly, and if so how?
[SIZE="1"]Silverstone GD01S-MXR (three dead rows of pixels in the LCD and defective remote control), Power: Zalman ZM460B-APS (blew up - can't remember what's there now); CPU: Pentium D 3.2 GHz with Asus V72 Cooler; MD: Asus P5LD2 Deluxe 2048MB,
WDC WD10EADS 1TB Data, 320GB System, Asus EN9400GT Silent 512MB, Hauppauge HVR 1300,
XP Home SP3, GB-PVR 2.0, ExternalDisplay v0.3[/SIZE]
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,686
Threads: 767
Joined: Nov 2003
#2
2007-12-02, 01:33 AM
There is no public API for accessing this type of info. About the only way you could get this info is accessing the database like you currently are.

I'm fairly sure the database isnt locked unless you do an update, and then I think its only locked for the duration of that statement.

You're correct that database access could cause a momentary blip, so you'd be best to cache the last programme details loaded from the database until the either the channel changes or the end time of the show passes. No point in re-reading the info if you know its still the same show.
ralphy
Offline

Senior Member

Posts: 255
Threads: 51
Joined: Nov 2006
#3
2007-12-02, 02:06 AM
sub Wrote:No point in re-reading the info if you know its still the same show.

Great idea - I need to stand back and look at the forest rather than the trees. I guess this happens sometimes. Hopefully this will reduce the likelihood of the stutter.

Thanks sub!
[SIZE="1"]Silverstone GD01S-MXR (three dead rows of pixels in the LCD and defective remote control), Power: Zalman ZM460B-APS (blew up - can't remember what's there now); CPU: Pentium D 3.2 GHz with Asus V72 Cooler; MD: Asus P5LD2 Deluxe 2048MB,
WDC WD10EADS 1TB Data, 320GB System, Asus EN9400GT Silent 512MB, Hauppauge HVR 1300,
XP Home SP3, GB-PVR 2.0, ExternalDisplay v0.3[/SIZE]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Possible to have another element in details-single.xml Northpole 2 2,207 2014-07-11, 09:51 PM
Last Post: Northpole
  Recording export tags and export details? spinnaker 10 4,389 2013-10-23, 01:48 AM
Last Post: mvallevand
  Skin element Details in NowNext Jaggy 2 1,780 2011-09-19, 11:50 PM
Last Post: Jaggy
  "Rating" in cached event details xml alibert 74 16,779 2011-03-28, 01:06 AM
Last Post: zehd
  Current program details, from batch file! pBS 48 19,566 2008-12-09, 08:52 AM
Last Post: pBS
  Upcoming Warning During LiveTV hkdl 11 3,197 2007-04-17, 03:08 PM
Last Post: hkdl
  exiting livetv from a videoplugin betlit 2 1,455 2007-01-15, 09:04 AM
Last Post: betlit
  What does happen at "Before LiveTV Play"? alibert 0 1,213 2005-12-02, 09:39 AM
Last Post: alibert

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode