Changeset aba6d6b020f9b407b47c27398149409a29d389b3

Show
Ignore:
Timestamp:
15/09/04 22:21:09 (4 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1095279669 +0000
git-parent:

[5bb58782a719ac8a8719513471f67512e2051640]

git-author:
Gildas Bazin <gbazin@videolan.org> 1095279669 +0000
Message:

* modules/stream_out/description.c: new "description" stream output module which gathers information on elementary streams (pre-parsing).
* src/misc/vlm.c: pre-parse vod media items.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • configure.ac

    r825f056 raba6d6b  
    11821182  VLC_ADD_PLUGINS([packetizer_copy]) 
    11831183 
    1184   VLC_ADD_PLUGINS([stream_out_dummy stream_out_standard stream_out_es stream_out_rtp]) 
     1184  VLC_ADD_PLUGINS([stream_out_dummy stream_out_standard stream_out_es stream_out_rtp stream_out_description vod_rtsp]) 
    11851185  VLC_ADD_PLUGINS([stream_out_duplicate stream_out_gather stream_out_display stream_out_transcode]) 
    11861186#  VLC_ADD_PLUGINS([stream_out_transrate]) 
  • modules/misc/rtsp.c

    re9097e4 raba6d6b  
    215215    vod_sys_t *p_sys = p_vod->p_sys; 
    216216    vod_media_t *p_media = malloc( sizeof(vod_media_t) ); 
     217    int i; 
     218 
    217219    memset( p_media, 0, sizeof(vod_media_t) ); 
    218  
    219220    asprintf( &p_media->psz_rtsp_path, "%s%s", p_sys->psz_path, psz_name ); 
    220221 
     
    247248 
    248249    TAB_APPEND( p_sys->i_media, p_sys->media, p_media ); 
     250 
     251    vlc_mutex_lock( &p_item->lock ); 
     252    msg_Dbg( p_vod, "media has %i declared ES", p_item->i_es ); 
     253    for( i = 0; i < p_item->i_es; i++ ) 
     254    msg_Dbg( p_vod, "  - ES %i: %4.4s", i, (char *)&p_item->es[i]->i_codec ); 
     255    vlc_mutex_unlock( &p_item->lock ); 
    249256 
    250257    return p_media; 
  • modules/stream_out/Modules.am

    r2a24c87 raba6d6b  
    11SOURCES_stream_out_dummy = dummy.c 
     2SOURCES_stream_out_description = description.c 
    23SOURCES_stream_out_standard = standard.c \ 
    34                              announce.c \ 
  • src/misc/vlm.c

    re9097e4 raba6d6b  
    933933    if( i_type == VOD_TYPE && !vlm->i_vod ) 
    934934    { 
    935         vlm->vod = vlc_object_create( vlm, sizeof(vod_t) ); 
     935        vlm->vod = vlc_object_create( vlm, VLC_OBJECT_VOD ); 
    936936        vlc_object_attach( vlm->vod, vlm ); 
    937937        vlm->vod->p_module = module_Need( vlm->vod, "vod server", 0, 0 ); 
     
    10991099        if( !media->b_enabled && media->vod_media ) 
    11001100        { 
     1101            int i; 
     1102 
     1103            for( i = 0; i < media->item.i_es; i++ ) 
     1104            { 
     1105                es_format_Clean( media->item.es[i] ); 
     1106                free( media->item.es[i] ); 
     1107            } 
     1108            if( media->item.es ) free( media->item.es ); 
     1109            media->item.es = 0; 
     1110            media->item.i_es = 0; 
     1111 
    11011112            vlm->vod->pf_media_del( vlm->vod, media->vod_media ); 
    11021113            media->vod_media = 0; 
     
    11041115        else if( media->b_enabled && !media->vod_media ) 
    11051116        { 
     1117            /* Pre-parse the input */ 
     1118            char *psz_output = media->psz_output; 
     1119            if( media->psz_output ) 
     1120            { 
     1121                asprintf( &media->psz_output, "%s:description", 
     1122                          media->psz_output ); 
     1123            } 
     1124            else 
     1125            { 
     1126                asprintf( &media->psz_output, "#description" ); 
     1127            } 
     1128 
     1129            if( !vlm_MediaControl( vlm, media, "play", 0 ) && media->p_input ) 
     1130            { 
     1131                while( !media->p_input->b_eof && !media->p_input->b_error ) 
     1132                { 
     1133                    msleep( 100000 ); 
     1134                } 
     1135 
     1136                input_StopThread( media->p_input ); 
     1137                input_DestroyThread( media->p_input ); 
     1138                vlc_object_detach( media->p_input ); 
     1139                vlc_object_destroy( media->p_input ); 
     1140                media->p_input = NULL; 
     1141            } 
     1142            free( media->psz_output ); 
     1143            media->psz_output = psz_output; 
     1144 
    11061145            media->vod_media = 
    11071146                vlm->vod->pf_media_new( vlm->vod, media->psz_name,