Lines Matching refs:pd
72 PulseData *pd = s->priv_data;
79 pd->sample_rate,
80 pd->channels };
91 attr.fragsize = pd->fragment_size;
96 pd->s = pa_simple_new(pd->server, pd->name,
98 device, pd->stream_name, &ss,
101 if (!pd->s) {
109 st->codec->sample_rate = pd->sample_rate;
110 st->codec->channels = pd->channels;
113 pd->pts = AV_NOPTS_VALUE;
114 pd->frame_duration = (pd->frame_size * 1000000LL * 8) /
115 (pd->sample_rate * pd->channels * av_get_bits_per_sample(codec_id));
122 PulseData *pd = s->priv_data;
126 if (av_new_packet(pkt, pd->frame_size) < 0) {
130 if ((pa_simple_read(pd->s, pkt->data, pkt->size, &res)) < 0) {
137 if ((latency = pa_simple_get_latency(pd->s, &res)) == (pa_usec_t) -1) {
143 if (pd->pts == AV_NOPTS_VALUE) {
144 pd->pts = -latency;
147 pkt->pts = pd->pts;
149 pd->pts += pd->frame_duration;
156 PulseData *pd = s->priv_data;
157 pa_simple_free(pd->s);