]> git.sesse.net Git - vlc/blobdiff - modules/codec/tarkin.c
Various shortnames forgotten.
[vlc] / modules / codec / tarkin.c
index 256a21de7473a56875b6995ce9201a6a8033051b..2a35e496f3c2374315729c50df90efd9080c9b22 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <vlc/vlc.h>
-#include <vlc/decoder.h>
-
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
+#include <vlc_codec.h>
+#include <vlc_vout.h>
 #include <ogg/ogg.h>
 
 /* FIXME */
@@ -71,14 +76,14 @@ static void tarkin_CopyPicture( decoder_t *, picture_t *, uint8_t *, int );
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-vlc_module_begin();
-    set_description( _("Tarkin decoder module") );
-    set_capability( "decoder", 100 );
-    set_category( CAT_INPUT );
-    set_subcategory( SUBCAT_INPUT_VCODEC );
-    set_callbacks( OpenDecoder, CloseDecoder );
-    add_shortcut( "tarkin" );
-vlc_module_end();
+vlc_module_begin ()
+    set_description( N_("Tarkin decoder module") )
+    set_capability( "decoder", 100 )
+    set_category( CAT_INPUT )
+    set_subcategory( SUBCAT_INPUT_VCODEC )
+    set_callbacks( OpenDecoder, CloseDecoder )
+    add_shortcut( "tarkin" )
+vlc_module_end ()
 
 /*****************************************************************************
  * OpenDecoder: probe the decoder and return score
@@ -96,10 +101,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     /* Allocate the memory needed to store the decoder's structure */
     if( ( p_dec->p_sys = p_sys =
           (decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL )
-    {
-        msg_Err( p_dec, "out of memory" );
-        return VLC_EGENERIC;
-    }
+        return VLC_ENOMEM;
 
     /* Set output properties */
     p_dec->fmt_out.i_cat = VIDEO_ES;
@@ -264,7 +266,7 @@ static picture_t *DecodePacket( decoder_t *p_dec, block_t **pp_block,
         p_dec->fmt_out.i_codec = i_chroma;
 
         /* Get a new picture */
-        if( (p_pic = p_dec->pf_vout_buffer_new( p_dec )) )
+        if( (p_pic = decoder_NewPicture( p_dec )) )
         {
             tarkin_CopyPicture( p_dec, p_pic, rgb, i_stride );
 
@@ -310,7 +312,7 @@ static void tarkin_CopyPicture( decoder_t *p_dec, picture_t *p_pic,
 
         for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ )
         {
-            p_dec->p_libvlc->pf_memcpy( p_dst, p_src, i_src_stride );
+            vlc_memcpy( p_dst, p_src, i_src_stride );
 
             p_src += i_src_stride;
             p_dst += i_dst_stride;