[FFmpeg-devel] [PATCH 4/4] lavd/pulse_audio_enc: implement get_device_list callback

Lukasz Marek lukasz.m.luki at gmail.com
Tue Feb 25 01:06:09 CET 2014


TODO: micro bump

Signed-off-by: Lukasz Marek <lukasz.m.luki at gmail.com>
---
 libavdevice/pulse_audio_enc.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavdevice/pulse_audio_enc.c b/libavdevice/pulse_audio_enc.c
index e047299..9d78114 100644
--- a/libavdevice/pulse_audio_enc.c
+++ b/libavdevice/pulse_audio_enc.c
@@ -149,6 +149,12 @@ static void pulse_get_output_timestamp(AVFormatContext *h, int stream, int64_t *
     *dts = s->timestamp - latency;
 }
 
+static int pulse_get_device_list(AVFormatContext *h, AVDeviceInfoList *device_list)
+{
+    PulseData *s = h->priv_data;
+    return ff_pulse_audio_get_devices(device_list, s->server, 1);
+}
+
 #define OFFSET(a) offsetof(PulseData, a)
 #define E AV_OPT_FLAG_ENCODING_PARAM
 
@@ -179,6 +185,7 @@ AVOutputFormat ff_pulse_muxer = {
     .write_packet   = pulse_write_packet,
     .write_trailer  = pulse_write_trailer,
     .get_output_timestamp = pulse_get_output_timestamp,
+    .get_device_list = pulse_get_device_list,
     .flags          = AVFMT_NOFILE | AVFMT_ALLOW_FLUSH,
     .priv_class     = &pulse_muxer_class,
 };
-- 
1.8.3.2



More information about the ffmpeg-devel mailing list