2 Copyright 2004-2005 Chris Tallon
4 This file is part of VOMP.
6 VOMP is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 VOMP is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with VOMP; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33 int VideoWin::init(UCHAR tformat)
35 if (initted) return 0;
40 int VideoWin::setTVsize(UCHAR ttvsize)
45 int VideoWin::setDefaultAspect()
47 return setAspectRatio(tvsize);
50 int VideoWin::shutdown()
52 if (!initted) return 0;
57 int VideoWin::setFormat(UCHAR tformat)
59 if (!initted) return 0;
60 if ((tformat != PAL) && (tformat != NTSC)) return 0;
66 int VideoWin::setConnection(UCHAR tconnection)
68 if (!initted) return 0;
69 if ((tconnection != COMPOSITERGB) && (tconnection != SVIDEO)) return 0;
70 connection = tconnection;
75 int VideoWin::setAspectRatio(UCHAR taspectRatio)
77 if (!initted) return 0;
78 if ((taspectRatio != ASPECT4X3) && (taspectRatio != ASPECT16X9)) return 0;
79 aspectRatio = taspectRatio;
84 int VideoWin::setMode(UCHAR tmode)
86 if (!initted) return 0;
88 if ((tmode == LETTERBOX) && (tvsize == ASPECT16X9)) return 0; // invalid mode
90 if ((tmode != NORMAL) && (tmode != LETTERBOX) && (tmode != UNKNOWN2) && (tmode != QUARTER) && (tmode != EIGHTH)
91 && (tmode != ZOOM) && (tmode != UNKNOWN6)) return 0;
97 int VideoWin::signalOff()
102 int VideoWin::signalOn()
107 int VideoWin::setSource()
109 if (!initted) return 0;
114 int VideoWin::setPosition(int x, int y)
116 if (!initted) return 0;
123 if (!initted) return 0;
130 if (!initted) return 0;
137 if (!initted) return 0;
142 int VideoWin::reset()
144 if (!initted) return 0;
149 int VideoWin::pause()
151 if (!initted) return 0;
156 int VideoWin::unPause() // FIXME get rid - same as play!!
158 if (!initted) return 0;
162 int VideoWin::fastForward()
164 if (!initted) return 0;
168 int VideoWin::unFastForward()
170 if (!initted) return 0;
174 int VideoWin::attachFrameBuffer()
176 if (!initted) return 0;
180 int VideoWin::blank(void)
185 int VideoWin::getFD()
187 if (!initted) return 0;
192 ULLONG VideoWin::getCurrentTimestamp()
197 ULONG VideoWin::timecodeToFrameNumber(ULLONG timecode)
199 if (format == PAL) return (ULONG)(((double)timecode / (double)90000) * (double)25);
200 else return (ULONG)(((double)timecode / (double)90000) * (double)30);
209 int VideoWin::test2()