On Wed, Oct 2, 2013 at 6:14 PM, Andreas Unterweger <[email protected]> wrote: > From 8d090d20f9a9bf0286d55864f5b7c7fd84b337d7 Mon Sep 17 00:00:00 2001 > From: Andreas Unterweger <[email protected]> > Date: Wed, 2 Oct 2013 18:08:51 +0200 > Subject: [PATCH] Added an Libav API usage example > > --- > doc/example/Makefile | 15 ++ > doc/example/mp3_aac.c | 692
nit: doc/examples as hopefully there will be more than one example :) > +++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 707 insertions(+) > create mode 100644 doc/example/Makefile > create mode 100644 doc/example/mp3_aac.c > > diff --git a/doc/example/Makefile b/doc/example/Makefile > new file mode 100644 > index 0000000..ddc53bb > --- /dev/null > +++ b/doc/example/Makefile > @@ -0,0 +1,15 @@ > +CC=gcc > + > +CFLAGS=-c -Wall > +LDFLAGS=-lavformat -lavcodec -lavresample -lavutil -lvo-aacenc -lpthread > -lm > + > +all: mp3_to_aac > + > +mp3_to_aac: mp3_aac > + $(CC) mp3_aac.o -o mp3_to_aac.exe $(LDFLAGS) > + > +mp3_aac: mp3_aac.c > + $(CC) $(CFLAGS) mp3_aac.c > + > +clean: > + rm -rf *.o *.exe > diff --git a/doc/example/mp3_aac.c b/doc/example/mp3_aac.c > new file mode 100644 > index 0000000..242b95f > --- /dev/null > +++ b/doc/example/mp3_aac.c > @@ -0,0 +1,692 @@ > + > +/** > + * @file MP3 to AAC converter > + * Convert an MP3 file to an AAC in an MP4 container using Libav. > + * Requires libvo_aacenc to compile. It'd be nice that you motivate this requirement, such as "Requires libvo_aacenc to show how to use an external library ..." > + * Use -lavformat -lavcodec -lavresample -lavutil -lvo-aacenc -lpthread -lm > + * @author Andreas Unterweger > + */ It's a nice example, thank you for sharing it. Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
