evRecordStopped,
evNewProgramInfo,
evRecordFailed,
- evRecordWriteError
+ evRecordWriteError,
+ evNewEventInfo
};
enum {
NoError=0,
virtual RESULT stop()=0;
virtual SWIG_VOID(RESULT) frontendInfo(ePtr<iFrontendInformation> &SWIG_OUTPUT)=0;
virtual SWIG_VOID(RESULT) stream(ePtr<iStreamableService> &SWIG_OUTPUT)=0;
+ virtual SWIG_VOID(RESULT) subServices(ePtr<iSubserviceList> &SWIG_OUTPUT)=0;
};
SWIG_TEMPLATE_TYPEDEF(ePtr<iRecordableService>, iRecordableServicePtr);
eDebug("[eDVBServiceRecord] now running: %s (%d seconds)", event_now->getEventName().c_str(), event_now->getDuration());
m_last_event_id = event_id;
+
+ m_event((iRecordableService*)this, evNewEventInfo);
}
void eDVBServiceRecord::saveCutlist()
}
}
+
+RESULT eDVBServiceRecord::subServices(ePtr<iSubserviceList> &ptr)
+{
+ ptr = this;
+ return 0;
+}
+
+int eDVBServiceRecord::getNumberOfSubservices()
+{
+ ePtr<eServiceEvent> evt;
+ if (!m_event_handler.getEvent(evt, 0))
+ return evt->getNumOfLinkageServices();
+ return 0;
+}
+
+RESULT eDVBServiceRecord::getSubservice(eServiceReference &sub, unsigned int n)
+{
+ ePtr<eServiceEvent> evt;
+ if (!m_event_handler.getEvent(evt, 0))
+ {
+ if (!evt->getLinkageService(sub, m_ref, n))
+ return 0;
+ }
+ sub.type=eServiceReference::idInvalid;
+ return -1;
+}
class eDVBServiceRecord: public eDVBServiceBase,
public iRecordableService,
public iStreamableService,
+ public iSubserviceList,
public Object
{
DECLARE_REF(eDVBServiceRecord);
RESULT stream(ePtr<iStreamableService> &ptr);
RESULT getError(int &error) { error = m_error; return 0; }
RESULT frontendInfo(ePtr<iFrontendInformation> &ptr);
+ RESULT subServices(ePtr<iSubserviceList> &ptr);
/* streamable service */
PyObject *getStreamingData();
+ // iSubserviceList
+ int getNumberOfSubservices();
+ RESULT getSubservice(eServiceReference &subservice, unsigned int n);
private:
enum { stateIdle, statePrepared, stateRecording };
bool m_simulate;