From: softworkz <ffmpegagent@gmail.com> To: ffmpeg-devel@ffmpeg.org Cc: softworkz <softworkz@hotmail.com> Subject: [FFmpeg-devel] [PATCH v9 01/25] avcodec, avutil: Move enum AVSubtitleType to avutil, add new and deprecate old values Date: Tue, 25 Oct 2022 09:13:22 +0000 Message-ID: <bc849a23dd3449818d5253c5ef3ec19a4e57b6e7.1666689226.git.ffmpegagent@gmail.com> (raw) In-Reply-To: <pull.18.v9.ffstaging.FFmpeg.1666689226.ffmpegagent@gmail.com> From: softworkz <softworkz@hotmail.com> Signed-off-by: softworkz <softworkz@hotmail.com> --- libavcodec/avcodec.h | 19 +------------ libavutil/Makefile | 1 + libavutil/subfmt.h | 68 ++++++++++++++++++++++++++++++++++++++++++++ libavutil/version.h | 5 ++-- 4 files changed, 73 insertions(+), 20 deletions(-) create mode 100644 libavutil/subfmt.h diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 3edd8e2636..bf06b01e22 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -35,6 +35,7 @@ #include "libavutil/frame.h" #include "libavutil/log.h" #include "libavutil/pixfmt.h" +#include "libavutil/subfmt.h" #include "libavutil/rational.h" #include "codec.h" @@ -2257,24 +2258,6 @@ typedef struct AVHWAccel { * @} */ -enum AVSubtitleType { - SUBTITLE_NONE, - - SUBTITLE_BITMAP, ///< A bitmap, pict will be set - - /** - * Plain text, the text field must be set by the decoder and is - * authoritative. ass and pict fields may contain approximations. - */ - SUBTITLE_TEXT, - - /** - * Formatted text, the ass field must be set by the decoder and is - * authoritative. pict and text fields may contain approximations. - */ - SUBTITLE_ASS, -}; - #define AV_SUBTITLE_FLAG_FORCED 0x00000001 typedef struct AVSubtitleRect { diff --git a/libavutil/Makefile b/libavutil/Makefile index 3d9c07aea8..74380cf917 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -77,6 +77,7 @@ HEADERS = adler32.h \ sha512.h \ spherical.h \ stereo3d.h \ + subfmt.h \ threadmessage.h \ time.h \ timecode.h \ diff --git a/libavutil/subfmt.h b/libavutil/subfmt.h new file mode 100644 index 0000000000..791b45519f --- /dev/null +++ b/libavutil/subfmt.h @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2021 softworkz + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_SUBFMT_H +#define AVUTIL_SUBFMT_H + +#include "version.h" + +enum AVSubtitleType { + + /** + * Subtitle format unknown. + */ + AV_SUBTITLE_FMT_NONE = -1, + + /** + * Subtitle format unknown. + */ + AV_SUBTITLE_FMT_UNKNOWN = 0, +#if FF_API_OLD_SUBTITLES + SUBTITLE_NONE = 0, ///< Deprecated, use AV_SUBTITLE_FMT_NONE instead. +#endif + + /** + * Bitmap area in AVSubtitleRect.data, pixfmt AV_PIX_FMT_PAL8. + */ + AV_SUBTITLE_FMT_BITMAP = 1, +#if FF_API_OLD_SUBTITLES + SUBTITLE_BITMAP = 1, ///< Deprecated, use AV_SUBTITLE_FMT_BITMAP instead. +#endif + + /** + * Plain text in AVSubtitleRect.text. + */ + AV_SUBTITLE_FMT_TEXT = 2, +#if FF_API_OLD_SUBTITLES + SUBTITLE_TEXT = 2, ///< Deprecated, use AV_SUBTITLE_FMT_TEXT instead. +#endif + + /** + * Text Formatted as per ASS specification, contained AVSubtitleRect.ass. + */ + AV_SUBTITLE_FMT_ASS = 3, +#if FF_API_OLD_SUBTITLES + SUBTITLE_ASS = 3, ///< Deprecated, use AV_SUBTITLE_FMT_ASS instead. +#endif + + AV_SUBTITLE_FMT_NB, ///< number of subtitle formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions. +}; + +#endif /* AVUTIL_SUBFMT_H */ diff --git a/libavutil/version.h b/libavutil/version.h index cb0c928bd0..009c628e35 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,8 +79,8 @@ */ #define LIBAVUTIL_VERSION_MAJOR 57 -#define LIBAVUTIL_VERSION_MINOR 39 -#define LIBAVUTIL_VERSION_MICRO 101 +#define LIBAVUTIL_VERSION_MINOR 40 +#define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ LIBAVUTIL_VERSION_MINOR, \ @@ -115,6 +115,7 @@ #define FF_API_OLD_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_MAJOR < 58) #define FF_API_AV_FOPEN_UTF8 (LIBAVUTIL_VERSION_MAJOR < 58) #define FF_API_PKT_DURATION (LIBAVUTIL_VERSION_MAJOR < 58) +#define FF_API_OLD_SUBTITLES (LIBAVUTIL_VERSION_MAJOR < 58) /** * @} -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-10-25 9:14 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <pull.18.v8.ffstaging.FFmpeg.1666591816.ffmpegagent@gmail.com> 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 00/25] Subtitle Filtering 2022 ffmpegagent 2022-10-25 9:13 ` softworkz [this message] 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 02/25] avutil/frame: Prepare AVFrame for subtitle handling softworkz 2022-10-25 9:37 ` Hendrik Leppkes 2022-10-25 9:58 ` Soft Works 2022-10-28 20:39 ` Soft Works 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 03/25] avcodec/subtitles: Introduce new frame-based subtitle decoding API softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 04/25] avcodec/libzvbi: set subtitle type softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 05/25] avfilter/subtitles: Update vf_subtitles to use new decoding api softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 06/25] avcodec, avutil: Move ass helper functions to avutil as avpriv_ and extend ass dialog parsing softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 07/25] avcodec/subtitles: Replace deprecated enum values softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 08/25] fftools/play, probe: Adjust for subtitle changes softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 09/25] avfilter/subtitles: Add subtitles.c for subtitle frame allocation softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 10/25] avfilter/avfilter: Handle subtitle frames softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 11/25] avfilter/avfilter: Fix hardcoded input index softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 12/25] avfilter/sbuffer: Add sbuffersrc and sbuffersink filters softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 13/25] avfilter/overlaygraphicsubs: Add overlaygraphicsubs and graphicsub2video filters softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 14/25] avfilter/overlaytextsubs: Add overlaytextsubs and textsubs2video filters softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 15/25] avfilter/textmod: Add textmod, censor and show_speaker filters softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 16/25] avfilter/stripstyles: Add stripstyles filter softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 17/25] avfilter/splitcc: Add splitcc filter for closed caption handling softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 18/25] avfilter/graphicsub2text: Add new graphicsub2text filter (OCR) softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 19/25] avfilter/subscale: Add filter for scaling and/or re-arranging graphical subtitles softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 20/25] avfilter/subfeed: add subtitle feed filter softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 21/25] avfilter/text2graphicsub: Added text2graphicsub subtitle filter softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 22/25] avfilter/snull, strim: Add snull and strim filters softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 23/25] avcodec/subtitles: Migrate subtitle encoders to frame-based API softworkz 2022-10-27 17:53 ` Michael Niedermayer 2022-10-27 19:05 ` Soft Works 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 24/25] fftools/ffmpeg: Introduce subtitle filtering and new frame-based subtitle encoding softworkz 2022-10-25 9:13 ` [FFmpeg-devel] [PATCH v9 25/25] avcodec/dvbsubdec: Fix conditions for fallback to default resolution softworkz 2022-11-06 20:52 ` [FFmpeg-devel] [PATCH v9 00/25] Subtitle Filtering 2022 Soft Works
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bc849a23dd3449818d5253c5ef3ec19a4e57b6e7.1666689226.git.ffmpegagent@gmail.com \ --to=ffmpegagent@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=softworkz@hotmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git