diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2008-09-06 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2008-09-06 18:00:00 +0200 |
commit | c848ab793a302dc067663ec4a06395745e443c9d (patch) | |
tree | a6c65facbf68864b9523152560a4ae23a6ad2f16 /device.h | |
parent | 771986b89fc19b4ae65179ccf7dd8082512f8b7d (diff) | |
download | vdr-patch-lnbsharing-c848ab793a302dc067663ec4a06395745e443c9d.tar.gz vdr-patch-lnbsharing-c848ab793a302dc067663ec4a06395745e443c9d.tar.bz2 |
Version 1.7.1vdr-1.7.1
- Adapted the tuning code to the new DVBFE_SET_DELSYS API (thanks to Reinhard Nissl).
VDR now uses the driver from http://jusst.de/hg/multiproto_plus.
- Updated the Italian OSD texts (thanks to Diego Pierotto).
- Removed obsolete $(NCURSESLIB) from the Makefile.
- Implemented handling the standard component descriptor for AC3 (stream=4), as it
will soon be used by the German ARD channels (thanks to Michael Pennewiß for
advance information about this change). The previously used "Premiere pseudo
standard" (stream=2, type=5) still works, but has apparently been wrongfully used
by broadcasters from the beginning.
- Added missing description of the 'S' channel parameter to vdr.5 (reported by
Reinhard Nissl).
- The SVDRP signon message now indicates the character encoding in use, as in
"220 video SVDRP VideoDiskRecorder 1.7.1; Fri May 2 16:17:10 2008; ISO-8859-1".
This may be useful for instance for external tools that provide EPG data, so that
they can correctly encode the strings.
- No longer calling FcFini() to avoid problems with older (broken) versions of
fontconfig (suggested by Edgar Toernig).
- Removed the compile time option VFAT to allow users of precompiled binary
distributions to have full control over whether or not to use the --vfat option
at runtime (suggested by Michael Nork).
- First step towards switching to TS (Transport Stream) as recording format:
+ The new function cDevice::PlayTs() is used to play TS packets.
+ The new functions cDevice::PlayTsVideo() and cDevice::PlayTsAudio()
are used to play video and audio TS packets, respectively.
+ The new function cAudio::PlayTs() is used to play audio TS packets.
+ The new class cPatPmtGenerator is used to generate a PAT/PMT pair that precedes
the TS data in Transfer Mode.
+ The new class cPatPmtParser is used by cDevice to parse the PAT/PMT data in a
TS in order to find out which streams it contains.
+ The new class cTsToPes is used to convert TS packets to a PES packet.
+ cTransfer no longer uses cRemux, and doesn't run a separate thread any more.
It just generates a PAT/PMT and sends all received TS packets to the primary
device's PlayTs().
+ Live subtitle display no longer uses a ring buffer and separate thread.
+ cPesAssembler has been removed. Old VDR recordings only contain complete PES
packets.
+ Since a TS needs to have a PAT/PMT, which requires the video stream type to
be explicitly given, the format of the VPID field in the channels.conf file
and the SVDRP commands NEWC/MODC/LSTC has been extended. The video stream type
now follows the VPID and optional PPID, separated by an '=' sign.
- Updated the sources.conf file (thanks to Oleg Roitburd).
- Fixed a possible integer overflow in GetAbsTime() (thanks to Alexander Rieger).
- Fixed a problem with calling isyslog() from within the SignalHandler() (thanks
to Udo Richter).
- Replaced the Finnish language code "smi" with "suo" (thanks to Rolf Ahrenberg).
- Fixed wrong value for TableIdBAT in libsi/si.h (thanks to Winfried Köhler).
- Errors in config files no longer keep VDR from starting.
- Removed unneeded include files <linux/dvb/dmx.h> und <time.h> from remux.h
(reported by Tobias Grimm).
Diffstat (limited to 'device.h')
-rw-r--r-- | device.h | 55 |
1 files changed, 48 insertions, 7 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.h 2.1 2008/04/12 11:11:23 kls Exp $ + * $Id: device.h 2.2 2008/07/06 11:25:42 kls Exp $ */ #ifndef __DEVICE_H @@ -17,6 +17,7 @@ #include "filter.h" #include "nit.h" #include "pat.h" +#include "remux.h" #include "ringbuffer.h" #include "sdt.h" #include "sections.h" @@ -30,10 +31,6 @@ #define MAXVOLUME 255 #define VOLUMEDELTA 5 // used to increase/decrease the volume -#define TS_SIZE 188 -#define TS_SYNC_BYTE 0x47 -#define PID_MASK_HI 0x1F - enum eSetChannelResult { scrOk, scrNotAvailable, scrNoTransfer, scrFailed }; enum ePlayMode { pmNone, // audio/video from decoder @@ -89,7 +86,6 @@ struct tTrackId { class cPlayer; class cReceiver; -class cPesAssembler; class cLiveSubtitle; /// The cDevice class is the base from which actual devices can be derived. @@ -477,7 +473,10 @@ public: private: cPlayer *player; - cPesAssembler *pesAssembler; + cPatPmtParser patPmtParser; + cTsToPes tsToPesVideo; + cTsToPes tsToPesAudio; + cTsToPes tsToPesSubtitle; protected: virtual bool CanReplay(void) const; ///< Returns true if this device can currently start a replay session. @@ -511,6 +510,33 @@ protected: ///< If VideoOnly is true, only the video will be displayed, ///< which is necessary for trick modes like 'fast forward'. ///< Data must point to one single, complete PES packet. + virtual int PlayTsVideo(const uchar *Data, int Length); + ///< Plays the given data block as video. + ///< Data points to exactly one complete TS packet of the given Length + ///< (which is always TS_SIZE). + ///< PlayTsVideo() shall process the packet either as a whole (returning + ///< a positive number, which needs not necessarily be Length) or not at all + ///< (returning 0 or -1 and setting 'errno' to EAGAIN). + ///< The default implementation collects all incoming TS payload belonging + ///< to one PES packet and calls PlayVideo() with the resulting packet. + virtual int PlayTsAudio(const uchar *Data, int Length); + ///< Plays the given data block as audio. + ///< Data points to exactly one complete TS packet of the given Length + ///< (which is always TS_SIZE). + ///< PlayTsAudio() shall process the packet either as a whole (returning + ///< a positive number, which needs not necessarily be Length) or not at all + ///< (returning 0 or -1 and setting 'errno' to EAGAIN). + ///< The default implementation collects all incoming TS payload belonging + ///< to one PES packet and calls PlayAudio() with the resulting packet. + virtual int PlayTsSubtitle(const uchar *Data, int Length); + ///< Plays the given data block as a subtitle. + ///< Data points to exactly one complete TS packet of the given Length + ///< (which is always TS_SIZE). + ///< PlayTsSubtitle() shall process the packet either as a whole (returning + ///< a positive number, which needs not necessarily be Length) or not at all + ///< (returning 0 or -1 and setting 'errno' to EAGAIN). + ///< The default implementation collects all incoming TS payload belonging + ///< to one PES packet and displays the resulting subtitle via the OSD. public: virtual int64_t GetSTC(void); ///< Gets the current System Time Counter, which can be used to @@ -565,6 +591,21 @@ public: ///< to a complete packet with data from the next call to PlayPes(). ///< That way any functions called from within PlayPes() will be ///< guaranteed to always receive complete PES packets. + virtual int PlayTs(const uchar *Data, int Length, bool VideoOnly = false); + ///< Plays the given TS packet. + ///< If VideoOnly is true, only the video will be displayed, + ///< which is necessary for trick modes like 'fast forward'. + ///< Data points to a single TS packet, Length is always TS_SIZE (the total + ///< size of a single TS packet). + ///< A derived device can reimplement this function to handle the + ///< TS packets itself. Any packets the derived function can't handle + ///< must be sent to the base class function. This applies especially + ///< to the PAT/PMT packets. + ///< Returns -1 in case of error, otherwise the number of actually + ///< processed bytes is returned, which may be less than Length. + ///< PlayTs() shall process the packet either as a whole (returning + ///< a positive number, which needs not necessarily be Length) or not at all + ///< (returning 0 or -1 and setting 'errno' to EAGAIN). bool Replaying(void) const; ///< Returns true if we are currently replaying. bool Transferring(void) const; |