28 #include <pulse/simple.h> 29 #include <pulse/rtclock.h> 30 #include <pulse/error.h> 39 #define DEFAULT_CODEC_ID AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE) 69 default:
return PA_SAMPLE_INVALID;
85 pa_buffer_attr attr = { -1 };
133 if ((pa_simple_read(pd->
s, pkt->
data, pkt->
size, &res)) < 0) {
140 if ((latency = pa_simple_get_latency(pd->
s, &res)) == (pa_usec_t) -1) {
162 pa_simple_free(pd->
s);
166 #define OFFSET(a) offsetof(PulseData, a) 167 #define D AV_OPT_FLAG_DECODING_PARAM 196 .priv_class = &pulse_demuxer_class,
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (%s)\, len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic ? ac->func_descr_generic :ac->func_descr)
static av_cold int pulse_close(AVFormatContext *s)
static pa_sample_format_t codec_id_to_pulse_format(int codec_id)
static const AVOption options[]
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
static av_cold int read_close(AVFormatContext *ctx)
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_get_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
enum AVMediaType codec_type
General type of the encoded data.
common internal API header
char filename[1024]
input or output filename
enum AVCodecID audio_codec_id
Forced audio codec_id.
static int pulse_read_packet(AVFormatContext *s, AVPacket *pkt)
static int read_header(FFV1Context *f)
int64_t av_gettime(void)
Get the current time in microseconds.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
AVInputFormat ff_pulse_demuxer
Describe the class of an AVClass context structure.
static const AVClass pulse_demuxer_class
static av_cold int pulse_read_header(AVFormatContext *s)
int sample_rate
Audio only.
void * priv_data
Format private data.
AVCodecParameters * codecpar
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
#define AV_NOPTS_VALUE
Undefined timestamp value.