Commit 6521130d authored by Jean-Paul Saman's avatar Jean-Paul Saman Committed by Jean-Paul Saman

Whitespace and tabs cleanup

parent 1299930e
...@@ -43,11 +43,11 @@ typedef enum { ...@@ -43,11 +43,11 @@ typedef enum {
DATA_UNIT_EBU_TELETEXT_NON_SUBTITLE = 0x02, DATA_UNIT_EBU_TELETEXT_NON_SUBTITLE = 0x02,
DATA_UNIT_EBU_TELETEXT_SUBTITLE = 0x03, DATA_UNIT_EBU_TELETEXT_SUBTITLE = 0x03,
DATA_UNIT_EBU_TELETEXT_INVERTED = 0x0C, DATA_UNIT_EBU_TELETEXT_INVERTED = 0x0C,
DATA_UNIT_ZVBI_WSS_CPR1204 = 0xB4, DATA_UNIT_ZVBI_WSS_CPR1204 = 0xB4,
DATA_UNIT_ZVBI_CLOSED_CAPTION_525 = 0xB5, DATA_UNIT_ZVBI_CLOSED_CAPTION_525 = 0xB5,
DATA_UNIT_ZVBI_MONOCHROME_SAMPLES_525 = 0xB6, DATA_UNIT_ZVBI_MONOCHROME_SAMPLES_525 = 0xB6,
DATA_UNIT_VPS = 0xC3, DATA_UNIT_VPS = 0xC3,
DATA_UNIT_WSS = 0xC4, DATA_UNIT_WSS = 0xC4,
DATA_UNIT_CLOSED_CAPTION = 0xC5, DATA_UNIT_CLOSED_CAPTION = 0xC5,
...@@ -137,16 +137,16 @@ static int Open( vlc_object_t *p_this ) ...@@ -137,16 +137,16 @@ static int Open( vlc_object_t *p_this )
if( (p_sys->p_vbi_dec == NULL) || (p_sys->p_dvb_demux == NULL) ) if( (p_sys->p_vbi_dec == NULL) || (p_sys->p_dvb_demux == NULL) )
{ {
msg_Err( p_dec, "VBI decoder/demux could not be created." ); msg_Err( p_dec, "VBI decoder/demux could not be created." );
Close( p_dec );
return VLC_ENOMEM; return VLC_ENOMEM;
} }
vbi_event_handler_register( p_sys->p_vbi_dec, vbi_event_handler_register( p_sys->p_vbi_dec,
VBI_EVENT_TTX_PAGE | VBI_EVENT_CAPTION | VBI_EVENT_NETWORK | VBI_EVENT_TTX_PAGE | VBI_EVENT_CAPTION | VBI_EVENT_NETWORK |
VBI_EVENT_ASPECT | VBI_EVENT_PROG_INFO, VBI_EVENT_ASPECT | VBI_EVENT_PROG_INFO,
event_handler, p_dec ); event_handler, p_dec );
/* Create the var on vlc_global. */ /* Create the var on vlc_global. */
p_sys->i_wanted_page = var_CreateGetInteger( p_dec->p_libvlc, p_sys->i_wanted_page = var_CreateGetInteger( p_dec->p_libvlc, "vbi-page" );
"vbi-page" );
var_AddCallback( p_dec->p_libvlc, "vbi-page", RequestPage, p_sys ); var_AddCallback( p_dec->p_libvlc, "vbi-page", RequestPage, p_sys );
p_sys->b_opaque = var_CreateGetBool( p_dec, "vbi-opaque" ); p_sys->b_opaque = var_CreateGetBool( p_dec, "vbi-opaque" );
...@@ -195,16 +195,16 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block ) ...@@ -195,16 +195,16 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
p_pos = p_block->p_buffer; p_pos = p_block->p_buffer;
i_left = p_block->i_buffer; i_left = p_block->i_buffer;
while( i_left > 0 ) while( i_left > 0 )
{ {
vbi_sliced p_sliced[MAX_SLICES]; vbi_sliced p_sliced[MAX_SLICES];
unsigned int i_lines = 0; unsigned int i_lines = 0;
int64_t i_pts; int64_t i_pts;
i_lines = vbi_dvb_demux_cor( p_sys->p_dvb_demux, p_sliced, i_lines = vbi_dvb_demux_cor( p_sys->p_dvb_demux, p_sliced,
MAX_SLICES, &i_pts, &p_pos, &i_left ); MAX_SLICES, &i_pts, &p_pos, &i_left );
if( i_lines > 0 ) if( i_lines > 0 )
vbi_decode( p_sys->p_vbi_dec, p_sliced, i_lines, i_pts / 90000.0 ); vbi_decode( p_sys->p_vbi_dec, p_sliced, i_lines, i_pts / 90000.0 );
} }
...@@ -214,14 +214,14 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block ) ...@@ -214,14 +214,14 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
vbi_dec2bcd( p_sys->i_wanted_page ), vbi_dec2bcd( p_sys->i_wanted_page ),
VBI_ANY_SUBNO, VBI_WST_LEVEL_3p5, VBI_ANY_SUBNO, VBI_WST_LEVEL_3p5,
25, FALSE ); 25, FALSE );
if( !b_cached ) if( !b_cached )
goto error; goto error;
if( (p_sys->i_wanted_page == p_sys->i_last_page) && if( (p_sys->i_wanted_page == p_sys->i_last_page) &&
(p_sys->b_update != VLC_TRUE) ) (p_sys->b_update != VLC_TRUE) )
goto error; goto error;
p_sys->i_last_page = p_sys->i_wanted_page; p_sys->i_last_page = p_sys->i_wanted_page;
p_sys->b_update = VLC_FALSE; p_sys->b_update = VLC_FALSE;
msg_Dbg( p_dec, "we now have page: %d ready for display", msg_Dbg( p_dec, "we now have page: %d ready for display",
...@@ -235,7 +235,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block ) ...@@ -235,7 +235,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
msg_Warn( p_dec, "can't get spu buffer" ); msg_Warn( p_dec, "can't get spu buffer" );
goto error; goto error;
} }
/* Create a new subpicture region */ /* Create a new subpicture region */
memset( &fmt, 0, sizeof(video_format_t) ); memset( &fmt, 0, sizeof(video_format_t) );
fmt.i_chroma = VLC_FOURCC('R','G','B','A'); fmt.i_chroma = VLC_FOURCC('R','G','B','A');
...@@ -254,7 +254,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block ) ...@@ -254,7 +254,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
} }
p_spu->p_region->i_x = 0; p_spu->p_region->i_x = 0;
p_spu->p_region->i_y = 0; p_spu->p_region->i_y = 0;
/* Normal text subs, easy markup */ /* Normal text subs, easy markup */
p_spu->i_flags = SUBPICTURE_ALIGN_TOP; p_spu->i_flags = SUBPICTURE_ALIGN_TOP;
...@@ -341,7 +341,7 @@ static void event_handler( vbi_event *ev, void *user_data) ...@@ -341,7 +341,7 @@ static void event_handler( vbi_event *ev, void *user_data)
{ {
decoder_t *p_dec = (decoder_t *)user_data; decoder_t *p_dec = (decoder_t *)user_data;
decoder_sys_t *p_sys = p_dec->p_sys; decoder_sys_t *p_sys = p_dec->p_sys;
if( ev->type == VBI_EVENT_TTX_PAGE ) if( ev->type == VBI_EVENT_TTX_PAGE )
{ {
/* msg_Dbg( p_dec, "Page %03x.%02x ", /* msg_Dbg( p_dec, "Page %03x.%02x ",
...@@ -350,7 +350,7 @@ static void event_handler( vbi_event *ev, void *user_data) ...@@ -350,7 +350,7 @@ static void event_handler( vbi_event *ev, void *user_data)
*/ */
if( p_sys->i_last_page == vbi_bcd2dec( ev->ev.ttx_page.pgno ) ) if( p_sys->i_last_page == vbi_bcd2dec( ev->ev.ttx_page.pgno ) )
p_sys->b_update = VLC_TRUE; p_sys->b_update = VLC_TRUE;
if( ev->ev.ttx_page.clock_update ) if( ev->ev.ttx_page.clock_update )
msg_Dbg( p_dec, "clock" ); msg_Dbg( p_dec, "clock" );
if( ev->ev.ttx_page.header_update ) if( ev->ev.ttx_page.header_update )
...@@ -370,10 +370,10 @@ static int RequestPage( vlc_object_t *p_this, char const *psz_cmd, ...@@ -370,10 +370,10 @@ static int RequestPage( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data ) vlc_value_t oldval, vlc_value_t newval, void *p_data )
{ {
decoder_sys_t *p_sys = p_data; decoder_sys_t *p_sys = p_data;
if( (newval.i_int > 0) && (newval.i_int < 999) ) if( (newval.i_int > 0) && (newval.i_int < 999) )
p_sys->i_wanted_page = newval.i_int; p_sys->i_wanted_page = newval.i_int;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -386,4 +386,3 @@ static int Opaque( vlc_object_t *p_this, char const *psz_cmd, ...@@ -386,4 +386,3 @@ static int Opaque( vlc_object_t *p_this, char const *psz_cmd,
p_sys->b_opaque = newval.b_bool; p_sys->b_opaque = newval.b_bool;
return VLC_SUCCESS; return VLC_SUCCESS;
} }
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