On Mon, Jul 14, 2014 at 01:17:57PM +0530, Nidhi Makhijani wrote:
> --- a/libavdevice/oss_audio.c
> +++ b/libavdevice/oss_audio.c
> @@ -20,43 +20,28 @@
>  
>  #include "config.h"
> -#include <stdlib.h>
> -#include <stdio.h>
> -#include <stdint.h>
> +
>  #include <string.h>
> -#include <errno.h>
> +
>  #if HAVE_SOUNDCARD_H
>  #include <soundcard.h>
>  #else
>  #include <sys/soundcard.h>
>  #endif
> +
>  #include <unistd.h>
>  #include <fcntl.h>
>  #include <sys/ioctl.h>
>  
> -#include "libavutil/internal.h"
>  #include "libavutil/log.h"
> -#include "libavutil/opt.h"
> -#include "libavutil/time.h"
>  #include "libavcodec/avcodec.h"
>  #include "libavformat/avformat.h"
> -#include "libavformat/internal.h"
>  
> +#include "oss_audio.h"

If you add all those empty lines, add them between the headers from
different libs as well.

> --- /dev/null
> +++ b/libavdevice/oss_audio.h
> @@ -0,0 +1,53 @@
> +/*
> + * Linux audio play and grab common header
> + * Copyright (c) 2000, 2001 Fabrice Bellard

Drop this.

> +#ifndef AVDEVICE_OSS_AUDIO_H
> +#define AVDEVICE_OSS_AUDIO_H
> +
> +#include "config.h"
> +
> +#if HAVE_SOUNDCARD_H
> +#include <soundcard.h>
> +#else
> +#include <sys/soundcard.h>
> +#endif

This is not needed in the header.

> +typedef struct AudioData {
> +} AudioData;
> +
> +int ff_audio_open(AVFormatContext *s1, int is_output, const char 
> *audio_device);
> +int ff_audio_close(AudioData *s);

These names are too generic now that they are globally visible.  Add an
oss prefix please.  Also break the long line.

> --- /dev/null
> +++ b/libavdevice/oss_audio_dec.c
> @@ -0,0 +1,146 @@
> +
> +/* grab support */

This comment is now redundant.

> --- /dev/null
> +++ b/libavdevice/oss_audio_enc.c
> @@ -0,0 +1,109 @@
> +
> +#include "oss_audio.h"
> +
> +#define AUDIO_BLOCK_SIZE 4096

I've seen this multiple times already, aren't you generating warnings?

> +/* sound output support */

another redundant comment

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to