]> git.sesse.net Git - vlc/blobdiff - src/video_output/video_text.c
Used subpicture_updater_t for vout_OSDEpg.
[vlc] / src / video_output / video_text.c
index d9383c602e24931a7dde657280df9f3b9c1ec474..003a630ad90f9c658a129a9b80988a43d6d6684b 100644 (file)
@@ -24,6 +24,7 @@
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
+#include <assert.h>
 
 #include <vlc_common.h>
 #include <vlc_vout.h>
@@ -31,6 +32,9 @@
 #include <vlc_filter.h>
 #include <vlc_osd.h>
 
+/* TODO remove access to private vout data */
+#include "vout_internal.h"
+
 /**
  * \brief Show text on the video for some time
  * \param p_vout pointer to the vout the text is to be showed on
@@ -78,7 +82,7 @@ int vout_ShowTextAbsolute( vout_thread_t *p_vout, int i_channel,
 
     if( !psz_string ) return VLC_EGENERIC;
 
-    p_spu = subpicture_New();
+    p_spu = subpicture_New( NULL );
     if( !p_spu )
         return VLC_EGENERIC;
 
@@ -110,7 +114,7 @@ int vout_ShowTextAbsolute( vout_thread_t *p_vout, int i_channel,
     if( p_style )
         p_spu->p_region->p_style = text_style_Duplicate( p_style );
 
-    spu_DisplaySubpicture( p_vout->p_spu, p_spu );
+    spu_DisplaySubpicture( vout_GetSpu( p_vout ), p_spu );
 
     return VLC_SUCCESS;
 }
@@ -139,11 +143,11 @@ void vout_OSDMessage( vlc_object_t *p_caller, int i_channel,
         if( vasprintf( &psz_string, psz_format, args ) != -1 )
         {
             vout_ShowTextRelative( p_vout, i_channel, psz_string, NULL,
-                                   OSD_ALIGN_TOP|OSD_ALIGN_RIGHT,
-                                   30 + p_vout->fmt_in.i_width
-                                      - p_vout->fmt_in.i_visible_width
-                                      - p_vout->fmt_in.i_x_offset,
-                                   20 + p_vout->fmt_in.i_y_offset, 1000000 );
+                                   SUBPICTURE_ALIGN_TOP|SUBPICTURE_ALIGN_RIGHT,
+                                   30 + p_vout->p->fmt_in.i_width
+                                      - p_vout->p->fmt_in.i_visible_width
+                                      - p_vout->p->fmt_in.i_x_offset,
+                                   20 + p_vout->p->fmt_in.i_y_offset, 1000000 );
             free( psz_string );
         }
         vlc_object_release( p_vout );