#include <vlc_filter.h>
#include <vlc_block.h>
-#include <vlc_osd.h>
#include <vlc_stream.h>
#include <vlc_xml.h>
*****************************************************************************/
vlc_module_begin ()
set_capability( "sub filter", 1 )
- set_shortname( "RSS / Atom" )
+ set_shortname( N_("RSS / Atom") )
set_help(RSS_HELP)
set_callbacks( CreateFilter, DestroyFilter )
set_category( CAT_VIDEO )
change_integer_list( pi_title_modes, ppsz_title_modes, NULL )
set_description( N_("RSS and Atom feed display") )
- add_shortcut( "rss" )
- add_shortcut( "atom" )
+ add_shortcut( "rss", "atom" )
vlc_module_end ()
static const char *const ppsz_filter_options[] = {
/* where to locate the string: */
if( p_sys->i_pos < 0 )
{ /* set to an absolute xy */
- p_spu->p_region->i_align = OSD_ALIGN_LEFT | OSD_ALIGN_TOP;
+ p_spu->p_region->i_align = SUBPICTURE_ALIGN_LEFT | SUBPICTURE_ALIGN_TOP;
p_spu->b_absolute = true;
}
else
p_spu->p_region->i_align = p_sys->i_pos;
p_spu->b_absolute = false;
}
+ p_spu->p_region->i_x = p_sys->i_xoff;
+ p_spu->p_region->i_y = p_sys->i_yoff;
p_spu->p_region->p_style = text_style_Duplicate( p_sys->p_style );
}
else
{
- p_region->i_x = p_sys->i_xoff;
- p_region->i_y = p_sys->i_yoff;
+ p_region->i_x = p_spu->p_region->i_x;
+ p_region->i_y = p_spu->p_region->i_y;
/* FIXME the copy is probably not needed anymore */
picture_Copy( p_region->p_picture, p_pic );
p_spu->p_region->p_next = p_region;
- }
- /* Offset text to display right next to the image */
- p_spu->p_region->i_x = p_pic->p[Y_PLANE].i_visible_pitch;
+ /* Offset text to display right next to the image */
+ p_spu->p_region->i_x += fmt_out.i_visible_width;
+ }
}
vlc_mutex_unlock( &p_sys->lock );
}
msg_Dbg( p_filter, "done with %s RSS/Atom feed", p_feed->psz_url );
- xml_ReaderDelete( p_xml, p_xml_reader );
+ xml_ReaderDelete( p_xml_reader );
stream_Delete( p_stream );
}
error:
FreeRSS( p_feeds, i_feed + 1 );
if( p_xml_reader )
- xml_ReaderDelete( p_xml, p_xml_reader );
+ xml_ReaderDelete( p_xml_reader );
if( p_stream )
stream_Delete( p_stream );
if( p_xml )