Changeset 89471fa0ae4ddc54bd49511af6e3f3b43761f153

Show
Ignore:
Timestamp:
07/28/06 15:28:08 (2 years ago)
Author:
Clément Stenac <zorglub@videolan.org>
git-committer:
Clément Stenac <zorglub@videolan.org> 1154093288 +0000
git-parent:

[ebc698a515bd416b4f03063b0c68d524015bfeef]

git-author:
Clément Stenac <zorglub@videolan.org> 1154093288 +0000
Message:

Some initial work for streaming profiles
+ some misc test cleanup

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_common.h

    ra8fcedd r89471fa  
    335335typedef struct sap_handler_t sap_handler_t; 
    336336 
     337typedef struct sout_std_t sout_std_t; 
     338typedef struct sout_display_t sout_display_t; 
     339typedef struct sout_duplicate_t sout_duplicate_t; 
     340typedef struct sout_transcode_t sout_transcode_t; 
     341typedef struct sout_chain_t sout_chain_t; 
     342typedef struct streaming_profile_t streaming_profile_t; 
     343typedef struct sout_module_t sout_module_t; 
     344typedef struct sout_gui_descr_t sout_gui_descr_t; 
     345 
    337346/* Decoders */ 
    338347typedef struct decoder_t      decoder_t; 
     
    359368typedef struct device_probe_t device_probe_t; 
    360369typedef struct probe_sys_t probe_sys_t; 
     370typedef struct localized_string_t localized_string_t; 
     371typedef struct i18n_string_t i18n_string_t; 
    361372 
    362373/* block */ 
  • include/vlc_strings.h

    ra48f5f1 r89471fa  
    3535VLC_EXPORT( char *, convert_xml_special_chars, ( const char *psz_content ) ); 
    3636 
     37struct localized_string_t  
     38{ 
     39    char *psz_lang; 
     40    char *psz_text; 
     41}; 
     42 
     43struct i18n_string_t 
     44{ 
     45    int i_langs; 
     46    localized_string_t **pp_langs; 
     47}; 
     48 
     49static inline void i18n_AddLang( i18n_string_t *p_src, 
     50                                 char *psz_lang, char *psz_text ) 
     51{ 
     52    DECMALLOC_VOID( pl10n, localized_string_t ); 
     53    pl10n->psz_lang = strdup( psz_lang ); 
     54    pl10n->psz_text = strdup( psz_text ); 
     55    INSERT_ELEM( p_src->pp_langs, p_src->i_langs, p_src->i_langs, pl10n ); 
     56}; 
     57 
     58static inline char *i18n_Get( i18n_string_t *p_src, char *psz_lang ) 
     59{ 
     60    int i; 
     61    for( i = 0 ; i < p_src->i_langs; i++ ) 
     62    { 
     63        if( !strcmp( p_src->pp_langs[i]->psz_lang, psz_lang ) ) 
     64            return p_src->pp_langs[i]->psz_text; 
     65    } 
     66    return strdup( "" ); 
     67}; 
     68 
    3769/** 
    3870 * @} 
  • include/vlc_symbols.h

    rf3c6bbc r89471fa  
    520520    void (*__intf_IntfProgressUpdate_inner) (vlc_object_t*, int, const char*, float); 
    521521    int (*__intf_IntfProgress_inner) (vlc_object_t*, const char*, float); 
     522    void *streaming_ChainToPsz_deprecated; 
    522523}; 
    523524# if defined (__PLUGIN__) 
     
    14941495    (p_symbols)->stats_TimerClean_deprecated = NULL; \ 
    14951496    (p_symbols)->stats_TimersClean_deprecated = NULL; \ 
     1497    (p_symbols)->streaming_ChainToPsz_deprecated = NULL; \ 
    14961498 
    14971499# endif /* __PLUGIN__ */ 
  • src/Makefile.am

    r07e87b9 r89471fa  
    5858    ../include/snapshot.h \ 
    5959    ../include/stream_output.h \ 
     60    ../include/vlc_streaming.h \ 
    6061    ../include/variables.h \ 
    6162    ../include/video_output.h \ 
     
    288289    stream_output/stream_output.c \ 
    289290    stream_output/announce.c \ 
     291    stream_output/profiles.c \ 
    290292    stream_output/sap.c \ 
    291293    osd/osd.c \ 
  • test/native/gc.c

    red0b72e r89471fa  
    11#include "../pyunit.h" 
    22#include <vlc/vlc.h> 
    3  
    4 #include <vlc_common.h> 
    53 
    64struct mygc 
     
    2220     mygc *gc = (mygc *)malloc( sizeof( mygc ) ); 
    2321 
    24      vlc_gc_init( gc, mygc_destructor ); 
    25      gc->i_gc_refcount = 0; 
    26  
     22     vlc_gc_init( gc, mygc_destructor, NULL ); 
     23     ASSERT( gc->i_gc_refcount == 0, "Refcount should be 0" ); 
    2724     vlc_gc_incref( gc ); 
    2825     ASSERT( gc->i_gc_refcount == 1, "Refcount should be 1" ); 
  • test/native/init.c

    r59cd4c2 r89471fa  
    99   DEF_METHOD( i18n_atof_test, "Test i18n_atof" ) 
    1010   DEF_METHOD( url_decode_test, "URL decoding" ) 
     11   DEF_METHOD( chains_test, "Test building of chains" ) 
     12   DEF_METHOD( gui_chains_test, "Test interactions between chains and GUI" ) 
     13   DEF_METHOD( psz_chains_test, "Test building of chain strings" ) 
    1114   { NULL, NULL, 0, NULL } 
    1215}; 
  • test/native/tests.h

    r59cd4c2 r89471fa  
    1111 
    1212PyObject *i18n_atof_test( PyObject *self, PyObject *args ); 
     13 
     14PyObject *chains_test( PyObject *self, PyObject *args ); 
     15PyObject *gui_chains_test( PyObject *self, PyObject *args ); 
     16PyObject *psz_chains_test( PyObject *self, PyObject *args ); 
  • test/native/url.c

    r59cd4c2 r89471fa  
    2424#include "vlc_url.h" 
    2525 
    26  PyObject * test_decode (const char *in, const char *out) 
     26PyObject * test_decode (const char *in, const char *out) 
    2727{ 
    2828    char *res; 
     
    4040} 
    4141 
    42  PyObject *url_decode_test( PyObject *self, PyObject *args ) 
     42PyObject *url_decode_test( PyObject *self, PyObject *args ) 
    4343{ 
     44    printf( "\n" ); 
    4445    (void)setvbuf (stdout, NULL, _IONBF, 0); 
    4546    if( !test_decode ("this_should_not_be_modified_1234", 
  • test/pyunit.h

    r4db506d r89471fa  
    1616 
    1717 
    18  
    1918#define DEF_METHOD( method, desc ) { #method, method, METH_VARARGS, desc}, 
  • test/setup.py

    r59cd4c2 r89471fa  
    4242native_libvlc_test = Extension( 'native_libvlc_test', 
    4343                sources = ['native/init.c', 'native/url.c', 'native/i18n.c', 
    44                'native/stats.c', 'native/libvlc.c'], 
     44                'native/stats.c', 'native/libvlc.c', 'native/profiles.c'], 
     45                include_dirs = ['../include', '../', '/usr/win32/include' ], 
     46                extra_objects = [ '../src/.libs/libvlc.so' ], 
     47                extra_compile_args = get_cflags(), 
     48                extra_link_args = [ '-L../..' ]  + get_ldflags(), 
     49                ) 
     50 
     51native_gc_test = Extension( 'native_gc_test', 
     52                sources = ['native/gc.c'], 
    4553                include_dirs = ['../include', '../', '/usr/win32/include' ], 
    4654                extra_objects = [ '../src/.libs/libvlc.so' ], 
     
    5058 
    5159setup( name = 'native_libvlc_test' ,version = '1242', ext_modules = [ native_libvlc_test ] ) 
     60 
     61 
     62setup( name = 'native_gc_test' ,version = '1242', ext_modules = [ native_gc_test ] )