NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 49 50 51 52 53 … 93 Next »
Simple Recording status?

 
  • 0 Vote(s) - 0 Average
Simple Recording status?
rwmech
Offline

Member

Posts: 76
Threads: 11
Joined: Sep 2006
#1
2006-10-08, 01:31 PM
Ok, what am I missing here. Something doesnt seem right

Code:
    private ScheduledRecording Mystat=new ScheduledRecording();
    Logger.Verbose("Status: "+Mystat.getRecordingStatus().ToString());

This always returns 0, even when I know i'm recording.

Shouldnt it return something other than 0?
Rob Mech - Kirkland, IL - http://www.robsprogrammingjunk.com
________________________________________________________________________
Athlon XP 1700+ | GeForce 5200 | NVidia Decoder | Technisat Air2PC ATSC Tuner
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,583
Threads: 384
Joined: Dec 2004
#2
2006-10-08, 03:46 PM
rwmech Wrote:Ok, what am I missing here. Something doesnt seem right

Code:
    private ScheduledRecording Mystat=new ScheduledRecording();
    Logger.Verbose("Status: "+Mystat.getRecordingStatus().ToString());
I've never done anything like this but I think you need to be checking the actual capture source status.

You could try getting the PluginHelper and then use the IPluginHelper.getCaptureSourceStatus() method. This seems to return a string array - not sure what you do with it once you've got it.

Cheers,
Brian
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,697
Threads: 767
Joined: Nov 2003
#3
2006-10-08, 04:07 PM
rwmech Wrote:Ok, what am I missing here. Something doesnt seem right

Code:
private ScheduledRecording Mystat=new ScheduledRecording();
    Logger.Verbose("Status: "+Mystat.getRecordingStatus().ToString());

This always returns 0, even when I know i'm recording.

Shouldnt it return something other than 0?
A ScheduledRecording does not represent the status of system with regard to recording, but rather a specific recording that may occur some time in the future.

Its not until that ScheduledRecording has had its starttime/endtime/channel/etc set, and been saved to the database, that the recording service will pick it up examine whether it needs to start a recording, and update its status to reflect this. Even then, you'd need to be reloading it from the database to get the real stats - creating a new one like you've shown above is just a empty representation of a recording that may occur some time in the future.
rwmech
Offline

Member

Posts: 76
Threads: 11
Joined: Sep 2006
#4
2006-10-09, 02:20 AM
Ok, here is what eventually worked. If anyone else was grapling with this, here is a quick function to say yes or no.

Code:
// Function to check to see if recording is in progress.  Return True if actively recording
    private bool CheckStatus()
    {
        foreach (ScheduledRecording scheduledRecording in ScheduleHelper.getInstance().LoadRecordingSchedule())
            {
                if (scheduledRecording.getRecordingStatus()== ScheduledRecording.STATUS_IN_PROGRESS)
                {
                    return true;
                }
            }
            return false;
       }
Rob Mech - Kirkland, IL - http://www.robsprogrammingjunk.com
________________________________________________________________________
Athlon XP 1700+ | GeForce 5200 | NVidia Decoder | Technisat Air2PC ATSC Tuner
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Custom recording tomx 2 520 2025-02-07, 09:14 AM
Last Post: tomx
  API call for Recording Complete linustorvalds 1 346 2025-01-19, 02:11 PM
Last Post: mvallevand
  Manual recording API mvallevand 2 985 2023-11-09, 02:14 PM
Last Post: mvallevand
  Recording direct to GPhotos API rgonzalez 0 1,449 2020-06-29, 04:45 AM
Last Post: rgonzalez
  Recurring Recording URL Parameters jcole998 2 2,964 2019-09-19, 01:08 PM
Last Post: jcole998
  Get recording length from stream skogl 46 13,831 2019-08-15, 09:34 PM
Last Post: sub
  Status field values in Table SCHEDULED_RECORDING scJohn 2 2,332 2019-07-03, 07:01 PM
Last Post: sub
  Unexpected result when deleting a pending recording scJohn 5 3,742 2018-05-06, 10:09 PM
Last Post: sub
  Tuner status & disk usage mikaelgu 2 2,911 2017-04-10, 04:51 PM
Last Post: mikaelgu
  How to best verify success when adding a recurring recording drmargarit 1 2,797 2017-03-02, 03:13 PM
Last Post: mvallevand

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

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

Linear Mode
Threaded Mode