[vlc-commits] aout_Format(s)Print: use vlc_object rather than audio_output
Rémi Denis-Courmont
git at videolan.org
Sat Aug 6 19:39:20 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 6 20:38:58 2011 +0300| [26b038f3e8c3e58317fb6db3503208eafb04e01d] | committer: Rémi Denis-Courmont
aout_Format(s)Print: use vlc_object rather than audio_output
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=26b038f3e8c3e58317fb6db3503208eafb04e01d
---
include/vlc_aout.h | 4 +++-
src/audio_output/aout_internal.h | 6 +++++-
src/audio_output/common.c | 24 +++++++++++++-----------
3 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/include/vlc_aout.h b/include/vlc_aout.h
index 4fb0525..f5eaafb 100644
--- a/include/vlc_aout.h
+++ b/include/vlc_aout.h
@@ -234,7 +234,9 @@ static inline unsigned aout_FormatNbChannels(const audio_sample_format_t *fmt)
VLC_API unsigned int aout_BitsPerSample( vlc_fourcc_t i_format ) VLC_USED;
VLC_API void aout_FormatPrepare( audio_sample_format_t * p_format );
-VLC_API void aout_FormatPrint( audio_output_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format );
+VLC_API void aout_FormatPrint(vlc_object_t *, const char *,
+ const audio_sample_format_t *);
+#define aout_FormatPrint(o, t, f) aout_FormatPrint(VLC_OBJECT(o), t, f)
VLC_API const char * aout_FormatPrintChannels( const audio_sample_format_t * ) VLC_USED;
VLC_API void aout_VolumeNoneInit( audio_output_t * );
diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index 08681ef..8fe921c 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -168,7 +168,11 @@ aout_buffer_t *aout_FifoPop( aout_fifo_t * p_fifo ) VLC_USED;
void aout_FifoReset( aout_fifo_t * );
void aout_FifoMoveDates( aout_fifo_t *, mtime_t );
void aout_FifoDestroy( aout_fifo_t * p_fifo );
-void aout_FormatsPrint( audio_output_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format1, const audio_sample_format_t * p_format2 );
+void aout_FormatsPrint(vlc_object_t *, const char *,
+ const audio_sample_format_t *,
+ const audio_sample_format_t *);
+#define aout_FormatsPrint(o, t, a, b) \
+ aout_FormatsPrint(VLC_OBJECT(o), t, a, b)
bool aout_ChangeFilterString( vlc_object_t *, audio_output_t *, const char *psz_variable, const char *psz_name, bool b_add );
/* From dec.c */
diff --git a/src/audio_output/common.c b/src/audio_output/common.c
index 190b7fb..2ca195f 100644
--- a/src/audio_output/common.c
+++ b/src/audio_output/common.c
@@ -290,26 +290,28 @@ const char * aout_FormatPrintChannels( const audio_sample_format_t * p_format )
return "ERROR";
}
-/*****************************************************************************
- * aout_FormatPrint : print a format in a human-readable form
- *****************************************************************************/
-void aout_FormatPrint( audio_output_t * p_aout, const char * psz_text,
- const audio_sample_format_t * p_format )
+#undef aout_FormatPrint
+/**
+ * Prints an audio sample format in a human-readable form.
+ */
+void aout_FormatPrint( vlc_object_t *obj, const char *psz_text,
+ const audio_sample_format_t *p_format )
{
- msg_Dbg( p_aout, "%s '%4.4s' %d Hz %s frame=%d samples/%d bytes", psz_text,
+ msg_Dbg( obj, "%s '%4.4s' %d Hz %s frame=%d samples/%d bytes", psz_text,
(char *)&p_format->i_format, p_format->i_rate,
aout_FormatPrintChannels( p_format ),
p_format->i_frame_length, p_format->i_bytes_per_frame );
}
-/*****************************************************************************
- * aout_FormatsPrint : print two formats in a human-readable form
- *****************************************************************************/
-void aout_FormatsPrint( audio_output_t * p_aout, const char * psz_text,
+#undef aout_FormatsPrint
+/**
+ * Prints two formats in a human-readable form
+ */
+void aout_FormatsPrint( vlc_object_t *obj, const char * psz_text,
const audio_sample_format_t * p_format1,
const audio_sample_format_t * p_format2 )
{
- msg_Dbg( p_aout, "%s '%4.4s'->'%4.4s' %d Hz->%d Hz %s->%s",
+ msg_Dbg( obj, "%s '%4.4s'->'%4.4s' %d Hz->%d Hz %s->%s",
psz_text,
(char *)&p_format1->i_format, (char *)&p_format2->i_format,
p_format1->i_rate, p_format2->i_rate,
More information about the vlc-commits
mailing list