4 #include <lib/base/message.h>
5 #include <lib/base/ebase.h>
6 #include <lib/base/thread.h>
7 #include <lib/service/iservice.h>
11 class eStaticServiceDVDInfo;
13 class eServiceFactoryDVD: public iServiceHandler
15 DECLARE_REF(eServiceFactoryDVD);
18 virtual ~eServiceFactoryDVD();
22 RESULT play(const eServiceReference &, ePtr<iPlayableService> &ptr);
23 RESULT record(const eServiceReference &, ePtr<iRecordableService> &ptr);
24 RESULT list(const eServiceReference &, ePtr<iListableService> &ptr);
25 RESULT info(const eServiceReference &, ePtr<iStaticServiceInformation> &ptr);
26 RESULT offlineOperations(const eServiceReference &, ePtr<iServiceOfflineOperations> &ptr);
29 class eServiceDVD: public iPlayableService, public iPauseableService, public iSeekableService,
30 public iServiceInformation, public iSubtitleOutput, public iServiceKeys, public iCueSheet, public eThread, public Object
32 friend class eServiceFactoryDVD;
33 DECLARE_REF(eServiceDVD);
35 virtual ~eServiceDVD();
36 // not implemented (yet)
37 RESULT audioChannel(ePtr<iAudioChannelSelection> &ptr) { ptr = 0; return -1; }
38 RESULT audioTracks(ePtr<iAudioTrackSelection> &ptr) { ptr = 0; return -1; }
39 RESULT frontendInfo(ePtr<iFrontendInformation> &ptr) { ptr = 0; return -1; }
40 RESULT subServices(ePtr<iSubserviceList> &ptr) { ptr = 0; return -1; }
41 RESULT timeshift(ePtr<iTimeshiftService> &ptr) { ptr = 0; return -1; }
42 RESULT audioDelay(ePtr<iAudioDelay> &ptr) { ptr = 0; return -1; }
43 RESULT rdsDecoder(ePtr<iRdsDecoder> &ptr) { ptr = 0; return -1; }
44 RESULT stream(ePtr<iStreamableService> &ptr) { ptr = 0; return -1; }
45 RESULT streamed(ePtr<iStreamedService> &ptr) { ptr = 0; return -1; }
46 RESULT cueSheet(ePtr<iCueSheet> &ptr);
49 RESULT connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection);
52 RESULT setTarget(int target);
53 RESULT info(ePtr<iServiceInformation> &ptr);
54 RESULT pause(ePtr<iPauseableService> &ptr);
55 RESULT subtitle(ePtr<iSubtitleOutput> &ptr);
56 RESULT seek(ePtr<iSeekableService> &ptr);
57 RESULT keys(ePtr<iServiceKeys> &ptr);
62 RESULT setSlowMotion(int ratio);
63 RESULT setFastForward(int ratio);
66 RESULT enableSubtitles(eWidget *parent, SWIG_PYOBJECT(ePyObject) entry);
67 RESULT disableSubtitles(eWidget *parent);
68 PyObject *getSubtitleList();
69 PyObject *getCachedSubtitle();
72 RESULT getLength(pts_t &len);
73 RESULT seekTo(pts_t to);
74 RESULT seekRelative(int direction, pts_t to);
75 RESULT getPlayPosition(pts_t &pos);
76 RESULT setTrickmode(int trick=0);
77 RESULT isCurrentlySeekable();
78 RESULT seekChapter(int chapter);
79 RESULT seekTitle(int title);
81 // iServiceInformation
82 RESULT getName(std::string &name);
84 std::string getInfoString(int w);
85 virtual PyObject *getInfoObject(int w);
88 PyObject *getCutList();
89 void setCutList(SWIG_PYOBJECT(ePyObject));
90 void setCutListEnable(int enable);
93 RESULT keyPressed(int key);
95 eServiceDVD(eServiceReference ref);
97 void gotMessage(int); // message from dvdlib
98 void gotThreadMessage(const int &); // message from dvd thread
102 void thread_finished();
104 eServiceReference m_ref;
106 Signal2<void,iPlayableService*,int> m_event;
108 struct ddvd *m_ddvdconfig;
109 ePtr<gPixmap> m_pixmap;
110 eSubtitleWidget *m_subtitle_widget;
114 stIdle, stRunning, stMenu, stStopped
120 char m_ddvd_titlestring[96];
122 ePtr<eSocketNotifier> m_sn;
123 eFixedMessagePump<int> m_pump;
126 struct ddvd_resume m_resume_info;