]> git.sesse.net Git - vlc/blobdiff - modules/access/cdda/callback.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / access / cdda / callback.c
index cf2c76cc6a9ae1cd8b4d6ec5ad788b7fb13f6fe6..b3c0e3119a6776f45d3fd5e517f54b1a5100b088 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * callback.c : Callbacks for CD digital audio input module
  *****************************************************************************
- * Copyright (C) 2004 VideoLAN
- * $Id: callback.c 8606 2004-08-31 18:32:54Z rocky $
+ * Copyright (C) 2004 the VideoLAN team
+ * $Id$
  *
  * Authors: Rocky Bernstein <rocky@panix.com>
  *
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include "callback.h"
 #include "cdda.h"
 
 int
-E_(CDDADebugCB)   ( vlc_object_t *p_this, const char *psz_name,
+CDDADebugCB   ( vlc_object_t *p_this, const char *psz_name,
                     vlc_value_t oldval, vlc_value_t val, void *p_data )
 {
     cdda_data_t *p_cdda;
@@ -34,9 +34,9 @@ E_(CDDADebugCB)   ( vlc_object_t *p_this, const char *psz_name,
 
     p_cdda = (cdda_data_t *)p_cdda_input->p_sys;
 
-    if (p_cdda->i_debug & (INPUT_DBG_CALL|INPUT_DBG_EXT)) 
+    if (p_cdda->i_debug & (INPUT_DBG_CALL|INPUT_DBG_EXT))
     {
-        msg_Dbg( p_cdda_input, "Old debug (x%0x) %d, new debug (x%0x) %d",
+        msg_Dbg( p_cdda_input, "old debug (x%0x) %d, new debug (x%0x) %d",
                  p_cdda->i_debug, p_cdda->i_debug, val.i_int, val.i_int);
     }
     p_cdda->i_debug = val.i_int;
@@ -46,7 +46,7 @@ E_(CDDADebugCB)   ( vlc_object_t *p_this, const char *psz_name,
 /* FIXME: could probably shorten some of the below boilerplate code...
 */
 int
-E_(CDDBEnabledCB)   ( vlc_object_t *p_this, const char *psz_name,
+CDDBEnabledCB   ( vlc_object_t *p_this, const char *psz_name,
                       vlc_value_t oldval, vlc_value_t val, void *p_data )
 {
     cdda_data_t *p_cdda;
@@ -56,9 +56,9 @@ E_(CDDBEnabledCB)   ( vlc_object_t *p_this, const char *psz_name,
     p_cdda = (cdda_data_t *)p_cdda_input->p_sys;
 
 #ifdef HAVE_LIBCDDB
-    if (p_cdda->i_debug & (INPUT_DBG_CALL|INPUT_DBG_EXT)) 
+    if (p_cdda->i_debug & (INPUT_DBG_CALL|INPUT_DBG_EXT))
     {
-        msg_Dbg( p_cdda_input, "Old CDDB Enabled (x%0x) %d, new (x%0x) %d",
+        msg_Dbg( p_cdda_input, "old CDDB Enabled (x%0x) %d, new (x%0x) %d",
                  p_cdda->b_cddb_enabled, p_cdda->b_cddb_enabled,
                  val.b_bool, val.b_bool);
     }
@@ -68,7 +68,7 @@ E_(CDDBEnabledCB)   ( vlc_object_t *p_this, const char *psz_name,
 }
 
 int
-E_(CDTextEnabledCB)   ( vlc_object_t *p_this, const char *psz_name,
+CDTextEnabledCB   ( vlc_object_t *p_this, const char *psz_name,
                         vlc_value_t oldval, vlc_value_t val, void *p_data )
 {
     cdda_data_t *p_cdda;
@@ -79,16 +79,35 @@ E_(CDTextEnabledCB)   ( vlc_object_t *p_this, const char *psz_name,
 
     if (p_cdda->i_debug & (INPUT_DBG_CALL|INPUT_DBG_EXT))
     {
-        msg_Dbg( p_cdda_input, "Old CDText Enabled (x%0x) %d, new (x%0x) %d",
-                 p_cdda->b_cdtext_enabled, p_cdda->b_cdtext_enabled,
-                 val.b_bool, val.b_bool);
+        msg_Dbg( p_cdda_input, "old CDText Enabled %d, new %d",
+                 p_cdda->b_cdtext, val.b_bool);
     }
-    p_cdda->b_cdtext_enabled = val.b_bool;
+    p_cdda->b_cdtext = val.b_bool;
     return VLC_SUCCESS;
 }
 
 int
-E_(CDTextPreferCB)   ( vlc_object_t *p_this, const char *psz_name,
+CDDANavModeCB( vlc_object_t *p_this, const char *psz_name,
+                        vlc_value_t oldval, vlc_value_t val, void *p_data )
+{
+    cdda_data_t *p_cdda;
+
+    if (NULL == p_cdda_input) return VLC_EGENERIC;
+
+    p_cdda = (cdda_data_t *)p_cdda_input->p_sys;
+
+    if (p_cdda->i_debug & (INPUT_DBG_CALL|INPUT_DBG_EXT))
+    {
+        msg_Dbg( p_cdda_input,
+         "old Navigation Mode Enabled %d, new %d",
+                 p_cdda->b_nav_mode, val.b_bool);
+    }
+    p_cdda->b_nav_mode = val.b_bool;
+    return VLC_SUCCESS;
+}
+
+int
+CDTextPreferCB   ( vlc_object_t *p_this, const char *psz_name,
                        vlc_value_t oldval, vlc_value_t val, void *p_data )
 {
     cdda_data_t *p_cdda;
@@ -98,9 +117,9 @@ E_(CDTextPreferCB)   ( vlc_object_t *p_this, const char *psz_name,
     p_cdda = (cdda_data_t *)p_cdda_input->p_sys;
 
 #ifdef HAVE_LIBCDDB
-    if ( p_cdda->i_debug & (INPUT_DBG_CALL|INPUT_DBG_EXT)) 
+    if ( p_cdda->i_debug & (INPUT_DBG_CALL|INPUT_DBG_EXT))
     {
-        msg_Dbg( p_cdda_input, "Old CDText Prefer (x%0x) %d, new (x%0x) %d",
+        msg_Dbg( p_cdda_input, "old CDText Prefer (x%0x) %d, new (x%0x) %d",
                  p_cdda->b_cdtext_prefer, p_cdda->b_cdtext_prefer,
                  val.b_bool, val.b_bool);
     }
@@ -110,7 +129,7 @@ E_(CDTextPreferCB)   ( vlc_object_t *p_this, const char *psz_name,
 }
 
 int
-E_(CDDABlocksPerReadCB) ( vlc_object_t *p_this, const char *psz_name,
+CDDABlocksPerReadCB ( vlc_object_t *p_this, const char *psz_name,
                           vlc_value_t oldval, vlc_value_t val, void *p_data )
 {
     cdda_data_t *p_cdda;
@@ -119,9 +138,9 @@ E_(CDDABlocksPerReadCB) ( vlc_object_t *p_this, const char *psz_name,
 
     p_cdda = (cdda_data_t *)p_cdda_input->p_sys;
 
-    if (p_cdda->i_debug & (INPUT_DBG_CALL|INPUT_DBG_EXT)) 
+    if (p_cdda->i_debug & (INPUT_DBG_CALL|INPUT_DBG_EXT))
     {
-        msg_Dbg( p_cdda_input, "Old blocks per read: %d, new %d",
+        msg_Dbg( p_cdda_input, "old blocks per read: %d, new %d",
                  p_cdda->i_blocks_per_read, val.i_int);
     }
 
@@ -131,7 +150,7 @@ E_(CDDABlocksPerReadCB) ( vlc_object_t *p_this, const char *psz_name,
     else
     {
         msg_Warn( p_cdda_input,
-             "Number of blocks (%d) has to be between %d and %d. No change.",
+             "number of blocks (%d) has to be between %d and %d. No change.",
               val.i_int, MIN_BLOCKS_PER_READ, MAX_BLOCKS_PER_READ );
     }
     return VLC_SUCCESS;