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 cueSheet(ePtr<iCueSheet> &ptr);
48 RESULT connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection);
51 RESULT setTarget(int target);
52 RESULT info(ePtr<iServiceInformation> &ptr);
53 RESULT pause(ePtr<iPauseableService> &ptr);
54 RESULT subtitle(ePtr<iSubtitleOutput> &ptr);
55 RESULT seek(ePtr<iSeekableService> &ptr);
56 RESULT keys(ePtr<iServiceKeys> &ptr);
61 RESULT setSlowMotion(int ratio);
62 RESULT setFastForward(int ratio);
65 RESULT enableSubtitles(eWidget *parent, SWIG_PYOBJECT(ePyObject) entry);
66 RESULT disableSubtitles(eWidget *parent);
67 PyObject *getSubtitleList();
68 PyObject *getCachedSubtitle();
71 RESULT getLength(pts_t &len);
72 RESULT seekTo(pts_t to);
73 RESULT seekRelative(int direction, pts_t to);
74 RESULT getPlayPosition(pts_t &pos);
75 RESULT setTrickmode(int trick=0);
76 RESULT isCurrentlySeekable();
77 RESULT seekChapter(int chapter);
78 RESULT seekTitle(int title);
80 // iServiceInformation
81 RESULT getName(std::string &name);
83 std::string getInfoString(int w);
84 virtual PyObject *getInfoObject(int w);
87 PyObject *getCutList();
88 void setCutList(SWIG_PYOBJECT(ePyObject));
89 void setCutListEnable(int enable);
92 RESULT keyPressed(int key);
94 eServiceDVD(const char *filename);
96 void gotMessage(int); // message from dvdlib
97 void gotThreadMessage(const int &); // message from dvd thread
101 void thread_finished();
103 std::string m_filename;
105 Signal2<void,iPlayableService*,int> m_event;
107 struct ddvd *m_ddvdconfig;
108 ePtr<gPixmap> m_pixmap;
109 eSubtitleWidget *m_subtitle_widget;
113 stIdle, stRunning, stMenu, stStopped
119 char m_ddvd_titlestring[96];
121 ePtr<eSocketNotifier> m_sn;
122 eFixedMessagePump<int> m_pump;
125 struct ddvd_resume m_resume_info;