Changeset 89471fa0ae4ddc54bd49511af6e3f3b43761f153
- 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
| ra8fcedd |
r89471fa |
|
| 335 | 335 | typedef struct sap_handler_t sap_handler_t; |
|---|
| 336 | 336 | |
|---|
| | 337 | typedef struct sout_std_t sout_std_t; |
|---|
| | 338 | typedef struct sout_display_t sout_display_t; |
|---|
| | 339 | typedef struct sout_duplicate_t sout_duplicate_t; |
|---|
| | 340 | typedef struct sout_transcode_t sout_transcode_t; |
|---|
| | 341 | typedef struct sout_chain_t sout_chain_t; |
|---|
| | 342 | typedef struct streaming_profile_t streaming_profile_t; |
|---|
| | 343 | typedef struct sout_module_t sout_module_t; |
|---|
| | 344 | typedef struct sout_gui_descr_t sout_gui_descr_t; |
|---|
| | 345 | |
|---|
| 337 | 346 | /* Decoders */ |
|---|
| 338 | 347 | typedef struct decoder_t decoder_t; |
|---|
| … | … | |
| 359 | 368 | typedef struct device_probe_t device_probe_t; |
|---|
| 360 | 369 | typedef struct probe_sys_t probe_sys_t; |
|---|
| | 370 | typedef struct localized_string_t localized_string_t; |
|---|
| | 371 | typedef struct i18n_string_t i18n_string_t; |
|---|
| 361 | 372 | |
|---|
| 362 | 373 | /* block */ |
|---|
| ra48f5f1 |
r89471fa |
|
| 35 | 35 | VLC_EXPORT( char *, convert_xml_special_chars, ( const char *psz_content ) ); |
|---|
| 36 | 36 | |
|---|
| | 37 | struct localized_string_t |
|---|
| | 38 | { |
|---|
| | 39 | char *psz_lang; |
|---|
| | 40 | char *psz_text; |
|---|
| | 41 | }; |
|---|
| | 42 | |
|---|
| | 43 | struct i18n_string_t |
|---|
| | 44 | { |
|---|
| | 45 | int i_langs; |
|---|
| | 46 | localized_string_t **pp_langs; |
|---|
| | 47 | }; |
|---|
| | 48 | |
|---|
| | 49 | static 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 | |
|---|
| | 58 | static 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 | |
|---|
| 37 | 69 | /** |
|---|
| 38 | 70 | * @} |
|---|
| rf3c6bbc |
r89471fa |
|
| 520 | 520 | void (*__intf_IntfProgressUpdate_inner) (vlc_object_t*, int, const char*, float); |
|---|
| 521 | 521 | int (*__intf_IntfProgress_inner) (vlc_object_t*, const char*, float); |
|---|
| | 522 | void *streaming_ChainToPsz_deprecated; |
|---|
| 522 | 523 | }; |
|---|
| 523 | 524 | # if defined (__PLUGIN__) |
|---|
| … | … | |
| 1494 | 1495 | (p_symbols)->stats_TimerClean_deprecated = NULL; \ |
|---|
| 1495 | 1496 | (p_symbols)->stats_TimersClean_deprecated = NULL; \ |
|---|
| | 1497 | (p_symbols)->streaming_ChainToPsz_deprecated = NULL; \ |
|---|
| 1496 | 1498 | |
|---|
| 1497 | 1499 | # endif /* __PLUGIN__ */ |
|---|
| r07e87b9 |
r89471fa |
|
| 58 | 58 | ../include/snapshot.h \ |
|---|
| 59 | 59 | ../include/stream_output.h \ |
|---|
| | 60 | ../include/vlc_streaming.h \ |
|---|
| 60 | 61 | ../include/variables.h \ |
|---|
| 61 | 62 | ../include/video_output.h \ |
|---|
| … | … | |
| 288 | 289 | stream_output/stream_output.c \ |
|---|
| 289 | 290 | stream_output/announce.c \ |
|---|
| | 291 | stream_output/profiles.c \ |
|---|
| 290 | 292 | stream_output/sap.c \ |
|---|
| 291 | 293 | osd/osd.c \ |
|---|
| red0b72e |
r89471fa |
|
| 1 | 1 | #include "../pyunit.h" |
|---|
| 2 | 2 | #include <vlc/vlc.h> |
|---|
| 3 | | |
|---|
| 4 | | #include <vlc_common.h> |
|---|
| 5 | 3 | |
|---|
| 6 | 4 | struct mygc |
|---|
| … | … | |
| 22 | 20 | mygc *gc = (mygc *)malloc( sizeof( mygc ) ); |
|---|
| 23 | 21 | |
|---|
| 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" ); |
|---|
| 27 | 24 | vlc_gc_incref( gc ); |
|---|
| 28 | 25 | ASSERT( gc->i_gc_refcount == 1, "Refcount should be 1" ); |
|---|
| r59cd4c2 |
r89471fa |
|
| 9 | 9 | DEF_METHOD( i18n_atof_test, "Test i18n_atof" ) |
|---|
| 10 | 10 | 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" ) |
|---|
| 11 | 14 | { NULL, NULL, 0, NULL } |
|---|
| 12 | 15 | }; |
|---|
| r59cd4c2 |
r89471fa |
|
| 11 | 11 | |
|---|
| 12 | 12 | PyObject *i18n_atof_test( PyObject *self, PyObject *args ); |
|---|
| | 13 | |
|---|
| | 14 | PyObject *chains_test( PyObject *self, PyObject *args ); |
|---|
| | 15 | PyObject *gui_chains_test( PyObject *self, PyObject *args ); |
|---|
| | 16 | PyObject *psz_chains_test( PyObject *self, PyObject *args ); |
|---|
| r59cd4c2 |
r89471fa |
|
| 24 | 24 | #include "vlc_url.h" |
|---|
| 25 | 25 | |
|---|
| 26 | | PyObject * test_decode (const char *in, const char *out) |
|---|
| | 26 | PyObject * test_decode (const char *in, const char *out) |
|---|
| 27 | 27 | { |
|---|
| 28 | 28 | char *res; |
|---|
| … | … | |
| 40 | 40 | } |
|---|
| 41 | 41 | |
|---|
| 42 | | PyObject *url_decode_test( PyObject *self, PyObject *args ) |
|---|
| | 42 | PyObject *url_decode_test( PyObject *self, PyObject *args ) |
|---|
| 43 | 43 | { |
|---|
| | 44 | printf( "\n" ); |
|---|
| 44 | 45 | (void)setvbuf (stdout, NULL, _IONBF, 0); |
|---|
| 45 | 46 | if( !test_decode ("this_should_not_be_modified_1234", |
|---|
| r4db506d |
r89471fa |
|
| 16 | 16 | |
|---|
| 17 | 17 | |
|---|
| 18 | | |
|---|
| 19 | 18 | #define DEF_METHOD( method, desc ) { #method, method, METH_VARARGS, desc}, |
|---|
| r59cd4c2 |
r89471fa |
|
| 42 | 42 | native_libvlc_test = Extension( 'native_libvlc_test', |
|---|
| 43 | 43 | 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 | |
|---|
| | 51 | native_gc_test = Extension( 'native_gc_test', |
|---|
| | 52 | sources = ['native/gc.c'], |
|---|
| 45 | 53 | include_dirs = ['../include', '../', '/usr/win32/include' ], |
|---|
| 46 | 54 | extra_objects = [ '../src/.libs/libvlc.so' ], |
|---|
| … | … | |
| 50 | 58 | |
|---|
| 51 | 59 | setup( name = 'native_libvlc_test' ,version = '1242', ext_modules = [ native_libvlc_test ] ) |
|---|
| | 60 | |
|---|
| | 61 | |
|---|
| | 62 | setup( name = 'native_gc_test' ,version = '1242', ext_modules = [ native_gc_test ] ) |
|---|