[MPlayer-cvslog] r23414 - trunk/command.c

albeu subversion at mplayerhq.hu
Wed May 30 08:53:06 CEST 2007


Author: albeu
Date: Wed May 30 08:53:06 2007
New Revision: 23414

Log:
Add PRINT to the samplerate property.


Modified:
   trunk/command.c

Modified: trunk/command.c
==============================================================================
--- trunk/command.c	(original)
+++ trunk/command.c	Wed May 30 08:53:06 2007
@@ -499,6 +499,13 @@ static int mp_property_samplerate(m_opti
 {
     if (!mpctx->sh_audio)
 	return M_PROPERTY_UNAVAILABLE;
+    switch(action) {
+    case M_PROPERTY_PRINT:
+        if(!arg) return M_PROPERTY_ERROR;
+        *(char**)arg = malloc(16);
+        sprintf(*(char**)arg,"%d kHz",mpctx->sh_audio->samplerate/1000);
+        return M_PROPERTY_OK;
+    }
     return m_property_int_ro(prop, action, arg, mpctx->sh_audio->samplerate);
 }
 



More information about the MPlayer-cvslog mailing list