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 eSubtitleWidget;
13 class eStaticServiceDVDInfo;
15 class eServiceFactoryDVD: public iServiceHandler
17 DECLARE_REF(eServiceFactoryDVD);
20 virtual ~eServiceFactoryDVD();
24 RESULT play(const eServiceReference &, ePtr<iPlayableService> &ptr);
25 RESULT record(const eServiceReference &, ePtr<iRecordableService> &ptr);
26 RESULT list(const eServiceReference &, ePtr<iListableService> &ptr);
27 RESULT info(const eServiceReference &, ePtr<iStaticServiceInformation> &ptr);
28 RESULT offlineOperations(const eServiceReference &, ePtr<iServiceOfflineOperations> &ptr);
31 class eServiceDVD: public iPlayableService, public iPauseableService, public iSeekableService,
32 public iServiceInformation, public iSubtitleOutput, public iServiceKeys, public eThread, public Object
37 friend class eServiceFactoryDVD;
38 DECLARE_REF(eServiceDVD);
40 virtual ~eServiceDVD();
41 // not implemented (yet)
42 RESULT audioChannel(ePtr<iAudioChannelSelection> &ptr) { ptr = 0; return -1; }
43 RESULT audioTracks(ePtr<iAudioTrackSelection> &ptr) { ptr = 0; return -1; }
44 RESULT frontendInfo(ePtr<iFrontendInformation> &ptr) { ptr = 0; return -1; }
45 RESULT subServices(ePtr<iSubserviceList> &ptr) { ptr = 0; return -1; }
46 RESULT timeshift(ePtr<iTimeshiftService> &ptr) { ptr = 0; return -1; }
47 RESULT audioDelay(ePtr<iAudioDelay> &ptr) { ptr = 0; return -1; }
48 RESULT rdsDecoder(ePtr<iRdsDecoder> &ptr) { ptr = 0; return -1; }
49 RESULT stream(ePtr<iStreamableService> &ptr) { ptr = 0; return -1; }
51 RESULT cueSheet(ePtr<iCueSheet> &ptr);
53 RESULT cueSheet(ePtr<iCueSheet> &ptr) { ptr = 0; return -1; }
57 RESULT connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection);
60 RESULT setTarget(int target);
61 RESULT info(ePtr<iServiceInformation> &ptr);
62 RESULT pause(ePtr<iPauseableService> &ptr);
63 RESULT subtitle(ePtr<iSubtitleOutput> &ptr);
64 RESULT seek(ePtr<iSeekableService> &ptr);
65 RESULT keys(ePtr<iServiceKeys> &ptr);
70 RESULT setSlowMotion(int ratio);
71 RESULT setFastForward(int ratio);
74 RESULT enableSubtitles(eWidget *parent, SWIG_PYOBJECT(ePyObject) entry);
75 RESULT disableSubtitles(eWidget *parent);
76 PyObject *getSubtitleList();
77 PyObject *getCachedSubtitle();
81 RESULT getLength(pts_t &len);
82 RESULT seekTo(pts_t to);
83 RESULT seekRelative(int direction, pts_t to);
84 RESULT getPlayPosition(pts_t &pos);
85 RESULT setTrickmode(int trick=0);
86 RESULT isCurrentlySeekable();
87 RESULT seekChapter(int chapter);
90 // iServiceInformation
91 RESULT getName(std::string &name);
93 std::string getInfoString(int w);
94 virtual PyObject *getInfoObject(int w);
98 PyObject *getCutList();
99 void setCutList(SWIG_PYOBJECT(ePyObject));
100 void setCutListEnable(int enable);
103 RESULT keyPressed(int key);
105 eServiceDVD(const char *filename);
107 void gotMessage(int); // message from dvdlib
108 void gotThreadMessage(const int &); // message from dvd thread
112 void thread_finished();
114 std::string m_filename;
116 Signal2<void,iPlayableService*,int> m_event;
118 struct ddvd *m_ddvdconfig;
119 ePtr<gPixmap> m_pixmap;
120 eSubtitleWidget *m_subtitle_widget;
124 stIdle, stRunning, stStopped,
132 char m_ddvd_titlestring[96];
134 eSocketNotifier m_sn;
135 eFixedMessagePump<int> m_pump;
138 // ePtr<eCueSheet> m_cue;
143 // unsigned int what;
145 // bool operator < (const struct cueEntry &o) const
147 // return where < o.where;
149 // cueEntry(const pts_t &where, unsigned int what) :
150 // where(where), what(what)
155 // std::multiset<cueEntry> m_cue_entries;
156 int m_cuesheet_changed, m_cutlist_enabled;
162 // void cutlistToCuesheet();