Mercurial > projects > dstep
comparison dstep/qtkit/QTCaptureFileOutput.d @ 16:19885b43130e
Huge update, the bridge actually works now
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 03 Jan 2010 22:06:11 +0100 |
parents | |
children | b9de51448c6b |
comparison
equal
deleted
inserted
replaced
15:7ff919f595d5 | 16:19885b43130e |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Sep 28, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.qtkit.QTCaptureFileOutput; | |
8 | |
9 import dstep.foundation.Foundation; | |
10 import dstep.objc.bridge.Bridge; | |
11 import dstep.objc.objc; | |
12 import dstep.qtkit.QTCaptureConnection; | |
13 import dstep.qtkit.QTCaptureOutput; | |
14 import dstep.qtkit.QTCompressionOptions; | |
15 import dstep.qtkit.QTKitDefines; | |
16 import dstep.qtkit.QTSampleBuffer; | |
17 import dstep.qtkit.QTTime; | |
18 | |
19 alias NSUInteger QTCaptureFileOutputBufferDestination; | |
20 | |
21 enum | |
22 { | |
23 QTCaptureFileOutputBufferDestinationNewFile = 1, | |
24 QTCaptureFileOutputBufferDestinationOldFile = 2 | |
25 } | |
26 | |
27 const TQTCaptureFileOutputDelegate = ` | |
28 | |
29 void captureOutput (QTCaptureFileOutput captureOutput, QTSampleBuffer sampleBuffer, QTCaptureConnection connection) | |
30 { | |
31 return invokeObjcSelf!(void, "captureOutput:didOutputSampleBuffer:fromConnection:", QTCaptureFileOutput, QTSampleBuffer, QTCaptureConnection)(captureOutput, sampleBuffer, connection); | |
32 } | |
33 | |
34 void captureOutput (QTCaptureFileOutput captureOutput, NSURL fileURL, NSArray connections) | |
35 { | |
36 return invokeObjcSelf!(void, "captureOutput:willStartRecordingToOutputFileAtURL:forConnections:", QTCaptureFileOutput, NSURL, NSArray)(captureOutput, fileURL, connections); | |
37 } | |
38 | |
39 void captureOutput (QTCaptureFileOutput captureOutput, NSURL fileURL, NSArray connections) | |
40 { | |
41 return invokeObjcSelf!(void, "captureOutput:didStartRecordingToOutputFileAtURL:forConnections:", QTCaptureFileOutput, NSURL, NSArray)(captureOutput, fileURL, connections); | |
42 } | |
43 | |
44 bool captureOutput (QTCaptureFileOutput captureOutput, NSURL outputFileURL, NSArray connections, NSError error) | |
45 { | |
46 return invokeObjcSelf!(bool, "captureOutput:shouldChangeOutputFileAtURL:forConnections:dueToError:", QTCaptureFileOutput, NSURL, NSArray, NSError)(captureOutput, outputFileURL, connections, error); | |
47 } | |
48 | |
49 void captureOutput (QTCaptureFileOutput captureOutput, NSURL outputFileURL, NSArray connections, NSError error) | |
50 { | |
51 return invokeObjcSelf!(void, "captureOutput:mustChangeOutputFileAtURL:forConnections:dueToError:", QTCaptureFileOutput, NSURL, NSArray, NSError)(captureOutput, outputFileURL, connections, error); | |
52 } | |
53 | |
54 void captureOutput (QTCaptureFileOutput captureOutput, NSURL outputFileURL, NSArray connections, NSError error) | |
55 { | |
56 return invokeObjcSelf!(void, "captureOutput:willFinishRecordingToOutputFileAtURL:forConnections:dueToError:", QTCaptureFileOutput, NSURL, NSArray, NSError)(captureOutput, outputFileURL, connections, error); | |
57 } | |
58 | |
59 void captureOutput (QTCaptureFileOutput captureOutput, NSURL outputFileURL, NSArray connections, NSError error) | |
60 { | |
61 return invokeObjcSelf!(void, "captureOutput:didFinishRecordingToOutputFileAtURL:forConnections:dueToError:", QTCaptureFileOutput, NSURL, NSArray, NSError)(captureOutput, outputFileURL, connections, error); | |
62 } | |
63 | |
64 //mixin ObjcBindMethod!(captureOutput, "captureOutput:didOutputSampleBuffer:fromConnection:"); | |
65 //mixin ObjcBindMethod!(captureOutput, "captureOutput:willStartRecordingToOutputFileAtURL:forConnections:"); | |
66 //mixin ObjcBindMethod!(captureOutput, "captureOutput:didStartRecordingToOutputFileAtURL:forConnections:"); | |
67 //mixin ObjcBindMethod!(captureOutput, "captureOutput:shouldChangeOutputFileAtURL:forConnections:dueToError:"); | |
68 //mixin ObjcBindMethod!(captureOutput, "captureOutput:mustChangeOutputFileAtURL:forConnections:dueToError:"); | |
69 //mixin ObjcBindMethod!(captureOutput, "captureOutput:willFinishRecordingToOutputFileAtURL:forConnections:dueToError:"); | |
70 //mixin ObjcBindMethod!(captureOutput, "captureOutput:didFinishRecordingToOutputFileAtURL:forConnections:dueToError:"); | |
71 | |
72 `; | |
73 | |
74 class QTCaptureFileOutput : QTCaptureOutput | |
75 { | |
76 mixin (ObjcWrap); | |
77 | |
78 NSURL outputFileURL () | |
79 { | |
80 return invokeObjcSelf!(NSURL, "outputFileURL"); | |
81 } | |
82 | |
83 void recordToOutputFileURL (NSURL url) | |
84 { | |
85 return invokeObjcSelf!(void, "recordToOutputFileURL:", NSURL)(url); | |
86 } | |
87 | |
88 void recordToOutputFileURL (NSURL url, uint bufferDestination) | |
89 { | |
90 return invokeObjcSelf!(void, "recordToOutputFileURL:bufferDestination:", NSURL, uint)(url, bufferDestination); | |
91 } | |
92 | |
93 QTCompressionOptions compressionOptionsForConnection (QTCaptureConnection connection) | |
94 { | |
95 return invokeObjcSelf!(QTCompressionOptions, "compressionOptionsForConnection:", QTCaptureConnection)(connection); | |
96 } | |
97 | |
98 void setCompressionOptions (QTCompressionOptions compressionOptions, QTCaptureConnection connection) | |
99 { | |
100 return invokeObjcSelf!(void, "setCompressionOptions:forConnection:", QTCompressionOptions, QTCaptureConnection)(compressionOptions, connection); | |
101 } | |
102 | |
103 QTTime recordedDuration () | |
104 { | |
105 return invokeObjcSelf!(QTTime, "recordedDuration"); | |
106 } | |
107 | |
108 ulong recordedFileSize () | |
109 { | |
110 return invokeObjcSelf!(ulong, "recordedFileSize"); | |
111 } | |
112 | |
113 QTTime maximumRecordedDuration () | |
114 { | |
115 return invokeObjcSelf!(QTTime, "maximumRecordedDuration"); | |
116 } | |
117 | |
118 void setMaximumRecordedDuration (QTTime maximumRecordedDuration) | |
119 { | |
120 return invokeObjcSelf!(void, "setMaximumRecordedDuration:", QTTime)(maximumRecordedDuration); | |
121 } | |
122 | |
123 ulong maximumRecordedFileSize () | |
124 { | |
125 return invokeObjcSelf!(ulong, "maximumRecordedFileSize"); | |
126 } | |
127 | |
128 void setMaximumRecordedFileSize (ulong maximumRecordedFileSize) | |
129 { | |
130 return invokeObjcSelf!(void, "setMaximumRecordedFileSize:", ulong)(maximumRecordedFileSize); | |
131 } | |
132 | |
133 Object delegate_ () | |
134 { | |
135 return invokeObjcSelf!(Object, "delegate"); | |
136 } | |
137 | |
138 void setDelegate (Object delegate_) | |
139 { | |
140 return invokeObjcSelf!(void, "setDelegate:", Object)(delegate_); | |
141 } | |
142 } | |
143 |