Commit 7027d05f authored by Stéphane Borel's avatar Stéphane Borel

-moved warning message to debug message in spdif pass-through plugin

-changed a bit the wait time. It works better here, please test (Bozo ? 0:-)
parent 6cbaf162
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard * ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: ac3_spdif.c,v 1.1 2001/11/13 12:09:17 henri Exp $ * $Id: ac3_spdif.c,v 1.2 2001/11/14 03:38:11 stef Exp $
* *
* Authors: Stphane Borel <stef@via.ecp.fr> * Authors: Stphane Borel <stef@via.ecp.fr>
* Juha Yrjola <jyrjola@cc.hut.fi> * Juha Yrjola <jyrjola@cc.hut.fi>
...@@ -158,11 +158,12 @@ static int ac3_spdif_Run( decoder_config_t * p_config ) ...@@ -158,11 +158,12 @@ static int ac3_spdif_Run( decoder_config_t * p_config )
/* Handle the dates */ /* Handle the dates */
if( p_spdif->i_real_pts ) if( p_spdif->i_real_pts )
{ {
if(i_current_pts + i_frame_time != p_spdif->i_real_pts) mtime_t i_delta = p_spdif->i_real_pts - i_current_pts -
i_frame_time;
if( i_delta > i_frame_time || i_delta < -i_frame_time )
{ {
intf_WarnMsg( 2, "spdif warning: date discontinuity (%d)", intf_WarnMsg( 3, "spdif warning: date discontinuity (%d)",
p_spdif->i_real_pts - i_current_pts - i_delta );
i_frame_time );
} }
i_current_pts = p_spdif->i_real_pts; i_current_pts = p_spdif->i_real_pts;
p_spdif->i_real_pts = 0; p_spdif->i_real_pts = 0;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* aout_spdif: ac3 passthrough output * aout_spdif: ac3 passthrough output
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: aout_spdif.c,v 1.17 2001/10/13 15:34:21 stef Exp $ * $Id: aout_spdif.c,v 1.18 2001/11/14 03:38:11 stef Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
#include "audio_output.h" #include "audio_output.h"
#include "aout_common.h" #include "aout_common.h"
#define FRAME_TIME 32000
/***************************************************************************** /*****************************************************************************
* aout_SpdifThread: audio output thread that sends raw spdif data * aout_SpdifThread: audio output thread that sends raw spdif data
* to an external decoder * to an external decoder
...@@ -61,7 +59,7 @@ void aout_SpdifThread( aout_thread_t * p_aout ) ...@@ -61,7 +59,7 @@ void aout_SpdifThread( aout_thread_t * p_aout )
mtime_t m_old = 0; mtime_t m_old = 0;
intf_WarnMsg( 3, "aout info: starting spdif output loop" ); intf_DbgMsg( "aout debug: starting spdif output loop" );
while( !p_aout->b_die ) while( !p_aout->b_die )
{ {
...@@ -112,13 +110,13 @@ void aout_SpdifThread( aout_thread_t * p_aout ) ...@@ -112,13 +110,13 @@ void aout_SpdifThread( aout_thread_t * p_aout )
/* check continuity */ /* check continuity */
if( (m_play - m_old) != m_frame_time ) if( (m_play - m_old) != m_frame_time )
{ {
intf_WarnMsg( 6, "aout warning: long frame ? (%lld)", intf_DbgMsg( "aout debug: malformed frame ? (%lld)",
m_play - m_old ); m_play - m_old );
mwait( m_play ); mwait( m_play - m_frame_time );
} }
else else
{ {
mwait( m_play - 3* m_frame_time ); mwait( m_play - 2 * m_frame_time );
} }
m_old = m_play; m_old = m_play;
...@@ -128,20 +126,20 @@ void aout_SpdifThread( aout_thread_t * p_aout ) ...@@ -128,20 +126,20 @@ void aout_SpdifThread( aout_thread_t * p_aout )
} }
else else
{ {
intf_WarnMsg( 6, "aout info: late spdif frame" ); intf_DbgMsg( "aout debug: late spdif frame" );
} }
} }
else else
{ {
vlc_mutex_unlock( &p_aout->fifo[i_fifo].data_lock ); vlc_mutex_unlock( &p_aout->fifo[i_fifo].data_lock );
msleep( m_frame_time ); msleep( m_frame_time );
intf_WarnMsg( 6, "aout info: empty spdif fifo" ); intf_WarnMsg( 3, "aout warning: empty spdif fifo" );
} }
} }
} }
} }
intf_WarnMsg( 3, "aout info: exiting spdif loop" ); intf_DbgMsg( "aout debug: exiting spdif loop" );
vlc_mutex_lock( &p_aout->fifos_lock ); vlc_mutex_lock( &p_aout->fifos_lock );
for ( i_fifo = 0; i_fifo < AOUT_MAX_FIFOS; i_fifo++ ) for ( i_fifo = 0; i_fifo < AOUT_MAX_FIFOS; i_fifo++ )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment