forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrevcapture.mm
More file actions
794 lines (623 loc) · 20.8 KB
/
Copy pathrevcapture.mm
File metadata and controls
794 lines (623 loc) · 20.8 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
/* Copyright (C) 2003-2015 LiveCode Ltd.
This file is part of LiveCode.
LiveCode is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License v3 as published by the Free
Software Foundation.
LiveCode 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 General Public License
for more details.
You should have received a copy of the GNU General Public License
along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <revolution/external.h>
#include <Carbon/Carbon.h>
#include <Foundation/Foundation.h>
#include "revcapture.h"
////////////////////////////////////////////////////////////////////////
//struct NSString;
extern "C" void rreCaptureBeginSession(void);
extern "C" void rreCaptureEndSession(void);
extern "C" NSString *rreCaptureListAudioInputs(void);
extern "C" NSString *rreCaptureListVideoInputs(void);
extern "C" NSString *rreCaptureGetAudioInput(void);
extern "C" void rreCaptureSetAudioInput(NSString *);
extern "C" NSString *rreCaptureGetVideoInput(void);
extern "C" void rreCaptureSetVideoInput(NSString *);
extern "C" int32_t rreCaptureGetPreviewVolume(void);
extern "C" void rreCaptureSetPreviewVolume(int32_t);
extern "C" NSString *rreCaptureGetPreviewImage(void);
extern "C" void rreCaptureSetPreviewImage(NSString *);
extern "C" void rreCaptureStartPreviewing(void);
extern "C" void rreCaptureStopPreviewing(void);
extern "C" void rreCapturePausePreviewing(void);
extern "C" void rreCaptureResumePreviewing(void);
extern "C" NSString *rreCapturePreviewState(void);
/////////
extern "C" NSString *rreCaptureListAudioCodecs(void);
extern "C" NSString *rreCaptureListVideoCodecs(void);
extern "C" NSString *rreCaptureGetAudioCodec(void);
extern "C" void rreCaptureSetAudioCodec(NSString *);
extern "C" NSString *rreCaptureGetVideoCodec(void);
extern "C" void rreCaptureSetVideoCodec(NSString *);
extern "C" NSString *rreCaptureGetRecordOutput(void);
extern "C" void rreCaptureSetRecordOutput(NSString *);
extern "C" NSString *rreCaptureStartRecording(void);
extern "C" NSString *rreCaptureStopRecording(void);
extern "C" void rreCaptureCancelRecording(void);
extern "C" void rreCapturePauseRecording(void);
extern "C" void rreCaptureResumeRecording(void);
extern "C" int rreCaptureGetRecordFrameRate(void);
extern "C" void rreCaptureSetRecordFrameRate(int);
extern "C" NSString *rreCaptureGetRecordFrameSize(void);
extern "C" void rreCaptureSetRecordFrameSize(int, int);
extern "C" NSString *rreCaptureRecordState(void);
////////////////////////////////////////////////////////////////////////
extern "C" void ClearException(void);
extern "C" void ThrowException(const char *error);
static const char *s_exception = nil;
void ClearException(void)
{
s_exception = nil;
}
void ThrowException(const char *p_exception)
{
s_exception = p_exception;
}
bool CatchException(char **r_result, Bool *r_error)
{
if (s_exception == nil)
return false;
*r_result = strdup(s_exception);
*r_error = True;
return true;
}
static void CatchSyntaxError(char **r_result, Bool *r_error)
{
*r_result = strdup("syntax error");
*r_error = True;
}
static void CatchObjCException(id p_error, char **r_result, Bool *r_error)
{
if ([p_error isKindOfClass: [NSException class]])
{
*r_result = strdup([[p_error reason] cStringUsingEncoding: NSMacOSRomanStringEncoding]);
}
else
{
*r_result = strdup("unknown objc exception");
*r_error = True;
}
}
////////////////////////////////////////////////////////////////////////
static bool CStringFormat(char*& r_string, const char *p_format, ...)
{
va_list t_args;
int t_count;
#ifdef _WINDOWS
va_start(t_args, p_format);
t_count = _vscprintf(p_format, t_args);
va_end(t_args);
#elif defined(_MACOSX) || defined(_LINUX)
va_start(t_args, p_format);
t_count = vsnprintf(nil, 0, p_format, t_args);
va_end(t_args);
#else
#error "Implement MCCStringFormat"
#endif
char *t_new_string;
t_new_string = (char *)malloc(t_count + 1);
if (t_new_string == nil)
return false;
va_start(t_args, p_format);
vsprintf(t_new_string, p_format, t_args);
va_end(t_args);
r_string = t_new_string;
return true;
}
static bool CStringFormatV(char*& r_string, const char *p_format, va_list p_args)
{
int t_count;
#ifdef _WINDOWS
t_count = _vscprintf(p_format, p_args);
#elif defined(_MACOSX) || defined(_LINUX)
t_count = vsnprintf(nil, 0, p_format, p_args);
#else
#error "Implement CStringFormatV"
#endif
char *t_new_string;
t_new_string = (char *)malloc(t_count + 1);
if (t_new_string == nil)
return false;
vsprintf(t_new_string, p_format, p_args);
r_string = t_new_string;
return true;
}
static void CStringFree(char *p_string)
{
free(p_string);
}
static bool EvaluateLiveCodeExpressionV(char*& r_result, const char *p_format, va_list p_args)
{
bool t_success;
t_success = true;
char *t_expr;
t_expr = nil;
if (t_success)
t_success = CStringFormatV(t_expr, p_format, p_args);
char *t_result;
t_result = nil;
if (t_success)
{
int t_retval;
t_result = EvalExpr(t_expr, &t_retval);
if (t_retval == EXTERNAL_FAILURE)
t_success = false;
}
if (t_success)
r_result = t_result;
CStringFree(t_expr);
return t_success;
}
static bool EvaluateLiveCodeExpression(char*& r_result, const char *p_format, ...)
{
bool t_success;
t_success = true;
va_list t_args;
va_start(t_args, p_format);
t_success = EvaluateLiveCodeExpressionV(r_result, p_format, t_args);
va_end(t_args);
return t_success;
}
static bool EvaluateLiveCodeExpressionAsInt(int32_t& r_result, const char *p_format, ...)
{
bool t_success;
t_success = true;
char *t_string_result;
va_list t_args;
va_start(t_args, p_format);
t_success = EvaluateLiveCodeExpressionV(t_string_result, p_format, t_args);
va_end(t_args);
if (t_success)
r_result = atoi(t_string_result);
CStringFree(t_string_result);
return t_success;
}
////////////////////////////////////////////////////////////////////////
extern "C" BOOL LockLiveCodeImage(const char *p_image_id, GWorldPtr* r_gworld);
extern "C" void UnlockLiveCodeImage(const char *p_image_id, GWorldPtr* x_gworld);
extern "C" void UpdateLiveCodeImage(const char *p_image_id);
extern "C" BOOL ExecuteLiveCodeScript(const char *p_format, ...);
static bool ResolveImageId(const char *p_image_ref, char*& r_image_id)
{
if (!EvaluateLiveCodeExpression(r_image_id, "the long id of %s", p_image_ref))
{
ThrowException("image not found");
return false;
}
return true;
}
static bool GetWidthAndHeightOfImageId(const char *p_image_ref, int32_t& r_width, int32_t& r_height)
{
if (!EvaluateLiveCodeExpressionAsInt(r_width, "the width of %s", p_image_ref) ||
!EvaluateLiveCodeExpressionAsInt(r_height, "the height of %s", p_image_ref))
{
ThrowException("could not get image dimensions");
return false;
}
return true;
}
static bool SetImageGWorld(const char *p_image_ref, GWorldPtr p_gworld)
{
if (p_gworld == nil)
ExecuteLiveCodeScript("set the imagePixmapId of %s to empty", p_image_ref);
else
{
if (!ExecuteLiveCodeScript("set the imagePixmapId of %s to %u", p_image_ref, p_gworld))
{
ThrowException("could not configure image buffer");
return false;
}
}
return true;
}
BOOL ExecuteLiveCodeScript(const char *p_format, ...)
{
bool t_success;
t_success = true;
char *t_script;
t_script = nil;
if (t_success)
{
va_list t_args;
va_start(t_args, p_format);
t_success = CStringFormatV(t_script, p_format, t_args);
va_end(t_args);
}
if (t_success)
{
int t_retval;
SendCardMessage(t_script, &t_retval);
if (t_retval == EXTERNAL_FAILURE)
t_success = false;
}
CStringFree(t_script);
return t_success ? YES : NO;
}
BOOL LockLiveCodeImage(const char *p_image_id, GWorldPtr* r_gworld)
{
bool t_success;
t_success = true;
char *t_resolved_image_id;
t_resolved_image_id = nil;
if (t_success)
t_success = ResolveImageId(p_image_id, t_resolved_image_id);
int32_t t_width, t_height;
if (t_success)
t_success = GetWidthAndHeightOfImageId(t_resolved_image_id, t_width, t_height);
GWorldPtr t_new_gworld;
t_new_gworld = nil;
if (t_success)
{
Rect t_rect;
SetRect(&t_rect, 0, 0, t_width, t_height);
if (NewGWorld(&t_new_gworld, 32, &t_rect, NULL, NULL, kNativeEndianPixMap) != noErr)
{
ThrowException("could not create image buffer");
t_success = false;
}
}
if (t_success)
t_success = SetImageGWorld(t_resolved_image_id, t_new_gworld);
if (t_success)
*r_gworld = t_new_gworld;
else
{
if (t_new_gworld != nil)
DisposeGWorld(t_new_gworld);
}
free(t_resolved_image_id);
return t_success ? YES : NO;
}
void UnlockLiveCodeImage(const char *p_image_id, GWorldPtr* x_gworld)
{
if (*x_gworld == nil)
return;
char *t_resolved_image_id;
t_resolved_image_id = nil;
if (ResolveImageId(p_image_id, t_resolved_image_id))
SetImageGWorld(t_resolved_image_id, nil);
DisposeGWorld(*x_gworld);
free(t_resolved_image_id);
*x_gworld = nil;
}
void UpdateLiveCodeImage(const char *p_image_id)
{
int t_success;
ShowImageByLongId(p_image_id, &t_success);
}
////////////////////////////////////////////////////////////////////////
typedef void (*VoidMethodPtr)(void);
typedef void (*VoidMethodWithObjCStringPtr)(NSString *);
typedef void (*VoidMethodWithIntPtr)(int);
typedef void (*VoidMethodWithIntIntPtr)(int, int);
typedef NSString *(*ObjCStringMethodPtr)(void);
typedef int32_t (*IntMethodPtr)(void);
static void CallVoidMethod(VoidMethodPtr p_method, char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
*r_result = nil;
*r_error = False;
*r_pass = False;
if (p_argn != 0)
{
CatchSyntaxError(r_result, r_error);
return;
}
NSAutoreleasePool *t_pool;
t_pool = [[NSAutoreleasePool alloc] init];
@try
{
ClearException();
p_method();
CatchException(r_result, r_error);
}
@catch(id t_error)
{
CatchObjCException(t_error, r_result, r_error);
}
[t_pool release];
}
static void CallObjCStringMethod(ObjCStringMethodPtr p_method, char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
*r_result = nil;
*r_error = False;
*r_pass = False;
if (p_argn != 0)
{
CatchSyntaxError(r_result, r_error);
return;
}
NSAutoreleasePool *t_pool;
t_pool = [[NSAutoreleasePool alloc] init];
@try
{
ClearException();
NSString *t_method_result;
t_method_result = p_method();
if (!CatchException(r_result, r_error))
{
// SN-2015-01-22: [[ Bug 14423 ]] Convert to UTF-8 by default, because we
// want to return the actual codec names, nothing with '?'
char *t_string;
NSData* t_data;
t_data = [t_method_result dataUsingEncoding: NSUTF8StringEncoding
allowLossyConversion:True];
t_string = new char[[t_data length] + 1];
if (t_string == NULL)
*r_result = NULL;
else
{
memcpy((void*)t_string, (const void*)[t_data bytes], [t_data length]);
t_string [[t_data length]] = '\0';
*r_result = t_string;
}
}
}
@catch(id t_error)
{
CatchObjCException(t_error, r_result, r_error);
}
[t_pool release];
}
static void CallIntMethod(IntMethodPtr p_method, char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
*r_result = nil;
*r_error = False;
*r_pass = False;
if (p_argn != 0)
{
CatchSyntaxError(r_result, r_error);
return;
}
NSAutoreleasePool *t_pool;
t_pool = [[NSAutoreleasePool alloc] init];
@try
{
ClearException();
int t_method_result;
t_method_result = p_method();
if (!CatchException(r_result, r_error))
{
char t_buffer[16];
sprintf(t_buffer, "%d", p_method());
*r_result = strdup(t_buffer);
}
}
@catch(id t_error)
{
CatchObjCException(t_error, r_result, r_error);
}
[t_pool release];
}
static void CallVoidMethodWithObjCString(VoidMethodWithObjCStringPtr p_method, char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
*r_result = nil;
*r_error = False;
*r_pass = False;
if (p_argn != 1)
{
CatchSyntaxError(r_result, r_error);
return;
}
NSAutoreleasePool *t_pool;
t_pool = [[NSAutoreleasePool alloc] init];
@try
{
ClearException();
p_method([NSString stringWithCString: p_argc[0] encoding: NSUTF8StringEncoding]);
CatchException(r_result, r_error);
}
@catch(id t_error)
{
CatchObjCException(t_error, r_result, r_error);
}
[t_pool release];
}
static void CallVoidMethodWithInt(VoidMethodWithIntPtr p_method, char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
*r_result = nil;
*r_error = False;
*r_pass = False;
if (p_argn != 1)
{
CatchSyntaxError(r_result, r_error);
return;
}
NSAutoreleasePool *t_pool;
t_pool = [[NSAutoreleasePool alloc] init];
@try
{
ClearException();
p_method(atoi(p_argc[0]));
CatchException(r_result, r_error);
}
@catch(id t_error)
{
CatchObjCException(t_error, r_result, r_error);
}
[t_pool release];
}
static void CallVoidMethodWithIntInt(VoidMethodWithIntIntPtr p_method, char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
*r_result = nil;
*r_error = False;
*r_pass = False;
if (p_argn != 2)
{
CatchSyntaxError(r_result, r_error);
return;
}
NSAutoreleasePool *t_pool;
t_pool = [[NSAutoreleasePool alloc] init];
@try
{
ClearException();
p_method(atoi(p_argc[0]), atoi(p_argc[1]));
CatchException(r_result, r_error);
}
@catch(id t_error)
{
CatchObjCException(t_error, r_result, r_error);
}
[t_pool release];
}
////////////////////////////////////////////////////////////////////////
void revCaptureBeginSession(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethod(rreCaptureBeginSession, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureEndSession(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethod(rreCaptureEndSession, p_argc, p_argn, r_result, r_pass, r_error);
}
////////////////////
void revCaptureListAudioInputs(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallObjCStringMethod(rreCaptureListAudioInputs, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureListVideoInputs(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallObjCStringMethod(rreCaptureListVideoInputs, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureGetAudioInput(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallObjCStringMethod(rreCaptureGetAudioInput, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureSetAudioInput(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethodWithObjCString(rreCaptureSetAudioInput, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureGetVideoInput(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallObjCStringMethod(rreCaptureGetVideoInput, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureSetVideoInput(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethodWithObjCString(rreCaptureSetVideoInput, p_argc, p_argn, r_result, r_pass, r_error);
}
////////////////////
void revCaptureGetPreviewVolume(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallIntMethod(rreCaptureGetPreviewVolume, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureSetPreviewVolume(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethodWithInt(rreCaptureSetPreviewVolume, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureGetPreviewImage(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallObjCStringMethod(rreCaptureGetPreviewImage, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureSetPreviewImage(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethodWithObjCString(rreCaptureSetPreviewImage, p_argc, p_argn, r_result, r_pass, r_error);
}
////////////////////
void revCaptureStartPreviewing(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethod(rreCaptureStartPreviewing, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureStopPreviewing(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethod(rreCaptureStopPreviewing, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCapturePausePreviewing(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethod(rreCapturePausePreviewing, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureResumePreviewing(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethod(rreCaptureResumePreviewing, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCapturePreviewState(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallObjCStringMethod(rreCapturePreviewState, p_argc, p_argn, r_result, r_pass, r_error);
}
////////////////////////////////////////////////////////////////////////
void revCaptureListAudioCodecs(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallObjCStringMethod(rreCaptureListAudioCodecs, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureListVideoCodecs(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallObjCStringMethod(rreCaptureListVideoCodecs, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureGetAudioCodec(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallObjCStringMethod(rreCaptureGetAudioCodec, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureSetAudioCodec(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethodWithObjCString(rreCaptureSetAudioCodec, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureGetVideoCodec(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallObjCStringMethod(rreCaptureGetVideoCodec, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureSetVideoCodec(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethodWithObjCString(rreCaptureSetVideoCodec, p_argc, p_argn, r_result, r_pass, r_error);
}
////////////////////
void revCaptureGetRecordOutput(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallObjCStringMethod(rreCaptureGetRecordOutput, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureSetRecordOutput(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethodWithObjCString(rreCaptureSetRecordOutput, p_argc, p_argn, r_result, r_pass, r_error);
}
////////////////////
void revCaptureStartRecording(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallObjCStringMethod(rreCaptureStartRecording, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureStopRecording(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallObjCStringMethod(rreCaptureStopRecording, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureCancelRecording(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethod(rreCaptureCancelRecording, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCapturePauseRecording(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethod(rreCapturePauseRecording, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureResumeRecording(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethod(rreCaptureResumeRecording, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureGetRecordFrameRate(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallIntMethod(rreCaptureGetRecordFrameRate, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureSetRecordFrameRate(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethodWithInt(rreCaptureSetRecordFrameRate, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureGetRecordFrameSize(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallObjCStringMethod(rreCaptureGetRecordFrameSize, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureSetRecordFrameSize(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallVoidMethodWithIntInt(rreCaptureSetRecordFrameSize, p_argc, p_argn, r_result, r_pass, r_error);
}
void revCaptureRecordState(char *p_argc[], int p_argn, char **r_result, Bool *r_pass, Bool *r_error)
{
CallObjCStringMethod(rreCaptureRecordState, p_argc, p_argn, r_result, r_pass, r_error);
}
////////////////////////////////////////////////////////////////////////