[MPlayer-cvslog] r35556 - in trunk/gui: interface.c interface.h ui/actions.c ui/render.c

ib subversion at mplayerhq.hu
Sun Dec 2 02:44:25 CET 2012


Author: ib
Date: Sun Dec  2 02:44:24 2012
New Revision: 35556

Log:
Add video codec name to guiInfo structure.

Modified:
   trunk/gui/interface.c
   trunk/gui/interface.h
   trunk/gui/ui/actions.c
   trunk/gui/ui/render.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Sun Dec  2 01:44:03 2012	(r35555)
+++ trunk/gui/interface.c	Sun Dec  2 02:44:24 2012	(r35556)
@@ -34,6 +34,7 @@
 #include "wm/wsxdnd.h"
 
 #include "access_mpcontext.h"
+#include "codec-cfg.h"
 #include "config.h"
 #include "help_mp.h"
 #include "input/input.h"
@@ -652,6 +653,11 @@ int gui(int what, void *data)
 
         guiInfo.sh_video = data;
 
+        nfree(guiInfo.CodecName);
+
+        if (guiInfo.sh_video)
+            guiInfo.CodecName = strdup(guiInfo.sh_video->codec->name);
+
         state = (guiInfo.StreamType == STREAMTYPE_STREAM ? btnDisabled : btnReleased);
         btnSet(evForward10sec, state);
         btnSet(evBackward10sec, state);

Modified: trunk/gui/interface.h
==============================================================================
--- trunk/gui/interface.h	Sun Dec  2 01:44:03 2012	(r35555)
+++ trunk/gui/interface.h	Sun Dec  2 02:44:24 2012	(r35556)
@@ -94,6 +94,8 @@ typedef struct {
     sh_video_t *sh_video;
     af_stream_t *afilter;
 
+    char *CodecName;
+
     int VideoWindow;
     int VideoWidth;
     int VideoHeight;

Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c	Sun Dec  2 01:44:03 2012	(r35555)
+++ trunk/gui/ui/actions.c	Sun Dec  2 02:44:24 2012	(r35556)
@@ -291,6 +291,8 @@ void uiUnsetFile(void)
 {
     uiSetFile(NULL, NULL, STREAMTYPE_DUMMY);
 
+    nfree(guiInfo.CodecName);
+
     guiInfo.Track         = 0;
     guiInfo.Chapter       = 0;
     guiInfo.Angle         = 0;

Modified: trunk/gui/ui/render.c
==============================================================================
--- trunk/gui/ui/render.c	Sun Dec  2 01:44:03 2012	(r35555)
+++ trunk/gui/ui/render.c	Sun Dec  2 02:44:24 2012	(r35556)
@@ -27,9 +27,7 @@
 #include "gui/util/string.h"
 
 #include "access_mpcontext.h"
-#include "codec-cfg.h"
 #include "libavutil/avstring.h"
-#include "libmpdemux/stheader.h"
 #include "mixer.h"
 #include "osdep/timer.h"
 #include "stream/stream.h"
@@ -150,7 +148,7 @@ calclengthmmmmss:
                 break;
 
             case 'C':
-                snprintf(tmp, sizeof(tmp), "%s", guiInfo.sh_video ? guiInfo.sh_video->codec->name : "");
+                snprintf(tmp, sizeof(tmp), "%s", guiInfo.CodecName ? guiInfo.CodecName : "");
                 av_strlcat(trbuf, tmp, sizeof(trbuf));
                 break;
 


More information about the MPlayer-cvslog mailing list