block_t *p_block;
long l_buffer_len;
- if( p_access->b_die )
+ if( !vlc_object_alive (p_access) )
return NULL;
l_buffer_len = dvb_GetBufferSize( p_access );
while( 1 )
{
- if( p_access->b_die || p_access->b_error ) return 0;
+ if( !vlc_object_alive (p_access) || p_access->b_error ) return 0;
/* Get new sample/frame from the elementary stream (blocking). */
vlc_mutex_lock( &p_sys->lock );
vlc_thread_ready( p_this );
- while( !p_sys->p_ev->b_die )
+ while( vlc_object_alive (p_sys->p_ev) )
{
while( ( result = poll( &(p_sys->raw1394_poll), 1, 200 ) ) < 0 )
{
if( p_sys->p_ev->b_die )
break;
}
- if( p_sys->p_ev->b_die )
+ if( !vlc_object_alive (p_sys->p_ev) )
break;
if( result > 0 && ( ( p_sys->raw1394_poll.revents & POLLIN )
|| ( p_sys->raw1394_poll.revents & POLLPRI ) ) )
/* Find if some data is available */
i_ret = poll( ufds, 2, 500 );
- if ( p_access->b_die )
+ if ( !vlc_object_alive (p_access) )
return NULL;
if ( i_ret < 0 )
#if HLCI_WAIT_CAM_READY
while( ca_msg.msg[8] == 0xff && ca_msg.msg[9] == 0xff )
{
- if( p_access->b_die ) return VLC_EGENERIC;
+ if( !vlc_object_alive (p_access) ) return VLC_EGENERIC;
msleep(1);
msg_Dbg( p_access, "CAM: please wait" );
APDUSend( p_access, 1, AOT_APPLICATION_INFO_ENQ, NULL, 0 );
var_AddCallback( p_ev->p_libvlc, "key-action", EventKey, p_ev );
/* main loop */
- while( !p_ev->b_die )
+ while( vlc_object_alive (p_ev) )
{
bool b_activated = false;
p_ev->b_clicked = false;
vlc_mutex_unlock( &p_ev->lock );
}
- if( p_vout && p_vout->b_die )
+ if( p_vout && !vlc_object_alive (p_vout) )
{
var_DelCallback( p_vout, "mouse-moved", EventMouse, p_ev );
var_DelCallback( p_vout, "mouse-clicked", EventMouse, p_ev );
p_sys->i_version = 0;
p_sys->b_seekable = false;
- if( p_access->b_die || Connect( p_access, 0 ) )
+ if( !vlc_object_alive (p_access) || Connect( p_access, 0 ) )
goto error;
#ifndef NDEBUG
free( psz );
- if( p_access->b_die || p_access->b_error )
+ if( !vlc_object_alive (p_access) || p_access->b_error )
{
Disconnect( p_access );
return -1;
goto error;
}
- if( p_access->b_die || p_access->b_error )
+ if( !vlc_object_alive (p_access) || p_access->b_error )
{
free( psz );
goto error;
Stop( p_access );
Start( p_access, i_packet * p_sys->asfh.i_min_data_packet_size );
- while( !p_access->b_die )
+ while( vlc_object_alive (p_access) )
{
msg_Warn( p_access, "GetPacket 1" );
if( GetPacket( p_access, &ck ) )
var_buffer_free( &buffer );
- while( !p_access->b_die )
+ while( vlc_object_alive (p_access) )
{
if( mms_HeaderMediaRead( p_access, MMS_PACKET_CMD ) < 0 )
{
}
}
- while( !p_access->b_die )
+ while( vlc_object_alive (p_access) )
{
if( mms_HeaderMediaRead( p_access, MMS_PACKET_CMD ) < 0 )
{
return -1;
}
- if( p_access->b_die || p_access->b_error ) return -1;
+ if( !vlc_object_alive (p_access) || p_access->b_error ) return -1;
//msg_Dbg( p_access, "NetFillBuffer: trying again (select)" );
{
int i_status;
- if( p_access->b_die )
+ if( !vlc_object_alive (p_access) )
return -1;
i_status = mms_ReceivePacket( p_access );
do
{
- if( p_access->b_die )
+ if( !vlc_object_alive (p_access) )
return 0;
ufd.revents = 0;
while( i_len_tmp < i_len )
{
- if( p_sys->p_thread->result_stop || p_access->info.b_eof || p_access->b_die )
+ if( p_sys->p_thread->result_stop || p_access->info.b_eof || !vlc_object_alive (p_access) )
{
p_access->info.b_eof = true;
return 0;
rtmp_init_handler( p_thread->rtmp_handler );
- while( !p_thread->b_die )
+ while( vlc_object_alive (p_thread) )
{
rtmp_packet = rtmp_read_net_packet( p_thread );
if( rtmp_packet != NULL )
return NULL;
}
- if( p_demux->b_die )
+ if( !vlc_object_alive (p_demux) )
{
return NULL;
}
do
{
- if( p_access->b_die )
+ if( !vlc_object_alive (p_access) )
return 0;
ufd.revents = 0;
dbg_print( INPUT_DBG_CALL, "intf initialized" );
/* Main loop */
- while( !p_intf->b_die )
+ while( vlc_object_alive (p_intf) )
{
vlc_mutex_lock( &p_intf->change_lock );
static int InitThread( intf_thread_t * p_intf )
{
/* We might need some locking here */
- if( !p_intf->b_die )
+ if( vlc_object_alive (p_intf) )
{
input_thread_t * p_input;
access_t *p_src = p_access->p_source;
block_t *p_block;
- while( !p_access->b_die )
+ while( vlc_object_alive (p_access) )
{
/* Get a new block from the source */
if( p_src->pf_block )
/* Read from file to fill up the fifo */
while( block_FifoSize( p_sys->p_fifo ) < TIMESHIFT_FIFO_MIN &&
- !p_access->b_die )
+ vlc_object_alive (p_access) )
{
p_block = ReadBlockFromFile( p_access );
if( !p_block ) break;
msg_Dbg( p_access, "timeshift: no more input data" );
- while( !p_access->b_die &&
+ while( vlc_object_alive (p_access) &&
(p_sys->p_read_list || block_FifoSize( p_sys->p_fifo ) ) )
{
/* Read from file to fill up the fifo */
while( block_FifoSize( p_sys->p_fifo ) < TIMESHIFT_FIFO_MIN &&
- !p_access->b_die && p_sys->p_read_list )
+ vlc_object_alive (p_access) && p_sys->p_read_list )
{
p_block = ReadBlockFromFile( p_access );
if( !p_block ) break;
{
vlc_thread_ready( p_pt );
- while( !p_pt->b_die )
+ while( vlc_object_alive (p_pt) )
if( avahi_simple_poll_iterate( p_pt->simple_poll, 100 ) != 0 )
break;
}
rtmp_init_handler( p_thread->rtmp_handler );
- while( !p_thread->b_die )
+ while( vlc_object_alive (p_thread) )
{
rtmp_packet = rtmp_read_net_packet( p_thread );
if( rtmp_packet != NULL )
mtime_t i_to_send = p_thread->i_group;
int i_dropped_packets = 0;
- while( !p_thread->b_die )
+ while( vlc_object_alive (p_thread) )
{
block_t *p_pk;
mtime_t i_date, i_sent;
/* Wait for the exact time to start playing (avoids resampling) */
vlc_mutex_lock( &p_sys->lock );
- while( !p_sys->start_date && !p_aout->b_die )
+ while( !p_sys->start_date && vlc_object_alive (p_aout) )
vlc_cond_wait( &p_sys->wait, &p_sys->lock );
vlc_mutex_unlock( &p_sys->lock );
- if( p_aout->b_die )
+ if( !vlc_object_alive (p_aout) )
goto cleanup;
mwait( p_sys->start_date - AOUT_PTS_TOLERANCE / 4 );
- while ( !p_aout->b_die )
+ while ( vlc_object_alive (p_aout) )
{
ALSAFill( p_aout );
}
* (stream is suspended and waiting for an application recovery) */
msg_Dbg( p_aout, "entering in suspend mode, trying to resume..." );
- while( !p_aout->b_die && !p_aout->p_libvlc->b_die &&
+ while( vlc_object_alive (p_aout) && vlc_object_alive (p_aout->p_libvlc) &&
( i_snd_rc = snd_pcm_resume( p_sys->p_snd_pcm ) ) == -EAGAIN )
{
msleep( 1000000 );
/* Wait here until Play() is called */
WaitForSingleObject( p_notif->event, INFINITE );
- if( !p_notif->b_die )
+ if( vlc_object_alive (p_notif) )
{
mwait( p_notif->start_date - AOUT_PTS_TOLERANCE / 2 );
}
last_time = mdate();
- while( !p_notif->b_die )
+ while( vlc_object_alive (p_notif) )
{
long l_read, l_free_slots;
mtime_t mtime = mdate();
struct aout_sys_t * p_sys = p_aout->output.p_sys;
PCMAudioPlayer * pPlayer = p_sys->pPlayer;
- while( !p_aout->b_die )
+ while( vlc_object_alive (p_aout) )
{
pPlayer->WaitForBuffer();
struct aout_sys_t * p_sys = p_aout->output.p_sys;
mtime_t next_date = 0;
- while ( !p_aout->b_die )
+ while ( vlc_object_alive (p_aout) )
{
aout_buffer_t * p_buffer = NULL;
int i_tmp, i_size;
}
}
- while( !p_aout->b_die && ! ( p_buffer =
+ while( vlc_object_alive (p_aout) && ! ( p_buffer =
aout_OutputNextBuffer( p_aout, next_date, true ) ) )
{
msleep( 1000 );
aout_sys_t *p_sys;
int i_err;
- while( !pa_thread->b_die )
+ while( vlc_object_alive (pa_thread) )
{
/* Wait for start of stream */
vlc_mutex_lock( &pa_thread->lock_signal );
if( uMsg != WOM_DONE ) return;
- if( p_aout->b_die ) return;
+ if( !vlc_object_alive (p_aout) ) return;
/* Find out the current latency */
for( i = 0; i < FRAMES_NUM; i++ )
b_sleek = p_aout->output.output.i_format == VLC_FOURCC('s','p','d','i');
// wait for first call to "play()"
- while( !p_sys->start_date && !p_aout->b_die )
+ while( !p_sys->start_date && vlc_object_alive (p_aout) )
WaitForSingleObject( p_sys->event, INFINITE );
- if( p_aout->b_die )
+ if( !vlc_object_alive (p_aout) )
return;
msg_Dbg( p_aout, "will start to play in %"PRId64" us",
p_aout->output.b_starving, msg);
next_date = mdate();
- while( !p_aout->b_die )
+ while( vlc_object_alive (p_aout) )
{
/* Cleanup and find out the current latency */
i_queued_frames = WaveOutClearDoneBuffers( p_sys );
- if( p_aout->b_die ) return;
+ if( !vlc_object_alive (p_aout) ) return;
/* Try to fill in as many frame buffers as possible */
for( i = 0; i < FRAMES_NUM; i++ )
}
}
- if( p_aout->b_die ) return;
+ if( !vlc_object_alive (p_aout) ) return;
/*
deal with the case that the loop didn't fillup the buffer to the
****************************************************************************/
static int FfmpegThread( struct thread_context_t *p_context )
{
- while ( !p_context->b_die && !p_context->b_error )
+ while ( vlc_object_alive (p_context) && !p_context->b_error )
{
vlc_mutex_lock( &p_context->lock );
- while ( !p_context->b_work && !p_context->b_die && !p_context->b_error )
+ while ( !p_context->b_work && vlc_object_alive (p_context) && !p_context->b_error )
{
vlc_cond_wait( &p_context->cond, &p_context->lock );
}
p_context->b_work = 0;
vlc_mutex_unlock( &p_context->lock );
- if ( p_context->b_die || p_context->b_error )
+ if ( !vlc_object_alive (p_context) || p_context->b_error )
break;
if ( p_context->pf_func )
#endif
/* Main loop */
- while( !p_intf->b_die )
+ while( vlc_object_alive (p_intf) )
{
/* if video output is dying, disassociate ourselves from it */
- if( p_vout && p_vout->b_die )
+ if( p_vout && !vlc_object_alive (p_vout) )
{
var_DelCallback( p_vout, "mouse-clicked", MouseEvent, p_intf );
vlc_object_release( p_vout );
static int InitThread( intf_thread_t * p_intf )
{
/* We might need some locking here */
- if( !p_intf->b_die )
+ if( vlc_object_alive (p_intf) )
{
input_thread_t * p_input;
decoder_t *p_cmml_decoder;
}
/* We need to check for quit commands here */
- if( p_dec->b_die )
+ if( !vlc_object_alive (p_dec) )
{
return VLC_EGENERIC;
}
/*
* video output
*/
- if( p_intf->p_sys->p_vout && p_intf->p_sys->p_vout->b_die )
+ if( p_intf->p_sys->p_vout && !vlc_object_alive (p_intf->p_sys->p_vout) )
{
var_DelCallback( p_intf->p_sys->p_vout, "mouse-moved",
MouseEvent, p_intf );
/* New input has been registered */
if( p_input )
{
- if( !p_input->b_dead || !p_input->b_die )
+ if( !p_input->b_dead || vlc_object_alive (p_input) )
{
char *psz_uri =
input_item_GetURI( input_GetItem( p_input ) );
}
}
- if( (p_input != NULL) && !p_input->b_dead && !p_input->b_die &&
+ if( (p_input != NULL) && !p_input->b_dead && vlc_object_alive (p_input) &&
(p_playlist != NULL) )
{
vlc_object_lock( p_playlist );
/* Take care of the video output */
- if( p_intf->p_sys->p_vout && p_intf->p_sys->p_vout->b_die )
+ if( p_intf->p_sys->p_vout && !vlc_object_alive (p_intf->p_sys->p_vout) )
{
var_DelCallback( p_intf->p_sys->p_vout, "mouse-moved",
MouseEvent, p_intf );
mtime_t i_time_begin = GetMoviePTS( p_sys );
int i_result;
- if( p_demux->b_die )
+ if( !vlc_object_alive (p_demux) )
break;
#if 0
/* FIXME: returns EOF too early for some mms streams */
* affect the reading speed too much. */
if( !(++i_loop_count % 1024) )
{
- if( p_demux->b_die ) return -1;
+ if( !vlc_object_alive (p_demux) ) return -1;
msleep( 10000 );
if( !(i_loop_count % (1024 * 10)) )
for( ;; )
{
- if( p_demux->b_die ) return VLC_EGENERIC;
+ if( !vlc_object_alive (p_demux) ) return VLC_EGENERIC;
if( AVI_PacketGetHeader( p_demux, &avi_pk ) )
{
* affect the reading speed too much. */
if( !(++i_loop_count % 1024) )
{
- if( p_demux->b_die ) return VLC_EGENERIC;
+ if( !vlc_object_alive (p_demux) ) return VLC_EGENERIC;
msleep( 10000 );
if( !(i_loop_count % (1024 * 10)) )
* this code is called only on broken files). */
if( !(++i_count % 1024) )
{
- if( p_demux->b_die ) return VLC_EGENERIC;
+ if( !vlc_object_alive (p_demux) ) return VLC_EGENERIC;
msleep( 10000 );
if( !(i_count % (1024 * 10)) )
{
avi_packet_t pk;
- if( p_demux->b_die )
+ if( !vlc_object_alive (p_demux) )
{
return;
}
int i_read = stream_Read( p_demux->s, &p_sdp[i_sdp],
i_sdp_max - i_sdp - 1 );
- if( p_demux->b_die || p_demux->b_error )
+ if( !vlc_object_alive (p_demux) || p_demux->b_error )
{
free( p_sdp );
goto error;
i_lefttries = 3;
createnew:
i_lefttries--;
- if( p_demux->b_die || p_demux->b_error )
+ if( !vlc_object_alive (p_demux) || p_demux->b_error )
{
free( psz_user );
free( psz_pwd );
Boolean bInit;
live_track_t *tk;
- if( p_demux->b_die || p_demux->b_error )
+ if( !vlc_object_alive (p_demux) || p_demux->b_error )
{
delete iter;
return VLC_EGENERIC;
vlc_thread_ready( p_timeout );
/* Avoid lock */
- while( !p_timeout->b_die )
+ while( vlc_object_alive (p_timeout) )
{
if( p_timeout->i_remain <= 0 )
{
var_AddCallback( p_ev->p_libvlc, "key-action", EventKey, p_ev );
/* main loop */
- while( !p_ev->b_die )
+ while( vlc_object_alive (p_ev) )
{
if ( !p_sys->b_pci_packet_set )
{
}
/* VOUT part */
- if( p_vout && p_vout->b_die )
+ if( p_vout && !vlc_object_alive (p_vout) )
{
var_DelCallback( p_vout, "mouse-moved", EventMouse, p_ev );
var_DelCallback( p_vout, "mouse-clicked", EventMouse, p_ev );
int i_skip;
int i_peek;
- while( !p_demux->b_die )
+ while( vlc_object_alive (p_demux) )
{
if( ( i_peek = stream_Peek( p_demux->s, &p_peek, 1024 ) ) < 8 )
{
for( ;; )
{
- if( p_demux->b_die )
+ if( !vlc_object_alive (p_demux) )
return -1;
if( FrameHeaderLoad( p_demux, &fh ) )
return VLC_EGENERIC;
}
- while( !p_demux->b_die )
+ while( vlc_object_alive (p_demux) )
{
frame_header_t fh;
int64_t i_tell;
p_sys->i_pcr = -1;
- while( !p_demux->b_die )
+ while( vlc_object_alive (p_demux) )
{
frame_header_t fh;
/* Check beginning */
i = 0;
i_current_pos = stream_Tell( p_demux->s );
- while( !p_demux->b_die && i < 40 && Demux2( p_demux, false ) > 0 ) i++;
+ while( vlc_object_alive (p_demux) && i < 40 && Demux2( p_demux, false ) > 0 ) i++;
/* Check end */
i_size = stream_Size( p_demux->s );
i_end = __MAX( 0, __MIN( 200000, i_size ) );
stream_Seek( p_demux->s, i_size - i_end );
- while( !p_demux->b_die && Demux2( p_demux, true ) > 0 );
+ while( vlc_object_alive (p_demux) && Demux2( p_demux, true ) > 0 );
if( i_current_pos >= 0 ) stream_Seek( p_demux->s, i_current_pos );
}
int i_skip;
int i_peek;
- while( !p_demux->b_die )
+ while( vlc_object_alive (p_demux) )
{
if( ( i_peek = stream_Peek( p_demux->s, &p_peek, 1024 ) ) < 8 )
{
len = net_Read (VLC_OBJECT (demux), fd, NULL,
block->p_buffer, block->i_buffer, false);
if (((len <= 0) && fd_dead (fd))
- || demux->b_die)
+ || !vlc_object_alive (demux))
{
block_Release (block);
return NULL;
if( p_sys->buffer[i_pos] != 0x47 )
{
msg_Warn( p_demux, "lost sync" );
- while( !p_demux->b_die && (i_pos < i_data) )
+ while( vlc_object_alive (p_demux) && (i_pos < i_data) )
{
i_pos++;
if( p_sys->buffer[i_pos] == 0x47 )
break;
}
- if( !p_demux->b_die )
+ if( vlc_object_alive (p_demux) )
msg_Warn( p_demux, "sync found" );
}
msg_Warn( p_demux, "lost synchro" );
block_Release( p_pkt );
- while( !p_demux->b_die )
+ while( vlc_object_alive (p_demux) )
{
const uint8_t *p_peek;
int i_peek, i_skip = 0;
p_intf->p_sys->b_input_update = true;
}
}
- else if( p_intf->p_sys->p_input->b_die || p_intf->p_sys->p_input->b_dead )
+ else if( !vlc_object_alive (p_intf->p_sys->p_input) || p_intf->p_sys->p_input->b_dead )
{
/* input stopped */
p_intf->p_sys->b_intf_update = true;
p_input = vlc_object_find( p_playlist, VLC_OBJECT_INPUT,
FIND_CHILD );
- if( p_input && !p_input->b_die )
+ if( p_input && vlc_object_alive (p_input) )
{
vlc_value_t val;
input_thread_t * p_input = p_playlist->p_input;
i_end_scroll = -1;
- if( p_input && !p_input->b_die )
+ if( p_input && vlc_object_alive (p_input) )
{
NSString *o_temp;
vlc_object_yield( p_input );
{
aglDestroyContext(p_vout->p_sys->agl_ctx);
}
- else if(VLCIntf && !VLCIntf->b_die)
+ else if(VLCIntf && vlc_object_alive (VLCIntf))
{
NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];
int64_t i_time = 0, i_length = 0;
vlc_object_lock( p_input );
- if( !p_input->b_die )
+ if( vlc_object_alive (p_input) )
{
playlist_t *p_playlist;
{
struct aout_sys_t * p_sys = p_aout->output.p_sys;
- while ( !p_aout->b_die )
+ while ( vlc_object_alive (p_aout) )
{
aout_buffer_t * p_buffer;
int i_tmp, i_size;
PhEvent_t *p_event;
bool b_repos = 0;
- if (p_vout->b_die)
+ if (!vlc_object_alive (p_vout))
{
return ( 0 );
}
{
delInput();
p_input = _p_input;
- if( p_input && !( p_input->b_dead || p_input->b_die ) )
+ if( p_input && !( p_input->b_dead || !vlc_object_alive (p_input) ) )
{
vlc_object_yield( p_input );
emit statusChanged( PLAYING_S );
if( VLC_OBJECT_INTF == p_intf->i_object_type ) /* FIXME: don't use object type */
{
vlc_mutex_lock( &p_intf->change_lock );
- if( p_input && ( p_input->b_dead || p_input->b_die ) )
+ if( p_input && ( p_input->b_dead || !vlc_object_alive (p_input) ) )
{
var_DelCallback( p_input, "state", PLItemChanged, this );
vlc_object_release( p_input );
{
QPL_LOCK;
p_input = THEPL->p_input;
- if( p_input && !( p_input->b_die || p_input->b_dead) )
+ if( p_input && !( !vlc_object_alive (p_input) || p_input->b_dead) )
{
vlc_object_yield( p_input );
var_AddCallback( p_input, "state", PLItemChanged, this );
virtual ~InputManager();
void delInput();
- bool hasInput() { return p_input && !p_input->b_dead && !p_input->b_die; }
+ bool hasInput() { return p_input && !p_input->b_dead && vlc_object_alive (p_input); }
bool hasAudio();
bool hasVideo();
}
- if( pInput && !pInput->b_die )
+ if( pInput && vlc_object_alive (pInput) )
{
// Refresh time variables
vlc_value_t pos;
{
input_thread_t *p_input = p_intf->p_sys->p_input;
- if( !p_input->b_die )
+ if( vlc_object_alive (p_input) )
{
/* New input or stream map change */
p_intf->p_sys->b_playing = 1;
p_input = NULL;
}
- if( p_input && !p_input->b_die )
+ if( p_input && vlc_object_alive (p_input) )
{
vlc_value_t pos;
*****************************************************************************/
bool InputManager::IsPlaying()
{
- return (p_input && !p_input->b_die);
+ return (p_input && vlc_object_alive (p_input));
}
/*****************************************************************************
i_input_hide_delay = 0;
}
- if( p_input && !p_input->b_die )
+ if( p_input && vlc_object_alive (p_input) )
{
vlc_value_t pos, len;
*****************************************************************************/
static void Run( intf_thread_t *p_intf )
{
- while( !p_intf->b_die )
+ while( vlc_object_alive (p_intf) )
{
FlushQueue( p_intf->p_sys->p_sub, p_intf->p_sys->p_file,
p_intf->p_sys->i_mode,
char psz_duration[MSTRTIME_MAX_SIZE+2];
char *psz_display = NULL;
- while( !p_intf->b_die )
+ while( vlc_object_alive (p_intf) )
{
if( p_intf->p_sys->b_need_update == true )
{
vod_t *p_vod = (vod_t*)p_this;
vod_sys_t *p_sys = p_vod->p_sys;
- while( !p_vod->b_die )
+ while( vlc_object_alive (p_vod) )
{
block_t *p_block_cmd = block_FifoGet( p_sys->p_fifo_cmd );
rtsp_cmd_t cmd;
val.i_int = 42;
- while( !p_this->b_die )
+ while( vlc_object_alive (p_this) )
{
int i = (int) (100.0 * rand() / (RAND_MAX));
vlc_thread_ready( p_this );
- while( !p_this->b_die )
+ while( vlc_object_alive (p_this) )
{
msleep( 10000 );
}
{
services_discovery_sys_t *p_sys = p_sd->p_sys;
- while( !p_sd->b_die )
+ while( vlc_object_alive (p_sd) )
{
if( avahi_simple_poll_iterate( p_sys->simple_poll, 100 ) != 0 )
{
libhal_free_string( devices[ i ] );
}
}
- while( !p_sd->b_die )
+ while( vlc_object_alive (p_sd) )
{
/* look for events on the bus, blocking 1 second */
dbus_connection_read_write_dispatch( p_sys->p_connection, 1000 );
free( psz_urls ); /* Gruik ? */
var_AddCallback( p_sd, "podcast-urls", UrlsChange, p_sys );
- while( !p_sd->b_die )
+ while( vlc_object_alive (p_sd) )
{
int i;
if( p_sys->b_update == true )
msg_Dbg( p_sd, "UPnP discovery started" );
/* read SAP packets */
- while( !p_sd->b_die )
+ while( vlc_object_alive (p_sd) )
{
msleep( 500 );
}
}
msg_Dbg( p_sd, "UPnP discovery started" );
- while( !p_sd->b_die )
+ while( vlc_object_alive (p_sd) )
{
msleep( 500 );
}
sout_stream_id_t *id = (sout_stream_id_t *)p_this;
unsigned i_caching = id->i_caching;
- while( !id->b_die )
+ while( vlc_object_alive (id) )
{
block_t *out = block_FifoGet( id->p_fifo );
if( out == NULL )
sout_stream_id_t *id = p_sys->id_video;
picture_t *p_pic;
- while( !p_sys->b_die && !p_sys->b_error )
+ while( vlc_object_alive (p_sys) && !p_sys->b_error )
{
block_t *p_block;
while( p_sys->i_last_pic == p_sys->i_first_pic )
{
vlc_cond_wait( &p_sys->cond, &p_sys->lock_out );
- if( p_sys->b_die || p_sys->b_error ) break;
+ if( !vlc_object_alive (p_sys) || p_sys->b_error ) break;
}
- if( p_sys->b_die || p_sys->b_error )
+ if( !vlc_object_alive (p_sys) || p_sys->b_error )
{
vlc_mutex_unlock( &p_sys->lock_out );
break;
vlc_mutex_lock( &m_WakeupLock );
- while ((this->m_bTerminated == ATMO_FALSE) && (this->m_pAtmoThread->b_die == false)) {
+ while ((this->m_bTerminated == ATMO_FALSE) && (!vlc_object_alive (this->m_pAtmoThread) == false)) {
int value = vlc_cond_timedwait(&m_WakeupCond, &m_WakeupLock, mdate() + INT64_C(75000));
if(!value) {
/* DeliverNewSourceDataPaket delivered new work for me... get it! */
/* send the same pixel data again... to unlock the buffer! */
AtmoSendPixelData( p_fadethread->p_filter );
- while( (!p_fadethread->b_die) &&
+ while( (vlc_object_alive (p_fadethread)) &&
(i_steps_done < p_fadethread->i_steps))
{
p_transfer = AtmoLockTransferBuffer( p_fadethread->p_filter );
thread improvements wellcome!
*/
for(i_index = 0;
- (i_index < i_size) && (!p_fadethread->b_die);
+ (i_index < i_size) && (vlc_object_alive (p_fadethread));
i_index+=4)
{
i_src_blue = p_source[i_index+0];
the VLC libaries? inside native win32 I would use an Event
(CreateEvent) and here an WaitForSingleObject?
*/
- if(p_fadethread->b_die) break;
+ if(!vlc_object_alive (p_fadethread)) break;
msleep(10000);
- if(p_fadethread->b_die) break;
+ if(!vlc_object_alive (p_fadethread)) break;
msleep(10000);
- if(p_fadethread->b_die) break;
+ if(!vlc_object_alive (p_fadethread)) break;
msleep(10000);
- if(p_fadethread->b_die) break;
+ if(!vlc_object_alive (p_fadethread)) break;
msleep(10000);
}
free(p_source);
vout_CreatePicture( p_vout->p_sys->pp_vout[ i_vout ], 0, 0, 0 )
) == NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{
vout_DestroyPicture(
p_vout->p_sys->pp_vout[ i_vout ], p_outpic );
vout_CreatePicture( p_vout->p_sys->p_vout, 0, 0, 0 )
) == NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{
vout_DestroyPicture( p_vout->p_sys->p_vout, p_outpic );
return;
0, 0, 0 ) )
== NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{
vlc_mutex_unlock( &p_vout->p_sys->filter_lock );
return;
0, 0, 0 ) )
== NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{
vout_DestroyPicture( p_vout->p_sys->p_vout, pp_outpic[0] );
vlc_mutex_unlock( &p_vout->p_sys->filter_lock );
/* This is a new frame. Get a structure from the video_output. */
while( !(p_outpic = vout_CreatePicture( p_sys->p_vout, 0, 0, 0 )) )
{
- if( p_vout->b_die || p_vout->b_error ) return;
+ if( !vlc_object_alive (p_vout) || p_vout->b_error ) return;
msleep( VOUT_OUTMEM_SLEEP );
}
while( ( p_outpic = vout_CreatePicture( p_vout->p_sys->p_vout, 0, 0, 0 ) )
== NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{
return;
}
while( ( p_outpic = vout_CreatePicture( p_vout->p_sys->p_vout, 0, 0, 0 ) )
== NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{ return; }
msleep( VOUT_OUTMEM_SLEEP );
}
0, 0, 0 )
) == NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{
vout_DestroyPicture(
p_vout->p_sys->pp_vout[ i_vout ].p_vout, p_outpic );
0, 0, 0 )
) == NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{
vout_DestroyPicture(
p_vout->p_sys->pp_vout[ i_vout ].p_vout, p_outpic );
0, 0, 0 )
) == NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{
vout_DestroyPicture(
p_vout->p_sys->pp_vout[ i_vout ].p_vout, p_outpic );
while( ( p_outpic = vout_CreatePicture( p_vout->p_sys->p_vout, 0, 0, 0 ) )
== NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{
return;
}
}
- if (p_sys->p_worker_thread->b_die ||
+ if (!vlc_object_alive (p_sys->p_worker_thread) ||
p_sys->p_worker_thread->b_error)
{
p_sys->b_continue = false;
msg_Err( p_filter, "Could not write rfbFramebufferUpdateRequestMsg." );
p_sys->b_continue = false;
}
- if (p_sys->p_update_request_thread->b_die ||
+ if (!vlc_object_alive (p_sys->p_update_request_thread) ||
p_sys->p_update_request_thread->b_error)
{
p_sys->b_continue = false;
while( ( p_outpic = vout_CreatePicture( p_vout->p_sys->p_vout, 0, 0, 0 ) )
== NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{
return;
}
0, 0, 0 )
) == NULL )
{
- if( p_vout->b_die || p_vout->b_error )
+ if( !vlc_object_alive (p_vout) || p_vout->b_error )
{
vout_DestroyPicture(
p_vout->p_sys->pp_vout[ i_vout ].p_vout, p_outpic );
}
/* Check if the event thread is still running */
- if( p_vout->p_sys->p_event->b_die )
+ if( !vlc_object_alive (p_vout->p_sys->p_event) )
{
return VLC_EGENERIC; /* exit */
}
}
/* Check if the event thread is still running */
- if( p_vout->p_sys->p_event->b_die )
+ if( !vlc_object_alive (p_vout->p_sys->p_event) )
{
return VLC_EGENERIC; /* exit */
}
/* Main loop */
/* GetMessage will sleep if there's no message in the queue */
- while( !p_event->b_die && GetMessage( &msg, 0, 0, 0 ) )
+ while( vlc_object_alive (p_event) && GetMessage( &msg, 0, 0, 0 ) )
{
/* Check if we are asked to exit */
- if( p_event->b_die )
+ if( !vlc_object_alive (p_event) )
break;
switch( msg.message )
}
/* Check if the event thread is still running */
- if( p_vout->p_sys->p_event->b_die )
+ if( !vlc_object_alive (p_vout->p_sys->p_event) )
{
return VLC_EGENERIC; /* exit */
}
}
/* Check if the event thread is still running */
- if( p_vout->p_sys->p_event->b_die )
+ if( !vlc_object_alive (p_vout->p_sys->p_event) )
{
return VLC_EGENERIC; /* exit */
}
// SDL_ShowCursor( 0 );
// }
//
-// if( p_vout->p_libvlc->b_die )
+// if( !vlc_object_alive (p_vout->p_libvlc) )
// p_vout->p_sys->bRunning = FALSE;
return 0;
p_event->p_vout->p_sys->bRunning = TRUE;
#ifdef NEED_QTE_MAIN
- while(!p_event->b_die && p_event->p_vout->p_sys->bRunning)
+ while(vlc_object_alive (p_event) && p_event->p_vout->p_sys->bRunning)
{
/* Check if we are asked to exit */
- if( p_event->b_die )
+ if( !vlc_object_alive (p_event) )
break;
msleep(100);
timestart=mdate()/1000;
- while( !p_thread->b_die )
+ while( vlc_object_alive (p_thread) )
{
mspf = 1000 / 60;
if( galaktos_update( p_thread ) == 1 )
p_plugin_info = goom_init( width.i_int, height.i_int );
- while( !p_thread->b_die )
+ while( vlc_object_alive (p_thread) )
{
uint32_t *plane;
picture_t *p_pic;
p_thread->psz_title = NULL;
while( !( p_pic = vout_CreatePicture( p_thread->p_vout, 0, 0, 0 ) ) &&
- !p_thread->b_die )
+ vlc_object_alive (p_thread) )
{
msleep( VOUT_OUTMEM_SLEEP );
}
/* First, get a new picture */
while( ( p_outpic = vout_CreatePicture( p_sys->p_vout, 0, 0, 3 ) ) == NULL)
{
- if( p_aout->b_die )
+ if( !vlc_object_alive (p_aout) )
{
return;
}