2 Copyright 2004-2005 Chris Tallon 2009 Marten Richter
\r
4 This file is part of VOMP.
\r
6 VOMP is free software; you can redistribute it and/or modify
\r
7 it under the terms of the GNU General Public License as published by
\r
8 the Free Software Foundation; either version 2 of the License, or
\r
9 (at your option) any later version.
\r
11 VOMP is distributed in the hope that it will be useful,
\r
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 GNU General Public License for more details.
\r
16 You should have received a copy of the GNU General Public License
\r
17 along with VOMP; if not, write to the Free Software
\r
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\r
22 #ifndef VIDEOVPEOGL_H
\r
23 #define VIDEOVPEOGL_H
\r
30 #include <sys/ioctl.h>
\r
35 #include "defines.h"
\r
38 #define WRITE_PACKETS 16
\r
39 #define WRITE_LENGTH (32*1024)
\r
42 class VideoVPEOGL : public Video
\r
46 virtual ~VideoVPEOGL();
\r
48 int init(UCHAR format);
\r
51 int setFormat(UCHAR format);
\r
52 int setConnection(UCHAR connection);
\r
53 int setAspectRatio(UCHAR aspectRatio); // This one does the pin 8 scart widescreen switching
\r
54 int setMode(UCHAR mode);
\r
55 int setTVsize(UCHAR size); // Is the TV a widescreen?
\r
56 int setDefaultAspect();
\r
58 int setPosition(int x, int y);
\r
65 int unFastForward();
\r
70 int attachFrameBuffer(); // What does this do?
\r
71 ULONG timecodeToFrameNumber(ULLONG timecode);
\r
72 ULLONG getCurrentTimestamp();
\r
73 bool displayIFrame(const UCHAR* buffer, UINT length);
\r
75 // Writing Data to Videodevice
\r
76 virtual void PrepareMediaSample(const MediaPacketList&, UINT samplepos);
\r
77 virtual UINT DeliverMediaSample(UCHAR* buffer, UINT* samplepos);
\r
78 virtual long long SetStartOffset(long long curreftime, bool *rsync)
\r
80 virtual void ResetTimeOffsets();
\r
82 virtual bool supportsh264(){return true;};
\r
84 int WriteOutTS(const unsigned char *buffer,int length, int type);
\r
85 void WriteOutPATPMT();
\r
88 Mutex *getMuxMutex() {return &filemutex;}; //File must be pointer of pointer Thread safety!
\r
89 FILE *getMuxFile() {return muxout;}; //File must be pointer of pointer Thread safety!
\r
90 void initMuxer(bool iframe=false);
\r
93 int getLastPacketNum() {return lastpacketnum;};
\r
100 int EnterIframePlayback();
\r
107 unsigned char audioconti,videoconti;
\r
108 unsigned int patversion,pmtversion;
\r
110 MediaPacket mediapacket;
\r