Results 1 to 8 of 8

Thread: ScheduleHelper.SheduleRecording returns Nothing

  1. #1
    Join Date
    Aug 2008
    Location
    Quebec City
    Posts
    46

    ScheduleHelper.SheduleRecording returns Nothing

    Hi,

    I am working on a small app using the Reminders and Recordings in GB-PVR.
    I am using the SheduleRecording function and it always return Nothing (or null). I get Recording failed when I try to do the same with EWA.

    The ScheduleHelper.getInstance works because I can read the guide et set and remove reminder. Is there a way to get more info about what's happening? I get no exception et nothing in the logs folder.

    Thanks!

    Public Shared Function ScheduleRecording(ByVal program As Programme) As Boolean
    Dim ScheduledRec As ScheduledRecording
    ScheduledRec = Schedules.SheduleRecording(program.getChannelOID, _
    program.getStartTime, _
    program.getEndTime, _
    program, _
    ScheduledRecording.TYPE_RECORD_ONCE, _
    ScheduledRecording.GROUP_NONE, _
    program.getTitle)

    Return Not ScheduledRec Is Nothing
    End Function

  2. #2
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    76,584
    Are you doing this as plugin inside PVRX2.exe or GBPVRRecordingService.exe? GB-PVR's Plugin APIs only work inside these processes.

  3. #3
    Join Date
    Aug 2008
    Location
    Quebec City
    Posts
    46
    It's a stand alone application that uses GBPVRBackendCommon.dll and GBPVRPublic.dll.

    I first create a ScheduleHelper instance (ScheduleHelper.getInstance). I call GetListingsForTimePeriod loop through the listings, get the programme object that match certain criteria. I then call CreateReminder, RemoveReminder or SheduleRecording functions. The remindeer functions worked but not the recording. It doesn't work in EWA neither.

  4. #4
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    76,584
    Sorry, but as I mentioned this in your other thread a few days ago, the API doesnt work outside of PVRX2.exe or GBPVRRecordingService.exe. You might of got lucky with some calls, but in general there is various environment stuff configured by those processes that will be missing when you try to do it in a standalone process. For example, the calls you mentioned above that work, are all ones that simply read/write the gbpvr.db3. When you try to schedule a recording, it needs to use the GB-PVR communication functions for talking to the Recording Service.

  5. #5
    Join Date
    Aug 2008
    Location
    Quebec City
    Posts
    46
    Ok, that makes sense. But I still don't get how EWA can make recording works (even though it doesn't work on my machine).

  6. #6
    Join Date
    Nov 2003
    Location
    NextPVR HQ, Wellington, New Zealand
    Posts
    76,584
    Does a GB-PVR log get automatically created for you process?

  7. #7
    Join Date
    Aug 2008
    Location
    Quebec City
    Posts
    46
    I never though about looking in my app folder...damn!

    I found the problem, I just had to put the NativeUtilities.dll in my folder and it works fine now.

    Thanks!

    2008-09-10 19:50:03.027 VERBOSE [10] Looking for missing assembly in : NativeUtilities, Version=1.0.3071.28412, Culture=neutral, PublicKeyToken=null
    2008-09-10 19:50:03.027 VERBOSE [10] Looking for missing assembly in plugin\common: NativeUtilities, Version=1.0.3071.28412, Culture=neutral, PublicKeyToken=null
    2008-09-10 19:50:03.035 ERROR [10] Error creating: GBPVR.Backend.Common.AnalogHighDefRecordingSource
    2008-09-10 19:50:03.035 ERROR [10] Exception has been thrown by the target of an invocation.
    2008-09-10 19:50:03.036 ERROR [10] at System.RuntimeTypeHandle.CreateInstance(RuntimeTyp e type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
    at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
    at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
    at System.Activator.CreateInstance(Type type, Boolean nonPublic)
    at System.Activator.CreateInstance(Type type)
    at GBPVR.Backend.Common.xc4f12ec3a8a4c96b.xb18f2a6855 a29bd8(String xa17d71c8507c19de)

  8. #8
    Join Date
    Feb 2008
    Location
    Belgium
    Posts
    27
    Quote Originally Posted by sub View Post
    Sorry, but as I mentioned this in your other thread a few days ago, the API doesnt work outside of PVRX2.exe or GBPVRRecordingService.exe. You might of got lucky with some calls, but in general there is various environment stuff configured by those processes that will be missing when you try to do it in a standalone process. For example, the calls you mentioned above that work, are all ones that simply read/write the gbpvr.db3. When you try to schedule a recording, it needs to use the GB-PVR communication functions for talking to the Recording Service.
    It works when it's executed in it's own AppDomain

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •