Changeset e5daac69bbf814759ffe6ab126aacffe2efb340a

Show
Ignore:
Timestamp:
03/12/02 17:29:04 (6 years ago)
Author:
Arnaud Schauly <gitan@videolan.org>
git-committer:
Arnaud Schauly <gitan@videolan.org> 1038932944 +0000
git-parent:

[e133e074fc9822f46c3f47911faa914b61426d59]

git-author:
Arnaud Schauly <gitan@videolan.org> 1038932944 +0000
Message:

* Added a session announcement protol module (enabled by default).
* Added the PLAYLIST_CHECK_INSERT option to the playlist. That option
checks previously enqueued sessions before enqueing.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • configure.ac.in

    r7b68278 re5daac6  
    626626dnl  Network modules 
    627627dnl 
    628 NETWORK_MODULES="access_udp access_http access_rtp ipv4 access_mms
     628NETWORK_MODULES="access_udp access_http access_rtp ipv4 access_mms sap
    629629 
    630630dnl 
  • include/vlc/vlc.h

    rce7d29b re5daac6  
    33 ***************************************************************************** 
    44 * Copyright (C) 1998, 1999, 2000 VideoLAN 
    5  * $Id: vlc.h,v 1.17 2002/10/17 13:15:30 sam Exp $ 
     5 * $Id: vlc.h,v 1.18 2002/12/03 16:29:04 gitan Exp $ 
    66 * 
    77 * This program is free software; you can redistribute it and/or modify 
     
    7575 
    7676/* Used by playlist_Add */ 
    77 #define PLAYLIST_INSERT      0x0001 
    78 #define PLAYLIST_REPLACE     0x0002 
    79 #define PLAYLIST_APPEND      0x0004 
    80 #define PLAYLIST_GO          0x0008 
     77#define PLAYLIST_INSERT          0x0001 
     78#define PLAYLIST_REPLACE         0x0002 
     79#define PLAYLIST_APPEND          0x0004 
     80#define PLAYLIST_GO              0x0008 
     81#define PLAYLIST_CHECK_INSERT    0x0010 
    8182 
    8283#define PLAYLIST_END           -666 
  • modules/misc/Modules.am

    r2b0b788 re5daac6  
    11SOURCES_gtk_main = modules/misc/gtk_main.c 
    22SOURCES_gnome_main = modules/misc/gtk_main.c 
     3SOURCES_sap = modules/misc/sap.c 
  • src/libvlc.c

    re2da42f re5daac6  
    33 ***************************************************************************** 
    44 * Copyright (C) 1998-2002 VideoLAN 
    5  * $Id: libvlc.c,v 1.48 2002/11/28 17:35:00 sam Exp $ 
     5 * $Id: libvlc.c,v 1.49 2002/12/03 16:29:04 gitan Exp $ 
    66 * 
    77 * Authors: Vincent Seguin <seguin@via.ecp.fr> 
     
    756756        return VLC_ENOOBJ; 
    757757    } 
    758  
     758     
     759    /* add pseudo sap interface; non blocking */ 
     760    if( config_GetInt( p_vlc, "sap" ) ) 
     761    { 
     762        msg_Dbg( p_vlc, "adding sap interface" ); 
     763        VLC_AddIntf( 0, "sap", VLC_FALSE ); 
     764    } 
     765 
     766     
    759767    p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); 
    760768 
  • src/libvlc.h

    re133e07 re5daac6  
    33 ***************************************************************************** 
    44 * Copyright (C) 1998-2002 VideoLAN 
    5  * $Id: libvlc.h,v 1.24 2002/12/03 12:59:21 sam Exp $ 
     5 * $Id: libvlc.h,v 1.25 2002/12/03 16:29:04 gitan Exp $ 
    66 * 
    77 * Authors: Vincent Seguin <seguin@via.ecp.fr> 
     
    359359    "\n") 
    360360 
     361#define SAP_TEXT N_( "Session Announcement Protocol support" ) 
     362#define SAP_LONGTEXT N_( "Session Announcement Protocol support" ) 
     363 
     364 
    361365/* 
    362366 * Quick usage guide for the configuration options: 
     
    476480    /* Misc options */ 
    477481    add_category_hint( N_("Miscellaneous"), NULL ); 
     482    add_bool( "sap", 1, NULL, SAP_TEXT, SAP_LONGTEXT ); 
    478483    add_module( "memcpy", "memcpy", NULL, NULL, MEMCPY_TEXT, MEMCPY_LONGTEXT ); 
    479484    add_module( "access", "access", NULL, NULL, ACCESS_TEXT, ACCESS_LONGTEXT ); 
  • src/playlist/playlist.c

    r8e3e302 re5daac6  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999-2001 VideoLAN 
    5  * $Id: playlist.c,v 1.23 2002/11/21 15:51:57 gbazin Exp $ 
     5 * $Id: playlist.c,v 1.24 2002/12/03 16:29:04 gitan Exp $ 
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    106106    playlist_item_t *p_item; 
    107107 
     108 
     109    vlc_mutex_lock( &p_playlist->object_lock ); 
     110 
     111    /* 
     112     * CHECK_INSERT : checks if the item is already enqued before  
     113     * enqueing it 
     114     */ 
     115    if ( i_mode & PLAYLIST_CHECK_INSERT ) 
     116    { 
     117         int j; 
     118        
     119         if ( p_playlist->pp_items ) 
     120         { 
     121             for ( j = 0; j < p_playlist->i_size; j++ ) 
     122             { 
     123                 if ( !strcmp( p_playlist->pp_items[j]->psz_name, psz_target ) ) 
     124                 { 
     125                      msg_Dbg( p_playlist, "item � %s � already enqued",  
     126                                        psz_target ); 
     127                      vlc_mutex_unlock( &p_playlist->object_lock ); 
     128                      return 0;    
     129                 } 
     130             } 
     131         } 
     132         i_mode &= ~PLAYLIST_CHECK_INSERT; 
     133         i_mode |= PLAYLIST_APPEND; 
     134    } 
     135 
     136     
    108137    msg_Dbg( p_playlist, "adding playlist item � %s �", psz_target ); 
    109  
     138     
    110139    /* Create the new playlist item */ 
    111140    p_item = malloc( sizeof( playlist_item_t ) ); 
     
    120149    p_item->b_autodeletion = VLC_FALSE; 
    121150 
    122     vlc_mutex_lock( &p_playlist->object_lock ); 
    123151 
    124152    /* Do a few boundary checks and allocate space for the item */