UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
audio_decoders.h
Go to the documentation of this file.
1
5/*
6 * Copyright (c) 2012-2024 CESNET
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, is permitted provided that the following conditions
11 * are met:
12 *
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 *
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 *
20 * 3. Neither the name of CESNET nor the names of its contributors may be
21 * used to endorse or promote products derived from this software without
22 * specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
26 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
27 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
28 * EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
29 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
35 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#ifndef RTP_AUDIO_DECODERS_H_54DFB935_A1FC_48EF_A375_A044581B869F
39#define RTP_AUDIO_DECODERS_H_54DFB935_A1FC_48EF_A375_A044581B869F
40
41#ifdef __cplusplus
42#include <cstddef> // for size_t
43#include <cstdint> // for uint32_t
44extern "C" {
45#else
46#include <stdbool.h> // for bool
47#include <stddef.h> // for size_t
48#include <stdint.h> // for uint32_t
49#endif
50
51struct audio_desc;
52struct coded_data;
53struct module;
54struct pbuf_stats;
55
56typedef bool (*audio_playback_ctl_t)(void *state, int request, void *data, size_t *len);
57
58int decode_audio_frame(struct coded_data *cdata, void *data, struct pbuf_stats *stats);
59int decode_audio_frame_mulaw(struct coded_data *cdata, void *data, struct pbuf_stats *stats);
60void *audio_decoder_init(char *audio_channel_map, const char *audio_scale,
61 const char *encryption, audio_playback_ctl_t c, void *ap_state,
62 struct module *parent);
64void audio_decoder_set_volume(void *state, double val);
65
66bool parse_audio_hdr(uint32_t *hdr, struct audio_desc *desc);
67
68#define MSG_UNIVERSAL_TAG_AUDIO_DECODER "ADEC "
69#define ADEC_CH_RATE_SHIFT (32LLU)
70
71#ifdef __cplusplus
72}
73#endif
74
75#endif // defined RTP_AUDIO_DECODERS_H_54DFB935_A1FC_48EF_A375_A044581B869F
void ** state
int void * val
struct video_desc desc
int void size_t * len
void audio_decoder_destroy(void *state)
bool parse_audio_hdr(uint32_t *hdr, struct audio_desc *desc)
void * audio_decoder_init(char *audio_channel_map, const char *audio_scale, const char *encryption, audio_playback_ctl_t c, void *ap_state, struct module *parent)
int decode_audio_frame_mulaw(struct coded_data *cdata, void *data, struct pbuf_stats *stats)
int decode_audio_frame(struct coded_data *cdata, void *data, struct pbuf_stats *stats)
bool(* audio_playback_ctl_t)(void *state, int request, void *data, size_t *len)
void audio_decoder_set_volume(void *state, double val)
const char * parent
Definition settings.cpp:198