Changeset 68cdf347da595e7a6975a21cf61b24bffa1bdbea

Show
Ignore:
Timestamp:
09/01/07 16:11:39 (1 year ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1188655899 +0000
git-parent:

[be9cd599a925a002e5e7f57721385178be2d6ec9]

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

DSO friendliness

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access_output/udp.c

    r9160f1e r68cdf34  
    135135    set_capability( "sout access", 100 ); 
    136136    add_shortcut( "udp" ); 
    137     add_shortcut( "rtp" ); // Will work only with ts muxer 
    138137    set_callbacks( Open, Close ); 
    139138vlc_module_end(); 
     
    204203{ 
    205204    int                 i_mtu; 
    206  
    207     vlc_bool_t          b_rtpts; // true for RTP/MP2 encapsulation 
    208205    vlc_bool_t          b_mtu_warning; 
    209     uint16_t            i_sequence_number; 
    210     uint32_t            i_ssrc; 
    211206 
    212207    block_t             *p_buffer; 
     
    257252    } 
    258253    p_access->p_sys = p_sys; 
    259  
    260     if( p_access->psz_access != NULL ) 
    261     { 
    262         if (strcmp (p_access->psz_access, "rtp") == 0) 
    263             p_sys->b_rtpts = VLC_TRUE; 
    264     } 
    265254 
    266255    if (var_GetBool (p_access, SOUT_CFG_PREFIX"lite")) 
     
    382371 
    383372    p_sys->i_mtu = var_CreateGetInteger( p_this, "mtu" ); 
    384     if( p_sys->b_rtpts && ( p_sys->i_mtu < RTP_HEADER_LENGTH ) ) 
    385         p_sys->i_mtu = 576 - 20 - 8; 
    386  
    387     srand( (uint32_t)mdate()); 
    388     p_sys->p_buffer          = NULL; 
    389     p_sys->i_sequence_number = rand()&0xffff; 
    390     p_sys->i_ssrc            = rand()&0xffffffff; 
     373    p_sys->p_buffer = NULL; 
    391374 
    392375    if (i_rtcp_port && OpenRTCP (VLC_OBJECT (p_access), &p_sys->p_thread->rtcp, 
     
    500483        { 
    501484            int i_payload_size = p_sys->i_mtu; 
    502             if( p_sys->b_rtpts ) 
    503                 i_payload_size -= RTP_HEADER_LENGTH; 
    504485 
    505486            int i_write = __MIN( p_buffer->i_buffer, i_payload_size ); 
     
    605586    p_buffer->i_dts = i_dts; 
    606587    p_buffer->i_buffer = 0; 
    607  
    608     if( p_sys->b_rtpts ) 
    609     { 
    610         mtime_t i_timestamp = p_buffer->i_dts * 9 / 100; 
    611  
    612         /* add rtp/ts header */ 
    613         p_buffer->p_buffer[0] = 0x80; 
    614         p_buffer->p_buffer[1] = 33; // mpeg2-ts 
    615  
    616         SetWBE( p_buffer->p_buffer + 2, p_sys->i_sequence_number ); 
    617         p_sys->i_sequence_number++; 
    618         SetDWBE( p_buffer->p_buffer + 4, i_timestamp ); 
    619         SetDWBE( p_buffer->p_buffer + 8, p_sys->i_ssrc ); 
    620  
    621         p_buffer->i_buffer = RTP_HEADER_LENGTH; 
    622     } 
    623588 
    624589    return p_buffer; 
  • modules/stream_out/standard.c

    r38ce066 r68cdf34  
    180180    { 
    181181        /* by extension */ 
    182         static struct { const char *ext; const char *mux; } exttomux[] = 
     182        static struct { const char ext[6]; const char mux[16]; } exttomux[] = 
    183183        { 
    184184            { "avi", "avi" }, 
     
    197197            { "ps",  "ps" }, 
    198198            { "mpeg1","mpeg1" }, 
    199             { "wav","wav" }, 
     199            { "wav", "wav" }, 
    200200            { "flv", "ffmpeg{mux=flv}" }, 
    201             { NULL,  NULL
     201            { "",    ""
    202202        }; 
    203203        const char *psz_ext = strrchr( psz_url, '.' ) + 1; 
     
    205205 
    206206        msg_Dbg( p_this, "extension is %s", psz_ext ); 
    207         for( i = 0; exttomux[i].ext != NULL; i++ ) 
     207        for( i = 0; exttomux[i].ext[0]; i++ ) 
    208208        { 
    209209            if( !strcasecmp( psz_ext, exttomux[i].ext ) )