]> git.sesse.net Git - vlc/blobdiff - modules/codec/subtitles/t140.c
darwin_specific: remove debug leftover
[vlc] / modules / codec / subtitles / t140.c
index babbcf00daf608bd79e817c918c830f8ca553d81..c5d5dcbb1c8655b770295f30f494d1e71f2cb8bf 100644 (file)
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
-#include <vlc_vout.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_codec.h>
 #include <vlc_sout.h>
 
 static int  Open ( vlc_object_t * );
 static void Close( vlc_object_t * );
 
-vlc_module_begin();
-    add_submodule();
-    set_description( _("T.140 text encoder") );
-    set_capability( "encoder", 100 );
-    set_callbacks( Open, Close );
-vlc_module_end();
+vlc_module_begin ()
+    set_description( N_("T.140 text encoder") )
+    set_capability( "encoder", 100 )
+    set_callbacks( Open, Close )
+vlc_module_end ()
 
 
 static block_t *Encode ( encoder_t *, subpicture_t * );
@@ -48,7 +47,7 @@ static int Open( vlc_object_t *p_this )
 
     switch( p_enc->fmt_out.i_codec )
     {
-        case VLC_FOURCC('s','u','b','t'):
+        case VLC_CODEC_SUBT:
             if( ( p_enc->fmt_out.subs.psz_encoding != NULL )
              && strcasecmp( p_enc->fmt_out.subs.psz_encoding, "utf8" )
              && strcasecmp( p_enc->fmt_out.subs.psz_encoding, "UTF-8" ) )
@@ -56,19 +55,20 @@ static int Open( vlc_object_t *p_this )
                 msg_Err( p_this, "Only UTF-8 encoding supported" );
                 return VLC_EGENERIC;
             }
-        case VLC_FOURCC('t','1','4','0'):
+        case VLC_CODEC_ITU_T140:
             break;
 
         default:
             if( !p_enc->b_force )
                 return VLC_EGENERIC;
 
-            p_enc->fmt_out.i_codec = VLC_FOURCC('t','1','4','0');
+            p_enc->fmt_out.i_codec = VLC_CODEC_ITU_T140;
     }
 
     p_enc->p_sys = NULL;
 
     p_enc->pf_encode_sub = Encode;
+    p_enc->fmt_out.i_cat = SPU_ES;
     return VLC_SUCCESS;
 }
 
@@ -90,7 +90,7 @@ static block_t *Encode( encoder_t *p_enc, subpicture_t *p_spu )
 
     p_region = p_spu->p_region;
     if( ( p_region == NULL )
-     || ( p_region->fmt.i_chroma != VLC_FOURCC('T','E','X','T') )
+     || ( p_region->fmt.i_chroma != VLC_CODEC_TEXT )
      || ( p_region->psz_text == NULL ) )
         return NULL;