]> git.sesse.net Git - vlc/blobdiff - modules/codec/zvbi.c
Fixed rawvideo packetizer.
[vlc] / modules / codec / zvbi.c
index 759d1408de3a88f876de025abf5e4cb858b30e52..868d03747d5704c2a8616b1b3aa941ff6946d973 100644 (file)
@@ -79,23 +79,23 @@ 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( N_("VBI & Teletext") );
-    set_capability( "decoder", 51 );
-    set_category( CAT_INPUT );
-    set_subcategory( SUBCAT_INPUT_SCODEC );
-    set_callbacks( Open, Close );
+vlc_module_begin ()
+    set_description( N_("VBI and Teletext decoder") )
+    set_shortname( N_("VBI & Teletext") )
+    set_capability( "decoder", 51 )
+    set_category( CAT_INPUT )
+    set_subcategory( SUBCAT_INPUT_SCODEC )
+    set_callbacks( Open, Close )
 
     add_integer( "vbi-page", 100, NULL,
                  PAGE_TEXT, PAGE_LONGTEXT, false );
     add_bool( "vbi-opaque", true, NULL,
                  OPAQUE_TEXT, OPAQUE_LONGTEXT, false );
-    add_integer( "vbi-position", 4, NULL, POS_TEXT, POS_LONGTEXT, false );
+    add_integer( "vbi-position", 4, NULL, POS_TEXT, POS_LONGTEXT, false )
         change_integer_list( pi_pos_values, ppsz_pos_descriptions, NULL );
     add_bool( "vbi-text", false, NULL,
               TELX_TEXT, TELX_LONGTEXT, false );
-vlc_module_end();
+vlc_module_end ()
 
 /****************************************************************************
  * Local structures
@@ -418,12 +418,12 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
     }
     else
     {
-        picture_t *p_pic = &p_spu->p_region->picture;
+        picture_t *p_pic = p_spu->p_region->p_picture;
 
         /* ZVBI is stupid enough to assume pitch == width */
         p_pic->p->i_pitch = 4 * fmt.i_width;
         vbi_draw_vt_page( &p_page, ZVBI_PIXFMT_RGBA32,
-                          p_spu->p_region->picture.p->p_pixels, 1, 1 );
+                          p_spu->p_region->p_picture->p->p_pixels, 1, 1 );
 
         vlc_mutex_lock( &p_sys->lock );
         memcpy( p_sys->nav_link, &p_page.nav_link, sizeof( p_sys->nav_link )) ;
@@ -441,7 +441,7 @@ error:
     vbi_unref_page( &p_page );
     if( p_spu != NULL )
     {
-        p_dec->pf_spu_buffer_del( p_dec, p_spu );
+        decoder_DeleteSubpicture( p_dec, p_spu );
         p_spu = NULL;
     }
 
@@ -459,7 +459,7 @@ static subpicture_t *Subpicture( decoder_t *p_dec, video_format_t *p_fmt,
 
     /* If there is a page or sub to render, then we do that here */
     /* Create the subpicture unit */
-    p_spu = p_dec->pf_spu_buffer_new( p_dec );
+    p_spu = decoder_NewSubpicture( p_dec );
     if( !p_spu )
     {
         msg_Warn( p_dec, "can't get spu buffer" );
@@ -483,11 +483,11 @@ static subpicture_t *Subpicture( decoder_t *p_dec, video_format_t *p_fmt,
     }
     fmt.i_x_offset = fmt.i_y_offset = 0;
 
-    p_spu->p_region = p_spu->pf_create_region( VLC_OBJECT(p_dec), &fmt );
+    p_spu->p_region = subpicture_region_New( &fmt );
     if( p_spu->p_region == NULL )
     {
         msg_Err( p_dec, "cannot allocate SPU region" );
-        p_dec->pf_spu_buffer_del( p_dec, p_spu );
+        decoder_DeleteSubpicture( p_dec, p_spu );
         return NULL;
     }
 
@@ -495,20 +495,14 @@ static subpicture_t *Subpicture( decoder_t *p_dec, video_format_t *p_fmt,
     p_spu->p_region->i_y = 0;
     p_spu->p_region->i_align = i_align;
 
-    /* Normal text subs, easy markup */
-    p_spu->i_flags = SUBPICTURE_ALIGN_BOTTOM;
-
     p_spu->i_start = i_pts;
     p_spu->i_stop = 0;
     p_spu->b_ephemer = true;
     p_spu->b_absolute = false;
-    p_spu->b_pausable = true;
 
     if( !b_text )
     {
-        p_spu->i_width =
         p_spu->i_original_picture_width = fmt.i_width;
-        p_spu->i_height =
         p_spu->i_original_picture_height = fmt.i_height;
     }