From 7a53ae931d3cac6f78993ba5480efd684a835cbc Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sun, 15 Jan 2023 12:49:32 +0100 Subject: examples: rename metadata to show_metadata --- configure | 4 +-- doc/examples/Makefile | 2 +- doc/examples/Makefile.example | 2 +- doc/examples/metadata.c | 60 ------------------------------------------- doc/examples/show_metadata.c | 60 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 64 insertions(+), 64 deletions(-) delete mode 100644 doc/examples/metadata.c create mode 100644 doc/examples/show_metadata.c diff --git a/configure b/configure index b695c77c58..6d4e184241 100755 --- a/configure +++ b/configure @@ -1723,12 +1723,12 @@ EXAMPLE_LIST=" extract_mvs_example filter_audio_example hw_decode_example - metadata_example muxing_example qsvdec_example remuxing_example resampling_audio_example scaling_video_example + show_metadata_example transcode_aac_example transcoding_example vaapi_encode_example @@ -3787,12 +3787,12 @@ encode_video_example_deps="avcodec avutil" extract_mvs_example_deps="avcodec avformat avutil" filter_audio_example_deps="avfilter avutil" hw_decode_example_deps="avcodec avformat avutil" -metadata_example_deps="avformat avutil" muxing_example_deps="avcodec avformat avutil swscale" qsvdec_example_deps="avcodec avutil libmfx h264_qsv_decoder" remuxing_example_deps="avcodec avformat avutil" resampling_audio_example_deps="avutil swresample" scaling_video_example_deps="avutil swscale" +show_metadata_example_deps="avformat avutil" transcode_aac_example_deps="avcodec avformat swresample" transcoding_example_deps="avfilter avcodec avformat avutil" vaapi_encode_example_deps="avcodec avutil h264_vaapi_encoder" diff --git a/doc/examples/Makefile b/doc/examples/Makefile index f640a5e636..44a56dd84d 100644 --- a/doc/examples/Makefile +++ b/doc/examples/Makefile @@ -11,12 +11,12 @@ EXAMPLES-$(CONFIG_ENCODE_VIDEO_EXAMPLE) += encode_video EXAMPLES-$(CONFIG_EXTRACT_MVS_EXAMPLE) += extract_mvs EXAMPLES-$(CONFIG_FILTER_AUDIO_EXAMPLE) += filter_audio EXAMPLES-$(CONFIG_HW_DECODE_EXAMPLE) += hw_decode -EXAMPLES-$(CONFIG_METADATA_EXAMPLE) += metadata EXAMPLES-$(CONFIG_MUXING_EXAMPLE) += muxing EXAMPLES-$(CONFIG_QSVDEC_EXAMPLE) += qsvdec EXAMPLES-$(CONFIG_REMUXING_EXAMPLE) += remuxing EXAMPLES-$(CONFIG_RESAMPLING_AUDIO_EXAMPLE) += resampling_audio EXAMPLES-$(CONFIG_SCALING_VIDEO_EXAMPLE) += scaling_video +EXAMPLES-$(CONFIG_SHOW_METADATA_EXAMPLE) += show_metadata EXAMPLES-$(CONFIG_TRANSCODE_AAC_EXAMPLE) += transcode_aac EXAMPLES-$(CONFIG_TRANSCODING_EXAMPLE) += transcoding EXAMPLES-$(CONFIG_VAAPI_ENCODE_EXAMPLE) += vaapi_encode diff --git a/doc/examples/Makefile.example b/doc/examples/Makefile.example index 9e725715a5..db09ceddd1 100644 --- a/doc/examples/Makefile.example +++ b/doc/examples/Makefile.example @@ -24,11 +24,11 @@ EXAMPLES=\ encode_video \ extract_mvs \ hw_decode \ - metadata \ muxing \ remuxing \ resampling_audio \ scaling_video \ + show_metadata \ transcode_aac \ transcoding \ diff --git a/doc/examples/metadata.c b/doc/examples/metadata.c deleted file mode 100644 index 734b12df16..0000000000 --- a/doc/examples/metadata.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2011 Reinhard Tartler - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -/** - * @file - * Shows how the metadata API can be used in application programs. - * @example metadata.c - */ - -#include - -#include -#include - -int main (int argc, char **argv) -{ - AVFormatContext *fmt_ctx = NULL; - const AVDictionaryEntry *tag = NULL; - int ret; - - if (argc != 2) { - printf("usage: %s \n" - "example program to demonstrate the use of the libavformat metadata API.\n" - "\n", argv[0]); - return 1; - } - - if ((ret = avformat_open_input(&fmt_ctx, argv[1], NULL, NULL))) - return ret; - - if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) < 0) { - av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n"); - return ret; - } - - while ((tag = av_dict_iterate(fmt_ctx->metadata, tag))) - printf("%s=%s\n", tag->key, tag->value); - - avformat_close_input(&fmt_ctx); - return 0; -} diff --git a/doc/examples/show_metadata.c b/doc/examples/show_metadata.c new file mode 100644 index 0000000000..f7f07bf598 --- /dev/null +++ b/doc/examples/show_metadata.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2011 Reinhard Tartler + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +/** + * @file + * Shows how the metadata API can be used in application programs. + * @example show_metadata.c + */ + +#include + +#include +#include + +int main (int argc, char **argv) +{ + AVFormatContext *fmt_ctx = NULL; + const AVDictionaryEntry *tag = NULL; + int ret; + + if (argc != 2) { + printf("usage: %s \n" + "example program to demonstrate the use of the libavformat metadata API.\n" + "\n", argv[0]); + return 1; + } + + if ((ret = avformat_open_input(&fmt_ctx, argv[1], NULL, NULL))) + return ret; + + if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) < 0) { + av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n"); + return ret; + } + + while ((tag = av_dict_iterate(fmt_ctx->metadata, tag))) + printf("%s=%s\n", tag->key, tag->value); + + avformat_close_input(&fmt_ctx); + return 0; +} -- cgit v1.2.1