Changeset 77d07c4028f5760684f3f41b6e0c382731d2de11
- Timestamp:
- 05/01/08 19:04:27
(4 months ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1209661467 +0300
- git-parent:
[ea0c5c53fd2910a995b935b5ec3417bf85ec8ae6]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1209661467 +0300
- Message:
Don't compile sout code if sout is disabled
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rea0c5c5 |
r77d07c4 |
|
| 201 | 201 | $(SOURCES_libvlc_dirent) \ |
|---|
| 202 | 202 | $(SOURCES_libvlc_getopt) \ |
|---|
| | 203 | $(SOURCES_libvlc_sout) \ |
|---|
| 203 | 204 | $(NULL) |
|---|
| 204 | 205 | if HAVE_BEOS |
|---|
| … | … | |
| 219 | 220 | if BUILD_GETOPT |
|---|
| 220 | 221 | libvlc_la_SOURCES += $(SOURCES_libvlc_getopt) |
|---|
| | 222 | endif |
|---|
| | 223 | if ENABLE_SOUT |
|---|
| | 224 | libvlc_la_SOURCES += $(SOURCES_libvlc_sout) |
|---|
| 221 | 225 | endif |
|---|
| 222 | 226 | |
|---|
| … | … | |
| 293 | 297 | audio_output/output.c \ |
|---|
| 294 | 298 | audio_output/intf.c \ |
|---|
| 295 | | stream_output/stream_output.c \ |
|---|
| 296 | | stream_output/stream_output.h \ |
|---|
| 297 | | stream_output/announce.c \ |
|---|
| 298 | | stream_output/profiles.c \ |
|---|
| 299 | | stream_output/sap.c \ |
|---|
| 300 | | stream_output/sdp.c \ |
|---|
| 301 | 299 | osd/osd.c \ |
|---|
| 302 | 300 | osd/osd_text.c \ |
|---|
| … | … | |
| 345 | 343 | misc/error.c \ |
|---|
| 346 | 344 | misc/update.c \ |
|---|
| 347 | | input/vlm.c \ |
|---|
| 348 | 345 | misc/xml.c \ |
|---|
| 349 | 346 | misc/devices.c \ |
|---|
| 350 | 347 | extras/libc.c \ |
|---|
| | 348 | $(NULL) |
|---|
| | 349 | |
|---|
| | 350 | SOURCES_libvlc_sout = \ |
|---|
| | 351 | input/vlm.c \ |
|---|
| | 352 | stream_output/stream_output.c \ |
|---|
| | 353 | stream_output/stream_output.h \ |
|---|
| | 354 | stream_output/announce.c \ |
|---|
| | 355 | stream_output/profiles.c \ |
|---|
| | 356 | stream_output/sap.c \ |
|---|
| | 357 | stream_output/sdp.c \ |
|---|
| 351 | 358 | $(NULL) |
|---|
| 352 | 359 | |
|---|
| r449fd28 |
r77d07c4 |
|
| 154 | 154 | vlc_value_t val; |
|---|
| 155 | 155 | |
|---|
| | 156 | #ifndef ENABLE_SOUT |
|---|
| | 157 | (void)b_force_decoder; |
|---|
| | 158 | #else |
|---|
| 156 | 159 | /* If we are in sout mode, search for packetizer module */ |
|---|
| 157 | 160 | if( p_input->p->p_sout && !b_force_decoder ) |
|---|
| … | … | |
| 168 | 171 | } |
|---|
| 169 | 172 | else |
|---|
| | 173 | #endif |
|---|
| 170 | 174 | { |
|---|
| 171 | 175 | /* Create the decoder configuration structure */ |
|---|
| … | … | |
| 776 | 780 | } |
|---|
| 777 | 781 | |
|---|
| | 782 | #ifdef ENABLE_SOUT |
|---|
| 778 | 783 | if( p_dec->i_object_type == VLC_OBJECT_PACKETIZER ) |
|---|
| 779 | 784 | { |
|---|
| … | … | |
| 830 | 835 | } |
|---|
| 831 | 836 | |
|---|
| 832 | | /* For now it's enough, as only sout inpact on this flag */ |
|---|
| | 837 | /* For now it's enough, as only sout impact on this flag */ |
|---|
| 833 | 838 | if( p_dec->p_owner->p_sout->i_out_pace_nocontrol > 0 && |
|---|
| 834 | 839 | p_dec->p_owner->p_input->p->b_out_pace_control ) |
|---|
| … | … | |
| 845 | 850 | } |
|---|
| 846 | 851 | } |
|---|
| 847 | | else if( p_dec->fmt_in.i_cat == AUDIO_ES ) |
|---|
| | 852 | else |
|---|
| | 853 | #endif |
|---|
| | 854 | if( p_dec->fmt_in.i_cat == AUDIO_ES ) |
|---|
| 848 | 855 | { |
|---|
| 849 | 856 | if( p_block ) |
|---|
| … | … | |
| 1001 | 1008 | } |
|---|
| 1002 | 1009 | |
|---|
| | 1010 | #ifdef ENABLE_SOUT |
|---|
| 1003 | 1011 | if( p_dec->p_owner->p_sout_input ) |
|---|
| 1004 | 1012 | { |
|---|
| … | … | |
| 1006 | 1014 | es_format_Clean( &p_dec->p_owner->sout ); |
|---|
| 1007 | 1015 | } |
|---|
| | 1016 | #endif |
|---|
| 1008 | 1017 | |
|---|
| 1009 | 1018 | if( p_dec->fmt_in.i_cat == SPU_ES ) |
|---|
| rd8ad123 |
r77d07c4 |
|
| 320 | 320 | stats_TimerDump( p_input, STATS_TIMER_INPUT_LAUNCHING ); |
|---|
| 321 | 321 | stats_TimerClean( p_input, STATS_TIMER_INPUT_LAUNCHING ); |
|---|
| 322 | | |
|---|
| | 322 | #ifdef ENABLE_SOUT |
|---|
| 323 | 323 | if( priv->b_owns_its_sout && priv->p_sout ) |
|---|
| 324 | 324 | { |
|---|
| … | … | |
| 331 | 331 | } |
|---|
| 332 | 332 | } |
|---|
| 333 | | |
|---|
| | 333 | #endif |
|---|
| 334 | 334 | vlc_gc_decref( p_input->p->input.p_item ); |
|---|
| 335 | 335 | |
|---|
| … | … | |
| 820 | 820 | } |
|---|
| 821 | 821 | |
|---|
| | 822 | #ifdef ENABLE_SOUT |
|---|
| 822 | 823 | static int InitSout( input_thread_t * p_input ) |
|---|
| 823 | 824 | { |
|---|
| … | … | |
| 884 | 885 | return VLC_SUCCESS; |
|---|
| 885 | 886 | } |
|---|
| | 887 | #endif |
|---|
| 886 | 888 | |
|---|
| 887 | 889 | static void InitTitle( input_thread_t * p_input ) |
|---|
| … | … | |
| 1162 | 1164 | |
|---|
| 1163 | 1165 | InitStatistics( p_input ); |
|---|
| | 1166 | #ifdef ENABLE_SOUT |
|---|
| 1164 | 1167 | ret = InitSout( p_input ); |
|---|
| 1165 | | |
|---|
| 1166 | 1168 | if( ret != VLC_SUCCESS ) |
|---|
| 1167 | 1169 | return ret; /* FIXME: goto error; should be better here */ |
|---|
| | 1170 | #endif |
|---|
| 1168 | 1171 | |
|---|
| 1169 | 1172 | /* Create es out */ |
|---|
| … | … | |
| 1250 | 1253 | if( p_input->p->p_es_out ) |
|---|
| 1251 | 1254 | input_EsOutDelete( p_input->p->p_es_out ); |
|---|
| 1252 | | |
|---|
| | 1255 | #ifdef ENABLE_SOUT |
|---|
| 1253 | 1256 | if( p_input->p->p_sout ) |
|---|
| 1254 | 1257 | { |
|---|
| … | … | |
| 1256 | 1259 | sout_DeleteInstance( p_input->p->p_sout ); |
|---|
| 1257 | 1260 | } |
|---|
| 1258 | | |
|---|
| | 1261 | #endif |
|---|
| 1259 | 1262 | |
|---|
| 1260 | 1263 | if( !p_input->b_preparsing && p_input->p_libvlc->b_stats ) |
|---|
| rf864df7 |
r77d07c4 |
|
| 779 | 779 | free( psz_modules ); |
|---|
| 780 | 780 | |
|---|
| | 781 | #ifdef ENABLE_SOUT |
|---|
| 781 | 782 | /* Initialize VLM if vlm-conf is specified */ |
|---|
| 782 | 783 | psz_parser = config_GetPsz( p_libvlc, "vlm-conf" ); |
|---|
| … | … | |
| 788 | 789 | } |
|---|
| 789 | 790 | free( psz_parser ); |
|---|
| | 791 | #endif |
|---|
| 790 | 792 | |
|---|
| 791 | 793 | /* |
|---|
| … | … | |
| 945 | 947 | vout_thread_t * p_vout = NULL; |
|---|
| 946 | 948 | aout_instance_t * p_aout = NULL; |
|---|
| 947 | | announce_handler_t * p_announce = NULL; |
|---|
| 948 | | sout_instance_t * p_sout = NULL; |
|---|
| 949 | 949 | |
|---|
| 950 | 950 | /* Ask the interfaces to stop and destroy them */ |
|---|
| … | … | |
| 981 | 981 | } |
|---|
| 982 | 982 | |
|---|
| | 983 | #ifdef ENABLE_SOUT |
|---|
| | 984 | sout_instance_t * p_sout; |
|---|
| | 985 | |
|---|
| 983 | 986 | p_sout = vlc_object_find( p_libvlc, VLC_OBJECT_SOUT, FIND_CHILD ); |
|---|
| 984 | 987 | if( p_sout ) |
|---|
| … | … | |
| 995 | 998 | vlm_Delete( p_libvlc->p_vlm ); |
|---|
| 996 | 999 | } |
|---|
| | 1000 | #endif |
|---|
| 997 | 1001 | |
|---|
| 998 | 1002 | /* Free interaction */ |
|---|
| … | … | |
| 1002 | 1006 | stats_TimersDumpAll( p_libvlc ); |
|---|
| 1003 | 1007 | stats_TimersCleanAll( p_libvlc ); |
|---|
| | 1008 | |
|---|
| | 1009 | #ifdef ENABLE_SOUT |
|---|
| | 1010 | announce_handler_t * p_announce; |
|---|
| 1004 | 1011 | |
|---|
| 1005 | 1012 | /* Free announce handler(s?) */ |
|---|
| … | … | |
| 1012 | 1019 | announce_HandlerDestroy( p_announce ); |
|---|
| 1013 | 1020 | } |
|---|
| | 1021 | #endif |
|---|
| 1014 | 1022 | |
|---|
| 1015 | 1023 | bool b_clean = true; |
|---|
| r7bc28ee |
r77d07c4 |
|
| 232 | 232 | vout_Destroy( (vout_thread_t *)p_obj ); |
|---|
| 233 | 233 | } |
|---|
| | 234 | #ifdef ENABLE_SOUT |
|---|
| 234 | 235 | while( ( p_obj = vlc_object_find( p_playlist, VLC_OBJECT_SOUT, |
|---|
| 235 | 236 | FIND_CHILD ) ) ) |
|---|
| … | … | |
| 245 | 246 | sout_DeleteInstance( (sout_instance_t*)p_obj ); |
|---|
| 246 | 247 | } |
|---|
| | 248 | #endif |
|---|
| 247 | 249 | p_playlist->b_cant_sleep = false; |
|---|
| 248 | 250 | vlc_mutex_unlock( &p_playlist->gc_lock ); |
|---|
| … | … | |
| 448 | 450 | } |
|---|
| 449 | 451 | |
|---|
| | 452 | #ifdef ENABLE_SOUT |
|---|
| 450 | 453 | /* close all remaining sout */ |
|---|
| 451 | 454 | while( ( p_obj = vlc_object_find( p_playlist, |
|---|
| … | … | |
| 456 | 459 | sout_DeleteInstance( (sout_instance_t*)p_obj ); |
|---|
| 457 | 460 | } |
|---|
| | 461 | #endif |
|---|
| 458 | 462 | |
|---|
| 459 | 463 | /* close all remaining vout */ |
|---|