]> git.sesse.net Git - vlc/blobdiff - modules/demux/mpc.c
libvlccore: fix AUTO_ADJUST_PTS_DELAY short comment.
[vlc] / modules / demux / mpc.c
index 2a420e02279d36cd1bce9c0c69a1db45fec46aba..d6d4ed3ea4378a28be242009694cd1cb0b7044e4 100644 (file)
@@ -28,7 +28,8 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_demux.h>
 #include <vlc_input.h>
 #include <vlc_codec.h>
@@ -54,8 +55,8 @@ static void Close ( vlc_object_t * );
 vlc_module_begin();
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_DEMUX );
-    set_description( _("MusePack demuxer") );
-    set_capability( "demux2", 145 );
+    set_description( N_("MusePack demuxer") );
+    set_capability( "demux", 145 );
 
     set_callbacks( Open, Close );
     add_shortcut( "mpc" );
@@ -111,9 +112,9 @@ static int Open( vlc_object_t * p_this )
         if( !p_demux->b_force )
         {
             /* Check file name extension */
-            if( !demux2_IsPathExtension( p_demux, ".mpc" ) &&
-                !demux2_IsPathExtension( p_demux, ".mp+" ) &&
-                !demux2_IsPathExtension( p_demux, ".mpp" ) )
+            if( !demux_IsPathExtension( p_demux, ".mpc" ) &&
+                !demux_IsPathExtension( p_demux, ".mp+" ) &&
+                !demux_IsPathExtension( p_demux, ".mpp" ) )
                 return VLC_EGENERIC;
         }
     }
@@ -172,16 +173,16 @@ static int Open( vlc_object_t * p_this )
                     fmt.audio.i_bitspersample;
     if( p_sys->info.peak_title > 0 )
     {
-        fmt.audio_replay_gain.pb_peak[AUDIO_REPLAY_GAIN_TRACK] = VLC_TRUE;
+        fmt.audio_replay_gain.pb_peak[AUDIO_REPLAY_GAIN_TRACK] = true;
         fmt.audio_replay_gain.pf_peak[AUDIO_REPLAY_GAIN_TRACK] = (float)p_sys->info.peak_title / 32767.0;
-        fmt.audio_replay_gain.pb_gain[AUDIO_REPLAY_GAIN_TRACK] = VLC_TRUE;
+        fmt.audio_replay_gain.pb_gain[AUDIO_REPLAY_GAIN_TRACK] = true;
         fmt.audio_replay_gain.pf_gain[AUDIO_REPLAY_GAIN_TRACK] = (float)p_sys->info.gain_title / 100.0;
     }
     if( p_sys->info.peak_album > 0 )
     {
-        fmt.audio_replay_gain.pb_peak[AUDIO_REPLAY_GAIN_ALBUM] = VLC_TRUE;
+        fmt.audio_replay_gain.pb_peak[AUDIO_REPLAY_GAIN_ALBUM] = true;
         fmt.audio_replay_gain.pf_peak[AUDIO_REPLAY_GAIN_ALBUM] = (float)p_sys->info.peak_album / 32767.0;
-        fmt.audio_replay_gain.pb_gain[AUDIO_REPLAY_GAIN_ALBUM] = VLC_TRUE;
+        fmt.audio_replay_gain.pb_gain[AUDIO_REPLAY_GAIN_ALBUM] = true;
         fmt.audio_replay_gain.pf_gain[AUDIO_REPLAY_GAIN_ALBUM] = (float)p_sys->info.gain_album / 100.0;
     }
 
@@ -226,7 +227,7 @@ static int Demux( demux_t *p_demux )
     /* */
     p_data->i_buffer = i_ret * sizeof(MPC_SAMPLE_FORMAT) * p_sys->info.channels;
     p_data->i_dts = p_data->i_pts =
-            1 + I64C(1000000) * p_sys->i_position / p_sys->info.sample_freq;
+            1 + INT64_C(1000000) * p_sys->i_position / p_sys->info.sample_freq;
 
     es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_data->i_dts );
 
@@ -246,18 +247,18 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
     demux_sys_t *p_sys = p_demux->p_sys;
     double   f, *pf;
     int64_t i64, *pi64;
-    vlc_bool_t *pb_bool;
+    bool *pb_bool;
 
     switch( i_query )
     {
         case DEMUX_HAS_UNSUPPORTED_META:
-            pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
-            *pb_bool = VLC_TRUE;
+            pb_bool = (bool*)va_arg( args, bool* );
+            *pb_bool = true;
             return VLC_SUCCESS;
 
         case DEMUX_GET_LENGTH:
             pi64 = (int64_t*)va_arg( args, int64_t * );
-            *pi64 = I64C(1000000) * p_sys->info.pcm_samples /
+            *pi64 = INT64_C(1000000) * p_sys->info.pcm_samples /
                         p_sys->info.sample_freq;
             return VLC_SUCCESS;
 
@@ -272,7 +273,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 
         case DEMUX_GET_TIME:
             pi64 = (int64_t*)va_arg( args, int64_t * );
-            *pi64 = I64C(1000000) * p_sys->i_position /
+            *pi64 = INT64_C(1000000) * p_sys->i_position /
                         p_sys->info.sample_freq;
             return VLC_SUCCESS;
 
@@ -327,7 +328,7 @@ mpc_int32_t ReaderGetSize( void *p_private )
 mpc_bool_t ReaderCanSeek( void *p_private )
 {
     demux_t *p_demux = (demux_t*)p_private;
-    vlc_bool_t b_canseek;
+    bool b_canseek;
 
     stream_Control( p_demux->s, STREAM_CAN_SEEK, &b_canseek );
     return b_canseek;