Beispiel #1
0
static void* Raw1394EventThread( vlc_object_t *p_this )
{
    event_thread_t *p_ev = (event_thread_t *) p_this;
    access_t *p_access = (access_t *) p_ev->p_access;
    access_sys_t *p_sys = (access_sys_t *) p_access->p_sys;
    int result = 0;
    int canc = vlc_savecancel ();

    AVCPlay( p_access, p_sys->i_node );

    while( vlc_object_alive (p_sys->p_ev) )
    {
        while( ( result = poll( &(p_sys->raw1394_poll), 1, 200 ) ) < 0 )
        {
            if( !( errno == EAGAIN || errno == EINTR ) )
            {
                perror( "error: raw1394 poll" );
                msg_Err( p_access, "retrying device raw1394" );
            }
        }
        if( !vlc_object_alive (p_sys->p_ev) )
                break;
        if( result > 0 && ( ( p_sys->raw1394_poll.revents & POLLIN )
                || ( p_sys->raw1394_poll.revents & POLLPRI ) ) )
            result = raw1394_loop_iterate( p_sys->p_raw1394 );
    }

    AVCStop( p_access, p_sys->i_node );
    vlc_restorecancel (canc);
    return NULL;
}
Beispiel #2
0
Datei: dv.c Projekt: 0xheart0/vlc
static void Raw1394EventThreadCleanup( void *obj )
{
    event_thread_t *p_ev = (event_thread_t *)obj;

    AVCStop( p_ev->p_access, p_ev->p_access->p_sys->i_node );
}