]> git.sesse.net Git - vlc/blobdiff - modules/codec/realvideo.c
Merged mp1v/mp2v codecs.
[vlc] / modules / codec / realvideo.c
index 60e43fb5e9e3fe6cc59af3ec194a4d0cc79e1cf3..c89068104566d160ed9b08c88b3d2f92a75030a4 100644 (file)
@@ -146,15 +146,15 @@ static void * load_syms(decoder_t *p_dec, const char *path)
 {
     void *handle;
 
-    msg_Dbg( p_dec, "opening win32 dll '%s'\n", path);
+    msg_Dbg( p_dec, "opening win32 dll '%s'", path);
 #ifdef LOADER
     Setup_LDT_Keeper();
 #endif
     handle = LoadLibraryA(path);
-    msg_Dbg( p_dec, "win32 real codec handle=%p  \n",handle);
+    msg_Dbg( p_dec, "win32 real codec handle=%p",handle);
     if (!handle)
     {
-        msg_Err( p_dec, "Error loading dll\n");
+        msg_Err( p_dec, "Error loading dll");
         return NULL;
     }
 
@@ -168,7 +168,7 @@ static void * load_syms(decoder_t *p_dec, const char *path)
         dll_type = 1;
         return handle;
     }
-    msg_Err( p_dec, "Error resolving symbols! (version incompatibility?)\n");
+    msg_Err( p_dec, "Error resolving symbols! (version incompatibility?)");
     FreeLibrary(handle);
     return NULL; // error
 }
@@ -177,12 +177,12 @@ static void * load_syms_linux(decoder_t *p_dec, const char *path)
 {
     void *handle;
 
-    msg_Dbg( p_dec, "opening shared obj '%s'\n", path);
+    msg_Dbg( p_dec, "opening shared obj '%s'", path);
 
     handle = dlopen (path, RTLD_LAZY);
     if (!handle) 
     {
-        msg_Err( p_dec,"Error: %s\n",dlerror());
+        msg_Err( p_dec,"Error: %s",dlerror());
         return NULL;
     }
 
@@ -197,7 +197,7 @@ static void * load_syms_linux(decoder_t *p_dec, const char *path)
         return handle;
     }
 
-    msg_Err( p_dec,"Error resolving symbols! (version incompatibility?)\n");
+    msg_Err( p_dec,"Error resolving symbols! (version incompatibility?)");
     dlclose(handle);
     return 0;
 }
@@ -327,7 +327,7 @@ static int InitVideo(decoder_t *p_dec)
     }
 
     /* setup rv30 codec (codec sub-type and image dimensions): */
-    /*if ( p_dec->fmt_in.i_codec == VLC_FOURCC('R','V','3','0') )*/
+    /*if ( p_dec->fmt_in.i_codec == VLC_CODEC_RV30 )*/
     if (p_vide[1]>=0x20200002)
     {
         int i, cmsg_cnt;
@@ -347,10 +347,10 @@ static int InitVideo(decoder_t *p_dec)
             (*rvyuv_custom_message)(&cmsg_data,p_sys->handle);
     }
     /*
-    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_FOURCC( 'Y','V','1','2' ));
-    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_FOURCC( 'Y','U','Y','2' ));
+    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_CODEC_YV12);
+    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_CODEC_YUYV);
      */
-    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_FOURCC( 'I', '4', '2', '0'));
+    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_CODEC_I420);
      
     p_dec->fmt_out.video.i_width = p_dec->fmt_in.video.i_width;
     p_dec->fmt_out.video.i_height= p_dec->fmt_in.video.i_height;
@@ -376,10 +376,10 @@ static int Open( vlc_object_t *p_this )
 
     switch ( p_dec->fmt_in.i_codec )
     {
-    case VLC_FOURCC('R','V','1','0')
-    case VLC_FOURCC('R','V','2','0')
-    case VLC_FOURCC('R','V','3','0'):
-    case VLC_FOURCC('R','V','4','0')
+    case VLC_CODEC_RV10
+    case VLC_CODEC_RV20
+    case VLC_CODEC_RV30:
+    case VLC_CODEC_RV40
         p_dec->p_sys = NULL;
         p_dec->pf_decode_video = DecodeVideo;
         return InitVideo(p_dec);
@@ -435,8 +435,7 @@ static void Close( vlc_object_t *p_this )
 
     vlc_mutex_unlock( &rm_mutex );
 
-    if ( p_sys )
-        free( p_sys );
+    free( p_sys );
 }
 
 /*****************************************************************************
@@ -514,7 +513,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
              || p_dec->fmt_in.video.i_height  != transform_out[4] )
             {
                 msg_Warn(p_dec, "Warning, Real's Header give a wrong "
-                         "information about media's width and height!\n"
+                         "information about media's width and height!"
                          "\tRealHeader: \t %d X %d  \t %d X %d",
                          p_dec->fmt_in.video.i_width,
                          p_dec->fmt_in.video.i_height,