if( i_mask & ATTRIBUTE_ALIGNMENT )
p_region->i_align = i_align;
-
+
/* TODO: Setup % based offsets properly, without adversely affecting
* everything else in vlc. Will address with separate patch, to
* prevent this one being any more complicated.
*/
p_text_region->i_x = p_style->i_margin_h;
p_text_region->i_y = p_style->i_margin_v;
-
+
}
else
{
* defaults.
*/
SetupPositions( p_text_region, psz_subtitle );
-
+
p_text_region->p_next = NULL;
}
return p_text_region;
( !strncasecmp( psz_subtitle, "<text>", 6 )))
{
psz_end = strcasestr( psz_subtitle, "</text>" );
-
+
if( psz_end )
{
subpicture_region_t *p_text_region;
psz_subtitle,
psz_end - psz_subtitle,
p_sys->i_align );
-
+
if( p_text_region )
{
p_text_region->psz_text = CreatePlainText( p_text_region->psz_html );
( !strncasecmp( psz_subtitle, "<karaoke>", 9 )))
{
psz_end = strcasestr( psz_subtitle, "</karaoke>" );
-
+
if( psz_end )
{
subpicture_region_t *p_text_region;
psz_subtitle,
psz_end - psz_subtitle,
p_sys->i_align );
-
+
if( p_text_region )
{
if( ! var_CreateGetBool( p_dec, "subsdec-formatted" ) )
char *psz_end = strcasestr( psz_subtitle, "</image>" );
char *psz_content = strchr( psz_subtitle, '>' );
int i_transparent = -1;
-
+
/* If a colorkey parameter is specified, then we have to map
* that index in the picture through as transparent (it is
* required by the USF spec but is also recommended that if the
}
if( psz_end )
psz_subtitle = psz_end - 1;
-
+
psz_subtitle += strcspn( psz_subtitle, ">" );
}
{
p_spu->i_x = (i_margin_l) ? i_margin_l : p_style->i_margin_h;
}
- else if( p_style->i_align & SUBPICTURE_ALIGN_RIGHT )
+ else if( p_style->i_align & SUBPICTURE_ALIGN_RIGHT )
{
p_spu->i_x = (i_margin_r) ? i_margin_r : p_style->i_margin_h;
}
if( p_image != NULL )
{
block_t *p_block;
-
+
p_block = block_New( p_image->p_parent, p_attach->i_data );
if( p_block != NULL )
}
vlc_input_attachment_Delete( pp_attachments[ k ] );
}
- free( pp_attachments );
+ free( pp_attachments );
return VLC_SUCCESS;
}
break;
case XML_READER_ENDELEM:
psz_node = xml_ReaderName( p_xml_reader );
-
+
if( !psz_node )
break;
switch (i_style_level)
}
break;
}
-
+
free( psz_node );
break;
case XML_READER_STARTELEM:
break;
}
/* All styles are supposed to default to Default, and then
- * one or more settings are over-ridden.
+ * one or more settings are over-ridden.
* At the moment this only effects styles defined AFTER
* Default in the XML
*/
p_style->font_style.i_outline_color = (col & 0x00ffffff);
p_style->font_style.i_outline_alpha = (col >> 24) & 0xff;
}
- }
+ }
else if( !strcasecmp( "outline-level", psz_name ) )
{
p_style->font_style.i_outline_width = atoi( psz_value );
- }
+ }
else if( !strcasecmp( "shadow-color", psz_name ) )
{
if( *psz_value == '#' )
else if( !strcasecmp( "shadow-level", psz_name ) )
{
p_style->font_style.i_shadow_width = atoi( psz_value );
- }
+ }
else if( !strcasecmp( "back-color", psz_name ) )
{
if( *psz_value == '#' )
else if( !strcasecmp( "spacing", psz_name ) )
{
p_style->font_style.i_spacing = atoi( psz_value );
- }
+ }
}
if( psz_name ) free( psz_name );
if( psz_value ) free( psz_value );
if( psz_value ) free( psz_value );
}
}
-
+
free( psz_node );
break;
}
if( i_align == 1 || i_align == 5 || i_align == 9 ) p_style->i_align |= SUBPICTURE_ALIGN_LEFT;
if( i_align == 3 || i_align == 7 || i_align == 11 ) p_style->i_align |= SUBPICTURE_ALIGN_RIGHT;
if( i_align < 4 ) p_style->i_align |= SUBPICTURE_ALIGN_BOTTOM;
- else if( i_align < 8 ) p_style->i_align |= SUBPICTURE_ALIGN_TOP;
+ else if( i_align < 8 ) p_style->i_align |= SUBPICTURE_ALIGN_TOP;
p_style->i_margin_h = ( p_style->i_align & SUBPICTURE_ALIGN_RIGHT ) ? i_margin_r : i_margin_l;
p_style->i_margin_v = i_margin_v;
{
int i_len = strlen( psz_attribs[ k ] );
- if( !strncasecmp( psz_subtitle, psz_attribs[ k ], i_len ))
+ if( !strncasecmp( psz_subtitle, psz_attribs[ k ], i_len ))
{
i_len += strcspn( psz_subtitle + i_len, "\"" ) + 1;
msg_Err( p_dec, "Unable to read image %s", psz_filename );
return NULL;
}
-
+
/* Display the feed's image */
memset( &fmt_out, 0, sizeof( video_format_t));