26 #include "sndio_common.h" 38 ret = ff_sndio_open(s1, 1, s1->
filename);
46 uint8_t *buf= pkt->data;
51 len = FFMIN(s->buffer_size - s->buffer_offset, size);
52 memcpy(s->buffer + s->buffer_offset, buf, len);
55 s->buffer_offset += len;
56 if (s->buffer_offset >= s->buffer_size) {
57 ret = sio_write(s->hdl, s->buffer, s->buffer_size);
58 if (ret == 0 || sio_eof(s->hdl))
72 sio_write(s->hdl, s->buffer, s->buffer_offset);
86 .audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
87 .video_codec = AV_CODEC_ID_NONE,
88 .write_header = audio_write_header,
89 .write_packet = audio_write_packet,
90 .write_trailer = audio_write_trailer,
Main libavdevice API header.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
AVCodecContext * codec
Codec context associated with this stream.
char filename[1024]
input or output filename
int sample_rate
samples per second
int channels
number of audio channels
void * priv_data
Format private data.
This structure stores compressed data.