Move all example programs to doc/examples

Also drop support for building examples in library directories.
pull/58/head
Diego Biurrun 11 years ago
parent 77fbc03265
commit b339182eba
  1. 1
      common.mak
  2. 4
      configure
  3. 4
      doc/Makefile
  4. 2
      doc/doxy-wrapper.sh
  5. 2
      doc/examples/avcodec.c
  6. 2
      doc/examples/metadata.c
  7. 2
      doc/examples/output.c
  8. 2
      doc/examples/transcode_aac.c
  9. 2
      libavcodec/Makefile
  10. 2
      libavformat/Makefile
  11. 14
      library.mak

@ -14,7 +14,6 @@ TESTPROGS += $(TESTPROGS-yes)
LDLIBS = $(FFLIBS:%=%$(BUILDSUF)) LDLIBS = $(FFLIBS:%=%$(BUILDSUF))
FFEXTRALIBS := $(LDLIBS:%=$(LD_LIB)) $(EXTRALIBS) FFEXTRALIBS := $(LDLIBS:%=$(LD_LIB)) $(EXTRALIBS)
EXAMPLES := $(EXAMPLES:%=$(SUBDIR)%-example$(EXESUF))
OBJS := $(sort $(OBJS:%=$(SUBDIR)%)) OBJS := $(sort $(OBJS:%=$(SUBDIR)%))
TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o) TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o)
TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF)) TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF))

4
configure vendored

@ -1095,6 +1095,8 @@ COMPONENT_LIST="
" "
EXAMPLE_LIST=" EXAMPLE_LIST="
avcodec_example
metadata_example
output_example output_example
transcode_aac_example transcode_aac_example
" "
@ -2020,6 +2022,8 @@ ocv_filter_deps="libopencv"
scale_filter_deps="swscale" scale_filter_deps="swscale"
# examples # examples
avcodec_example_deps="avcodec avutil"
metadata_example_deps="avformat avutil"
output_example_deps="avcodec avformat avutil swscale" output_example_deps="avcodec avformat avutil swscale"
transcode_aac_example_deps="avcodec avformat avresample" transcode_aac_example_deps="avcodec avformat avresample"

@ -15,9 +15,11 @@ DOCS-$(CONFIG_POD2MAN) += $(MANPAGES) $(PODPAGES)
DOCS-$(CONFIG_TEXI2HTML) += $(HTMLPAGES) DOCS-$(CONFIG_TEXI2HTML) += $(HTMLPAGES)
DOCS = $(DOCS-yes) DOCS = $(DOCS-yes)
DOC_EXAMPLES-$(CONFIG_AVCODEC_EXAMPLE) += avcodec
DOC_EXAMPLES-$(CONFIG_METADATA_EXAMPLE) += metadata
DOC_EXAMPLES-$(CONFIG_OUTPUT_EXAMPLE) += output DOC_EXAMPLES-$(CONFIG_OUTPUT_EXAMPLE) += output
DOC_EXAMPLES-$(CONFIG_TRANSCODE_AAC_EXAMPLE) += transcode_aac DOC_EXAMPLES-$(CONFIG_TRANSCODE_AAC_EXAMPLE) += transcode_aac
ALL_DOC_EXAMPLES = output transcode_aac ALL_DOC_EXAMPLES = avcodec metadata output transcode_aac
DOC_EXAMPLES := $(DOC_EXAMPLES-yes:%=doc/examples/%$(EXESUF)) DOC_EXAMPLES := $(DOC_EXAMPLES-yes:%=doc/examples/%$(EXESUF))
ALL_DOC_EXAMPLES := $(ALL_DOC_EXAMPLES:%=doc/examples/%$(EXESUF)) ALL_DOC_EXAMPLES := $(ALL_DOC_EXAMPLES:%=doc/examples/%$(EXESUF))

@ -8,7 +8,7 @@ shift 2
doxygen - <<EOF doxygen - <<EOF
@INCLUDE = ${DOXYFILE} @INCLUDE = ${DOXYFILE}
INPUT = $@ INPUT = $@
EXAMPLE_PATH = ${SRC_PATH}/ EXAMPLE_PATH = ${SRC_PATH}/doc/examples
HTML_HEADER = ${SRC_PATH}/doc/doxy/header.html HTML_HEADER = ${SRC_PATH}/doc/doxy/header.html
HTML_FOOTER = ${SRC_PATH}/doc/doxy/footer.html HTML_FOOTER = ${SRC_PATH}/doc/doxy/footer.html
HTML_STYLESHEET = ${SRC_PATH}/doc/doxy/doxy_stylesheet.css HTML_STYLESHEET = ${SRC_PATH}/doc/doxy/doxy_stylesheet.css

@ -22,7 +22,7 @@
* @file * @file
* libavcodec API use example. * libavcodec API use example.
* *
* @example libavcodec/api-example.c * @example avcodec.c
* Note that this library only handles codecs (mpeg, mpeg4, etc...), * Note that this library only handles codecs (mpeg, mpeg4, etc...),
* not file formats (avi, vob, etc...). See library 'libavformat' for the * not file formats (avi, vob, etc...). See library 'libavformat' for the
* format handling * format handling

@ -22,7 +22,7 @@
/** /**
* @file * @file
* @example libavformat/metadata-example.c * @example metadata.c
* Shows how the metadata API can be used in application programs. * Shows how the metadata API can be used in application programs.
*/ */

@ -24,7 +24,7 @@
* @file * @file
* libavformat API example. * libavformat API example.
* *
* @example doc/examples/output.c * @example output.c
* Output a media file in any supported libavformat format. The default * Output a media file in any supported libavformat format. The default
* codecs are used. * codecs are used.
*/ */

@ -20,7 +20,7 @@
* @file * @file
* simple audio converter * simple audio converter
* *
* @example doc/examples/transcode_aac.c * @example transcode_aac.c
* Convert an input audio file to AAC in an MP4 container using Libav. * Convert an input audio file to AAC in an MP4 container using Libav.
* @author Andreas Unterweger (dustsigns@gmail.com) * @author Andreas Unterweger (dustsigns@gmail.com)
*/ */

@ -697,8 +697,6 @@ SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_internal.h
SKIPHEADERS-$(CONFIG_VDA) += vda.h SKIPHEADERS-$(CONFIG_VDA) += vda.h
SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h
EXAMPLES = api
TESTPROGS = dct \ TESTPROGS = dct \
fft \ fft \
fft-fixed \ fft-fixed \

@ -392,8 +392,6 @@ OBJS-$(HAVE_LIBC_MSVCRT) += file_open.o
SKIPHEADERS-$(CONFIG_FFRTMPCRYPT_PROTOCOL) += rtmpdh.h SKIPHEADERS-$(CONFIG_FFRTMPCRYPT_PROTOCOL) += rtmpdh.h
SKIPHEADERS-$(CONFIG_NETWORK) += network.h rtsp.h SKIPHEADERS-$(CONFIG_NETWORK) += network.h rtsp.h
EXAMPLES = metadata \
TESTPROGS = seek \ TESTPROGS = seek \
srtp \ srtp \
url \ url \

@ -5,7 +5,6 @@ LIBMAJOR := $(lib$(NAME)_VERSION_MAJOR)
LIBMINOR := $(lib$(NAME)_VERSION_MINOR) LIBMINOR := $(lib$(NAME)_VERSION_MINOR)
INCINSTDIR := $(INCDIR)/lib$(NAME) INCINSTDIR := $(INCDIR)/lib$(NAME)
LIB_EXAMPLES := $(LIB_EXAMPLES) $(EXAMPLES)
INSTHEADERS := $(INSTHEADERS) $(HEADERS:%=$(SUBDIR)%) INSTHEADERS := $(INSTHEADERS) $(HEADERS:%=$(SUBDIR)%)
all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME) all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME)
@ -43,10 +42,10 @@ install-libs-$(CONFIG_STATIC): install-lib$(NAME)-static
install-libs-$(CONFIG_SHARED): install-lib$(NAME)-shared install-libs-$(CONFIG_SHARED): install-lib$(NAME)-shared
define RULES define RULES
$(EXAMPLES) $(TOOLS): THISLIB = $(FULLNAME:%=$(LD_LIB)) $(TOOLS): THISLIB = $(FULLNAME:%=$(LD_LIB))
$(TESTPROGS): THISLIB = $(SUBDIR)$(LIBNAME) $(TESTPROGS): THISLIB = $(SUBDIR)$(LIBNAME)
$(EXAMPLES) $(TESTPROGS) $(TOOLS): %$(EXESUF): %.o $(EXEOBJS) $(TESTPROGS) $(TOOLS): %$(EXESUF): %.o $(EXEOBJS)
$$(LD) $(LDFLAGS) $$(LD_O) $$(filter %.o,$$^) $$(THISLIB) $(FFEXTRALIBS) $$(ELIBS) $$(LD) $(LDFLAGS) $$(LD_O) $$(filter %.o,$$^) $$(THISLIB) $(FFEXTRALIBS) $$(ELIBS)
$(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR) $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
@ -58,7 +57,7 @@ $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver $(DEP_LIBS)
$(SLIB_EXTRA_CMD) $(SLIB_EXTRA_CMD)
clean:: clean::
$(RM) $(addprefix $(SUBDIR),*-example$(EXESUF) *-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \ $(RM) $(addprefix $(SUBDIR),*-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
$(CLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%) $(CLEANSUFFIXES:%=$(SUBDIR)$(ARCH)/%)
distclean:: clean distclean:: clean
@ -101,8 +100,7 @@ endef
$(eval $(RULES)) $(eval $(RULES))
$(EXAMPLES) $(TOOLS): $(DEP_LIBS) $(SUBDIR)$($(CONFIG_SHARED:yes=S)LIBNAME) $(TOOLS): $(DEP_LIBS) $(SUBDIR)$($(CONFIG_SHARED:yes=S)LIBNAME)
$(TESTPROGS): $(DEP_LIBS) $(SUBDIR)$(LIBNAME) $(TESTPROGS): $(DEP_LIBS) $(SUBDIR)$(LIBNAME)
examples: $(EXAMPLES)
testprogs: $(TESTPROGS) testprogs: $(TESTPROGS)

Loading…
Cancel
Save