summaryrefslogtreecommitdiff
path: root/XMPFiles/source/FormatSupport/TimeConversionUtils.hpp
blob: ee21e672856a0020edc843f967a2362c82996313 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef TimeConversionUtils_h__
#define TimeConversionUtils_h__ 1

// =================================================================================================
// Copyright Adobe
// Copyright 2014 Adobe
// All Rights Reserved
//
// NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the terms
// of the Adobe license agreement accompanying it. If you have received this file from a source other 
// than Adobe, then your use, modification, or distribution of it requires the prior written permission
// of Adobe.
// =================================================================================================

#include "public/include/XMP_Environment.h"	// ! XMP_Environment.h must be the first included header.
#include "public/include/XMP_Const.h"
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include "XMPFiles/source/XMPFiles_Impl.hpp"

namespace TimeConversionUtils {
	bool ConvertSamplesToSMPTETimecode(
		std::string &		outTimecode,
		XMP_Int64			inSamples,
		XMP_Uns64			inSampleRate,
		const std::string & inTimecodeFormat );

	bool ConvertSMPTETimecodeToSamples(
		XMP_Int64 &			outSamples,
		const std::string & inTimecode,
		XMP_Uns64			inSampleRate,
		const std::string & inTimecodeFormat
		);
   
};

#endif // TimeConversionUtils_h__