Debian Codegraph @

components/encoder/coreaudioconnect/coreaudioconnect.h

raw symbols SCIP
1 /* BoCA - BonkEnc Component Architecture
2 * Copyright (C) 2007-2022 Robert Kausch <[email protected]>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation, either version 2 of
7 * the License, or (at your option) any later version.
8 *
9 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
10 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
11 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */
12
13 #include <boca.h>
14
15 #include "connector/communication.h"
16
17 namespace CA
18 {
19 # include <AudioToolbox/AudioFile.h>
20 # include <AudioToolbox/AudioFormat.h>
21 };
22
23 BoCA_BEGIN_COMPONENT(EncoderCoreAudioConnect)
24
25 namespace BoCA
26 {
27 class EncoderCoreAudioConnect : public CS::EncoderComponent
28 {
29 private:
30 ConfigLayer *configLayer;
31 Config *config;
32
33 String mappingName;
34
35 #ifdef __WIN32__
36 HANDLE connector;
37 HANDLE semaphore;
38 HANDLE mapping;
39 #else
40 pid_t connector;
41 int semaphore;
42 int mapping;
43 #endif
44
45 CoreAudioCommBuffer *comm;
46 Bool connected;
47 Bool ready;
48
49 CA::UInt32 fileType;
50
51 Bool Connect();
52 Bool Disconnect();
53
54 Bool ProcessConnectorCommand();
55
56 Bool FixupDurationAtoms(Int64, IO::InStream &, IO::OutStream &, Int64, Bool = False);
57
58 static Bool ConvertArguments(Config *);
59 public:
60 static const String &GetComponentSpecs();
61
62 EncoderCoreAudioConnect();
63 ~EncoderCoreAudioConnect();
64
65 Bool IsReady() const;
66 Bool IsLossless() const;
67
68 Bool Activate();
69 Bool Deactivate();
70
71 Int WriteData(Buffer<UnsignedByte> &);
72
73 Bool SetOutputFormat(Int);
74 String GetOutputFileExtension() const;
75
76 ConfigLayer *GetConfigurationLayer();
77 };
78
79 /* This is declared in BoCA's core.h which is not included for component builds.
80 */
81 BOCA_DLL_EXPORT const String &GetApplicationPrefix();
82 };
83
84 BoCA_DEFINE_ENCODER_COMPONENT(EncoderCoreAudioConnect)
85
86 BoCA_END_COMPONENT(EncoderCoreAudioConnect)