yolobs-studio/plugins/decklink/audio-repack.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
897 B
C
Raw Permalink Normal View History

2017-06-29 19:01:10 +00:00
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <string.h>
#include <obs.h>
struct audio_repack;
2019-09-22 21:19:10 +00:00
typedef int (*audio_repack_func_t)(struct audio_repack *, const uint8_t *,
uint32_t);
2017-06-29 19:01:10 +00:00
struct audio_repack {
2019-09-22 21:19:10 +00:00
uint8_t *packet_buffer;
uint32_t packet_size;
2017-06-29 19:01:10 +00:00
2019-09-22 21:19:10 +00:00
uint32_t base_src_size;
uint32_t base_dst_size;
uint32_t extra_dst_size;
2017-06-29 19:01:10 +00:00
audio_repack_func_t repack_func;
};
enum _audio_repack_mode {
2019-09-22 21:19:10 +00:00
repack_mode_8to3ch = 0,
2019-07-27 12:47:10 +00:00
repack_mode_8to4ch,
repack_mode_8to5ch,
repack_mode_8to6ch,
repack_mode_8to5ch_swap,
repack_mode_8to6ch_swap,
repack_mode_8ch_swap,
repack_mode_8ch,
2017-06-29 19:01:10 +00:00
};
typedef enum _audio_repack_mode audio_repack_mode_t;
extern int audio_repack_init(struct audio_repack *repack,
2019-09-22 21:19:10 +00:00
audio_repack_mode_t repack_mode,
uint8_t sample_bit);
2017-06-29 19:01:10 +00:00
extern void audio_repack_free(struct audio_repack *repack);
#ifdef __cplusplus
}
#endif