Changeset a9b034cf7998a55b8403858e83ad481a803cf79d

Show
Ignore:
Timestamp:
05/03/08 22:07:15 (2 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1209845235 +0300
git-parent:

[976b9f6dc9259e4532a01502d00aa91c95f455e8]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1209845201 +0300
Message:

Remove splice support - it does not quite help for UDP & DCCP

(at least currently)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • configure.ac

    r5d1e0c0 ra9b034c  
    474474 
    475475AC_CHECK_FUNCS(mmap, [VLC_ADD_PLUGIN([access_mmap])]) 
    476  
    477 AS_IF([test "${SYS}" = "linux"], [ 
    478   AC_CHECK_FUNCS(tee) 
    479 ]) 
    480476 
    481477dnl Check for setlocal and langinfo 
  • modules/stream_out/rtp.c

    rb2b9fb4 ra9b034c  
    13621362    sout_stream_id_t *id = (sout_stream_id_t *)p_this; 
    13631363    unsigned i_caching = id->i_caching; 
    1364 #ifdef HAVE_TEE 
    1365     int fd[5] = { -1, -1, -1, -1, -1 }; 
    1366  
    1367     if( pipe( fd ) ) 
    1368         fd[0] = fd[1] = -1; 
    1369     else 
    1370     if( pipe( fd ) ) 
    1371         fd[2] = fd[3] = -1; 
    1372     else 
    1373         fd[4] = open( "/dev/null", O_WRONLY ); 
    1374 #endif 
    13751364 
    13761365    while( !id->b_die ) 
     
    13831372        ssize_t  len = out->i_buffer; 
    13841373 
    1385 #ifdef HAVE_TEE 
    1386         if( fd[4] != -1 ) 
    1387             len = write( fd[1], out->p_buffer, len); 
    1388         if( len == -1 ) 
    1389             continue; /* Uho - should not happen */ 
    1390 #endif 
    13911374        mwait( i_date ); 
    13921375 
     
    13991382            SendRTCP( id->sinkv[i].rtcp, out ); 
    14001383 
    1401 #ifdef HAVE_TEE 
    1402             tee( fd[0], fd[3], len, 0 ); 
    1403             if( splice( fd[2], NULL, id->sinkv[i].rtp_fd, NULL, len, 
    1404                         SPLICE_F_NONBLOCK ) >= 0 ) 
    1405                 continue; 
    1406             if( errno == EAGAIN ) 
    1407                 continue; 
    1408  
    1409             /* splice failed */ 
    1410             splice( fd[2], NULL, fd[4], NULL, len, 0 ); 
    1411 #else 
    14121384            if( send( id->sinkv[i].rtp_fd, out->p_buffer, len, 0 ) >= 0 ) 
    14131385                continue; 
    1414 #endif 
    14151386            /* Retry sending to root out soft-errors */ 
    14161387            if( send( id->sinkv[i].rtp_fd, out->p_buffer, len, 0 ) >= 0 ) 
     
    14201391        } 
    14211392        vlc_mutex_unlock( &id->lock_sink ); 
    1422  
    14231393        block_Release( out ); 
    1424 #ifdef HAVE_TEE 
    1425         splice( fd[0], NULL, fd[4], NULL, len, 0 ); 
    1426 #endif 
    14271394 
    14281395        for( unsigned i = 0; i < deadc; i++ ) 
     
    14421409        } 
    14431410    } 
    1444  
    1445 #ifdef HAVE_TEE 
    1446     for( unsigned i = 0; i < 5; i++ ) 
    1447         close( fd[i] ); 
    1448 #endif 
    14491411} 
    14501412