2 Copyright 2004-2005 Chris Tallon
\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
20 //portions from vdr by Klaus Schmiding HSMF code
\r
24 Video* Video::instance = NULL;
\r
28 if (instance) return;
\r
49 Video* Video::getInstance()
\r
54 void Video::setInstance(Video* inst)
\r
60 hmsf Video::framesToHMSF(ULONG frames, double fps)
\r
65 ret.frames= int(modf((frames + 0.5) / fps, &Seconds) * fps + 1);
\r
66 int s = int(Seconds);
\r
68 ret.minutes = s / 60 % 60;
\r
69 ret.hours = s / 3600;
\r
71 / * if (format == NTSC)
\r
73 ret.hours = frames / 108000;
\r
75 ret.minutes = frames / 1800;
\r
77 ret.seconds = frames / 30;
\r
78 ret.frames = frames % 30;
\r
82 ret.hours = frames / 90000;
\r
84 ret.minutes = frames / 1500;
\r
86 ret.seconds = frames / 25;
\r
87 ret.frames = frames % 25;
\r
93 UINT Video::getFPS()
\r
95 if (format == NTSC) return 30;
\r