[vlc-devel] [Patch][Fwd: Breakdown of subsdec patch]

Jean-Baptiste Kempf jb at videolan.org
Mon Jun 25 08:21:22 CEST 2007


Hello,

Yet another B.Purcell Patch ;)
It is a breakup in smaller pieces from the big patch from june 22 to
"Make USF subtitles conform better to spec"

-------- Original Message --------
I've made some progress in segmenting this patch up into smaller pieces.
It is a bit of a mess though, as some patches are trying to change lines
very close to (or in some cases the same line) as others. I've tried to
concentrate on making the patches as harmless and independant as
possible: ie. all the 00_* patches should be able to be applied
individually and committed to svn without hurting anything else. A
couple of these patches can't be applied on top of one another though
because of the reasons above.
If someone could take a look at these patches and commit any you are 
happy with, though, I can re-generate the other patches then to avoid 
the collisions (which are in the function prototypes declarations, and 
in the changes to vlc_osd.h)
Ok here they are:

* 00_Quartztext --> change the font size implementation, and whitespace
implementation to be exactly the same as the new code you have in the
last freetype.c patch. I wasn't handling whitespace properly, and the
font size implementation I had didn't match the spec. This patch has no
clashes with any of the others.

* 00_ImageStructures --> add the fields to private storage necessary for
storing a list of pictures, and the code necessary to dispose of them
during cleanup. No code is added to populate this list though. In itself
is does absolutely nothing - other patches need to build on it. This
patch has no clashes with any of the others, but is a dependancy for
01_LoadAttachments. 01_LoadAttachments won't compile or add properly if
this one hasn't been applied first.

* 00_HeaderEnhancements --> Corrects the interpretation of the USF
header to comply with the spec, which requires that the styles all
inherit from the default style -- this necessitates changing most of the
interpretation of the other variables so that settings like bold, can be
turned off as well as on. It also adds some variables missed last time -
in particular a couple of new ones solely for karaoke and corrects the
implementation of font size to match the spec (same as we had to do in
quartztext and freetype) and adds some memory improvements over the old
code (null pointer check, and memory frees). Appropriate initialisation
code of the new karaoke fields in the style struct was added to
ParseSSAHeader() also. This patch will clash with 00_RemoveTextAlign
patch, so one of them will need to be redone based on which one is
committed first.

* 00_RemoveTextAlign --> Removes a now unused field i_text_align which
was only be written to in one place in the entire VLC source, and only
then for USF subtitles, and the code in freetype and quartztext that
paid any attention to it. In order to support alignment properly we now
only pay attention to the i_align field of the subpicture region. This
patch will clash with 00_HeaderEnhancements, so one of them will need to
be redone based on which one is committed first.

* 00_KaraokeVars --> Adds some vlc variables which can be used by
rendering modules to render time specific information - such as the
raster progress indicator for karaoke. Also adds code which allows the
subpicture_region to remain in TEXT format so that second and subsequent
passes will work properly, rather than being converted first time
through to YUVA/YUVP. If the rendering module ignores the new variables
and fails to request this feature, the region is processed the same as
normal and turns into YUVA/YUVP first time through.

* 01_LoadAttachments --> This patch depends on 00_ImageStructures having
already been applied. It populates the list of pictures with those
available as attachments in the file. Code actually used to display them
isn't included in this patch - just the loading. The pictures will be
silently unused without further patches, but will be correctly unloaded
from memory thanks to code already in place from 00_ImageStructures. The
load code in this patch requests SDL_Image to do the image decoding, if
it is available. An alternative version of this patch that disables
ffmpeg's ability to decode BMPs can be provided if that is preferred,
but I'm still leaning in the direction of thinking this is a less
intrusive way to go - ie. no possibility of this way impacting other
developers.

* 01_TheRest --> depends on all the other patches having been applied.
Probably won't apply flawlessly, so don't expect you to get this far.

If you can look at and, if you are happy with, commit some of these
patches I can go through this procedure again with the remaining ones -
I don't think it's practical for me to be whittling into this patch any
further until then though.

--------------------------------

gtz,
jb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 00_HeaderEnhancements.svn-diff
Type: text/x-patch
Size: 17907 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070625/064a1daa/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 00_ImageStructures.svn-diff
Type: text/x-patch
Size: 1826 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070625/064a1daa/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 00_KaraokeVars.svn-diff
Type: text/x-patch
Size: 4220 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070625/064a1daa/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 00_Quartztext.svn-diff
Type: text/x-patch
Size: 2233 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070625/064a1daa/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 00_RemoveTextAlign.svn-diff
Type: text/x-patch
Size: 4781 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070625/064a1daa/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 00_TidyupTextSubs1.svn-diff
Type: text/x-patch
Size: 8406 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070625/064a1daa/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01_LoadAttachments.svn-diff
Type: text/x-patch
Size: 6344 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070625/064a1daa/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01_TheRest.svn-diff
Type: text/x-patch
Size: 19479 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070625/064a1daa/attachment-0007.bin>
-------------- next part --------------
_______________________________________________
vlc-devel mailing list
vlc-devel at videolan.org
http://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list