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

ib subversion at mplayerhq.hu
Tue Mar 25 13:25:10 CET 2014


Author: ib
Date: Tue Mar 25 13:25:09 2014
New Revision: 37062

Log:
Detect audio AC3/DTS pass-through S/PDIF.

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

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Tue Mar 25 01:15:02 2014	(r37061)
+++ trunk/gui/interface.c	Tue Mar 25 13:25:09 2014	(r37062)
@@ -48,6 +48,7 @@
 #include "input/input.h"
 #include "libaf/equalizer.h"
 #include "libavutil/common.h"
+#include "libmpcodecs/ad.h"
 #include "libmpcodecs/dec_audio.h"
 #include "libmpcodecs/dec_video.h"
 #include "libmpcodecs/vd.h"
@@ -328,6 +329,7 @@ int gui(int what, void *data)
     int idata = (intptr_t)data, msg, state;
     stream_t *stream = NULL;
     sh_audio_t *sh_audio;
+    const ad_functions_t *ad;
     mixer_t *mixer;
     float l, r, b;
     plItem *next = NULL;
@@ -702,6 +704,9 @@ int gui(int what, void *data)
 
         sh_audio = data;
 
+        ad = sh_audio->ad_driver;
+        guiInfo.AudioPassthrough = (gstrcmp(ad->info->short_name, "hwac3") == 0);
+
         guiInfo.AudioChannels = sh_audio ? sh_audio->channels : 0;
 
         if (guiInfo.AudioChannels < 2)

Modified: trunk/gui/interface.h
==============================================================================
--- trunk/gui/interface.h	Tue Mar 25 01:15:02 2014	(r37061)
+++ trunk/gui/interface.h	Tue Mar 25 13:25:09 2014	(r37062)
@@ -108,6 +108,8 @@ typedef struct {
     int StreamType;
     int AudioChannels;
 
+    int AudioPassthrough;
+
     int AudioStreams;
     stream_language_t AudioStream[32];
 

Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c	Tue Mar 25 01:15:02 2014	(r37061)
+++ trunk/gui/ui/actions.c	Tue Mar 25 13:25:09 2014	(r37062)
@@ -707,6 +707,7 @@ void uiUnsetMedia(int totals)
     guiInfo.VideoWidth    = 0;
     guiInfo.VideoHeight   = 0;
     guiInfo.AudioChannels = 0;
+    guiInfo.AudioPassthrough = False;
     guiInfo.RunningTime   = 0;
 
     if (totals) {

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	Tue Mar 25 01:15:02 2014	(r37061)
+++ trunk/gui/win32/interface.c	Tue Mar 25 13:25:09 2014	(r37062)
@@ -60,6 +60,7 @@
 #include "libvo/video_out.h"
 #include "libao2/audio_out.h"
 #include "access_mpcontext.h"
+#include "libmpcodecs/ad.h"
 #include "libmpcodecs/vd.h"
 #include "libmpcodecs/dec_audio.h"
 #include "gui/ui/actions.h"
@@ -561,6 +562,7 @@ int gui(int what, void *data)
     int idata = (intptr_t) data;
     stream_t *stream;
     sh_audio_t *sh_audio;
+    const ad_functions_t *ad;
 #ifdef CONFIG_DVDREAD
     dvd_priv_t *dvdp;
 #endif
@@ -623,6 +625,8 @@ int gui(int what, void *data)
         case GUI_SET_AUDIO:
         {
             sh_audio = data;
+            ad = sh_audio->ad_driver;
+            guiInfo.AudioPassthrough = (gstrcmp(ad->info->short_name, "hwac3") == 0);
             guiInfo.AudioChannels = sh_audio ? sh_audio->channels : 0;
             if (sh_audio && !guiInfo.sh_video) guiInfo.VideoWindow = FALSE;
             if(IsWindowVisible(mygui->videowindow) && !guiInfo.VideoWindow)
@@ -793,6 +797,7 @@ int gui(int what, void *data)
           guiInfo.ElapsedTime = 0;
           guiInfo.Position = 0;
           guiInfo.AudioChannels = 0;
+          guiInfo.AudioPassthrough = FALSE;
 
           guiInfo.Track = 1;
           guiInfo.Chapter = 1;


More information about the MPlayer-cvslog mailing list