50 const uint8_t *buf =
pkt->data;
56 memcpy(
s->buffer +
s->buffer_offset, buf,
len);
59 s->buffer_offset +=
len;
60 if (
s->buffer_offset >=
s->buffer_size) {
61 ret = sio_write(
s->hdl,
s->buffer,
s->buffer_size);
62 if (ret == 0 || sio_eof(
s->hdl))
76 sio_write(
s->hdl,
s->buffer,
s->buffer_offset);
84 .class_name =
"sndio outdev",
const FFOutputFormat ff_sndio_muxer
static av_cold int audio_write_header(AVFormatContext *s1)
static int audio_write_packet(AVFormatContext *s1, AVPacket *pkt)
Main libavdevice API header.
const char * av_default_item_name(void *ptr)
Return the context name.
#define LIBAVUTIL_VERSION_INT
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
@ AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT
static int audio_write_trailer(AVFormatContext *s1)
av_cold int ff_sndio_open(AVFormatContext *s1, int is_output, const char *audio_device)
int ff_sndio_close(SndioData *s)
static av_cold int audio_write_header(AVFormatContext *s1)
static int audio_write_trailer(AVFormatContext *s1)
static const AVClass sndio_muxer_class
static int audio_write_packet(AVFormatContext *s1, AVPacket *pkt)
int nb_channels
Number of channels in this layout.
Describe the class of an AVClass context structure.
AVChannelLayout ch_layout
The channel layout and number of channels.
int sample_rate
The number of audio samples per second.
char * url
input or output URL.
void * priv_data
Format private data.
AVStream ** streams
A list of all streams in the file.
This structure stores compressed data.
AVCodecParameters * codecpar
Codec parameters associated with this stream.