This repository has been archived by the owner on Jul 30, 2022. It is now read-only.
mirrored from https://chromium.googlesource.com/webm/webmquicktime
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathWebMExportStructs.h
123 lines (95 loc) · 2.92 KB
/
WebMExportStructs.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
// Copyright (c) 2010 The WebM project authors. All Rights Reserved.
//
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file in the root of the source
// tree. An additional intellectual property rights grant can be found
// in the file PATENTS. All contributing project authors may
// be found in the AUTHORS file in the root of the source tree.
#ifndef _WEBM_EXPORT_STRUCTS_h_
#define _WEBM_EXPORT_STRUCTS_h_ 1
#if defined(__APPLE_CC__)
#include <QuickTime/QuickTime.h>
#else
#include <QuickTimeComponents.h>
#if defined(TARGET_OS_WIN32)
#define _WINIOCTL_
#error windows
#include <windows.h>
#endif /* TARGET_OS_WIN32 */
#endif /* __APPLE_CC__ */
#include "EbmlDataHWriter.h"
#include "WebMCommon.h"
typedef struct
{
ComponentInstance vorbisComponentInstance;
AudioStreamBasicDescription asbd;
WebMBuffer buf;
} AudioStream, *AudioStreamPtr;
typedef struct
{
ICMDecompressionSessionRef decompressionSession;
ICMCompressionSessionRef compressionSession;
Boolean bTwoPass;
UInt32 lastTimeMs;
} VideoStream, *VideoStreamPtr;
typedef struct
{
OSType trackType;
StreamSource source;
WebMQueuedFrames frameQueue;
UInt64 framesIn;
UInt64 framesOut;
Boolean complete;
union
{
VideoStream vid;
AudioStream aud;
} ;
} GenericStream, *GenericStreamPtr;
typedef struct
{
UInt64 loc;
unsigned long timeVal;
unsigned int track;
unsigned int blockNumber;
} WebMCuePoint;
typedef struct
{
ComponentInstance self;
ComponentInstance quickTimeMovieExporter;
int streamCount;
GenericStream **streams; //should be either audio or video
unsigned long cueCount;
Handle cueHandle;
MovieProgressUPP progressProc;
long progressRefCon;
Boolean progressOpen;
Boolean canceled;
Boolean startNewCluster;
UInt64 newClusterStartTime;
double framerate;
UInt32 webmTimeCodeScale;
/* settings */
Boolean bExportVideo;
Boolean bExportAudio;
Boolean bAltRefEnabled;
AudioStreamBasicDescription audioBSD;
//Ebml writing
unsigned long clusterTime;
unsigned long clusterKeyFrameTime;
EbmlLoc clusterStart;
unsigned int blocksInCluster; //this increments any time a block added
SInt64 clusterOffset;
/////////////////
QTAtomContainer audioSettingsAtom; //hold on to any audio settings the user changes
QTAtomContainer videoSettingsAtom;
Handle videoSettingsCustom; //this contains vp8 custom settings.
unsigned int currentPass;
/* settings dialog vars */
Boolean bMovieHasAudio;
Boolean bMovieHasVideo;
Movie setdlg_movie;
Track setdlg_track;
Boolean bCanExportAudio;
} WebMExportGlobals, *WebMExportGlobalsPtr;
#endif /* __exporter_types_h__ */