summaryrefslogtreecommitdiff
path: root/muggle-plugin/vdr_stream.h
diff options
context:
space:
mode:
authorLarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b>2005-03-22 06:47:53 +0000
committerLarsAC <LarsAC@e10066b5-e1e2-0310-b819-94efdf66514b>2005-03-22 06:47:53 +0000
commite2de0c5ed7bbbe4b236246e8bfd71cc87c8d974f (patch)
tree616f2f0a482597e3968e281ccf8adcfd04f45bbc /muggle-plugin/vdr_stream.h
parent101360901576c7e91196de60e2e6ebd6a4b145dd (diff)
downloadvdr-plugin-muggle-0.1.6-BETA.tar.gz
vdr-plugin-muggle-0.1.6-BETA.tar.bz2
Added 0.1.6 beta tag0.1.6-BETA
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/tags/0.1.6-BETA@586 e10066b5-e1e2-0310-b819-94efdf66514b
Diffstat (limited to 'muggle-plugin/vdr_stream.h')
-rw-r--r--muggle-plugin/vdr_stream.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/muggle-plugin/vdr_stream.h b/muggle-plugin/vdr_stream.h
new file mode 100644
index 0000000..6b1769c
--- /dev/null
+++ b/muggle-plugin/vdr_stream.h
@@ -0,0 +1,60 @@
+/*!
+ * \file vdr_stream.h
+ * \brief Definitions of media streams
+ *
+ * \version $Revision: 1.2 $
+ * \date $Date$
+ * \author Ralf Klueber, Lars von Wedel, Andreas Kellner
+ * \author Responsible author: $Author$
+ *
+ * $Id$
+ *
+ * Adapted from
+ * MP3/MPlayer plugin to VDR (C++)
+ * (C) 2001-2003 Stefan Huelswitt <huels@iname.com>
+ */
+
+#ifndef ___STREAM_H
+#define ___STREAM_H
+
+#include <string>
+
+#include "vdr_decoder.h"
+
+class cNet;
+
+// ----------------------------------------------------------------
+
+class mgStream // : public mgFileInfo
+{
+ private:
+ int m_fd;
+ bool m_ismmap;
+
+// from cFileInfo
+ std::string m_filename, m_fsID;
+ unsigned long long m_filesize;
+ time_t m_ctime;
+ long m_fsType;
+
+ bool fileinfo (bool log);
+ bool removable ();
+
+ protected:
+ unsigned char *m_buffer;
+ unsigned long long m_readpos, m_buffpos;
+ unsigned long m_fill;
+ public:
+ mgStream (std::string filename);
+ virtual ~ mgStream ();
+ virtual bool open (bool log = true);
+ virtual void close ();
+ virtual bool stream (unsigned char *&data, unsigned long &len,
+ const unsigned char *rest = NULL);
+ virtual bool seek (unsigned long long pos = 0);
+ virtual unsigned long long bufferPos ()
+ {
+ return m_buffpos;
+ }
+};
+#endif //___STREAM_H