MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / pulse_write_frame

Function pulse_write_frame

libavdevice/pulse_audio_enc.c:678–693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676}
677
678static int pulse_write_frame(AVFormatContext *h, int stream_index,
679 AVFrame **frame, unsigned flags)
680{
681 AVPacket pkt;
682
683 /* Planar formats are not supported yet. */
684 if (flags & AV_WRITE_UNCODED_FRAME_QUERY)
685 return av_sample_fmt_is_planar(h->streams[stream_index]->codecpar->format) ?
686 AVERROR(EINVAL) : 0;
687
688 pkt.data = (*frame)->data[0];
689 pkt.size = (*frame)->nb_samples * av_get_bytes_per_sample((*frame)->format) * (*frame)->ch_layout.nb_channels;
690 pkt.dts = (*frame)->pkt_dts;
691 pkt.duration = (*frame)->duration;
692 return pulse_write_packet(h, &pkt);
693}
694
695
696static void pulse_get_output_timestamp(AVFormatContext *h, int stream, int64_t *dts, int64_t *wall)

Callers

nothing calls this directly

Calls 3

av_sample_fmt_is_planarFunction · 0.85
av_get_bytes_per_sampleFunction · 0.85
pulse_write_packetFunction · 0.85

Tested by

no test coverage detected