6 #include <lib/base/message.h>
7 #include <lib/service/iservice.h>
10 #include <xine/xineutils.h>
12 class eStaticServiceXineInfo;
14 class eServiceFactoryXine: public iServiceHandler
16 DECLARE_REF(eServiceFactoryXine);
18 eServiceFactoryXine();
19 virtual ~eServiceFactoryXine();
23 RESULT play(const eServiceReference &, ePtr<iPlayableService> &ptr);
24 RESULT record(const eServiceReference &, ePtr<iRecordableService> &ptr);
25 RESULT list(const eServiceReference &, ePtr<iListableService> &ptr);
26 RESULT info(const eServiceReference &, ePtr<iStaticServiceInformation> &ptr);
27 RESULT offlineOperations(const eServiceReference &, ePtr<iServiceOfflineOperations> &ptr);
29 ePtr<eStaticServiceXineInfo> m_service_info;
32 class eStaticServiceXineInfo: public iStaticServiceInformation
34 DECLARE_REF(eStaticServiceXineInfo);
35 friend class eServiceFactoryXine;
36 eStaticServiceXineInfo();
38 RESULT getName(const eServiceReference &ref, std::string &name);
39 int getLength(const eServiceReference &ref);
42 typedef struct _GstElement GstElement;
44 class eServiceXine: public iPlayableService, public iPauseableService,
45 public iServiceInformation, public iSeekableService, public Object
47 DECLARE_REF(eServiceXine);
49 virtual ~eServiceXine();
52 RESULT connectEvent(const Slot2<void,iPlayableService*,int> &event, ePtr<eConnection> &connection);
55 RESULT setTarget(int target);
57 RESULT pause(ePtr<iPauseableService> &ptr);
58 RESULT setSlowMotion(int ratio);
59 RESULT setFastForward(int ratio);
61 RESULT seek(ePtr<iSeekableService> &ptr);
63 // not implemented (yet)
64 RESULT audioChannel(ePtr<iAudioChannelSelection> &ptr) { ptr = 0; return -1; }
65 RESULT audioTracks(ePtr<iAudioTrackSelection> &ptr) { ptr = 0; return -1; }
66 RESULT frontendInfo(ePtr<iFrontendInformation> &ptr) { ptr = 0; return -1; }
67 RESULT subServices(ePtr<iSubserviceList> &ptr) { ptr = 0; return -1; }
68 RESULT timeshift(ePtr<iTimeshiftService> &ptr) { ptr = 0; return -1; }
69 RESULT cueSheet(ePtr<iCueSheet> &ptr) { ptr = 0; return -1; }
70 RESULT subtitle(ePtr<iSubtitleOutput> &ptr) { ptr = 0; return -1; }
71 RESULT audioDelay(ePtr<iAudioDelay> &ptr) { ptr = 0; return -1; }
72 RESULT rdsDecoder(ePtr<iRdsDecoder> &ptr) { ptr = 0; return -1; }
73 RESULT keys(ePtr<iServiceKeys> &ptr) { ptr = 0; return -1; }
79 RESULT info(ePtr<iServiceInformation>&);
82 RESULT getLength(pts_t &SWIG_OUTPUT);
83 RESULT seekTo(pts_t to);
84 RESULT seekRelative(int direction, pts_t to);
85 RESULT getPlayPosition(pts_t &SWIG_OUTPUT);
86 RESULT setTrickmode(int trick);
87 RESULT isCurrentlySeekable();
89 // iServiceInformation
90 RESULT getName(std::string &name);
92 std::string getInfoString(int w);
94 friend class eServiceFactoryXine;
95 std::string m_filename;
96 eServiceXine(const char *filename);
97 Signal2<void,iPlayableService*,int> m_event;
99 xine_stream_t *stream;
100 xine_video_port_t *vo_port;
101 xine_audio_port_t *ao_port;
102 xine_event_queue_t *event_queue;
106 stError, stIdle, stRunning, stStopped,
110 static void eventListenerWrap(void *user_data, const xine_event_t *event);
111 void eventListener(const xine_event_t *event);
114 eFixedMessagePump<int> m_pump;