source: trunk/Subtitles/SubATSUIRenderer.h @ 1038

Revision 1038, 2.1 KB checked in by astrange, 6 years ago (diff)

Add LGPL license headers to all files (or MIT where appropriate)
Get rid of "All rights reserved" which is LGPL-incompatible.

I didn't touch the Apple sample code, but they should've taken it out too...

Line 
1/*
2 * SubATSUIRenderer.h
3 * Created by Alexander Strange on 7/30/07.
4 *
5 * This file is part of Perian.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#ifdef __cplusplus
23extern "C"
24{
25#endif
26
27#ifdef __OBJC__
28#import <Cocoa/Cocoa.h>
29#import "SubRenderer.h"
30
31@interface SubATSUIRenderer : SubRenderer {
32        SubContext *context;
33        unichar *ubuffer;
34        UniCharArrayOffset *breakbuffer;
35        ATSUTextLayout layout;
36        float screenScaleX, screenScaleY, videoWidth, videoHeight;
37        @public;
38        CGColorSpaceRef srgbCSpace;
39        TextBreakLocatorRef breakLocator;
40}
41-(SubATSUIRenderer*)initWithVideoWidth:(float)width videoHeight:(float)height;
42-(SubATSUIRenderer*)initWithSSAHeader:(NSString*)header videoWidth:(float)width videoHeight:(float)height;
43-(void)renderPacket:(NSString *)packet inContext:(CGContextRef)c width:(float)cWidth height:(float)cHeight;
44@end
45
46typedef SubATSUIRenderer *SubtitleRendererPtr;
47
48#else
49#include <QuickTime/QuickTime.h>
50
51typedef void *SubtitleRendererPtr;
52
53#endif
54
55extern SubtitleRendererPtr SubInitForSSA(char *header, size_t headerLen, int width, int height);
56extern SubtitleRendererPtr SubInitNonSSA(int width, int height);
57extern CGColorSpaceRef SubGetColorSpace(SubtitleRendererPtr s);
58extern void SubRenderPacket(SubtitleRendererPtr s, CGContextRef c, CFStringRef str, int cWidth, int cHeight);
59extern void SubPrerollFromHeader(char *header, int headerLen);
60extern void SubDisposeRenderer(SubtitleRendererPtr s);
61
62#ifdef __cplusplus
63}
64#endif
Note: See TracBrowser for help on using the repository browser.