[FFmpeg-devel] [PATCH v4 20/22] doc/examples: adding device_get_capabilities example
Michael Niedermayer
michael at niedermayer.cc
Fri Mar 25 19:26:17 EET 2022
On Fri, Mar 25, 2022 at 03:10:39PM +0100, Diederick Niehorster wrote:
> This example also shows use of get_device_list API.
>
> Also improve capability API doc in avdevice.h: now point to this example
> instead of rough example code given in the header.
>
> Signed-off-by: Diederick Niehorster <dcnieho at gmail.com>
> ---
> configure | 2 +
> doc/examples/.gitignore | 1 +
> doc/examples/Makefile | 1 +
> doc/examples/Makefile.example | 1 +
> doc/examples/device_get_capabilities.c | 243 +++++++++++++++++++++++++
> libavdevice/avdevice.h | 33 +---
> 6 files changed, 249 insertions(+), 32 deletions(-)
> create mode 100644 doc/examples/device_get_capabilities.c
maybe i forgot something but this seems not building
make examples -j32
CC doc/examples/device_get_capabilities.o
In file included from ./libavformat/avformat.h:330:0,
from doc/examples/device_get_capabilities.c:33:
./libavformat/version.h:55:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
unsigned avformat_version_same_minor();
^~~~~~~~
In file included from ./libavdevice/avdevice.h:27:0,
from doc/examples/device_get_capabilities.c:34:
./libavdevice/version.h:54:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
unsigned avdevice_version_same_minor();
^~~~~~~~
doc/examples/device_get_capabilities.c:39:5: error: no previous prototype for ‘print_option_ranges’ [-Werror=missing-prototypes]
int print_option_ranges(enum AVOptionType type, AVOptionRanges *ranges)
^~~~~~~~~~~~~~~~~~~
doc/examples/device_get_capabilities.c:73:6: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
void list_queries()
^~~~~~~~~~~~
doc/examples/device_get_capabilities.c:81:6: error: no previous prototype for ‘list_device_sources’ [-Werror=missing-prototypes]
void list_device_sources(const AVInputFormat *fmt)
^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
ffbuild/common.mak:78: recipe for target 'doc/examples/device_get_capabilities.o' failed
make: *** [doc/examples/device_get_capabilities.o] Error 1
make: *** Waiting for unfinished jobs....
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20220325/a826071d/attachment.sig>
More information about the ffmpeg-devel
mailing list