This repository has been archived by the owner on Jul 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
CommonUtils.h
73 lines (55 loc) · 2.57 KB
/
CommonUtils.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
* CommonUtils.h
* Created by David Conrad on 10/13/06.
*
* This file is part of Perian.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __COMMONUTILS_H__
#define __COMMONUTILS_H__
#include <QuickTime/QuickTime.h>
#ifdef __cplusplus
extern "C" {
#endif
// ISO 639-1 to language ID expected by SetMediaLanguage
short ISO639_1ToQTLangCode(const char *lang);
// ISO 639-2 to language ID expected by SetMediaLanguage
short ISO639_2ToQTLangCode(const char *lang);
// mallocs the buffer and copies the codec-specific description to it, in the same format
// as is specified in Matroska and is used in libavcodec
ComponentResult ReadESDSDescExt(Handle descExt, UInt8 **buffer, int *size);
int isImageDescriptionExtensionPresent(ImageDescriptionHandle desc, FourCharCode type);
// does the current process break if we signal droppable frames?
int IsFrameDroppingEnabled();
// does the current process break if we return errors in Preflight?
int IsForcedDecodeEnabled();
// does the current process break if we use graphicsModePreBlackAlpha?
int IsTransparentSubtitleHackEnabled();
// is this font name known to be incompatible with ATSUI?
int ShouldImportFontFileName(const char *filename);
// can we safely create an HE-AAC track with a frequency of more than 48khz?
int ShouldPlayHighFreqSBR();
// CFPreferencesCopyAppValue() wrapper which checks the type of the value returned
CFPropertyListRef CopyPreferencesValueTyped(CFStringRef key, CFTypeID type) CF_RETURNS_RETAINED;
void *fast_realloc_with_padding(void *ptr, unsigned int *size, unsigned int min_size);
// postprocess RGBA+8-bit to not look terrible when displayed with 'transparent' blend mode
void ConvertImageToQDTransparent(Ptr baseAddr, OSType pixelFormat, int rowBytes, int width, int height);
#define PERIAN_PREF_DOMAIN CFSTR("org.perian.Perian")
#define PERIAN_EXPORTED __attribute__((visibility("default")))
#ifdef __cplusplus
}
#endif
#endif