84 operator std::string()
const;
117#define AUDIO_FRAME_DISPOSE(frame) if ((frame) && (frame)->dispose) \
118 (frame)->dispose(frame)
154 explicit operator bool()
const;
163 [[nodiscard]]
int get_bps()
const;
struct video_frame * frame
struct audio_frame audio_frame
struct used to comunicate with audio capture/playback device
std::ostream & operator<<(std::ostream &os, const audio_desc &desc)
void change_bps(int new_bps)
void resize(int channel, size_t len)
audio_frame2 & operator=(audio_frame2 &&)=default
char * get_data(int channel)
struct audio_desc get_desc() const
bool has_same_prop_as(audio_frame2 const &frame) const
void set_fec_params(int channel, fec_desc const &)
audio_frame2(audio_frame2 const &)=delete
std::vector< channel > channels
void init(int nr_channels, audio_codec_t codec, int bps, int sample_rate)
Initializes audio_frame2 for use. If already initialized, data are dropped.
void set_duration(double duration)
audio_frame2(audio_frame2 &&)=default
friend class soxr_resampler
audio_codec_t get_codec() const
friend class speex_resampler
int get_channel_count() const
bool resample(audio_frame2_resampler &resampler_state, int new_sample_rate)
audio_frame2 & operator=(audio_frame2 const &)=delete
int64_t get_timestamp() const
void replace(int channel, size_t offset, const char *data, size_t length)
replaces portion of data of specified channel. If the size of the channel is not sufficient,...
fec_desc const & get_fec_params(int channel) const
struct audio_desc desc
desc.ch_count not set, use channels.size() instead
std::tuple< bool, audio_frame2 > resample_fake(audio_frame2_resampler &resampler_state, int new_sample_rate_num, int new_sample_rate_den)
@ resamples to new sample rate while keeping nominal sample rate intact
void set_timestamp(int64_t ts)
double get_duration() const
int get_sample_rate() const
static audio_frame2 copy_with_bps_change(audio_frame2 const &frame, int new_bps)
size_t get_data_len() const
void append(audio_frame2 const &frame)
int get_sample_count() const
static __device__ const float offset
steady_clock::duration duration
Audio channel is a non-owning view on audio_frame2 isolating one channel.
bool operator==(audio_desc const &) const
std::unique_ptr< char[]> data
struct fec_desc fec_params
struct used to comunicate with audio capture/playback device
void(* dispose)(struct audio_frame *)
called by sender when frame was processed
void * dispose_udata
additional data that may the caller use in dispose
This file contains some common data types.