summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/HandBrakeInterop/HbLib/hb_audio.cs
blob: a598ccb801e4bc4e8baa5f3e829a461b1eba0e23 (plain)
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
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="hb_audio.cs" company="HandBrake Project (http://handbrake.fr)">
//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
// </copyright>
// <summary>
//   Defines the hb_audio_s type.
// </summary>
// <auto-generated> Disable Stylecop Warnings for this file  </auto-generated>
// --------------------------------------------------------------------------------------------------------------------

namespace HandBrake.Interop.HbLib
{
	using System;
	using System.Runtime.InteropServices;

	[StructLayout(LayoutKind.Sequential)]
	public struct hb_audio_s
	{
		/// int
		public int id;

		/// hb_audio_config_t->hb_audio_config_s
		public hb_audio_config_s config;

		// Padding for the part of the struct we don't care about marshaling.
		[MarshalAs(UnmanagedType.ByValArray, SizeConst = MarshalingConstants.AudioPaddingBytes, ArraySubType = UnmanagedType.U1)]
		public byte[] padding;

		/// Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545
		//public Anonymous_e6c7b779_b5a3_4e80_9fa8_13619d14f545 priv;
	}

	[StructLayout(LayoutKind.Sequential)]
	public struct hb_audio_config_s
	{
		public hb_audio_config_output_s output;
		public hb_audio_config_input_s input;

		public hb_audio_config_lang_s lang;
	}

	[StructLayout(LayoutKind.Sequential)]
	public struct hb_audio_config_output_s
	{
		public int mixdown;

		/// int
		public int track;

		/// uint32_t->unsigned int
		public uint codec;

		/// int
		public int samplerate;

		public int samples_per_frame;

		/// int
		public int bitrate;

		public float quality;

		public float compression_level;

		/// double
		public double dynamic_range_compression;

		public double gain;

		public int normalize_mix_level;

		public int dither_method;

		public IntPtr name;

		public int delay;
	}

	public enum hb_mixdown
	{
		HB_INVALID_AMIXDOWN = -1,
		HB_AMIXDOWN_NONE = 0,
		HB_AMIXDOWN_MONO,
		HB_AMIXDOWN_LEFT,
		HB_AMIXDOWN_RIGHT,
		HB_AMIXDOWN_STEREO,
		HB_AMIXDOWN_DOLBY,
		HB_AMIXDOWN_DOLBYPLII,
		HB_AMIXDOWN_5POINT1,
		HB_AMIXDOWN_6POINT1,
		HB_AMIXDOWN_7POINT1,
		HB_AMIXDOWN_5_2_LFE,
	}

	[StructLayout(LayoutKind.Sequential)]
	public struct hb_audio_config_input_s
	{
		/// int
		public int track;

		/* Input audio codec */
		public uint codec;

		/* Per-codec config info */
		public uint codec_param;

		/* Registration descriptor of source */
		public uint reg_desc;

		/* Stream type from source stream */
		public uint stream_type;

		/* Substream type for multiplexed streams */
		public uint substream_type;

		/* Bitsream version */
		public uint version;

		/* Bitstream flags, codec-specific */
		public uint flags;

		/* Bitstream mode, codec-specific */
		public uint mode;

		/* Input sample rate (Hz) */
		public int samplerate;

		/* Number of samples per frame */
		public int samples_per_frame;

		/* Input bitrate (bps) */
		public int bitrate;

		/* Source channel layout, set by the audio decoder */
		public ulong channel_layout;

		/* Source channel map, set by the audio decoder */
		// hb_chan_map_t
		public IntPtr channel_map;
	}

	[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
	public struct hb_audio_config_lang_s
	{
		/// char[1024]
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
		public string description;

		/// char[1024]
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1024)]
		public string simple;

		/// char[4]
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 4)]
		public string iso639_2;

		/// uint8_t->unsigned char
		public byte type;
	}
}