1f8aebdaf1aa8b2bbdf2020991d53503d62dc451
[enigma2.git] / lib / dvb / idvb.h
1 #ifndef __dvb_idvb_h
2 #define __dvb_idvb_h
3
4 #ifndef SWIG
5
6 #if HAVE_DVB_API_VERSION < 3
7 #include <ost/frontend.h>
8 #define FRONTENDPARAMETERS FrontendParameters
9 #else
10 #include <linux/dvb/frontend.h>
11 #define FRONTENDPARAMETERS struct dvb_frontend_parameters
12 #endif
13 #include <lib/dvb/frontendparms.h>
14 #include <lib/base/object.h>
15 #include <lib/base/ebase.h>
16 #include <lib/base/elock.h>
17 #include <lib/service/service.h>
18 #include <libsig_comp.h>
19 #include <connection.h>
20
21 #if defined(__GNUC__) && ((__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ == 4 )  // check if gcc version >= 3.1
22 #include <ext/slist>
23 #define CAID_LIST __gnu_cxx::slist<uint16_t>
24 #else
25 #include <slist>
26 #define CAID_LIST std::slist<uint16_t>
27 #endif
28
29 struct eBouquet
30 {
31         std::string m_bouquet_name;
32         std::string m_filename;  // without path.. just name
33         typedef std::list<eServiceReference> list;
34         list m_services;
35 // the following five methods are implemented in db.cpp
36         RESULT flushChanges();
37         RESULT addService(const eServiceReference &, eServiceReference before=eServiceReference());
38         RESULT removeService(const eServiceReference &);
39         RESULT moveService(const eServiceReference &, unsigned int);
40         RESULT setListName(const std::string &name);
41 };
42
43                 /* these structures have by intention no operator int() defined.
44                    the reason of these structures is to avoid mixing for example
45                    a onid and a tsid (as there's no general order for them).
46                    
47                    defining an operator int() would implicitely convert values
48                    between them over the constructor with the int argument.
49                    
50                    'explicit' doesn't here - eTransportStreamID(eOriginalNetworkID(n)) 
51                    would still work. */
52
53 struct eTransportStreamID
54 {
55 private:
56         int v;
57 public:
58         int get() const { return v; }
59         eTransportStreamID(int i): v(i) { }
60         eTransportStreamID(): v(-1) { }
61         bool operator == (const eTransportStreamID &c) const { return v == c.v; }
62         bool operator != (const eTransportStreamID &c) const { return v != c.v; }
63         bool operator < (const eTransportStreamID &c) const { return v < c.v; }
64         bool operator > (const eTransportStreamID &c) const { return v > c.v; }
65 };
66
67 struct eServiceID
68 {
69 private:
70         int v;
71 public:
72         int get() const { return v; }
73         eServiceID(int i): v(i) { }
74         eServiceID(): v(-1) { }
75         bool operator == (const eServiceID &c) const { return v == c.v; }
76         bool operator != (const eServiceID &c) const { return v != c.v; }
77         bool operator < (const eServiceID &c) const { return v < c.v; }
78         bool operator > (const eServiceID &c) const { return v > c.v; }
79 };
80
81 struct eOriginalNetworkID
82 {
83 private:
84         int v;
85 public:
86         int get() const { return v; }
87         eOriginalNetworkID(int i): v(i) { }
88         eOriginalNetworkID(): v(-1) { }
89         bool operator == (const eOriginalNetworkID &c) const { return v == c.v; }
90         bool operator != (const eOriginalNetworkID &c) const { return v != c.v; }
91         bool operator < (const eOriginalNetworkID &c) const { return v < c.v; }
92         bool operator > (const eOriginalNetworkID &c) const { return v > c.v; }
93 };
94
95 struct eDVBNamespace
96 {
97 private:
98         int v;
99 public:
100         int get() const { return v; }
101         eDVBNamespace(int i): v(i) { }
102         eDVBNamespace(): v(-1) { }
103         bool operator == (const eDVBNamespace &c) const { return v == c.v; }
104         bool operator != (const eDVBNamespace &c) const { return v != c.v; }
105         bool operator < (const eDVBNamespace &c) const { return v < c.v; }
106         bool operator > (const eDVBNamespace &c) const { return v > c.v; }
107 };
108
109 struct eDVBChannelID
110 {
111         eDVBNamespace dvbnamespace;
112         eTransportStreamID transport_stream_id;
113         eOriginalNetworkID original_network_id;
114         
115         bool operator==(const eDVBChannelID &c) const
116         {
117                 return dvbnamespace == c.dvbnamespace &&
118                         transport_stream_id == c.transport_stream_id &&
119                         original_network_id == c.original_network_id;
120         }
121         
122         bool operator<(const eDVBChannelID &c) const
123         {
124                 if (dvbnamespace < c.dvbnamespace)
125                         return 1;
126                 else if (dvbnamespace == c.dvbnamespace)
127                 {
128                         if (original_network_id < c.original_network_id)
129                                 return 1;
130                         else if (original_network_id == c.original_network_id)
131                                 if (transport_stream_id < c.transport_stream_id)
132                                         return 1;
133                 }
134                 return 0;
135         }
136         eDVBChannelID(eDVBNamespace dvbnamespace, eTransportStreamID tsid, eOriginalNetworkID onid): 
137                         dvbnamespace(dvbnamespace), transport_stream_id(tsid), original_network_id(onid)
138         {
139         }
140         eDVBChannelID():
141                         dvbnamespace(-1), transport_stream_id(-1), original_network_id(-1)
142         {
143         }
144         operator bool() const
145         {
146                 return (dvbnamespace != -1) && (transport_stream_id != -1) && (original_network_id != -1);
147         }
148 };
149
150 struct eServiceReferenceDVB: public eServiceReference
151 {
152         int getServiceType() const { return data[0]; }
153         void setServiceType(int service_type) { data[0]=service_type; }
154
155         eServiceID getServiceID() const { return eServiceID(data[1]); }
156         void setServiceID(eServiceID service_id) { data[1]=service_id.get(); }
157
158         eTransportStreamID getTransportStreamID() const { return eTransportStreamID(data[2]); }
159         void setTransportStreamID(eTransportStreamID transport_stream_id) { data[2]=transport_stream_id.get(); }
160
161         eOriginalNetworkID getOriginalNetworkID() const { return eOriginalNetworkID(data[3]); }
162         void setOriginalNetworkID(eOriginalNetworkID original_network_id) { data[3]=original_network_id.get(); }
163
164         eDVBNamespace getDVBNamespace() const { return eDVBNamespace(data[4]); }
165         void setDVBNamespace(eDVBNamespace dvbnamespace) { data[4]=dvbnamespace.get(); }
166
167         eServiceID getParentServiceID() const { return eServiceID(data[5]); }
168         void setParentServiceID( eServiceID sid ) { data[5]=sid.get(); }
169
170         eTransportStreamID getParentTransportStreamID() const { return eTransportStreamID(data[6]); }
171         void setParentTransportStreamID( eTransportStreamID tsid ) { data[6]=tsid.get(); }
172
173         eServiceReferenceDVB getParentServiceReference() const
174         {
175                 eServiceReferenceDVB tmp(*this);
176                 if (data[5] && data[6])
177                 {
178                         tmp.data[1] = data[5];
179                         tmp.data[2] = data[6];
180                         tmp.data[5] = tmp.data[6] = 0;
181                 }
182                 else
183                         tmp.type = idInvalid;
184                 return tmp;
185         }
186
187         eServiceReferenceDVB(eDVBNamespace dvbnamespace, eTransportStreamID transport_stream_id, eOriginalNetworkID original_network_id, eServiceID service_id, int service_type)
188                 :eServiceReference(eServiceReference::idDVB, 0)
189         {
190                 setTransportStreamID(transport_stream_id);
191                 setOriginalNetworkID(original_network_id);
192                 setDVBNamespace(dvbnamespace);
193                 setServiceID(service_id);
194                 setServiceType(service_type);
195         }
196         
197         void set(const eDVBChannelID &chid)
198         {
199                 setDVBNamespace(chid.dvbnamespace);
200                 setOriginalNetworkID(chid.original_network_id);
201                 setTransportStreamID(chid.transport_stream_id);
202         }
203         
204         void getChannelID(eDVBChannelID &chid) const
205         {
206                 chid = eDVBChannelID(getDVBNamespace(), getTransportStreamID(), getOriginalNetworkID());
207         }
208
209         eServiceReferenceDVB()
210                 :eServiceReference(eServiceReference::idDVB, 0)
211         {
212         }
213
214         eServiceReferenceDVB(const std::string &string)
215                 :eServiceReference(string)
216         {
217         }
218 };
219
220
221 ////////////////// TODO: we need an interface here, but what exactly?
222
223 #include <set>
224 // btw, still implemented in db.cpp. FIX THIS, TOO.
225
226 class eDVBChannelQuery;
227
228 class eDVBService: public iStaticServiceInformation
229 {
230         DECLARE_REF(eDVBService);
231         int *m_cache;
232         void initCache();
233         void copyCache(int *source);
234 public:
235         enum cacheID
236         {
237                 cVPID, cAPID, cTPID, cPCRPID, cAC3PID,
238                 cVTYPE, cACHANNEL, cAC3DELAY, cPCMDELAY,
239                 cSUBTITLE, cacheMax
240         };
241
242         int getCacheEntry(cacheID);
243         void setCacheEntry(cacheID, int);
244
245         bool cacheEmpty();
246
247         eDVBService();
248                 /* m_service_name_sort is uppercase, with special chars removed, to increase sort performance. */
249         std::string m_service_name, m_service_name_sort;
250         std::string m_provider_name;
251         
252         void genSortName();
253
254         int m_flags;
255         enum
256         {
257                 dxNoSDT=1,    // don't get SDT
258 //nyi   dxDontshow=2,
259                 dxNoDVB=4,  // dont use PMT for this service ( use cached pids )
260                 dxHoldName=8,
261                 dxNewFound=64,
262         };
263
264         bool usePMT() const { return !(m_flags & dxNoDVB); }
265
266         CAID_LIST m_ca;
267
268         virtual ~eDVBService();
269         
270         eDVBService &operator=(const eDVBService &);
271         
272         // iStaticServiceInformation
273         RESULT getName(const eServiceReference &ref, std::string &name);
274         RESULT getEvent(const eServiceReference &ref, ePtr<eServiceEvent> &ptr, time_t start_time);
275         bool isPlayable(const eServiceReference &ref, const eServiceReference &ignore);
276
277                 /* for filtering: */
278         int checkFilter(const eServiceReferenceDVB &ref, const eDVBChannelQuery &query);
279 };
280
281 //////////////////
282
283 class iDVBChannel;
284 class iDVBDemux;
285 class iDVBFrontendParameters;
286
287 class iDVBChannelListQuery: public iObject
288 {
289 public:
290         virtual RESULT getNextResult(eServiceReferenceDVB &ref)=0;
291         virtual int compareLessEqual(const eServiceReferenceDVB &a, const eServiceReferenceDVB &b)=0;
292 };
293
294 class eDVBChannelQuery: public iObject
295 {
296         DECLARE_REF(eDVBChannelQuery);
297 public:
298         enum
299         {
300                 tName,
301                 tProvider,
302                 tType,
303                 tBouquet,
304                 tSatellitePosition,
305                 tChannelID,
306                 tAND,
307                 tOR,
308                 tAny,
309                 tFlags
310         };
311         
312         int m_type;
313         int m_inverse;
314         
315         std::string m_string;
316         int m_int;
317         eDVBChannelID m_channelid;
318         
319                 /* sort is only valid in root, and must be from the enum above. */
320         int m_sort;
321         std::string m_bouquet_name;
322         
323         static RESULT compile(ePtr<eDVBChannelQuery> &res, std::string query);
324         
325         ePtr<eDVBChannelQuery> m_p1, m_p2;
326 };
327
328 class iDVBChannelList: public iObject
329 {
330 public:
331         virtual RESULT removeService(const eServiceReference &service)=0;
332         virtual RESULT removeServices(eDVBChannelID chid=eDVBChannelID(), unsigned int orb_pos=0xFFFFFFFF)=0;
333         virtual RESULT removeServices(int dvb_namespace=-1, int tsid=-1, int onid=-1, unsigned int orb_pos=0xFFFFFFFF)=0;
334         virtual RESULT addFlag(const eServiceReference &service, unsigned int flagmask=0xFFFFFFFF)=0;
335         virtual RESULT removeFlag(const eServiceReference &service, unsigned int flagmask=0xFFFFFFFF)=0;
336         virtual RESULT removeFlags(unsigned int flagmask, eDVBChannelID chid=eDVBChannelID(), unsigned int orb_pos=0xFFFFFFFF)=0;
337         virtual RESULT removeFlags(unsigned int flagmask, int dvb_namespace=-1, int tsid=-1, int onid=-1, unsigned int orb_pos=0xFFFFFFFF)=0;
338         virtual RESULT addChannelToList(const eDVBChannelID &id, iDVBFrontendParameters *feparm)=0;
339         virtual RESULT removeChannel(const eDVBChannelID &id)=0;
340         
341         virtual RESULT getChannelFrontendData(const eDVBChannelID &id, ePtr<iDVBFrontendParameters> &parm)=0;
342         
343         virtual RESULT addService(const eServiceReferenceDVB &service, eDVBService *service)=0;
344         virtual RESULT getService(const eServiceReferenceDVB &reference, ePtr<eDVBService> &service)=0;
345         virtual RESULT flush()=0;
346
347         virtual RESULT getBouquet(const eServiceReference &ref,  eBouquet* &bouquet)=0;
348
349         virtual RESULT startQuery(ePtr<iDVBChannelListQuery> &query, eDVBChannelQuery *query, const eServiceReference &source)=0;
350 };
351
352 #endif  // SWIG
353
354 class iDVBFrontendParameters: public iObject
355 {
356 #ifdef SWIG
357         iDVBFrontendParameters();
358         ~iDVBFrontendParameters();
359 #endif
360 public:
361         virtual RESULT getSystem(int &SWIG_OUTPUT) const = 0;
362         virtual RESULT getDVBS(eDVBFrontendParametersSatellite &SWIG_OUTPUT) const = 0;
363         virtual RESULT getDVBC(eDVBFrontendParametersCable &SWIG_OUTPUT) const = 0;
364         virtual RESULT getDVBT(eDVBFrontendParametersTerrestrial &SWIG_OUTPUT) const = 0;
365         
366         virtual RESULT calculateDifference(const iDVBFrontendParameters *parm, int &SWIG_OUTPUT, bool exact) const = 0;
367         virtual RESULT getHash(unsigned long &SWIG_OUTPUT) const = 0;
368 };
369
370 #define MAX_DISEQC_LENGTH  16
371
372 class eDVBDiseqcCommand
373 {
374 #ifndef SWIG
375 public:
376 #endif
377         int len;
378         __u8 data[MAX_DISEQC_LENGTH];
379 #if HAVE_DVB_API_VERSION < 3
380         int tone;
381         int voltage;
382 #endif
383 #ifdef SWIG
384 public:
385 #endif
386         void setCommandString(const char *str);
387 };
388
389 class iDVBSatelliteEquipmentControl;
390 class eSecCommandList;
391
392 class iDVBFrontend: public iObject
393 {
394 public:
395         enum {
396                 feSatellite, feCable, feTerrestrial
397         };
398         virtual RESULT getFrontendType(int &SWIG_OUTPUT)=0;
399         virtual RESULT tune(const iDVBFrontendParameters &where)=0;
400 #ifndef SWIG
401         virtual RESULT connectStateChange(const Slot1<void,iDVBFrontend*> &stateChange, ePtr<eConnection> &connection)=0;
402 #endif
403         enum {
404                 stateIdle = 0,
405                 stateTuning = 1,
406                 stateFailed = 2,
407                 stateLock = 3,
408                 stateLostLock = 4,
409         };
410         virtual RESULT getState(int &SWIG_OUTPUT)=0;
411         enum {
412                 toneOff, toneOn
413         };
414         virtual RESULT setTone(int tone)=0;
415         enum {
416                 voltageOff, voltage13, voltage18, voltage13_5, voltage18_5
417         };
418         virtual RESULT setVoltage(int voltage)=0;
419         virtual RESULT sendDiseqc(const eDVBDiseqcCommand &diseqc)=0;
420         virtual RESULT sendToneburst(int burst)=0;
421 #ifndef SWIG
422         virtual RESULT setSEC(iDVBSatelliteEquipmentControl *sec)=0;
423         virtual RESULT setSecSequence(const eSecCommandList &list)=0;
424 #endif
425         enum {
426                 bitErrorRate, signalPower, signalQuality, locked, synced, frontendNumber
427         };
428         virtual int readFrontendData(int type)=0;
429         virtual PyObject *readTransponderData(bool original)=0;
430
431 #ifndef SWIG
432         virtual RESULT getData(int num, int &data)=0;
433         virtual RESULT setData(int num, int val)=0;
434                 /* 0 means: not compatible. other values are a priority. */
435         virtual int isCompatibleWith(ePtr<iDVBFrontendParameters> &feparm)=0;
436 #endif
437 };
438 TEMPLATE_TYPEDEF(ePtr<iDVBFrontend>, iDVBFrontendPtr);
439
440 #ifndef SWIG
441 class iDVBSatelliteEquipmentControl: public iObject
442 {
443 public:
444         virtual RESULT prepare(iDVBFrontend &frontend, FRONTENDPARAMETERS &parm, const eDVBFrontendParametersSatellite &sat, int frontend_id)=0;
445         virtual int canTune(const eDVBFrontendParametersSatellite &feparm, iDVBFrontend *fe, int frontend_id)=0;
446         virtual void setRotorMoving(bool)=0;
447 };
448
449 struct eDVBCIRouting
450 {
451         int enabled;
452 };
453 #endif // SWIG
454
455 class iDVBChannel: public iObject
456 {
457 public:
458         enum
459         {
460                 state_idle,        /* not yet tuned */
461                 state_tuning,      /* currently tuning (first time) */
462                 state_failed,      /* tuning failed. */
463                 state_unavailable, /* currently unavailable, will be back without further interaction */
464                 state_ok,          /* ok */
465                 state_last_instance, /* just one reference to this channel is left */
466                 state_release      /* channel is being shut down. */
467         };
468         virtual RESULT getState(int &SWIG_OUTPUT)=0;    
469
470                 /* direct frontend access for raw channels and/or status inquiries. */
471         virtual RESULT getFrontend(ePtr<iDVBFrontend> &)=0;
472
473 #ifndef SWIG
474         virtual RESULT getCurrentFrontendParameters(ePtr<iDVBFrontendParameters> &)=0;
475         enum 
476         {
477                 evtEOF, evtSOF, evtFailed
478         };
479         virtual RESULT connectStateChange(const Slot1<void,iDVBChannel*> &stateChange, ePtr<eConnection> &connection)=0;
480         virtual RESULT connectEvent(const Slot2<void,iDVBChannel*,int> &eventChange, ePtr<eConnection> &connection)=0;
481
482                 /* demux capabilities */
483         enum
484         {
485                 capDecode = 1,
486                 /* capCI = 2 */
487         };
488         virtual RESULT setCIRouting(const eDVBCIRouting &routing)=0;
489         virtual RESULT getDemux(ePtr<iDVBDemux> &demux, int cap=0)=0;
490         
491                 /* use count handling */
492         virtual void AddUse() = 0;
493         virtual void ReleaseUse() = 0;
494 #endif
495 };
496 TEMPLATE_TYPEDEF(eUsePtr<iDVBChannel>, iDVBChannelPtr);
497
498 #ifndef SWIG
499
500         /* signed, so we can express deltas. */
501         
502 typedef long long pts_t;
503
504 class iFilePushScatterGather;
505 class iTSMPEGDecoder;
506
507         /* note that a cue sheet describes the logical positions. thus 
508            everything is specified in pts and not file positions */
509
510         /* implemented in dvb.cpp */
511 class eCueSheet: public iObject, public Object
512 {
513         DECLARE_REF(eCueSheet);
514 public:
515         eCueSheet();
516         
517                         /* frontend */
518         void seekTo(int relative, const pts_t &pts);
519         
520         void clear();
521         void addSourceSpan(const pts_t &begin, const pts_t &end);
522         void commitSpans();
523         
524         void setSkipmode(const pts_t &ratio); /* 90000 is 1:1 */
525         void setDecodingDemux(iDVBDemux *demux, iTSMPEGDecoder *decoder);
526         
527                         /* frontend and backend */
528         eSingleLock m_lock;
529         
530                         /* backend */
531         enum { evtSeek, evtSkipmode, evtSpanChanged };
532         RESULT connectEvent(const Slot1<void, int> &event, ePtr<eConnection> &connection);
533
534         std::list<std::pair<pts_t,pts_t> > m_spans;     /* begin, end */
535         std::list<std::pair<int, pts_t> > m_seek_requests; /* relative, delta */
536         pts_t m_skipmode_ratio;
537         Signal1<void,int> m_event;
538         ePtr<iDVBDemux> m_decoding_demux;
539         ePtr<iTSMPEGDecoder> m_decoder;
540 };
541
542 class iDVBPVRChannel: public iDVBChannel
543 {
544 public:
545         enum
546         {
547                 state_eof = state_release + 1  /* end-of-file reached. */
548         };
549         
550                 /* FIXME: there are some very ugly buffer-end and ... related problems */
551                 /* so this is VERY UGLY. 
552                 
553                    ok, it's going to get better. but still...*/
554         virtual RESULT playFile(const char *file) = 0;
555         virtual void stopFile() = 0;
556         
557         virtual void setCueSheet(eCueSheet *cuesheet) = 0;
558         
559         virtual RESULT getLength(pts_t &pts) = 0;
560         
561                 /* we explicitely ask for the decoding demux here because a channel
562                    can be shared between multiple decoders.
563                 */
564         virtual RESULT getCurrentPosition(iDVBDemux *decoding_demux, pts_t &pos, int mode) = 0;
565                 /* skipping must be done with a cue sheet */
566 };
567
568 class iDVBSectionReader;
569 class iDVBPESReader;
570 class iDVBTSRecorder;
571 class iTSMPEGDecoder;
572
573 class iDVBDemux: public iObject
574 {
575 public:
576         virtual RESULT createSectionReader(eMainloop *context, ePtr<iDVBSectionReader> &reader)=0;
577         virtual RESULT createPESReader(eMainloop *context, ePtr<iDVBPESReader> &reader)=0;
578         virtual RESULT createTSRecorder(ePtr<iDVBTSRecorder> &recorder)=0;
579         virtual RESULT getMPEGDecoder(ePtr<iTSMPEGDecoder> &reader, int primary=1)=0;
580         virtual RESULT getSTC(pts_t &pts, int num=0)=0;
581         virtual RESULT getCADemuxID(uint8_t &id)=0;
582         virtual RESULT flush()=0;
583 };
584
585 class iTSMPEGDecoder: public iObject
586 {
587 public:
588         enum { pidDisabled = -1 };
589                 /** Set Displayed Video PID and type */
590         virtual RESULT setVideoPID(int vpid, int type)=0;
591
592         enum { af_MPEG, af_AC3, af_DTS, af_AAC };
593                 /** Set Displayed Audio PID and type */
594         virtual RESULT setAudioPID(int apid, int type)=0;
595
596         enum { ac_left, ac_stereo, ac_right };
597                 /** Set Displayed Audio Channel */
598         virtual RESULT setAudioChannel(int channel)=0;
599         virtual int getAudioChannel()=0;
600
601         virtual RESULT setPCMDelay(int delay)=0;
602         virtual int getPCMDelay()=0;
603         virtual RESULT setAC3Delay(int delay)=0;
604         virtual int getAC3Delay()=0;
605
606                 /** Set Displayed Videotext PID */
607         virtual RESULT setTextPID(int vpid)=0;
608
609                 /** Set Sync mode to PCR */
610         virtual RESULT setSyncPCR(int pcrpid)=0;
611         enum { sm_Audio, sm_Video };
612                 /** Set Sync mode to either audio or video master */
613         virtual RESULT setSyncMaster(int who)=0;
614
615                 /** Apply settings */
616         virtual RESULT start()=0;
617         
618                 /** Freeze frame. Either continue decoding (without display) or halt. */
619         virtual RESULT freeze(int cont)=0;
620                 /** Continue after freeze. */
621         virtual RESULT unfreeze()=0;
622         
623                 /** fast forward by skipping frames. 0 is disabled, 2 is twice-the-speed, ... */
624         virtual RESULT setFastForward(int skip=0)=0;
625         
626                 // stop on .. Picture
627         enum { spm_I, spm_Ref, spm_Any };
628                 /** Stop on specific decoded picture. For I-Frame display. */
629         virtual RESULT setSinglePictureMode(int when)=0;
630         
631         enum { pkm_B, pkm_PB };
632                 /** Fast forward by skipping either B or P/B pictures */
633         virtual RESULT setPictureSkipMode(int what)=0;
634         
635                 /** Slow Motion by repeating pictures */
636         virtual RESULT setSlowMotion(int repeat)=0;
637         
638         enum { zoom_Normal, zoom_PanScan, zoom_Letterbox, zoom_Fullscreen };
639                 /** Set Zoom. mode *must* be fitting. */
640         virtual RESULT setZoom(int what)=0;
641         
642         virtual RESULT setTrickmode(int what) = 0;
643         
644         virtual RESULT getPTS(int what, pts_t &pts) = 0;
645
646         virtual RESULT showSinglePic(const char *filename) = 0;
647
648         virtual RESULT setRadioPic(const std::string &filename) = 0;
649 };
650
651 #endif //SWIG
652 #endif