2010-12-21 02:05:13 +01:00
|
|
|
/*
|
|
|
|
|
TIMECODE.hpp - grid aligned and fixed format time specifications
|
|
|
|
|
|
|
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2010, Hermann Vosseler <Ichthyostega@web.de>
|
|
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
|
modify it under the terms of the GNU General Public License as
|
|
|
|
|
published by the Free Software Foundation; either version 2 of
|
|
|
|
|
the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef LIB_TIME_TIMECODE_H
|
|
|
|
|
#define LIB_TIME_TIMECODE_H
|
|
|
|
|
|
2010-12-27 02:04:34 +01:00
|
|
|
#include "lib/time/timevalue.hpp"
|
2011-01-02 01:21:39 +01:00
|
|
|
#include "lib/time/formats.hpp"
|
2010-12-27 02:04:34 +01:00
|
|
|
|
2010-12-21 02:05:13 +01:00
|
|
|
//#include <boost/operators.hpp>
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace lib {
|
|
|
|
|
namespace time {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* fixed format time specification.
|
2011-01-02 01:21:39 +01:00
|
|
|
* @param FMT the actual timecode format to use
|
|
|
|
|
* @see time::Format
|
2010-12-21 02:05:13 +01:00
|
|
|
* @todo WIP-WIP-WIP
|
|
|
|
|
*/
|
2011-01-02 01:21:39 +01:00
|
|
|
template<class FMT>
|
2010-12-21 02:05:13 +01:00
|
|
|
class TCode
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2011-01-02 01:21:39 +01:00
|
|
|
class QuTime;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A frame counting timecode value.
|
|
|
|
|
* This is an hard-coded representation of
|
|
|
|
|
* TCode<format::Frames>, with additional convenience
|
|
|
|
|
* constructors and conversions, which basically make
|
|
|
|
|
* FrameNr values interchangeable with integral numbers.
|
|
|
|
|
*/
|
|
|
|
|
class FrameNr
|
|
|
|
|
: public TCode<format::Frames>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
FrameNr (QuTime const& quantisedTime);
|
|
|
|
|
|
|
|
|
|
operator long() const;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2010-12-21 02:05:13 +01:00
|
|
|
|
|
|
|
|
}} // lib::time
|
|
|
|
|
#endif
|