[FFmpeg-devel] [PATCH 1/2] refactored srtdec

Yayoi Ukai yayoi.ukai at gmail.com
Fri Apr 10 10:46:16 CEST 2015


On Fri, Apr 10, 2015 at 12:14 AM, James Almer <jamrial at gmail.com> wrote:
>
> On 10/04/15 3:54 AM, Yayoi wrote:
> > diff --git a/libavcodec/htmlsubtitles.h b/libavcodec/htmlsubtitles.h
> > new file mode 100644
> > index 0000000..4f21205
> > --- /dev/null
> > +++ b/libavcodec/htmlsubtitles.h
> > @@ -0,0 +1,45 @@
> > +/*
> > + * SSA/ASS common functions
> > + * Copyright (c) 2010  Aurelien Jacobs <aurel at gnuage.org>
> > + *
> > + * 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 AVCODEC_HTMLSUBTITLES_H
> > +#define AVCODEC_HTMLSUBTITLES_H
> > +
> > +#include "avcodec.h"
> > +#include "libavutil/bprint.h"
> > +
> > +/**
> > + * @name Default values for ASS style
> > + * @{
> > + */
> > +#define ASS_DEFAULT_FONT        "Arial"
> > +#define ASS_DEFAULT_FONT_SIZE   16
> > +#define ASS_DEFAULT_COLOR       0xffffff
> > +#define ASS_DEFAULT_BACK_COLOR  0
> > +#define ASS_DEFAULT_BOLD        0
> > +#define ASS_DEFAULT_ITALIC      0
> > +#define ASS_DEFAULT_UNDERLINE   0
> > +#define ASS_DEFAULT_ALIGNMENT   2
> > +/** @} */
>
> This is duplicating defines already available in ass.h
>
> IMO all this belongs in ass.c/h instead of two new files.

What ass.c/h does? Well, the point of the refactoring is to add the
font/color etc support (that already existed in srtdec.c) to
semidec.c. (I wrote more details in other mail.)

>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list