Commit cf3bb5c0 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* ALL:

  - Removed all the RLE subtitle font code.
  - Removed the .rle and even older .psf font files.
  - Moved the filesubtitle code from spudec to subsdec.
  - spudec is again DVD only.
parent 1f4b5609
dnl Autoconf settings for vlc
dnl $Id: configure.ac,v 1.39 2003/07/21 17:48:31 gbazin Exp $
dnl $Id: configure.ac,v 1.40 2003/07/22 20:49:10 hartman Exp $
AC_INIT(vlc,0.6.1-test1)
......@@ -768,7 +768,7 @@ dnl
#AX_ADD_BUILTINS([mpeg_video_old idct idctclassic motion])
AX_ADD_PLUGINS([dummy rc logger gestures memcpy])
AX_ADD_PLUGINS([es audio m4v mpeg_system ps ts avi asf aac mp4 rawdv])
AX_ADD_PLUGINS([mpeg_audio lpcm a52 dts cinepak])
AX_ADD_PLUGINS([spudec mpeg_audio lpcm a52 dts cinepak])
AX_ADD_PLUGINS([deinterlace invert adjust wall transform distort clone crop motionblur])
AX_ADD_PLUGINS([float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif dtstospdif fixed32tofloat32 fixed32tos16 s16tofixed32 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32])
AX_ADD_PLUGINS([trivial_resampler ugly_resampler linear_resampler bandlimited_resampler])
......@@ -1701,7 +1701,7 @@ then
AC_CHECK_HEADERS(QuickTime/QuickTime.h,
[ AX_ADD_BUILTINS([quicktime])
AX_ADD_LDFLAGS([quicktime],[-framework QuickTime -framework Carbon])
], [ AC_MSG_ERROR([cannot find CoreAudio headers]) ])
], [ AC_MSG_ERROR([cannot find QuickTime headers]) ])
fi
fi
......@@ -1951,11 +1951,11 @@ You also need to check that you have a libogg posterior to the 1.0 release.])],
fi
dnl
dnl spudec support
dnl subsdec support
dnl
AX_ADD_LDFLAGS([spudec],[${LIBICONV}])
AX_ADD_CPPFLAGS([spudec],[${INCICONV}])
AX_ADD_PLUGINS([spudec])
AX_ADD_LDFLAGS([subsdec],[${LIBICONV}])
AX_ADD_CPPFLAGS([subsdec],[${INCICONV}])
AX_ADD_PLUGINS([subsdec])
dnl
......@@ -3254,6 +3254,7 @@ AC_OUTPUT([
modules/codec/mpeg_video/idct/Makefile
modules/codec/mpeg_video/motion/Makefile
modules/codec/spudec/Makefile
modules/codec/subsdec/Makefile
modules/control/Makefile
modules/control/corba/Makefile
modules/control/lirc/Makefile
......
......@@ -2,7 +2,5 @@ SOURCES_spudec = \
spudec.c \
parse.c \
render.c \
text.c \
subtitler.c \
spudec.h \
$(NULL)
......@@ -2,7 +2,7 @@
* parse.c: SPU parser
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: parse.c,v 1.11 2003/03/09 19:25:08 gbazin Exp $
* $Id: parse.c,v 1.12 2003/07/22 20:49:10 hartman Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -10,7 +10,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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
......@@ -166,6 +166,7 @@ void E_(ParsePacket)( spudec_thread_t *p_spudec )
vlc_mutex_lock( p_mutex );
UpdateSPU( p_spu, VLC_OBJECT(p_spu->p_sys->p_input) );
var_AddCallback( p_spu->p_sys->p_input,
"highlight", CropCallback, p_spu );
vlc_mutex_unlock( p_mutex );
......@@ -273,18 +274,18 @@ static int ParseControlSeq( spudec_thread_t *p_spudec,
/* Get the control sequence date */
date = (mtime_t)GetBits( &p_spudec->bit_stream, 16 ) * 11000
* p_spudec->bit_stream.p_pes->i_rate / DEFAULT_RATE;
/* Next offset */
i_cur_seq = i_index;
i_next_seq = GetBits( &p_spudec->bit_stream, 16 );
/* Skip what we just read */
i_index += 4;
}
i_command = GetBits( &p_spudec->bit_stream, 8 );
i_index++;
switch( i_command )
{
case SPU_CMD_FORCE_DISPLAY: /* 00 (force displaying) */
......@@ -412,11 +413,11 @@ static int ParseControlSeq( spudec_thread_t *p_spudec,
msg_Err( p_spudec->p_fifo, "no `start display' command" );
}
if( p_spu->i_stop <= p_spu->i_start && !p_spu->b_ephemer )
if( !p_spu->i_stop <= p_spu->i_start && !p_spu->b_ephemer )
{
/* This subtitle will live for 5 seconds or until the next subtitle */
p_spu->i_stop = p_spu->i_start + (mtime_t)500 * 11000
* p_spudec->bit_stream.p_pes->i_rate / DEFAULT_RATE;
* p_spudec->bit_stream.p_pes->i_rate / DEFAULT_RATE;
p_spu->b_ephemer = VLC_TRUE;
}
......
......@@ -2,7 +2,7 @@
* render.c : SPU renderer
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: render.c,v 1.4 2002/11/06 21:48:24 gbazin Exp $
* $Id: render.c,v 1.5 2003/07/22 20:49:10 hartman Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Rudolf Cornelissen <rag.cornelissen@inter.nl.net>
......
This diff is collapsed.
/*****************************************************************************
* spudec.h : sub picture unit decoder thread interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: spudec.h,v 1.6 2003/07/14 21:32:58 sigmunau Exp $
* $Id: spudec.h,v 1.7 2003/07/22 20:49:10 hartman Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -11,7 +10,7 @@
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* This program 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
......@@ -22,11 +21,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#if defined(HAVE_ICONV)
#include <iconv.h>
#endif
typedef struct spudec_thread_t spudec_thread_t;
struct subpicture_sys_t
......@@ -50,18 +44,6 @@ struct subpicture_sys_t
unsigned int i_x_start, i_y_start, i_x_end, i_y_end;
};
/*****************************************************************************
* subtitler_font_t : proportional font
*****************************************************************************/
typedef struct subtitler_font_s
{
unsigned int i_height; /* character height in pixels */
unsigned int i_width[256]; /* character widths in pixels */
unsigned int i_memory[256]; /* amount of memory used by character */
unsigned int * p_length[256]; /* line byte widths */
uint16_t ** p_offset[256]; /* pointer to RLE data */
} subtitler_font_t;
/*****************************************************************************
* spudec_thread_t : sub picture unit decoder thread descriptor
*****************************************************************************/
......@@ -89,9 +71,6 @@ struct spudec_thread_t
*/
unsigned int i_spu_size; /* size of current SPU packet */
unsigned int i_rle_size; /* size of the RLE part */
#if defined(HAVE_ICONV)
iconv_t iconv_handle; /* handle to iconv instance */
#endif
};
/*****************************************************************************
......@@ -120,9 +99,3 @@ void E_(ParsePacket) ( spudec_thread_t * );
void E_(RenderSPU) ( vout_thread_t *, picture_t *,
const subpicture_t * );
void E_(ParseText) ( spudec_thread_t *, subtitler_font_t * );
subtitler_font_t *E_(subtitler_LoadFont) ( vout_thread_t *, const char * );
void E_(subtitler_UnloadFont) ( vout_thread_t *, subtitler_font_t * );
void E_(subtitler_PlotSubtitle) ( vout_thread_t *, char *, subtitler_font_t *,
mtime_t, mtime_t );
This diff is collapsed.
/*****************************************************************************
* text.c: text subtitles parser
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: text.c,v 1.6 2003/07/14 21:32:58 sigmunau Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h> /* malloc(), free() */
#include <string.h> /* memcpy(), memset() */
#include <vlc/vlc.h>
#include <vlc/vout.h>
#include <vlc/decoder.h>
#include <osd.h>
#include "spudec.h"
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
/*****************************************************************************
* ParseText: parse an text subtitle packet and send it to the video output
*****************************************************************************/
void E_(ParseText)( spudec_thread_t *p_spudec, subtitler_font_t *p_font )
{
char * psz_subtitle;
mtime_t i_pts, i_dts;
/* We cannot display a subpicture with no date */
i_pts = p_spudec->bit_stream.p_pes->i_pts;
i_dts = p_spudec->bit_stream.p_pes->i_dts;
if( i_pts == 0 )
{
/* Dump the packet */
NextDataPacket( p_spudec->p_fifo, &p_spudec->bit_stream );
msg_Warn( p_spudec->p_fifo, "subtitle without a date" );
return;
}
/* Check validity of packet data */
if( (p_spudec->bit_stream.p_data->p_payload_end
- p_spudec->bit_stream.p_data->p_payload_start) <= 0
|| (strlen(p_spudec->bit_stream.p_data->p_payload_start)
> (size_t)(p_spudec->bit_stream.p_data->p_payload_end
- p_spudec->bit_stream.p_data->p_payload_start)) )
{
/* Dump the packet */
NextDataPacket( p_spudec->p_fifo, &p_spudec->bit_stream );
msg_Warn( p_spudec->p_fifo, "invalid subtitle" );
return;
}
psz_subtitle = p_spudec->bit_stream.p_data->p_payload_start;
if( psz_subtitle[0] != '\0' )
{
#if defined(HAVE_ICONV)
char *psz_new_subtitle, *psz_convert_buffer_out, *psz_convert_buffer_in;
size_t ret, inbytes_left, outbytes_left;
psz_new_subtitle = malloc( 6 * strlen( psz_subtitle ) * sizeof(char) );
psz_convert_buffer_out = psz_new_subtitle;
psz_convert_buffer_in = psz_subtitle;
inbytes_left = strlen( psz_subtitle );
outbytes_left = 6 * inbytes_left;
ret = iconv( p_spudec->iconv_handle, &psz_convert_buffer_in, &inbytes_left, &psz_convert_buffer_out, &outbytes_left );
*psz_convert_buffer_out = '\0';
if( inbytes_left )
{
msg_Warn( p_spudec->p_fifo, "Something fishy happened during conversion" );
}
else
{
msg_Dbg( p_spudec->p_fifo, "reencoded \"%s\" into \"%s\"", psz_subtitle, psz_new_subtitle );
vout_ShowTextAbsolute( p_spudec->p_vout, psz_new_subtitle, NULL,
OSD_ALIGN_BOTTOM|OSD_ALIGN_LEFT, 20, 20,
i_pts, i_dts );
}
free( psz_new_subtitle );
#else
vout_ShowTextAbsolute( p_spudec->p_vout, psz_subtitle, NULL,
OSD_ALIGN_BOTTOM|OSD_ALIGN_LEFT, 20, 20,
i_pts, i_dts );
#endif
#if 0
subtitler_PlotSubtitle( p_spudec->p_vout,
psz_subtitle, p_font,
i_pts,
i_dts );
#endif
}
/* Prepare for next time. No need to check that
* p_spudec->bit_stream->p_data is valid since we check later on
* for b_die and b_error */
NextDataPacket( p_spudec->p_fifo, &p_spudec->bit_stream );
}
.deps
.dirstamp
*.lo
*.la
*.dll
*.dylib
*.sl
*.so
Makefile.am
Makefile.in
Makefile
SOURCES_subsdec = \
subsdec.c \
subsdec.h \
$(NULL)
This diff is collapsed.
/*****************************************************************************
* subsdec.h : sub picture unit decoder thread interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: subsdec.h,v 1.1 2003/07/22 20:49:10 hartman Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#if defined(HAVE_ICONV)
#include <iconv.h>
#endif
typedef struct subsdec_thread_t subsdec_thread_t;
/*****************************************************************************
* subsdec_thread_t : sub picture unit decoder thread descriptor
*****************************************************************************/
struct subsdec_thread_t
{
/*
* Thread properties and locks
*/
vlc_thread_t thread_id; /* id for thread functions */
/*
* Input properties
*/
decoder_fifo_t * p_fifo; /* stores the PES stream data */
/* The bit stream structure handles the PES stream at the bit level */
bit_stream_t bit_stream;
/*
* Output properties
*/
vout_thread_t * p_vout; /* needed to create the spu objects */
/*
* Private properties
*/
#if defined(HAVE_ICONV)
iconv_t iconv_handle; /* handle to iconv instance */
#endif
};
/*****************************************************************************
* Prototypes
*****************************************************************************/
int E_(SyncPacket) ( subsdec_thread_t * );
void E_(ParsePacket) ( subsdec_thread_t * );
void E_(ParseText) ( subsdec_thread_t * );
<html>
<head>
<title>VLC Media Player - Informations</title>
<title>VLC Media Player</title>
<vlc id="if" param1="url_param"/>
<meta http-equiv="refresh" content="0;URL=/" />
<vlc id="end" />
<vlc id="control" param1="stop,pause,previous,next,add,sout,play" />
<vlc id="set" param1="sout" param2="string" />
</head>
<body>
<h2><center><a href="http://www.videolan.org">VLC Media Player <vlc id="value" param1="version" /></a></center></h2>
<h2><center><a href="http://www.videolan.org">VLC Media Player <vlc id="value" param1="version" /></a> (http interface)</center></h2>
<hr/>
<td>
<form method="get" action="">
<input type="submit" name="control" value="stop" />
<input type="submit" name="control" value="pause" />
<input type="submit" name="control" value="previous" />
<input type="submit" name="control" value="next" />
<a href="info.html">infos</a>
</form>
</td>
<br />
<td>
<form method="get" action="" enctype="text/plain" >
<input type="text" name="mrl" size="40" />
<input type="submit" name="control" value="add" />
</form>
</td>
<td>
<form method="get" action="" enctype="text/plain" >
<input type="text" name="sout" size="30" value="<vlc id="get" param1="sout" param2="string" />" />
<input type="submit" name="control" value="sout" />
</form>
</td>
<hr/>
<vlc id="foreach" param1="cat" param2="informations" />
<p> <vlc id="value" param1="cat.name" />
<ul>
<vlc id="foreach" param1="info" param2="cat.info" />
<li> <vlc id="value" param1="info.name" /> : <vlc id="value" param1="info.value" /> </li>
<p>
<vlc id="foreach" param1="pl" param2="playlist" />
<vlc id="if" param1="pl.current" />
<b>
<vlc id="end" />
<a href=?control=play&item=<vlc id="value" param1="pl.index" />><vlc id="value" param1="pl.index" /> - <vlc id="value" param1="pl.name" /></a> <br />
<vlc id="if" param1="pl.current" />
</b>
<vlc id="end" />
<vlc id="end" />
</ul>
<vlc id="end" />
</p>
<hr/>
<p><vlc id="value" param1="copyright" /> </p>
<p> <vlc id="value" param1="copyright" /> </p>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment