-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* merge rem into re * ci: remove rem * ci: skip building librem * ci: remove rem * ci: test mingw repo patch * ci: fix 2 spaces as YML indentation * bump coverage to 57.0% * link to libm
- Loading branch information
Showing
54 changed files
with
7,508 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* @file rem.h Wrapper for librem headers | ||
* | ||
* Copyright (C) 2010 Creytiv.com | ||
*/ | ||
|
||
#ifndef REM_H__ | ||
#define REM_H__ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
|
||
#include "rem_audio.h" | ||
#include "rem_video.h" | ||
#include "rem_dsp.h" | ||
#include "rem_flv.h" | ||
|
||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* @file rem_aac.h Advanced Audio Coding | ||
* | ||
* Copyright (C) 2010 Creytiv.com | ||
*/ | ||
|
||
|
||
/** Defines the AAC header */ | ||
struct aac_header { | ||
unsigned sample_rate; /**< Audio sample rate in [Hz] */ | ||
unsigned channels; /**< Number of audio channels */ | ||
unsigned frame_size; /**< Frame size, 960 or 1024 bits */ | ||
}; | ||
|
||
int aac_header_decode(struct aac_header *hdr, const uint8_t *p, size_t len); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* @file rem_au.h Basic audio types | ||
* | ||
* Copyright (C) 2010 Creytiv.com | ||
*/ | ||
|
||
|
||
/** Audio formats */ | ||
enum aufmt { | ||
AUFMT_S16LE, /**< Signed 16-bit PCM */ | ||
AUFMT_S32LE, /**< Signed 32-bit PCM */ | ||
AUFMT_PCMA, /**< G.711 A-law */ | ||
AUFMT_PCMU, /**< G.711 U-law */ | ||
AUFMT_FLOAT, /**< Float 32 bit (CPU endian) */ | ||
AUFMT_S24_3LE,/**< Signed 24bit Little Endian in 3bytes format */ | ||
AUFMT_RAW, /**< RAW PCM */ | ||
}; | ||
|
||
size_t aufmt_sample_size(enum aufmt fmt); | ||
const char *aufmt_name(enum aufmt fmt); | ||
|
||
uint32_t calc_nsamp(uint32_t srate, uint8_t channels, uint16_t ptime); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
/** | ||
* @file rem_aubuf.h Audio Buffer | ||
* | ||
* Copyright (C) 2010 Creytiv.com | ||
*/ | ||
struct aubuf; | ||
|
||
enum aubuf_mode { | ||
AUBUF_FIXED, | ||
AUBUF_ADAPTIVE | ||
}; | ||
|
||
int aubuf_alloc(struct aubuf **abp, size_t min_sz, size_t max_sz); | ||
void aubuf_set_live(struct aubuf *ab, bool live); | ||
void aubuf_set_mode(struct aubuf *ab, enum aubuf_mode mode); | ||
void aubuf_set_silence(struct aubuf *ab, double silence); | ||
int aubuf_resize(struct aubuf *ab, size_t min_sz, size_t max_sz); | ||
int aubuf_write_auframe(struct aubuf *ab, const struct auframe *af); | ||
int aubuf_append_auframe(struct aubuf *ab, struct mbuf *mb, | ||
const struct auframe *af); | ||
void aubuf_read_auframe(struct aubuf *ab, struct auframe *af); | ||
void aubuf_sort_auframe(struct aubuf *ab); | ||
int aubuf_get(struct aubuf *ab, uint32_t ptime, uint8_t *p, size_t sz); | ||
void aubuf_flush(struct aubuf *ab); | ||
int aubuf_debug(struct re_printf *pf, const struct aubuf *ab); | ||
size_t aubuf_cur_size(const struct aubuf *ab); | ||
void aubuf_drop_auframe(struct aubuf *ab, const struct auframe *af); | ||
|
||
|
||
static inline int aubuf_append(struct aubuf *ab, struct mbuf *mb) | ||
{ | ||
return aubuf_append_auframe(ab, mb, NULL); | ||
} | ||
|
||
|
||
static inline int aubuf_get_samp(struct aubuf *ab, uint32_t ptime, | ||
int16_t *sampv, size_t sampc) | ||
{ | ||
return aubuf_get(ab, ptime, (uint8_t *)sampv, sampc * 2); | ||
} | ||
|
||
|
||
#ifndef __cplusplus | ||
static inline int aubuf_write(struct aubuf *ab, const uint8_t *p, size_t sz) | ||
{ | ||
struct auframe af = { | ||
.fmt = AUFMT_RAW, | ||
.srate = 0, | ||
.sampv = (uint8_t *)p, | ||
.sampc = sz, | ||
.timestamp = 0, | ||
.level = AULEVEL_UNDEF | ||
}; | ||
|
||
return aubuf_write_auframe(ab, &af); | ||
} | ||
|
||
|
||
static inline int aubuf_write_samp(struct aubuf *ab, const int16_t *sampv, | ||
size_t sampc) | ||
{ | ||
struct auframe af = { | ||
.fmt = AUFMT_S16LE, | ||
.srate = 0, | ||
.sampv = (uint8_t *)sampv, | ||
.sampc = sampc, | ||
.timestamp = 0, | ||
.level = AULEVEL_UNDEF | ||
}; | ||
|
||
return aubuf_write_auframe(ab, &af); | ||
} | ||
|
||
|
||
static inline void aubuf_read(struct aubuf *ab, uint8_t *p, size_t sz) | ||
{ | ||
struct auframe af = { | ||
.fmt = AUFMT_RAW, | ||
.srate = 0, | ||
.sampv = p, | ||
.sampc = sz, | ||
.timestamp = 0, | ||
.level = AULEVEL_UNDEF | ||
}; | ||
|
||
aubuf_read_auframe(ab, &af); | ||
} | ||
|
||
|
||
static inline void aubuf_read_samp(struct aubuf *ab, int16_t *sampv, | ||
size_t sampc) | ||
{ | ||
struct auframe af = { | ||
.fmt = AUFMT_S16LE, | ||
.srate = 0, | ||
.sampv = (uint8_t *)sampv, | ||
.sampc = sampc, | ||
.timestamp = 0, | ||
.level = AULEVEL_UNDEF | ||
}; | ||
|
||
aubuf_read_auframe(ab, &af); | ||
} | ||
#endif |
Oops, something went wrong.