# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_plugin.h>
#include <assert.h>
#include <stdint.h>
// #define ZVBI_DEBUG
-static int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
-static const char *ppsz_pos_descriptions[] =
+static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
+static const char *const ppsz_pos_descriptions[] =
{ N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
vlc_module_begin();
set_description( N_("VBI and Teletext decoder") );
- set_shortname( "VBI & Teletext" );
+ set_shortname( N_("VBI & Teletext") );
set_capability( "decoder", 51 );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_SCODEC );
VLC_FOURCC('R','G','B','A');
#endif
fmt.i_aspect = p_sys->b_text ? 0 : VOUT_ASPECT_FACTOR;
- fmt.i_sar_num = fmt.i_sar_den = 1;
- fmt.i_width = fmt.i_visible_width = p_page.columns * 12;
- fmt.i_height = fmt.i_visible_height = p_page.rows * 10;
+ if( !p_sys->b_text )
+ {
+ fmt.i_sar_num = fmt.i_sar_den = 1;
+ fmt.i_width = fmt.i_visible_width = p_page.columns * 12;
+ fmt.i_height = fmt.i_visible_height = p_page.rows * 10;
+ }
fmt.i_bits_per_pixel = p_sys->b_text ? 0 : 32;
fmt.i_x_offset = fmt.i_y_offset = 0;
p_spu->p_region->i_x = 0;
p_spu->p_region->i_y = 0;
- p_spu->p_region->i_align = SUBPICTURE_ALIGN_BOTTOM;
+ p_spu->p_region->i_align = p_sys->i_align;
/* Normal text subs, easy markup */
p_spu->i_flags = SUBPICTURE_ALIGN_BOTTOM;
- p_spu->i_start = (mtime_t) p_block->i_dts;
+ p_spu->i_start = (mtime_t) p_block->i_pts;
p_spu->i_stop = (mtime_t) 0;
p_spu->b_ephemer = true;
p_spu->b_absolute = false;
p_spu->b_pausable = true;
- p_spu->i_width = fmt.i_width;
- p_spu->i_height = fmt.i_height;
- p_spu->i_original_picture_width = p_page.columns * 12;
- p_spu->i_original_picture_height = p_page.rows * 10;
+ if( !p_sys->b_text )
+ {
+ p_spu->i_width = fmt.i_width;
+ p_spu->i_height = fmt.i_height;
+ p_spu->i_original_picture_width = p_page.columns * 12;
+ p_spu->i_original_picture_height = p_page.rows * 10;
+ }
#ifdef WORDS_BIGENDIAN
# define ZVBI_PIXFMT_RGBA32 VBI_PIXFMT_RGBA32_BE
if( i_total <= 40 ) goto error;
p_spu->p_region->psz_text = strdup( &p_text[8] );
- p_spu->p_region->fmt.i_height = p_spu->p_region->fmt.i_visible_height = p_page.rows + 1;
#ifdef ZVBI_DEBUG
msg_Info( p_dec, "page %x-%x(%d)\n%s", p_page.pgno, p_page.subno, i_total, p_text );
#endif