[FFmpeg-devel] [PATCH 3/4] lavd/pulse_audio_dec: cosmetic changes
Lukasz M
lukasz.m.luki at gmail.com
Fri Oct 18 22:22:40 CEST 2013
On 11 October 2013 13:39, Stefano Sabatini <stefasab at gmail.com> wrote:
> On date Friday 2013-10-11 00:39:38 +0200, Lukasz Marek encoded:
> > Signed-off-by: Lukasz Marek <lukasz.m.luki at gmail.com>
> > ---
> > libavdevice/pulse_audio_dec.c | 22 +++++++++++-----------
> > 1 file changed, 11 insertions(+), 11 deletions(-)
> >
> > diff --git a/libavdevice/pulse_audio_dec.c
> b/libavdevice/pulse_audio_dec.c
> > index aa0c995..8a47bc1 100644
> > --- a/libavdevice/pulse_audio_dec.c
> > +++ b/libavdevice/pulse_audio_dec.c
> > @@ -37,9 +37,9 @@
> >
> > typedef struct PulseData {
> > AVClass *class;
> > - char *server;
> > - char *name;
> > - char *stream_name;
> > + const char *server;
> > + const char *name;
> > + const char *stream_name;
> > const char *device;
>
> Not sure this is correct (indeed the values are allocated and freed).
>
Removed.
> > static const AVOption options[] = {
> > - { "server", "pulse server name",
> OFFSET(server), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, D },
> > - { "name", "application name",
> OFFSET(name), AV_OPT_TYPE_STRING, {.str = LIBAVFORMAT_IDENT},
> 0, 0, D },
> > - { "stream_name", "stream description",
> OFFSET(stream_name), AV_OPT_TYPE_STRING, {.str = "record"}, 0, 0, D },
> > - { "audio_device", "set device name",
> OFFSET(device), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, D },
> > - { "sample_rate", "sample rate in Hz",
> OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = 48000}, 1, INT_MAX,
> D },
> > - { "channels", "number of audio channels",
> OFFSET(channels), AV_OPT_TYPE_INT, {.i64 = 2}, 1, INT_MAX,
> D },
> > - { "frame_size", "number of bytes per frame",
> OFFSET(frame_size), AV_OPT_TYPE_INT, {.i64 = 1024}, 1, INT_MAX,
> D },
> > - { "fragment_size", "buffering size, affects latency and cpu usage",
> OFFSET(fragment_size), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
> D },
> > + { "server", "set PulseAudio server",
> OFFSET(server), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, D },
> > + { "name", "set application name",
> OFFSET(name), AV_OPT_TYPE_STRING, {.str = LIBAVFORMAT_IDENT},
> 0, 0, D },
> > + { "stream_name", "set stream description",
> OFFSET(stream_name), AV_OPT_TYPE_STRING, {.str = "record"}, 0, 0, D
> },
> > + { "audio_device", "set device name",
> OFFSET(device), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, D },
> > + { "sample_rate", "set sample rate in Hz",
> OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = 48000}, 1,
> INT_MAX, D },
> > + { "channels", "set number of audio channels",
> OFFSET(channels), AV_OPT_TYPE_INT, {.i64 = 2}, 1,
> INT_MAX, D },
> > + { "frame_size", "set number of bytes per frame",
> OFFSET(frame_size), AV_OPT_TYPE_INT, {.i64 = 1024}, 1,
> INT_MAX, D },
> > + { "fragment_size", "set buffering size, affects latency and cpu
> usage", OFFSET(fragment_size), AV_OPT_TYPE_INT, {.i64 = -1}, -1,
> INT_MAX, D },
> > { NULL },
>
> This hunk looks good.
>
I attached updated patch. squash with other patch that updates doc for this
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-avdevice-pulse_audio_dec-cosmetic-changes.patch
Type: application/octet-stream
Size: 3626 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131018/d02d6249/attachment.obj>
More information about the ffmpeg-devel
mailing list