From f485214f09dd284cbb85674e937fbbb0a6032a2e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Cl=C3=A9ment=20Stenac?= Date: Fri, 15 Sep 2006 14:31:51 +0000 Subject: [PATCH] For consistency, remove references to vlc from libvlc Also, make it clearer what is shared and instance-specific So, libvlc_t ==> libvlc_global_t vlc_t ==> libvlc_int_t (internal instance) p_object->p_libvlc ==> p_object->p_libvlc_globale p_object->p_vlc ==> p_object->p_libvlc VLC_OBJECT_VLC ==> VLC_OBJECT_LIBVLC And by the way, there is some cleanup required :) (ie, some things are created in the global object instead of the instance-specific one) --- include/libvlc_internal.h | 2 +- include/main.h | 22 +- include/vlc_common.h | 8 +- include/vlc_objects.h | 4 +- include/vlc_symbols.h | 10 +- include/vlc_update.h | 2 +- modules/access/dshow/dshow.cpp | 4 +- modules/access/dvdnav.c | 8 +- modules/access/file.c | 2 +- modules/access/screen/win32.c | 2 +- modules/access/vcdx/intf.c | 8 +- modules/access_filter/record.c | 10 +- modules/audio_filter/converter/a52tospdif.c | 8 +- modules/audio_filter/converter/dtstospdif.c | 10 +- .../audio_filter/converter/mpgatofixed32.c | 4 +- modules/audio_filter/resampler/bandlimited.c | 4 +- modules/audio_filter/resampler/linear.c | 2 +- modules/audio_filter/resampler/trivial.c | 2 +- modules/audio_filter/resampler/ugly.c | 2 +- modules/audio_mixer/trivial.c | 4 +- modules/audio_output/alsa.c | 2 +- modules/audio_output/auhal.c | 20 +- modules/audio_output/directx.c | 2 +- modules/audio_output/hd1000a.cpp | 4 +- modules/audio_output/portaudio.c | 4 +- modules/audio_output/sdl.c | 4 +- modules/codec/cmml/intf.c | 22 +- modules/codec/dirac.c | 4 +- modules/codec/dmo/dmo.c | 4 +- modules/codec/faad.c | 6 +- modules/codec/ffmpeg/audio.c | 2 +- modules/codec/ffmpeg/encoder.c | 12 +- modules/codec/ffmpeg/ffmpeg.c | 16 +- modules/codec/ffmpeg/postprocess.c | 2 +- modules/codec/ffmpeg/video.c | 6 +- modules/codec/libmpeg2.c | 8 +- modules/codec/mash.cpp | 6 +- modules/codec/quicktime.c | 14 +- modules/codec/rawvideo.c | 8 +- modules/codec/sdl_image.c | 2 +- modules/codec/tarkin.c | 2 +- modules/codec/theora.c | 2 +- modules/codec/twolame.c | 2 +- modules/codec/x264.c | 8 +- modules/control/gestures.c | 2 +- modules/control/hotkeys.c | 20 +- modules/control/http/http.c | 8 +- modules/control/http/macro.c | 2 +- modules/control/http/rpn.c | 4 +- modules/control/http/util.c | 4 +- modules/control/lirc.c | 2 +- modules/control/ntservice.c | 2 +- modules/control/rc.c | 92 +-- modules/control/telnet.c | 2 +- modules/demux/mkv.cpp | 8 +- modules/demux/mp4/libmp4.c | 2 +- modules/gui/beos/AudioOutput.cpp | 6 +- modules/gui/beos/PreferencesWindow.cpp | 2 +- modules/gui/beos/VideoOutput.cpp | 2 +- modules/gui/macosx/controls.m | 24 +- modules/gui/macosx/intf.m | 8 +- modules/gui/macosx/prefs_widgets.m | 2 +- modules/gui/macosx/sfilters.m | 26 +- modules/gui/macosx/vout.m | 18 +- modules/gui/macosx/voutgl.m | 20 +- modules/gui/macosx/voutqt.m | 44 +- modules/gui/ncurses.c | 6 +- modules/gui/pda/pda.c | 6 +- modules/gui/pda/pda_callbacks.c | 2 +- modules/gui/qnx/vout.c | 4 +- modules/gui/qt4/dialogs/messages.cpp | 2 +- modules/gui/qt4/dialogs_provider.cpp | 2 +- modules/gui/qt4/main_interface.cpp | 2 +- modules/gui/skins2/src/top_window.cpp | 4 +- modules/gui/skins2/src/vlcproc.cpp | 2 +- modules/gui/skins2/win32/win32_factory.cpp | 10 +- modules/gui/skins2/x11/x11_factory.cpp | 2 +- modules/gui/wince/messages.cpp | 6 +- modules/gui/wince/preferences.cpp | 2 +- modules/gui/wxwidgets/dialogs/preferences.cpp | 2 +- modules/gui/wxwidgets/interface.cpp | 2 +- modules/gui/wxwidgets/menus.cpp | 4 +- modules/misc/dummy/input.c | 2 +- modules/misc/gnutls.c | 26 +- modules/misc/gtk_main.c | 14 +- modules/misc/logger.c | 2 +- modules/misc/memcpy/memcpy.c | 8 +- modules/misc/memcpy/memcpyaltivec.c | 2 +- modules/misc/qte_main.cpp | 12 +- modules/misc/testsuite/playlist.c | 2 +- modules/misc/testsuite/test4.c | 16 +- modules/mux/mpeg/pes.c | 2 +- modules/mux/mpeg/ts.c | 4 +- modules/services_discovery/daap.c | 8 +- modules/stream_out/bridge.c | 20 +- modules/stream_out/mosaic_bridge.c | 16 +- modules/stream_out/switcher.c | 26 +- modules/video_chroma/i420_rgb.h | 2 +- modules/video_chroma/i420_ymga.c | 2 +- modules/video_filter/clone.c | 4 +- modules/video_filter/crop.c | 2 +- modules/video_filter/deinterlace.c | 54 +- modules/video_filter/gradient.c | 22 +- modules/video_filter/logo.c | 40 +- modules/video_filter/marq.c | 68 +- modules/video_filter/mosaic.c | 72 +- modules/video_filter/mosaic.h | 4 +- modules/video_filter/motionblur.c | 4 +- modules/video_filter/motiondetect.c | 4 +- modules/video_filter/opencv_example.cpp | 8 +- modules/video_filter/psychedelic.c | 2 +- modules/video_filter/ripple.c | 8 +- modules/video_filter/swscale/filter.c | 10 +- modules/video_filter/time.c | 42 +- modules/video_filter/transform.c | 2 +- modules/video_filter/wall.c | 2 +- modules/video_filter/wave.c | 6 +- modules/video_output/caca.c | 2 +- modules/video_output/directx/events.c | 4 +- modules/video_output/fb.c | 2 +- modules/video_output/ggi.c | 2 +- modules/video_output/glide.c | 2 +- modules/video_output/qte/qte.cpp | 2 +- modules/video_output/sdl.c | 10 +- modules/video_output/snapshot.c | 16 +- modules/video_output/svgalib.c | 2 +- modules/video_output/wingdi.c | 4 +- modules/video_output/x11/xcommon.c | 8 +- src/audio_output/dec.c | 4 +- src/audio_output/intf.c | 22 +- src/audio_output/output.c | 2 +- src/control/audio.c | 10 +- src/control/core.c | 12 +- src/control/input.c | 4 +- src/control/mediacontrol_init.c | 4 +- src/control/video.c | 26 +- src/control/vlm.c | 2 +- src/input/es_out.c | 2 +- src/input/input.c | 6 +- src/input/stream.c | 2 +- src/interface/interface.c | 12 +- src/libvlc.c | 744 +++++++++--------- src/misc/beos_specific.cpp | 16 +- src/misc/block.c | 2 +- src/misc/charset.c | 8 +- src/misc/configuration.c | 50 +- src/misc/darwin_specific.m | 14 +- src/misc/devices.c | 4 +- src/misc/messages.c | 52 +- src/misc/modules.c | 132 ++-- src/misc/objects.c | 75 +- src/misc/stats.c | 76 +- src/misc/threads.c | 25 +- src/misc/update.c | 62 +- src/misc/vlm.c | 10 +- src/misc/win32_specific.c | 12 +- src/network/httpd.c | 8 +- src/network/tls.c | 8 +- src/osd/osd.c | 32 +- src/playlist/engine.c | 2 +- src/playlist/loadsave.c | 4 +- src/stream_output/announce.c | 4 +- src/stream_output/stream_output.c | 2 +- src/video_output/vout_intf.c | 14 +- src/video_output/vout_pictures.c | 4 +- 165 files changed, 1336 insertions(+), 1342 deletions(-) diff --git a/include/libvlc_internal.h b/include/libvlc_internal.h index e66c5d612d..634d7f0d01 100644 --- a/include/libvlc_internal.h +++ b/include/libvlc_internal.h @@ -33,7 +33,7 @@ extern "C" { struct libvlc_instance_t { - vlc_t *p_vlc; + libvlc_int_t *p_libvlc_int; playlist_t *p_playlist; vlm_t *p_vlm; int i_vlc_id; diff --git a/include/main.h b/include/main.h index 55375520cb..aa3919c52d 100644 --- a/include/main.h +++ b/include/main.h @@ -23,13 +23,13 @@ *****************************************************************************/ /***************************************************************************** - * libvlc_t (global variable) + * libvlc_global_data_t (global variable) ***************************************************************************** * This structure has an unique instance, statically allocated in main and - * never accessed from the outside. It store once-initialized data such as + * never accessed from the outside. It stores once-initialized data such as * the CPU capabilities or the global lock. *****************************************************************************/ -struct libvlc_t +struct libvlc_global_data_t { VLC_COMMON_MEMBERS @@ -48,13 +48,13 @@ struct libvlc_t module_bank_t * p_module_bank; ///< The module bank - vlc_bool_t b_stats; ///< Should we collect stats + vlc_bool_t b_stats; ///< Should we collect stats /* Timers handling */ - vlc_mutex_t timer_lock; ///< Lock to protect timers - int i_timers; ///< Number of timers - counter_t **pp_timers; ///< Array of all timers + vlc_mutex_t timer_lock; ///< Lock to protect timers + int i_timers; ///< Number of timers + counter_t **pp_timers; ///< Array of all timers - intf_thread_t *p_probe; ///< Devices prober + intf_thread_t *p_probe; ///< Devices prober /* Arch-specific variables */ #if !defined( WIN32 ) @@ -78,11 +78,11 @@ struct libvlc_t }; /***************************************************************************** - * vlc_t, p_vlc + * libvlc_internal_instance_t ***************************************************************************** - * This structure is a LibVLC instance. + * This structure is a LibVLC instance, for use by libvlc core and plugins *****************************************************************************/ -struct vlc_t +struct libvlc_int_t { VLC_COMMON_MEMBERS diff --git a/include/vlc_common.h b/include/vlc_common.h index bdfb89ba42..e50d23de48 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -199,8 +199,8 @@ typedef uint32_t vlc_fourcc_t; *****************************************************************************/ /* Internal types */ -typedef struct libvlc_t libvlc_t; -typedef struct vlc_t vlc_t; +typedef struct libvlc_global_data_t libvlc_global_data_t; +typedef struct libvlc_int_t libvlc_int_t; typedef struct variable_t variable_t; typedef struct date_t date_t; typedef struct dict_entry_t dict_entry_t; @@ -521,8 +521,8 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ variable_t * p_vars; \ \ /* Stuff related to the libvlc structure */ \ - libvlc_t * p_libvlc; /**< root of all evil */ \ - vlc_t * p_vlc; /**< (root of all evil) - 1 */ \ + libvlc_global_data_t *p_libvlc_global; /**< root of all evil */ \ + libvlc_int_t *p_libvlc; /**< (root of all evil) - 1 */ \ \ volatile int i_refcount; /**< usage count */ \ vlc_object_t * p_parent; /**< our parent */ \ diff --git a/include/vlc_objects.h b/include/vlc_objects.h index 6f8af17141..7f346a53ba 100644 --- a/include/vlc_objects.h +++ b/include/vlc_objects.h @@ -33,7 +33,7 @@ /* Object types */ #define VLC_OBJECT_ROOT (-1) -#define VLC_OBJECT_VLC (-2) +#define VLC_OBJECT_LIBVLC (-2) #define VLC_OBJECT_MODULE (-3) #define VLC_OBJECT_INTF (-4) #define VLC_OBJECT_PLAYLIST (-5) @@ -99,7 +99,7 @@ VLC_EXPORT( void, __vlc_object_yield, ( vlc_object_t * ) ); VLC_EXPORT( void, __vlc_object_release, ( vlc_object_t * ) ); VLC_EXPORT( vlc_list_t *, __vlc_list_find, ( vlc_object_t *, int, int ) ); VLC_EXPORT( void, vlc_list_release, ( vlc_list_t * ) ); -VLC_EXPORT( vlc_t *, vlc_current_object, ( int ) ); +VLC_EXPORT( libvlc_int_t *, vlc_current_object, ( int ) ); /*}@*/ diff --git a/include/vlc_symbols.h b/include/vlc_symbols.h index 5546bcae13..e518afffa9 100644 --- a/include/vlc_symbols.h +++ b/include/vlc_symbols.h @@ -447,7 +447,7 @@ struct module_symbols_t void *__stats_CounterGet_deprecated; input_thread_t * (*__input_CreateThread2_inner) (vlc_object_t *, input_item_t *, char *); void *stats_HandlerDestroy_deprecated; - vlc_t * (*vlc_current_object_inner) (int); + libvlc_int_t * (*vlc_current_object_inner) (int); void (*__var_OptionParse_inner) (vlc_object_t *, const char *); void *__stats_TimerDumpAll_deprecated; void (*__stats_TimerDump_inner) (vlc_object_t*, unsigned int); @@ -511,7 +511,7 @@ struct module_symbols_t void (*playlist_NodeDump_inner) (playlist_t *p_playlist, playlist_item_t *p_item, int i_level); void *__intf_UserOkayCancel_deprecated; int (*__intf_UserStringInput_inner) (vlc_object_t*, const char*, const char*, char **); - void (*playlist_NodesCreateForSD_inner) (playlist_t *, char *, playlist_item_t **, playlist_item_t **); + void *playlist_NodesCreateForSD_deprecated; vlc_bool_t (*input_AddSubtitles_inner) (input_thread_t *, char *, vlc_bool_t); counter_t * (*__stats_CounterCreate_inner) (vlc_object_t*, int, int); void *stats_TimerClean_deprecated; @@ -536,6 +536,7 @@ struct module_symbols_t int (*net_SetDSCP_inner) (int fd, uint8_t dscp); void (*vout_EnableFilter_inner) (vout_thread_t *, char *,vlc_bool_t , vlc_bool_t); void (*aout_EnableFilter_inner) (vlc_object_t *, const char *, vlc_bool_t); + void (*playlist_NodesPairCreate_inner) (playlist_t *, char *, playlist_item_t **, playlist_item_t **, vlc_bool_t); }; # if defined (__PLUGIN__) # define aout_FiltersCreatePipeline (p_symbols)->aout_FiltersCreatePipeline_inner @@ -987,7 +988,6 @@ struct module_symbols_t # define playlist_DeleteFromItemId (p_symbols)->playlist_DeleteFromItemId_inner # define playlist_NodeDump (p_symbols)->playlist_NodeDump_inner # define __intf_UserStringInput (p_symbols)->__intf_UserStringInput_inner -# define playlist_NodesCreateForSD (p_symbols)->playlist_NodesCreateForSD_inner # define input_AddSubtitles (p_symbols)->input_AddSubtitles_inner # define __stats_CounterCreate (p_symbols)->__stats_CounterCreate_inner # define __stats_TimersClean (p_symbols)->__stats_TimersClean_inner @@ -1007,6 +1007,7 @@ struct module_symbols_t # define net_SetDSCP (p_symbols)->net_SetDSCP_inner # define vout_EnableFilter (p_symbols)->vout_EnableFilter_inner # define aout_EnableFilter (p_symbols)->aout_EnableFilter_inner +# define playlist_NodesPairCreate (p_symbols)->playlist_NodesPairCreate_inner # elif defined (HAVE_DYNAMIC_PLUGINS) && !defined (__BUILTIN__) /****************************************************************** * STORE_SYMBOLS: store VLC APIs into p_symbols for plugin access. @@ -1461,7 +1462,6 @@ struct module_symbols_t ((p_symbols)->playlist_DeleteFromItemId_inner) = playlist_DeleteFromItemId; \ ((p_symbols)->playlist_NodeDump_inner) = playlist_NodeDump; \ ((p_symbols)->__intf_UserStringInput_inner) = __intf_UserStringInput; \ - ((p_symbols)->playlist_NodesCreateForSD_inner) = playlist_NodesCreateForSD; \ ((p_symbols)->input_AddSubtitles_inner) = input_AddSubtitles; \ ((p_symbols)->__stats_CounterCreate_inner) = __stats_CounterCreate; \ ((p_symbols)->__stats_TimersClean_inner) = __stats_TimersClean; \ @@ -1481,6 +1481,7 @@ struct module_symbols_t ((p_symbols)->net_SetDSCP_inner) = net_SetDSCP; \ ((p_symbols)->vout_EnableFilter_inner) = vout_EnableFilter; \ ((p_symbols)->aout_EnableFilter_inner) = aout_EnableFilter; \ + ((p_symbols)->playlist_NodesPairCreate_inner) = playlist_NodesPairCreate; \ (p_symbols)->net_ConvertIPv4_deprecated = NULL; \ (p_symbols)->__playlist_ItemNew_deprecated = NULL; \ (p_symbols)->__playlist_ItemCopy_deprecated = NULL; \ @@ -1524,6 +1525,7 @@ struct module_symbols_t (p_symbols)->playlist_PlaylistAddExt_deprecated = NULL; \ (p_symbols)->playlist_PlaylistAddInput_deprecated = NULL; \ (p_symbols)->__intf_UserOkayCancel_deprecated = NULL; \ + (p_symbols)->playlist_NodesCreateForSD_deprecated = NULL; \ (p_symbols)->stats_TimerClean_deprecated = NULL; \ (p_symbols)->stats_TimersClean_deprecated = NULL; \ (p_symbols)->__intf_IntfProgressUpdate_deprecated = NULL; \ diff --git a/include/vlc_update.h b/include/vlc_update.h index be5839b9f6..cc441b8372 100644 --- a/include/vlc_update.h +++ b/include/vlc_update.h @@ -111,7 +111,7 @@ struct update_mirror_t */ struct update_t { - vlc_t *p_vlc; + libvlc_int_t *p_libvlc; vlc_mutex_t lock; diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp index 847508630f..46f01b7dde 100644 --- a/modules/access/dshow/dshow.cpp +++ b/modules/access/dshow/dshow.cpp @@ -1614,7 +1614,7 @@ static block_t *ReadCompressed( access_t *p_access ) } sample.p_sample->GetPointer( &p_data ); - p_access->p_vlc->pf_memcpy( p_block->p_buffer, p_data, i_data_size ); + p_access->p_libvlc->pf_memcpy( p_block->p_buffer, p_data, i_data_size ); sample.p_sample->Release(); /* The caller got what he wanted */ @@ -1703,7 +1703,7 @@ static int Demux( demux_t *p_demux ) #endif p_block = block_New( p_demux, i_data_size ); - p_demux->p_vlc->pf_memcpy( p_block->p_buffer, p_data, i_data_size ); + p_demux->p_libvlc->pf_memcpy( p_block->p_buffer, p_data, i_data_size ); p_block->i_pts = p_block->i_dts = i_pts; sample.p_sample->Release(); diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c index 8a768e3b56..b424e46eaa 100644 --- a/modules/access/dvdnav.c +++ b/modules/access/dvdnav.c @@ -1219,7 +1219,7 @@ static int EventThread( vlc_object_t *p_this ) p_ev->b_still = VLC_FALSE; /* catch all key event */ - var_AddCallback( p_ev->p_vlc, "key-pressed", EventKey, p_ev ); + var_AddCallback( p_ev->p_libvlc, "key-pressed", EventKey, p_ev ); /* main loop */ while( !p_ev->b_die ) @@ -1232,11 +1232,11 @@ static int EventThread( vlc_object_t *p_this ) pci_t *pci = dvdnav_get_current_nav_pci( p_sys->dvdnav ); vlc_value_t valk; - struct hotkey *p_hotkeys = p_ev->p_vlc->p_hotkeys; + struct hotkey *p_hotkeys = p_ev->p_libvlc->p_hotkeys; int i, i_action = -1; vlc_mutex_lock( &p_ev->lock ); - var_Get( p_ev->p_vlc, "key-pressed", &valk ); + var_Get( p_ev->p_libvlc, "key-pressed", &valk ); for( i = 0; p_hotkeys[i].psz_action != NULL; i++ ) { if( p_hotkeys[i].i_key == valk.i_int ) @@ -1340,7 +1340,7 @@ static int EventThread( vlc_object_t *p_this ) var_DelCallback( p_vout, "mouse-clicked", EventMouse, p_ev ); vlc_object_release( p_vout ); } - var_DelCallback( p_ev->p_vlc, "key-pressed", EventKey, p_ev ); + var_DelCallback( p_ev->p_libvlc, "key-pressed", EventKey, p_ev ); vlc_mutex_destroy( &p_ev->lock ); diff --git a/modules/access/file.c b/modules/access/file.c index 50e0c32281..7b65345cf1 100644 --- a/modules/access/file.c +++ b/modules/access/file.c @@ -163,7 +163,7 @@ static int Open( vlc_object_t *p_this ) { /* This is incomplete : we should also support the ~cmassiot/ * syntax. */ - asprintf( &psz, "%s/%s", p_access->p_vlc->psz_homedir, psz_name + 2 ); + asprintf( &psz, "%s/%s", p_access->p_libvlc->psz_homedir, psz_name + 2 ); free( psz_name ); psz_name = psz; } diff --git a/modules/access/screen/win32.c b/modules/access/screen/win32.c index 3a204fbac9..613e412af4 100644 --- a/modules/access/screen/win32.c +++ b/modules/access/screen/win32.c @@ -216,7 +216,7 @@ static block_t *CaptureBlockNew( demux_t *p_demux ) p_block->i_buffer = i_buffer; p_block->p_buffer = p_buffer; p_block->pf_release = CaptureBlockRelease; - p_block->p_manager = VLC_OBJECT( p_demux->p_vlc ); + p_block->p_manager = VLC_OBJECT( p_demux->p_libvlc ); p_block->p_sys->hbmp = hbmp; return p_block; diff --git a/modules/access/vcdx/intf.c b/modules/access/vcdx/intf.c index 762e4c2f0f..b3d5923dfa 100644 --- a/modules/access/vcdx/intf.c +++ b/modules/access/vcdx/intf.c @@ -63,7 +63,7 @@ int VCDOpenIntf ( vlc_object_t *p_this ) p_intf->pf_run = RunIntf; - var_AddCallback( p_intf->p_vlc, "key-pressed", KeyEvent, p_intf ); + var_AddCallback( p_intf->p_libvlc, "key-pressed", KeyEvent, p_intf ); p_intf->p_sys->m_still_time = 0; p_intf->p_sys->b_infinite_still = 0; p_intf->p_sys->b_still = 0; @@ -77,7 +77,7 @@ int VCDOpenIntf ( vlc_object_t *p_this ) void VCDCloseIntf ( vlc_object_t *p_this ) { intf_thread_t *p_intf = (intf_thread_t *)p_this; - var_DelCallback( p_intf->p_vlc, "key-pressed", KeyEvent, p_intf ); + var_DelCallback( p_intf->p_libvlc, "key-pressed", KeyEvent, p_intf ); /* Destroy structure */ free( p_intf->p_sys ); @@ -159,12 +159,12 @@ RunIntf( intf_thread_t *p_intf ) { vlc_value_t val; int i, i_action = -1; - struct hotkey *p_hotkeys = p_intf->p_vlc->p_hotkeys; + struct hotkey *p_hotkeys = p_intf->p_libvlc->p_hotkeys; p_intf->p_sys->b_key_pressed = VLC_FALSE; /* Find action triggered by hotkey (if any) */ - var_Get( p_intf->p_vlc, "key-pressed", &val ); + var_Get( p_intf->p_libvlc, "key-pressed", &val ); dbg_print( INPUT_DBG_EVENT, "Key pressed %d", val.i_int ); diff --git a/modules/access_filter/record.c b/modules/access_filter/record.c index 71571b2993..f8a40757b3 100644 --- a/modules/access_filter/record.c +++ b/modules/access_filter/record.c @@ -151,14 +151,14 @@ static int Open( vlc_object_t *p_this ) if( *psz == '\0' ) { free( psz ); - if( p_access->p_vlc->psz_homedir ) - psz = strdup( p_access->p_vlc->psz_homedir ); + if( p_access->p_libvlc->psz_homedir ) + psz = strdup( p_access->p_libvlc->psz_homedir ); } p_sys->psz_path = psz; msg_Dbg( p_access, "Record access filter path %s", psz ); /* catch all key event */ - var_AddCallback( p_access->p_vlc, "key-pressed", EventKey, p_access ); + var_AddCallback( p_access->p_libvlc, "key-pressed", EventKey, p_access ); return VLC_SUCCESS; } @@ -171,7 +171,7 @@ static void Close( vlc_object_t *p_this ) access_t *p_access = (access_t*)p_this; access_sys_t *p_sys = p_access->p_sys; - var_DelCallback( p_access->p_vlc, "key-pressed", EventKey, p_access ); + var_DelCallback( p_access->p_libvlc, "key-pressed", EventKey, p_access ); if( p_sys->f ) { @@ -277,7 +277,7 @@ static int EventKey( vlc_object_t *p_this, char const *psz_var, access_t *p_access = p_data; access_sys_t *p_sys = p_access->p_sys; - struct hotkey *p_hotkeys = p_access->p_vlc->p_hotkeys; + struct hotkey *p_hotkeys = p_access->p_libvlc->p_hotkeys; int i_action = -1, i; for( i = 0; p_hotkeys[i].psz_action != NULL; i++ ) diff --git a/modules/audio_filter/converter/a52tospdif.c b/modules/audio_filter/converter/a52tospdif.c index 7d489d74b9..a0dcbb13b0 100644 --- a/modules/audio_filter/converter/a52tospdif.c +++ b/modules/audio_filter/converter/a52tospdif.c @@ -98,15 +98,15 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, /* Copy the S/PDIF headers. */ if( p_filter->output.i_format == VLC_FOURCC('s','p','d','b') ) { - p_filter->p_vlc->pf_memcpy( p_out, p_sync_be, 6 ); + p_filter->p_libvlc->pf_memcpy( p_out, p_sync_be, 6 ); p_out[4] = p_in[5] & 0x7; /* bsmod */ p_out[6] = (i_frame_size >> 4) & 0xff; p_out[7] = (i_frame_size << 4) & 0xff; - p_filter->p_vlc->pf_memcpy( &p_out[8], p_in, i_frame_size * 2 ); + p_filter->p_libvlc->pf_memcpy( &p_out[8], p_in, i_frame_size * 2 ); } else { - p_filter->p_vlc->pf_memcpy( p_out, p_sync_le, 6 ); + p_filter->p_libvlc->pf_memcpy( p_out, p_sync_le, 6 ); p_out[5] = p_in[5] & 0x7; /* bsmod */ p_out[6] = (i_frame_size << 4) & 0xff; p_out[7] = (i_frame_size >> 4) & 0xff; @@ -122,7 +122,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, } #endif } - p_filter->p_vlc->pf_memset( p_out + 8 + i_frame_size * 2, 0, + p_filter->p_libvlc->pf_memset( p_out + 8 + i_frame_size * 2, 0, AOUT_SPDIF_SIZE - i_frame_size * 2 - 8 ); p_out_buf->i_nb_samples = p_in_buf->i_nb_samples; diff --git a/modules/audio_filter/converter/dtstospdif.c b/modules/audio_filter/converter/dtstospdif.c index c2de08f1c9..b34a7deac7 100644 --- a/modules/audio_filter/converter/dtstospdif.c +++ b/modules/audio_filter/converter/dtstospdif.c @@ -134,7 +134,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, } /* Backup frame */ - p_filter->p_vlc->pf_memcpy( p_filter->p_sys->p_buf + p_in_buf->i_nb_bytes * + p_filter->p_libvlc->pf_memcpy( p_filter->p_sys->p_buf + p_in_buf->i_nb_bytes * p_filter->p_sys->i_frames, p_in_buf->p_buffer, p_in_buf->i_nb_bytes ); @@ -169,14 +169,14 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, /* Copy the S/PDIF headers. */ if( p_filter->output.i_format == VLC_FOURCC('s','p','d','b') ) { - p_filter->p_vlc->pf_memcpy( p_out, p_sync_be, 6 ); + p_filter->p_libvlc->pf_memcpy( p_out, p_sync_be, 6 ); p_out[5] = i_ac5_spdif_type; p_out[6] = (( i_length ) >> 5 ) & 0xFF; p_out[7] = ( i_length << 3 ) & 0xFF; } else { - p_filter->p_vlc->pf_memcpy( p_out, p_sync_le, 6 ); + p_filter->p_libvlc->pf_memcpy( p_out, p_sync_le, 6 ); p_out[4] = i_ac5_spdif_type; p_out[6] = ( i_length << 3 ) & 0xFF; p_out[7] = (( i_length ) >> 5 ) & 0xFF; @@ -205,12 +205,12 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, } else { - p_filter->p_vlc->pf_memcpy( p_out + 8, p_in, i_length ); + p_filter->p_libvlc->pf_memcpy( p_out + 8, p_in, i_length ); } if( i_fz > i_length + 8 ) { - p_filter->p_vlc->pf_memset( p_out + 8 + i_length, 0, + p_filter->p_libvlc->pf_memset( p_out + 8 + i_length, 0, i_fz - i_length - 8 ); } } diff --git a/modules/audio_filter/converter/mpgatofixed32.c b/modules/audio_filter/converter/mpgatofixed32.c index f54ef7945d..6b25be9736 100644 --- a/modules/audio_filter/converter/mpgatofixed32.c +++ b/modules/audio_filter/converter/mpgatofixed32.c @@ -199,7 +199,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, break; case 1: - p_filter->p_vlc->pf_memcpy( p_samples, p_left, + p_filter->p_libvlc->pf_memcpy( p_samples, p_left, i_samples * sizeof(mad_fixed_t) ); break; @@ -313,7 +313,7 @@ static int OpenFilter( vlc_object_t *p_this ) mad_synth_init( &p_sys->mad_synth ); mad_stream_options( &p_sys->mad_stream, MAD_OPTION_IGNORECRC ); - if( p_this->p_libvlc->i_cpu & CPU_CAPABILITY_FPU ) + if( p_this->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU ) p_filter->fmt_out.i_codec = VLC_FOURCC('f','l','3','2'); else p_filter->fmt_out.i_codec = VLC_FOURCC('f','i','3','2'); diff --git a/modules/audio_filter/resampler/bandlimited.c b/modules/audio_filter/resampler/bandlimited.c index c357303064..640f161b85 100644 --- a/modules/audio_filter/resampler/bandlimited.c +++ b/modules/audio_filter/resampler/bandlimited.c @@ -244,11 +244,11 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, /* Copy all our samples in p_in */ if( p_filter->p_sys->i_old_wing ) { - p_aout->p_vlc->pf_memcpy( p_in, p_filter->p_sys->p_buf, + p_aout->p_libvlc->pf_memcpy( p_in, p_filter->p_sys->p_buf, p_filter->p_sys->i_old_wing * 2 * p_filter->input.i_bytes_per_frame ); } - p_aout->p_vlc->pf_memcpy( p_in + p_filter->p_sys->i_old_wing * 2 * + p_aout->p_libvlc->pf_memcpy( p_in + p_filter->p_sys->i_old_wing * 2 * i_nb_channels, p_in_buf->p_buffer, p_in_buf->i_nb_samples * p_filter->input.i_bytes_per_frame ); diff --git a/modules/audio_filter/resampler/linear.c b/modules/audio_filter/resampler/linear.c index 37d0f84fe4..d823ffea30 100644 --- a/modules/audio_filter/resampler/linear.c +++ b/modules/audio_filter/resampler/linear.c @@ -174,7 +174,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, return; } - p_aout->p_vlc->pf_memcpy( p_in, p_in_buf->p_buffer, p_in_buf->i_nb_bytes ); + p_aout->p_libvlc->pf_memcpy( p_in, p_in_buf->p_buffer, p_in_buf->i_nb_bytes ); /* Take care of the previous input sample (if any) */ if( !p_filter->b_continuity ) diff --git a/modules/audio_filter/resampler/trivial.c b/modules/audio_filter/resampler/trivial.c index 24eaafbccf..fb72fc5c94 100644 --- a/modules/audio_filter/resampler/trivial.c +++ b/modules/audio_filter/resampler/trivial.c @@ -97,7 +97,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, { /* For whatever reason the buffer allocator decided to allocate * a new buffer. Currently, this never happens. */ - p_aout->p_vlc->pf_memcpy( p_out_buf->p_buffer, p_in_buf->p_buffer, + p_aout->p_libvlc->pf_memcpy( p_out_buf->p_buffer, p_in_buf->p_buffer, __MIN(i_out_nb, i_in_nb) * i_sample_bytes ); } diff --git a/modules/audio_filter/resampler/ugly.c b/modules/audio_filter/resampler/ugly.c index 43ffc3be75..27897c7a3f 100644 --- a/modules/audio_filter/resampler/ugly.c +++ b/modules/audio_filter/resampler/ugly.c @@ -112,7 +112,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, return; } - p_aout->p_vlc->pf_memcpy( p_in, p_in_buf->p_buffer, p_in_buf->i_nb_bytes ); + p_aout->p_libvlc->pf_memcpy( p_in, p_in_buf->p_buffer, p_in_buf->i_nb_bytes ); for( i_out = i_out_nb ; i_out-- ; ) { diff --git a/modules/audio_mixer/trivial.c b/modules/audio_mixer/trivial.c index 38e6a8fba9..ffd8aec324 100644 --- a/modules/audio_mixer/trivial.c +++ b/modules/audio_mixer/trivial.c @@ -102,7 +102,7 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer ) aout_buffer_t * p_old_buffer; if ( i_available_bytes > 0 ) - p_aout->p_vlc->pf_memcpy( p_out, p_in, i_available_bytes ); + p_aout->p_libvlc->pf_memcpy( p_out, p_in, i_available_bytes ); i_nb_bytes -= i_available_bytes; p_out += i_available_bytes; @@ -119,7 +119,7 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer ) else { if ( i_nb_bytes > 0 ) - p_aout->p_vlc->pf_memcpy( p_out, p_in, i_nb_bytes ); + p_aout->p_libvlc->pf_memcpy( p_out, p_in, i_nb_bytes ); p_input->p_first_byte_to_mix = p_in + i_nb_bytes; break; } diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c index fc0090f794..4f48fcbb6a 100644 --- a/modules/audio_output/alsa.c +++ b/modules/audio_output/alsa.c @@ -358,7 +358,7 @@ static int Open( vlc_object_t *p_this ) /* Choose the linear PCM format (read the comment above about FPU and float32) */ - if( p_aout->p_libvlc->i_cpu & CPU_CAPABILITY_FPU ) + if( p_aout->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU ) { i_vlc_pcm_format = VLC_FOURCC('f','l','3','2'); i_snd_pcm_format = SND_PCM_FORMAT_FLOAT; diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c index 80cd622fb4..4e14bde61e 100644 --- a/modules/audio_output/auhal.c +++ b/modules/audio_output/auhal.c @@ -185,9 +185,9 @@ static int Open( vlc_object_t * p_this ) aout_FormatPrint( p_aout, "VLC is looking for:", (audio_sample_format_t *)&p_aout->output.output ); /* Persistent device variable */ - if( var_Type( p_aout->p_vlc, "macosx-audio-device" ) == 0 ) + if( var_Type( p_aout->p_libvlc, "macosx-audio-device" ) == 0 ) { - var_Create( p_aout->p_vlc, "macosx-audio-device", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); + var_Create( p_aout->p_libvlc, "macosx-audio-device", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); } /* Build a list of devices */ @@ -1031,7 +1031,7 @@ static void Probe( aout_instance_t * p_aout ) } /* If a device is already "preselected", then use this device */ - var_Get( p_aout->p_vlc, "macosx-audio-device", &val ); + var_Get( p_aout->p_libvlc, "macosx-audio-device", &val ); if( val.i_int > 0 ) { var_Change( p_aout, "audio-device", VLC_VAR_SETDEFAULT, &val, NULL ); @@ -1312,7 +1312,7 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout, if( p_sys->i_total_bytes > 0 ) { i_mData_bytes = __MIN( p_sys->i_total_bytes - p_sys->i_read_bytes, ioData->mBuffers[0].mDataByteSize ); - p_aout->p_vlc->pf_memcpy( ioData->mBuffers[0].mData, &p_sys->p_remainder_buffer[p_sys->i_read_bytes], i_mData_bytes ); + p_aout->p_libvlc->pf_memcpy( ioData->mBuffers[0].mData, &p_sys->p_remainder_buffer[p_sys->i_read_bytes], i_mData_bytes ); p_sys->i_read_bytes += i_mData_bytes; current_date += (mtime_t) ( (mtime_t) 1000000 / p_aout->output.output.i_rate ) * ( i_mData_bytes / 4 / aout_FormatNbChannels( &p_aout->output.output ) ); // 4 is fl32 specific @@ -1331,13 +1331,13 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout, { uint32_t i_second_mData_bytes = __MIN( p_buffer->i_nb_bytes, ioData->mBuffers[0].mDataByteSize - i_mData_bytes ); - p_aout->p_vlc->pf_memcpy( (uint8_t *)ioData->mBuffers[0].mData + i_mData_bytes, p_buffer->p_buffer, i_second_mData_bytes ); + p_aout->p_libvlc->pf_memcpy( (uint8_t *)ioData->mBuffers[0].mData + i_mData_bytes, p_buffer->p_buffer, i_second_mData_bytes ); i_mData_bytes += i_second_mData_bytes; if( i_mData_bytes >= ioData->mBuffers[0].mDataByteSize ) { p_sys->i_total_bytes = p_buffer->i_nb_bytes - i_second_mData_bytes; - p_aout->p_vlc->pf_memcpy( p_sys->p_remainder_buffer, &p_buffer->p_buffer[i_second_mData_bytes], p_sys->i_total_bytes ); + p_aout->p_libvlc->pf_memcpy( p_sys->p_remainder_buffer, &p_buffer->p_buffer[i_second_mData_bytes], p_sys->i_total_bytes ); } else { @@ -1349,7 +1349,7 @@ static OSStatus RenderCallbackAnalog( vlc_object_t *_p_aout, } else { - p_aout->p_vlc->pf_memset( (uint8_t *)ioData->mBuffers[0].mData +i_mData_bytes, 0, ioData->mBuffers[0].mDataByteSize - i_mData_bytes ); + p_aout->p_libvlc->pf_memset( (uint8_t *)ioData->mBuffers[0].mData +i_mData_bytes, 0, ioData->mBuffers[0].mDataByteSize - i_mData_bytes ); i_mData_bytes += ioData->mBuffers[0].mDataByteSize - i_mData_bytes; } } @@ -1391,13 +1391,13 @@ static OSStatus RenderCallbackSPDIF( AudioDeviceID inDevice, msg_Warn( p_aout, "bytesize: %d nb_bytes: %d", (int)BUFFER.mDataByteSize, (int)p_buffer->i_nb_bytes ); /* move data into output data buffer */ - p_aout->p_vlc->pf_memcpy( BUFFER.mData, + p_aout->p_libvlc->pf_memcpy( BUFFER.mData, p_buffer->p_buffer, p_buffer->i_nb_bytes ); aout_BufferFree( p_buffer ); } else { - p_aout->p_vlc->pf_memset( BUFFER.mData, 0, BUFFER.mDataByteSize ); + p_aout->p_libvlc->pf_memset( BUFFER.mData, 0, BUFFER.mDataByteSize ); } #undef BUFFER @@ -1460,7 +1460,7 @@ static int AudioDeviceCallback( vlc_object_t *p_this, const char *psz_variable, vlc_value_t old_val, vlc_value_t new_val, void *param ) { aout_instance_t *p_aout = (aout_instance_t *)p_this; - var_Set( p_aout->p_vlc, "macosx-audio-device", new_val ); + var_Set( p_aout->p_libvlc, "macosx-audio-device", new_val ); msg_Dbg( p_aout, "Set Device: %#x", new_val.i_int ); return aout_ChannelsRestart( p_this, psz_variable, old_val, new_val, param ); } diff --git a/modules/audio_output/directx.c b/modules/audio_output/directx.c index 177f2c47f9..01d53244cc 100644 --- a/modules/audio_output/directx.c +++ b/modules/audio_output/directx.c @@ -965,7 +965,7 @@ static int FillBuffer( aout_instance_t *p_aout, int i_frame, p_sys->i_bits_per_sample ); } - p_aout->p_vlc->pf_memcpy( p_write_position, p_buffer->p_buffer, + p_aout->p_libvlc->pf_memcpy( p_write_position, p_buffer->p_buffer, l_bytes1 ); aout_BufferFree( p_buffer ); } diff --git a/modules/audio_output/hd1000a.cpp b/modules/audio_output/hd1000a.cpp index 5b0fa82427..7a44d035cc 100644 --- a/modules/audio_output/hd1000a.cpp +++ b/modules/audio_output/hd1000a.cpp @@ -165,7 +165,7 @@ static int Open( vlc_object_t * p_this ) p_aout->output.pf_play = Play; aout_VolumeSoftInit( p_aout ); - i_volume = config_GetInt( p_aout->p_vlc, "volume" ); + i_volume = config_GetInt( p_aout->p_libvlc, "volume" ); pPlayer->SetVolume( (u32)__MIN( i_volume * 64, 0xFFFF ) ); /* Create thread and wait for its readiness. */ @@ -235,7 +235,7 @@ static int Thread( aout_instance_t * p_aout ) #define i p_sys->nNextBufferIndex if( p_buffer == NULL ) { - p_aout->p_vlc->pf_memset( p_sys->ppBuffers[ i ], 0, + p_aout->p_libvlc->pf_memset( p_sys->ppBuffers[ i ], 0, p_sys->nBufferSize ); } else diff --git a/modules/audio_output/portaudio.c b/modules/audio_output/portaudio.c index 16995ab64c..900e6d305b 100644 --- a/modules/audio_output/portaudio.c +++ b/modules/audio_output/portaudio.c @@ -145,7 +145,7 @@ static int paCallback( const void *inputBuffer, void *outputBuffer, p_sys->i_channels, p_sys->pi_chan_table, p_sys->i_bits_per_sample ); } - p_aout->p_vlc->pf_memcpy( outputBuffer, p_buffer->p_buffer, + p_aout->p_libvlc->pf_memcpy( outputBuffer, p_buffer->p_buffer, framesPerBuffer * p_sys->i_sample_size ); /* aout_BufferFree may be dangereous here, but then so is * aout_OutputNextBuffer (calls aout_BufferFree internally). @@ -158,7 +158,7 @@ static int paCallback( const void *inputBuffer, void *outputBuffer, else /* Audio output buffer shortage -> stop the fill process and wait */ { - p_aout->p_vlc->pf_memset( outputBuffer, 0, + p_aout->p_libvlc->pf_memset( outputBuffer, 0, framesPerBuffer * p_sys->i_sample_size ); } return 0; diff --git a/modules/audio_output/sdl.c b/modules/audio_output/sdl.c index 9b0e70d017..6bade6419e 100644 --- a/modules/audio_output/sdl.c +++ b/modules/audio_output/sdl.c @@ -258,12 +258,12 @@ static void SDLCallback( void * _p_aout, byte_t * p_stream, int i_len ) if ( p_buffer != NULL ) { - p_aout->p_vlc->pf_memcpy( p_stream, p_buffer->p_buffer, i_len ); + p_aout->p_libvlc->pf_memcpy( p_stream, p_buffer->p_buffer, i_len ); aout_BufferFree( p_buffer ); } else { - p_aout->p_vlc->pf_memset( p_stream, 0, i_len ); + p_aout->p_libvlc->pf_memset( p_stream, 0, i_len ); } } diff --git a/modules/codec/cmml/intf.c b/modules/codec/cmml/intf.c index f23caeeb17..2d4e0134ba 100644 --- a/modules/codec/cmml/intf.c +++ b/modules/codec/cmml/intf.c @@ -119,18 +119,18 @@ int E_(OpenIntf) ( vlc_object_t *p_this ) p_intf->pf_run = RunIntf; - var_AddCallback( p_intf->p_vlc, "key-pressed", KeyEvent, p_intf ); + var_AddCallback( p_intf->p_libvlc, "key-pressed", KeyEvent, p_intf ); /* we also need to add the callback for "mouse-clicked", but do that later * when we've found a p_vout */ - var_Create( p_intf->p_vlc, "browse-go-back", VLC_VAR_VOID ); - var_AddCallback( p_intf->p_vlc, "browse-go-back", + var_Create( p_intf->p_libvlc, "browse-go-back", VLC_VAR_VOID ); + var_AddCallback( p_intf->p_libvlc, "browse-go-back", GoBackCallback, p_intf ); - var_Create( p_intf->p_vlc, "browse-go-forward", VLC_VAR_VOID ); - var_AddCallback( p_intf->p_vlc, "browse-go-forward", + var_Create( p_intf->p_libvlc, "browse-go-forward", VLC_VAR_VOID ); + var_AddCallback( p_intf->p_libvlc, "browse-go-forward", GoForwardCallback, p_intf ); - var_Create( p_intf->p_vlc, "browse-follow-anchor", VLC_VAR_VOID ); - var_AddCallback( p_intf->p_vlc, "browse-follow-anchor", + var_Create( p_intf->p_libvlc, "browse-follow-anchor", VLC_VAR_VOID ); + var_AddCallback( p_intf->p_libvlc, "browse-follow-anchor", FollowAnchorCallback, p_intf ); return( 0 ); @@ -157,7 +157,7 @@ void E_(CloseIntf) ( vlc_object_t *p_this ) vlc_object_release( p_vout ); } - var_DelCallback( p_intf->p_vlc, "key-pressed", KeyEvent, p_intf ); + var_DelCallback( p_intf->p_libvlc, "key-pressed", KeyEvent, p_intf ); vlc_object_release( p_intf->p_sys->p_cmml_decoder ); @@ -216,10 +216,10 @@ static void RunIntf( intf_thread_t *p_intf ) { vlc_value_t val; int i, i_action = -1; - struct hotkey *p_hotkeys = p_intf->p_vlc->p_hotkeys; + struct hotkey *p_hotkeys = p_intf->p_libvlc->p_hotkeys; /* Find action triggered by hotkey (if any) */ - var_Get( p_intf->p_vlc, "key-pressed", &val ); + var_Get( p_intf->p_libvlc, "key-pressed", &val ); /* Acknowledge that we've handled the b_key_pressed event */ p_intf->p_sys->b_key_pressed = VLC_FALSE; @@ -307,7 +307,7 @@ static int DisplayPendingAnchor( intf_thread_t *p_intf, vout_thread_t *p_vout ) if( p_vout != NULL ) { /* don't display anchor if main interface can display it */ - p_primary_intf = vlc_object_find( p_intf->p_vlc, VLC_OBJECT_INTF, + p_primary_intf = vlc_object_find( p_intf->p_libvlc, VLC_OBJECT_INTF, FIND_CHILD ); if( p_primary_intf ) diff --git a/modules/codec/dirac.c b/modules/codec/dirac.c index 2028775388..449e23aeca 100644 --- a/modules/codec/dirac.c +++ b/modules/codec/dirac.c @@ -184,7 +184,7 @@ static picture_t *GetNewPicture( decoder_t *p_dec ) for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ ) { - p_dec->p_vlc->pf_memcpy( p_dst, p_src, i_width ); + p_dec->p_libvlc->pf_memcpy( p_dst, p_src, i_width ); p_src += i_width; p_dst += i_dst_stride; } @@ -406,7 +406,7 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pic ) for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ ) { - p_enc->p_vlc->pf_memcpy( p_dst, p_src, i_width ); + p_enc->p_libvlc->pf_memcpy( p_dst, p_src, i_width ); p_dst += i_width; p_src += i_src_stride; } diff --git a/modules/codec/dmo/dmo.c b/modules/codec/dmo/dmo.c index 43857347a5..0705168cbe 100644 --- a/modules/codec/dmo/dmo.c +++ b/modules/codec/dmo/dmo.c @@ -925,7 +925,7 @@ static void CopyPicture( decoder_t *p_dec, picture_t *p_pic, uint8_t *p_in ) for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ ) { - p_dec->p_vlc->pf_memcpy( p_dst, p_src, i_width ); + p_dec->p_libvlc->pf_memcpy( p_dst, p_src, i_width ); p_src += i_width; p_dst += i_dst_stride; } @@ -1440,7 +1440,7 @@ static block_t *EncodeBlock( encoder_t *p_enc, void *p_data ) for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ ) { - p_enc->p_vlc->pf_memcpy( p_dst, p_src, i_width ); + p_enc->p_libvlc->pf_memcpy( p_dst, p_src, i_width ); p_dst += i_width; p_src += i_src_stride; } diff --git a/modules/codec/faad.c b/modules/codec/faad.c index 7c95eb07bb..dc33496be6 100644 --- a/modules/codec/faad.c +++ b/modules/codec/faad.c @@ -118,7 +118,7 @@ static int Open( vlc_object_t *p_this ) aout_DateSet( &p_sys->date, 0 ); p_dec->fmt_out.i_cat = AUDIO_ES; - if (p_this->p_libvlc->i_cpu & CPU_CAPABILITY_FPU) + if (p_this->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU) p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','3','2'); else p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE; @@ -153,7 +153,7 @@ static int Open( vlc_object_t *p_this ) /* Set the faad config */ cfg = faacDecGetCurrentConfiguration( p_sys->hfaad ); - if (p_this->p_libvlc->i_cpu & CPU_CAPABILITY_FPU) + if (p_this->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU) cfg->outputFormat = FAAD_FMT_FLOAT; else cfg->outputFormat = FAAD_FMT_16BIT; @@ -404,7 +404,7 @@ static void DoReordering( decoder_t *p_dec, } /* Do the actual reordering */ - if( p_dec->p_libvlc->i_cpu & CPU_CAPABILITY_FPU ) + if( p_dec->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU ) for( i = 0; i < i_samples; i++ ) for( j = 0; j < i_nb_channels; j++ ) p_out[i * i_nb_channels + pi_chan_table[j]] = diff --git a/modules/codec/ffmpeg/audio.c b/modules/codec/ffmpeg/audio.c index e9bbbf4f02..325608a111 100644 --- a/modules/codec/ffmpeg/audio.c +++ b/modules/codec/ffmpeg/audio.c @@ -89,7 +89,7 @@ int E_(InitAudioDec)( decoder_t *p_dec, AVCodecContext *p_context, decoder_sys_t *p_sys; vlc_value_t lockval; - var_Get( p_dec->p_libvlc, "avcodec", &lockval ); + var_Get( p_dec->p_libvlc_global, "avcodec", &lockval ); /* Allocate the memory needed to store the decoder's structure */ if( ( p_dec->p_sys = p_sys = diff --git a/modules/codec/ffmpeg/encoder.c b/modules/codec/ffmpeg/encoder.c index 2c28ccd48d..4c7221d246 100644 --- a/modules/codec/ffmpeg/encoder.c +++ b/modules/codec/ffmpeg/encoder.c @@ -206,7 +206,7 @@ int E_(OpenEncoder)( vlc_object_t *p_this ) vlc_value_t val; vlc_value_t lockval; - var_Get( p_enc->p_libvlc, "avcodec", &lockval ); + var_Get( p_enc->p_libvlc_global, "avcodec", &lockval ); if( !E_(GetFfmpegCodec)( p_enc->fmt_out.i_codec, &i_cat, &i_codec_id, &psz_namecodec ) ) @@ -271,19 +271,19 @@ int E_(OpenEncoder)( vlc_object_t *p_this ) /* Set CPU capabilities */ p_context->dsp_mask = 0; - if( !(p_enc->p_libvlc->i_cpu & CPU_CAPABILITY_MMX) ) + if( !(p_enc->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMX) ) { p_context->dsp_mask |= FF_MM_MMX; } - if( !(p_enc->p_libvlc->i_cpu & CPU_CAPABILITY_MMXEXT) ) + if( !(p_enc->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT) ) { p_context->dsp_mask |= FF_MM_MMXEXT; } - if( !(p_enc->p_libvlc->i_cpu & CPU_CAPABILITY_3DNOW) ) + if( !(p_enc->p_libvlc_global->i_cpu & CPU_CAPABILITY_3DNOW) ) { p_context->dsp_mask |= FF_MM_3DNOW; } - if( !(p_enc->p_libvlc->i_cpu & CPU_CAPABILITY_SSE) ) + if( !(p_enc->p_libvlc_global->i_cpu & CPU_CAPABILITY_SSE) ) { p_context->dsp_mask |= FF_MM_SSE; p_context->dsp_mask |= FF_MM_SSE2; @@ -1049,7 +1049,7 @@ void E_(CloseEncoder)( vlc_object_t *p_this ) encoder_sys_t *p_sys = p_enc->p_sys; vlc_value_t lockval; - var_Get( p_enc->p_libvlc, "avcodec", &lockval ); + var_Get( p_enc->p_libvlc_global, "avcodec", &lockval ); #if LIBAVCODEC_BUILD >= 4702 if ( p_sys->b_inited && p_enc->i_threads >= 1 ) diff --git a/modules/codec/ffmpeg/ffmpeg.c b/modules/codec/ffmpeg/ffmpeg.c index f02a0ac65e..e890d58a5c 100644 --- a/modules/codec/ffmpeg/ffmpeg.c +++ b/modules/codec/ffmpeg/ffmpeg.c @@ -216,7 +216,7 @@ vlc_module_begin(); set_description( _("FFmpeg deinterlace video filter") ); add_shortcut( "ffmpeg-deinterlace" ); - var_Create( p_module->p_libvlc, "avcodec", VLC_VAR_MUTEX ); + var_Create( p_module->p_libvlc_global, "avcodec", VLC_VAR_MUTEX ); vlc_module_end(); /***************************************************************************** @@ -266,23 +266,23 @@ static int OpenDecoder( vlc_object_t *p_this ) /* Set CPU capabilities */ p_context->dsp_mask = 0; - if( !(p_dec->p_libvlc->i_cpu & CPU_CAPABILITY_MMX) ) + if( !(p_dec->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMX) ) { p_context->dsp_mask |= FF_MM_MMX; } - if( !(p_dec->p_libvlc->i_cpu & CPU_CAPABILITY_MMXEXT) ) + if( !(p_dec->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT) ) { p_context->dsp_mask |= FF_MM_MMXEXT; } - if( !(p_dec->p_libvlc->i_cpu & CPU_CAPABILITY_3DNOW) ) + if( !(p_dec->p_libvlc_global->i_cpu & CPU_CAPABILITY_3DNOW) ) { p_context->dsp_mask |= FF_MM_3DNOW; } - if( !(p_dec->p_libvlc->i_cpu & CPU_CAPABILITY_SSE) ) + if( !(p_dec->p_libvlc_global->i_cpu & CPU_CAPABILITY_SSE) ) { p_context->dsp_mask |= FF_MM_SSE; } - if( !(p_dec->p_libvlc->i_cpu & CPU_CAPABILITY_SSE2) ) + if( !(p_dec->p_libvlc_global->i_cpu & CPU_CAPABILITY_SSE2) ) { p_context->dsp_mask |= FF_MM_SSE2; } @@ -318,7 +318,7 @@ static void CloseDecoder( vlc_object_t *p_this ) decoder_sys_t *p_sys = p_dec->p_sys; vlc_value_t lockval; - var_Get( p_dec->p_libvlc, "avcodec", &lockval ); + var_Get( p_dec->p_libvlc_global, "avcodec", &lockval ); switch( p_sys->i_cat ) { @@ -407,7 +407,7 @@ void E_(InitLibavcodec)( vlc_object_t *p_object ) static int b_ffmpeginit = 0; vlc_value_t lockval; - var_Get( p_object->p_libvlc, "avcodec", &lockval ); + var_Get( p_object->p_libvlc_global, "avcodec", &lockval ); vlc_mutex_lock( lockval.p_address ); /* *** init ffmpeg library (libavcodec) *** */ diff --git a/modules/codec/ffmpeg/postprocess.c b/modules/codec/ffmpeg/postprocess.c index 2c9471842b..54de0e3eda 100644 --- a/modules/codec/ffmpeg/postprocess.c +++ b/modules/codec/ffmpeg/postprocess.c @@ -124,7 +124,7 @@ int E_(InitPostproc)( decoder_t *p_dec, void *p_data, int i_width, int i_height, int pix_fmt ) { video_postproc_sys_t *p_sys = (video_postproc_sys_t *)p_data; - int32_t i_cpu = p_dec->p_libvlc->i_cpu; + int32_t i_cpu = p_dec->p_libvlc_global->i_cpu; int i_flags = 0; /* Set CPU capabilities */ diff --git a/modules/codec/ffmpeg/video.c b/modules/codec/ffmpeg/video.c index 6fe925599c..9ecf44b565 100644 --- a/modules/codec/ffmpeg/video.c +++ b/modules/codec/ffmpeg/video.c @@ -237,7 +237,7 @@ int E_(InitVideoDec)( decoder_t *p_dec, AVCodecContext *p_context, vlc_value_t lockval; vlc_value_t val; - var_Get( p_dec->p_libvlc, "avcodec", &lockval ); + var_Get( p_dec->p_libvlc_global, "avcodec", &lockval ); /* Allocate the memory needed to store the decoder's structure */ if( ( p_dec->p_sys = p_sys = @@ -502,7 +502,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block ) } p_sys->p_buffer = p_sys->p_buffer_orig; p_sys->i_buffer = p_block->i_buffer; - p_dec->p_vlc->pf_memcpy( p_sys->p_buffer, p_block->p_buffer, + p_dec->p_libvlc->pf_memcpy( p_sys->p_buffer, p_block->p_buffer, p_block->i_buffer ); memset( p_sys->p_buffer + p_block->i_buffer, 0, FF_INPUT_BUFFER_PADDING_SIZE ); @@ -808,7 +808,7 @@ static void ffmpeg_CopyPicture( decoder_t *p_dec, for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ ) { - p_dec->p_vlc->pf_memcpy( p_dst, p_src, i_size ); + p_dec->p_libvlc->pf_memcpy( p_dst, p_src, i_size ); p_src += i_src_stride; p_dst += i_dst_stride; } diff --git a/modules/codec/libmpeg2.c b/modules/codec/libmpeg2.c index 35a96a317f..d6208ffadf 100644 --- a/modules/codec/libmpeg2.c +++ b/modules/codec/libmpeg2.c @@ -146,23 +146,23 @@ static int OpenDecoder( vlc_object_t *p_this ) p_sys->b_preroll = VLC_FALSE; #if defined( __i386__ ) || defined( __x86_64__ ) - if( p_dec->p_libvlc->i_cpu & CPU_CAPABILITY_MMX ) + if( p_dec->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMX ) { i_accel |= MPEG2_ACCEL_X86_MMX; } - if( p_dec->p_libvlc->i_cpu & CPU_CAPABILITY_3DNOW ) + if( p_dec->p_libvlc_global->i_cpu & CPU_CAPABILITY_3DNOW ) { i_accel |= MPEG2_ACCEL_X86_3DNOW; } - if( p_dec->p_libvlc->i_cpu & CPU_CAPABILITY_MMXEXT ) + if( p_dec->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT ) { i_accel |= MPEG2_ACCEL_X86_MMXEXT; } #elif defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ ) - if( p_dec->p_libvlc->i_cpu & CPU_CAPABILITY_ALTIVEC ) + if( p_dec->p_libvlc_global->i_cpu & CPU_CAPABILITY_ALTIVEC ) { i_accel |= MPEG2_ACCEL_PPC_ALTIVEC; } diff --git a/modules/codec/mash.cpp b/modules/codec/mash.cpp index 3a82ec833f..2a5cb66e12 100644 --- a/modules/codec/mash.cpp +++ b/modules/codec/mash.cpp @@ -208,11 +208,11 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) p_sys->p_decoder->sync(); p_sys->i_counter = 0; p_frame = p_sys->p_decoder->frame(); - p_dec->p_vlc->pf_memcpy( p_pic->p[0].p_pixels, p_frame, i_width*i_height ); + p_dec->p_libvlc->pf_memcpy( p_pic->p[0].p_pixels, p_frame, i_width*i_height ); p_frame += i_width * i_height; - p_dec->p_vlc->pf_memcpy( p_pic->p[1].p_pixels, p_frame, i_width*i_height/4 ); + p_dec->p_libvlc->pf_memcpy( p_pic->p[1].p_pixels, p_frame, i_width*i_height/4 ); p_frame += i_width * i_height/4; - p_dec->p_vlc->pf_memcpy( p_pic->p[2].p_pixels, p_frame, i_width*i_height/4 ); + p_dec->p_libvlc->pf_memcpy( p_pic->p[2].p_pixels, p_frame, i_width*i_height/4 ); p_pic->date = p_sys->i_pts; } block_Release( p_block); diff --git a/modules/codec/quicktime.c b/modules/codec/quicktime.c index 2b259c6222..380ee7bf72 100644 --- a/modules/codec/quicktime.c +++ b/modules/codec/quicktime.c @@ -223,7 +223,7 @@ static int Open( vlc_object_t *p_this ) decoder_t *p_dec = (decoder_t*)p_this; /* create a mutex */ - var_Create( p_this->p_libvlc, "qt_mutex", VLC_VAR_MUTEX ); + var_Create( p_this->p_libvlc_global, "qt_mutex", VLC_VAR_MUTEX ); switch( p_dec->fmt_in.i_codec ) { @@ -287,7 +287,7 @@ static void Close( vlc_object_t *p_this ) vlc_value_t lockval; /* get lock, avoid segfault */ - var_Get( p_dec->p_libvlc, "qt_mutex", &lockval ); + var_Get( p_dec->p_libvlc_global, "qt_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); if( p_dec->fmt_out.i_cat == AUDIO_ES ) @@ -328,7 +328,7 @@ static void Close( vlc_object_t *p_this ) #endif vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_dec->p_libvlc, "qt_mutex" ); + var_Destroy( p_dec->p_libvlc_global, "qt_mutex" ); if( p_sys ) free( p_sys ); } @@ -355,7 +355,7 @@ static int OpenAudio( decoder_t *p_dec ) memcpy( fcc, &p_dec->fmt_in.i_codec, 4 ); /* get lock, avoid segfault */ - var_Get( p_dec->p_libvlc, "qt_mutex", &lockval ); + var_Get( p_dec->p_libvlc_global, "qt_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); #ifdef __APPLE__ @@ -548,7 +548,7 @@ static aout_buffer_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block ) int i_frames = p_sys->i_buffer / p_sys->InFrameSize; unsigned long i_out_frames, i_out_bytes; - var_Get( p_dec->p_libvlc, "qt_mutex", &lockval ); + var_Get( p_dec->p_libvlc_global, "qt_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); i_error = p_sys->SoundConverterConvertBuffer( p_sys->myConverter, p_sys->p_buffer, @@ -654,7 +654,7 @@ static int OpenVideo( decoder_t *p_dec ) fcc, p_dec->fmt_in.video.i_width, p_dec->fmt_in.video.i_height ); /* get lock, avoid segfault */ - var_Get( p_dec->p_libvlc, "qt_mutex", &lockval ); + var_Get( p_dec->p_libvlc_global, "qt_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); #ifdef __APPLE__ @@ -861,7 +861,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block ) return NULL; } - var_Get( p_dec->p_libvlc, "qt_mutex", &lockval ); + var_Get( p_dec->p_libvlc_global, "qt_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); if( ( p_pic = p_dec->pf_vout_buffer_new( p_dec ) ) ) diff --git a/modules/codec/rawvideo.c b/modules/codec/rawvideo.c index 771867fe96..6167008a8c 100644 --- a/modules/codec/rawvideo.c +++ b/modules/codec/rawvideo.c @@ -264,7 +264,7 @@ static void FillPicture( decoder_t *p_dec, block_t *p_block, picture_t *p_pic ) for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ ) { - p_dec->p_vlc->pf_memcpy( p_dst, p_src, i_width ); + p_dec->p_libvlc->pf_memcpy( p_dst, p_src, i_width ); p_src += p_sys->b_invert ? -i_width : i_width; p_dst += p_pic->p[i_plane].i_pitch; } @@ -335,11 +335,11 @@ static block_t *SendFrame( decoder_t *p_dec, block_t *p_block ) for( j = 0; j < pic.p[i].i_visible_lines / 2; j++ ) { - p_dec->p_vlc->pf_memcpy( p_tmp, p_bottom, + p_dec->p_libvlc->pf_memcpy( p_tmp, p_bottom, pic.p[i].i_visible_pitch ); - p_dec->p_vlc->pf_memcpy( p_bottom, p_top, + p_dec->p_libvlc->pf_memcpy( p_bottom, p_top, pic.p[i].i_visible_pitch ); - p_dec->p_vlc->pf_memcpy( p_top, p_tmp, + p_dec->p_libvlc->pf_memcpy( p_top, p_tmp, pic.p[i].i_visible_pitch ); p_top += i_pitch; p_bottom -= i_pitch; diff --git a/modules/codec/sdl_image.c b/modules/codec/sdl_image.c index 6d1ccba8ff..258eca2c89 100644 --- a/modules/codec/sdl_image.c +++ b/modules/codec/sdl_image.c @@ -202,7 +202,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block ) for ( i = 0; i < p_surface->h; i++ ) { - p_dec->p_vlc->pf_memcpy( p_dst, p_src, i_pitch ); + p_dec->p_libvlc->pf_memcpy( p_dst, p_src, i_pitch ); p_src += p_surface->pitch; p_dst += p_pic->p[0].i_pitch; } diff --git a/modules/codec/tarkin.c b/modules/codec/tarkin.c index ee309ac76d..256a21de74 100644 --- a/modules/codec/tarkin.c +++ b/modules/codec/tarkin.c @@ -310,7 +310,7 @@ static void tarkin_CopyPicture( decoder_t *p_dec, picture_t *p_pic, for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ ) { - p_dec->p_vlc->pf_memcpy( p_dst, p_src, i_src_stride ); + p_dec->p_libvlc->pf_memcpy( p_dst, p_src, i_src_stride ); p_src += i_src_stride; p_dst += i_dst_stride; diff --git a/modules/codec/theora.c b/modules/codec/theora.c index 05d121a48b..5ded104825 100644 --- a/modules/codec/theora.c +++ b/modules/codec/theora.c @@ -561,7 +561,7 @@ static void theora_CopyPicture( decoder_t *p_dec, picture_t *p_pic, for( i_line = 0; i_line < p_pic->p[i_plane].i_visible_lines; i_line++ ) { - p_dec->p_vlc->pf_memcpy( p_dst, p_src + i_src_xoffset, + p_dec->p_libvlc->pf_memcpy( p_dst, p_src + i_src_xoffset, i_plane ? yuv->uv_width : yuv->y_width ); p_src += i_src_stride; p_dst += i_dst_stride; diff --git a/modules/codec/twolame.c b/modules/codec/twolame.c index 35dbcced69..95c622e048 100644 --- a/modules/codec/twolame.c +++ b/modules/codec/twolame.c @@ -285,7 +285,7 @@ static block_t *Encode( encoder_t *p_enc, aout_buffer_t *p_aout_buf ) p_sys->p_out_buffer, MAX_CODED_FRAME_SIZE ); p_sys->i_nb_samples = 0; p_block = block_New( p_enc, i_used ); - p_enc->p_vlc->pf_memcpy( p_block->p_buffer, p_sys->p_out_buffer, + p_enc->p_libvlc->pf_memcpy( p_block->p_buffer, p_sys->p_out_buffer, i_used ); p_block->i_length = (mtime_t)1000000 * (mtime_t)MPEG_FRAME_SIZE / (mtime_t)p_enc->fmt_out.audio.i_rate; diff --git a/modules/codec/x264.c b/modules/codec/x264.c index 431937bb46..58e50bcbb9 100644 --- a/modules/codec/x264.c +++ b/modules/codec/x264.c @@ -921,19 +921,19 @@ static int Open ( vlc_object_t *p_this ) p_sys->param.i_fps_num = p_enc->fmt_in.video.i_frame_rate; p_sys->param.i_fps_den = p_enc->fmt_in.video.i_frame_rate_base; } - if( !(p_enc->p_libvlc->i_cpu & CPU_CAPABILITY_MMX) ) + if( !(p_enc->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMX) ) { p_sys->param.cpu &= ~X264_CPU_MMX; } - if( !(p_enc->p_libvlc->i_cpu & CPU_CAPABILITY_MMXEXT) ) + if( !(p_enc->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT) ) { p_sys->param.cpu &= ~X264_CPU_MMXEXT; } - if( !(p_enc->p_libvlc->i_cpu & CPU_CAPABILITY_SSE) ) + if( !(p_enc->p_libvlc_global->i_cpu & CPU_CAPABILITY_SSE) ) { p_sys->param.cpu &= ~X264_CPU_SSE; } - if( !(p_enc->p_libvlc->i_cpu & CPU_CAPABILITY_SSE2) ) + if( !(p_enc->p_libvlc_global->i_cpu & CPU_CAPABILITY_SSE2) ) { p_sys->param.cpu &= ~X264_CPU_SSE2; } diff --git a/modules/control/gestures.c b/modules/control/gestures.c index a6cc59e41d..16de437ce9 100644 --- a/modules/control/gestures.c +++ b/modules/control/gestures.c @@ -198,7 +198,7 @@ static void RunIntf( intf_thread_t *p_intf ) break; case GESTURE(DOWN,RIGHT,NONE,NONE): /* FIXME: Should close the vout!"*/ - p_intf->p_vlc->b_die = VLC_TRUE; + p_intf->p_libvlc->b_die = VLC_TRUE; break; case GESTURE(DOWN,LEFT,UP,RIGHT): msg_Dbg(p_intf, "a square was drawn!" ); diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c index 66cbf83190..ba8fe27e04 100644 --- a/modules/control/hotkeys.c +++ b/modules/control/hotkeys.c @@ -121,7 +121,7 @@ static int Open( vlc_object_t *p_this ) p_intf->p_sys->p_input = NULL; p_intf->p_sys->p_vout = NULL; - var_AddCallback( p_intf->p_vlc, "key-pressed", KeyEvent, p_intf ); + var_AddCallback( p_intf->p_libvlc, "key-pressed", KeyEvent, p_intf ); return 0; } @@ -132,7 +132,7 @@ static void Close( vlc_object_t *p_this ) { intf_thread_t *p_intf = (intf_thread_t *)p_this; - var_DelCallback( p_intf->p_vlc, "key-pressed", KeyEvent, p_intf ); + var_DelCallback( p_intf->p_libvlc, "key-pressed", KeyEvent, p_intf ); if( p_intf->p_sys->p_input ) { vlc_object_release( p_intf->p_sys->p_input ); @@ -154,20 +154,20 @@ static void Run( intf_thread_t *p_intf ) input_thread_t *p_input = NULL; vout_thread_t *p_vout = NULL; vout_thread_t *p_last_vout = NULL; - struct hotkey *p_hotkeys = p_intf->p_vlc->p_hotkeys; + struct hotkey *p_hotkeys = p_intf->p_libvlc->p_hotkeys; vlc_value_t val; int i; /* Initialize hotkey structure */ for( i = 0; p_hotkeys[i].psz_action != NULL; i++ ) { - var_Create( p_intf->p_vlc, p_hotkeys[i].psz_action, + var_Create( p_intf->p_libvlc, p_hotkeys[i].psz_action, VLC_VAR_HOTKEY | VLC_VAR_DOINHERIT ); - var_AddCallback( p_intf->p_vlc, p_hotkeys[i].psz_action, + var_AddCallback( p_intf->p_libvlc, p_hotkeys[i].psz_action, ActionKeyCB, NULL ); - var_Get( p_intf->p_vlc, p_hotkeys[i].psz_action, &val ); - var_Set( p_intf->p_vlc, p_hotkeys[i].psz_action, val ); + var_Get( p_intf->p_libvlc, p_hotkeys[i].psz_action, &val ); + var_Set( p_intf->p_libvlc, p_hotkeys[i].psz_action, val ); } while( !p_intf->b_die ) @@ -253,7 +253,7 @@ static void Run( intf_thread_t *p_intf ) vlc_object_release( p_playlist ); } /* Playlist is stopped now kill vlc. */ - p_intf->p_vlc->b_die = VLC_TRUE; + p_intf->p_libvlc->b_die = VLC_TRUE; ClearChannels( p_intf, p_vout ); vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Quit" ) ); continue; @@ -881,8 +881,8 @@ static int KeyEvent( vlc_object_t *p_this, char const *psz_var, static int ActionKeyCB( vlc_object_t *p_this, char const *psz_var, vlc_value_t oldval, vlc_value_t newval, void *p_data ) { - vlc_t *p_vlc = (vlc_t *)p_this; - struct hotkey *p_hotkeys = p_vlc->p_hotkeys; + libvlc_int_t *p_libvlc = (libvlc_int_t *)p_this; + struct hotkey *p_hotkeys = p_libvlc->p_hotkeys; mtime_t i_date; int i; diff --git a/modules/control/http/http.c b/modules/control/http/http.c index cdaef567d9..d8ea465450 100644 --- a/modules/control/http/http.c +++ b/modules/control/http/http.c @@ -126,8 +126,8 @@ static int Open( vlc_object_t *p_this ) char *psz_src; char psz_tmp[10]; - var_Create(p_intf->p_libvlc, "http-host", VLC_VAR_STRING ); - psz_address=var_GetString(p_intf->p_libvlc, "http-host"); + var_Create(p_intf->p_libvlc_global, "http-host", VLC_VAR_STRING ); + psz_address=var_GetString(p_intf->p_libvlc_global, "http-host"); if( !psz_address || !*psz_address ) { psz_address = config_GetPsz( p_intf, "http-host" ); @@ -265,7 +265,7 @@ static int Open( vlc_object_t *p_this ) /* Ugly hack to allow to run several HTTP servers on different ports. */ sprintf( psz_tmp, "%s:%d", psz_address, i_port + 1 ); - var_SetString( p_intf->p_libvlc, "http-host", psz_tmp ); + var_SetString( p_intf->p_libvlc_global, "http-host", psz_tmp ); msg_Dbg( p_intf, "base %s:%d", psz_address, i_port ); @@ -287,7 +287,7 @@ static int Open( vlc_object_t *p_this ) #if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32) if ( ( psz_src = config_GetPsz( p_intf, "http-src" )) == NULL ) { - char * psz_vlcpath = p_intf->p_libvlc->psz_vlcpath; + char * psz_vlcpath = p_intf->p_libvlc_global->psz_vlcpath; psz_src = malloc( strlen(psz_vlcpath) + strlen("/share/http" ) + 1 ); if( !psz_src ) return VLC_ENOMEM; #if defined(WIN32) diff --git a/modules/control/http/macro.c b/modules/control/http/macro.c index 9c122c8699..d2bdaf6228 100644 --- a/modules/control/http/macro.c +++ b/modules/control/http/macro.c @@ -510,7 +510,7 @@ void E_(MacroDo)( httpd_file_sys_t *p_args, case MVLC_SHUTDOWN: { msg_Dbg( p_intf, "requested shutdown" ); - p_intf->p_vlc->b_die = VLC_TRUE; + p_intf->p_libvlc->b_die = VLC_TRUE; break; } /* vlm */ diff --git a/modules/control/http/rpn.c b/modules/control/http/rpn.c index ee86775335..1efe2bf4a8 100644 --- a/modules/control/http/rpn.c +++ b/modules/control/http/rpn.c @@ -39,8 +39,8 @@ static vlc_object_t *GetVLCObject( intf_thread_t *p_intf, if( !strcmp( psz_object, "VLC_OBJECT_ROOT" ) ) i_object_type = VLC_OBJECT_ROOT; - else if( !strcmp( psz_object, "VLC_OBJECT_VLC" ) ) - p_object = VLC_OBJECT(p_intf->p_vlc); + else if( !strcmp( psz_object, "VLC_OBJECT_LIBVLC" ) ) + p_object = VLC_OBJECT(p_intf->p_libvlc); else if( !strcmp( psz_object, "VLC_OBJECT_INTF" ) ) p_object = VLC_OBJECT(p_intf); else if( !strcmp( psz_object, "VLC_OBJECT_PLAYLIST" ) ) diff --git a/modules/control/http/util.c b/modules/control/http/util.c index 3ccf2f8079..5c4cae3a5c 100644 --- a/modules/control/http/util.c +++ b/modules/control/http/util.c @@ -957,9 +957,9 @@ char *E_(RealPath)( intf_thread_t *p_intf, const char *psz_src ) if( psz_dir[0] == '~' ) { char *dir = malloc( strlen(psz_dir) - + strlen(p_intf->p_vlc->psz_userdir) ); + + strlen(p_intf->p_libvlc->psz_userdir) ); /* This is incomplete : we should also support the ~cmassiot/ syntax. */ - sprintf( dir, "%s%s", p_intf->p_vlc->psz_userdir, psz_dir + 1 ); + sprintf( dir, "%s%s", p_intf->p_libvlc->psz_userdir, psz_dir + 1 ); free( psz_dir ); psz_dir = dir; } diff --git a/modules/control/lirc.c b/modules/control/lirc.c index c760af91ae..3e2e71cc63 100644 --- a/modules/control/lirc.c +++ b/modules/control/lirc.c @@ -148,7 +148,7 @@ static void Run( intf_thread_t *p_intf ) break; } keyval.i_int = config_GetInt( p_intf, c ); - var_Set( p_intf->p_vlc, "key-pressed", keyval ); + var_Set( p_intf->p_libvlc, "key-pressed", keyval ); } free( code ); } diff --git a/modules/control/ntservice.c b/modules/control/ntservice.c index aeba86e729..0bbbff1b64 100644 --- a/modules/control/ntservice.c +++ b/modules/control/ntservice.c @@ -164,7 +164,7 @@ static void Run( intf_thread_t *p_intf ) } /* Make sure we exit (In case other interfaces have been spawned) */ - p_intf->p_vlc->b_die = VLC_TRUE; + p_intf->p_libvlc->b_die = VLC_TRUE; } /***************************************************************************** diff --git a/modules/control/rc.c b/modules/control/rc.c index 780b97afc3..22e7f4a004 100644 --- a/modules/control/rc.c +++ b/modules/control/rc.c @@ -548,7 +548,7 @@ static void Run( intf_thread_t *p_intf ) /* status callbacks */ /* Listen to audio volume updates */ - var_AddCallback( p_intf->p_vlc, "volume-change", VolumeChanged, p_intf ); + var_AddCallback( p_intf->p_libvlc, "volume-change", VolumeChanged, p_intf ); #ifdef WIN32 /* Get the file descriptor of the console input */ @@ -700,15 +700,15 @@ static void Run( intf_thread_t *p_intf ) psz_cmd, i_ret, vlc_error( i_ret ) ); } /* Or maybe it's a global command */ - else if( var_Type( p_intf->p_libvlc, psz_cmd ) & VLC_VAR_ISCOMMAND ) + else if( var_Type( p_intf->p_libvlc_global, psz_cmd ) & VLC_VAR_ISCOMMAND ) { vlc_value_t val; int i_ret; val.psz_string = psz_arg; /* FIXME: it's a global command, but we should pass the - * local object as an argument, not p_intf->p_libvlc. */ - i_ret = var_Set( p_intf->p_libvlc, psz_cmd, val ); + * local object as an argument, not p_intf->p_libvlc_global. */ + i_ret = var_Set( p_intf->p_libvlc_global, psz_cmd, val ); if( i_ret != 0 ) { msg_rc( "%s: returned %i (%s)", @@ -886,7 +886,7 @@ static void Run( intf_thread_t *p_intf ) p_playlist = NULL; } - var_DelCallback( p_intf->p_vlc, "volume-change", VolumeChanged, p_intf ); + var_DelCallback( p_intf->p_libvlc, "volume-change", VolumeChanged, p_intf ); } static void Help( intf_thread_t *p_intf, vlc_bool_t b_longhelp) @@ -1102,7 +1102,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd, if( !strcmp( psz_cmd, "pause" ) ) { val.i_int = config_GetInt( p_intf, "key-play-pause" ); - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); vlc_object_release( p_input ); return VLC_SUCCESS; } @@ -1125,14 +1125,14 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd, else if ( !strcmp( psz_cmd, "fastforward" ) ) { val.i_int = config_GetInt( p_intf, "key-jump+extrashort" ); - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); vlc_object_release( p_input ); return VLC_SUCCESS; } else if ( !strcmp( psz_cmd, "rewind" ) ) { val.i_int = config_GetInt( p_intf, "key-jump-extrashort" ); - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); vlc_object_release( p_input ); return VLC_SUCCESS; } @@ -1487,12 +1487,12 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0 ) { val.psz_string = newval.psz_string; - var_Set( p_input->p_libvlc, "marq-marquee", val ); + var_Set( p_input->p_libvlc_global, "marq-marquee", val ); } else { val.psz_string = ""; - var_Set( p_input->p_libvlc, "marq-marquee", val); + var_Set( p_input->p_libvlc_global, "marq-marquee", val); } } else if( !strcmp( psz_cmd, "marq-x" ) ) @@ -1500,7 +1500,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "marq-x", val ); + var_Set( p_input->p_libvlc_global, "marq-x", val ); } } else if( !strcmp( psz_cmd, "marq-y" ) ) @@ -1508,7 +1508,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "marq-y", val ); + var_Set( p_input->p_libvlc_global, "marq-y", val ); } } else if( !strcmp( psz_cmd, "marq-position" ) ) @@ -1516,7 +1516,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "marq-position", val ); + var_Set( p_input->p_libvlc_global, "marq-position", val ); } } else if( !strcmp( psz_cmd, "marq-color" ) ) @@ -1524,7 +1524,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = strtol( newval.psz_string, NULL, 0 ); - var_Set( p_input->p_libvlc, "marq-color", val ); + var_Set( p_input->p_libvlc_global, "marq-color", val ); } } else if( !strcmp( psz_cmd, "marq-opacity" ) ) @@ -1532,7 +1532,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = strtol( newval.psz_string, NULL, 0 ); - var_Set( p_input->p_libvlc, "marq-opacity", val ); + var_Set( p_input->p_libvlc_global, "marq-opacity", val ); } } else if( !strcmp( psz_cmd, "marq-size" ) ) @@ -1540,7 +1540,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "marq-size", val ); + var_Set( p_input->p_libvlc_global, "marq-size", val ); } } else if( !strcmp( psz_cmd, "marq-timeout" ) ) @@ -1556,7 +1556,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "mosaic-alpha", val ); + var_Set( p_input->p_libvlc_global, "mosaic-alpha", val ); } } else if( !strcmp( psz_cmd, "mosaic-height" ) ) @@ -1564,7 +1564,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "mosaic-height", val ); + var_Set( p_input->p_libvlc_global, "mosaic-height", val ); } } else if( !strcmp( psz_cmd, "mosaic-width" ) ) @@ -1572,7 +1572,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "mosaic-width", val ); + var_Set( p_input->p_libvlc_global, "mosaic-width", val ); } } else if( !strcmp( psz_cmd, "mosaic-xoffset" ) ) @@ -1580,7 +1580,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "mosaic-xoffset", val ); + var_Set( p_input->p_libvlc_global, "mosaic-xoffset", val ); } } else if( !strcmp( psz_cmd, "mosaic-yoffset" ) ) @@ -1588,7 +1588,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "mosaic-yoffset", val ); + var_Set( p_input->p_libvlc_global, "mosaic-yoffset", val ); } } else if( !strcmp( psz_cmd, "mosaic-align" ) ) @@ -1596,7 +1596,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0 ) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "mosaic-align", val ); + var_Set( p_input->p_libvlc_global, "mosaic-align", val ); } } else if( !strcmp( psz_cmd, "mosaic-vborder" ) ) @@ -1604,7 +1604,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "mosaic-vborder", val ); + var_Set( p_input->p_libvlc_global, "mosaic-vborder", val ); } } else if( !strcmp( psz_cmd, "mosaic-hborder" ) ) @@ -1612,7 +1612,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "mosaic-hborder", val ); + var_Set( p_input->p_libvlc_global, "mosaic-hborder", val ); } } else if( !strcmp( psz_cmd, "mosaic-position" ) ) @@ -1620,7 +1620,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "mosaic-position", val ); + var_Set( p_input->p_libvlc_global, "mosaic-position", val ); } } else if( !strcmp( psz_cmd, "mosaic-rows" ) ) @@ -1628,7 +1628,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "mosaic-rows", val ); + var_Set( p_input->p_libvlc_global, "mosaic-rows", val ); } } else if( !strcmp( psz_cmd, "mosaic-cols" ) ) @@ -1636,7 +1636,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "mosaic-cols", val ); + var_Set( p_input->p_libvlc_global, "mosaic-cols", val ); } } else if( !strcmp( psz_cmd, "mosaic-order" ) ) @@ -1644,7 +1644,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.psz_string = newval.psz_string; - var_Set( p_input->p_libvlc, "mosaic-order", val ); + var_Set( p_input->p_libvlc_global, "mosaic-order", val ); } } else if( !strcmp( psz_cmd, "mosaic-keep-aspect-ratio" ) ) @@ -1652,7 +1652,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "mosaic-keep-aspect-ratio", val ); + var_Set( p_input->p_libvlc_global, "mosaic-keep-aspect-ratio", val ); } } else if( !strcmp( psz_cmd, "time-format" ) ) @@ -1660,12 +1660,12 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0 ) { val.psz_string = newval.psz_string; - var_Set( p_input->p_libvlc, "time-format", val ); + var_Set( p_input->p_libvlc_global, "time-format", val ); } else { val.psz_string = ""; - var_Set( p_input->p_libvlc, "time-format", val); + var_Set( p_input->p_libvlc_global, "time-format", val); } } else if( !strcmp( psz_cmd, "time-x" ) ) @@ -1673,7 +1673,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "time-x", val ); + var_Set( p_input->p_libvlc_global, "time-x", val ); } } else if( !strcmp( psz_cmd, "time-y" ) ) @@ -1681,7 +1681,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "time-y", val ); + var_Set( p_input->p_libvlc_global, "time-y", val ); } } else if( !strcmp( psz_cmd, "time-position" ) ) @@ -1689,7 +1689,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "time-position", val ); + var_Set( p_input->p_libvlc_global, "time-position", val ); } } else if( !strcmp( psz_cmd, "time-color" ) ) @@ -1697,7 +1697,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = strtol( newval.psz_string, NULL, 0 ); - var_Set( p_input->p_libvlc, "time-color", val ); + var_Set( p_input->p_libvlc_global, "time-color", val ); } } else if( !strcmp( psz_cmd, "time-opacity" ) ) @@ -1705,7 +1705,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = strtol( newval.psz_string, NULL, 0 ); - var_Set( p_input->p_libvlc, "time-opacity", val ); + var_Set( p_input->p_libvlc_global, "time-opacity", val ); } } else if( !strcmp( psz_cmd, "time-size" ) ) @@ -1713,7 +1713,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "time-size", val ); + var_Set( p_input->p_libvlc_global, "time-size", val ); } } else if( !strcmp( psz_cmd, "logo-file" ) ) @@ -1721,7 +1721,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0 ) { val.psz_string = newval.psz_string; - var_Set( p_input->p_libvlc, "logo-file", val ); + var_Set( p_input->p_libvlc_global, "logo-file", val ); } } else if( !strcmp( psz_cmd, "logo-x" ) ) @@ -1729,7 +1729,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "logo-x", val ); + var_Set( p_input->p_libvlc_global, "logo-x", val ); } } else if( !strcmp( psz_cmd, "logo-y" ) ) @@ -1737,7 +1737,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "logo-y", val ); + var_Set( p_input->p_libvlc_global, "logo-y", val ); } } else if( !strcmp( psz_cmd, "logo-position" ) ) @@ -1745,7 +1745,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = atoi( newval.psz_string ); - var_Set( p_input->p_libvlc, "logo-position", val ); + var_Set( p_input->p_libvlc_global, "logo-position", val ); } } else if( !strcmp( psz_cmd, "logo-transparency" ) ) @@ -1753,7 +1753,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, if( strlen( newval.psz_string ) > 0) { val.i_int = strtol( newval.psz_string, NULL, 0 ); - var_Set( p_input->p_libvlc, "logo-transparency", val ); + var_Set( p_input->p_libvlc_global, "logo-transparency", val ); } } @@ -1781,7 +1781,7 @@ static int Quit( vlc_object_t *p_this, char const *psz_cmd, playlist_Stop( p_playlist ); vlc_object_release( p_playlist ); } - p_this->p_vlc->b_die = VLC_TRUE; + p_this->p_libvlc->b_die = VLC_TRUE; return VLC_SUCCESS; } @@ -1790,7 +1790,7 @@ static int Intf( vlc_object_t *p_this, char const *psz_cmd, { intf_thread_t *p_newintf = NULL; - p_newintf = intf_Create( p_this->p_vlc, newval.psz_string, 0, NULL ); + p_newintf = intf_Create( p_this->p_libvlc, newval.psz_string, 0, NULL ); if( p_newintf ) { p_newintf->b_block = VLC_FALSE; @@ -1846,7 +1846,7 @@ static int Volume( vlc_object_t *p_this, char const *psz_cmd, vlc_value_t keyval; keyval.i_int = config_GetInt( p_intf, "key-vol-mute" ); - var_Set( p_intf->p_vlc, "key-pressed", keyval ); + var_Set( p_intf->p_libvlc, "key-pressed", keyval ); } i_error = aout_VolumeSet( p_this, i_volume ); osd_Volume( p_this ); @@ -1899,7 +1899,7 @@ static int VolumeMove( vlc_object_t *p_this, char const *psz_cmd, vlc_object_release( p_input ); } - i_volume_step = config_GetInt( p_intf->p_vlc, "volume-step" ); + i_volume_step = config_GetInt( p_intf->p_libvlc, "volume-step" ); if ( i_nb_steps <= 0 || i_nb_steps > (AOUT_VOLUME_MAX/i_volume_step) ) { i_nb_steps = 1; diff --git a/modules/control/telnet.c b/modules/control/telnet.c index ce0f45c250..9bf7278b40 100644 --- a/modules/control/telnet.c +++ b/modules/control/telnet.c @@ -435,7 +435,7 @@ static void Run( intf_thread_t *p_intf ) else if( !strncmp( cl->buffer_read, "shutdown", 8 ) ) { msg_Err( p_intf, "shutdown requested" ); - p_intf->p_vlc->b_die = VLC_TRUE; + p_intf->p_libvlc->b_die = VLC_TRUE; } else { diff --git a/modules/demux/mkv.cpp b/modules/demux/mkv.cpp index 93826a0c3c..3ef16166c8 100644 --- a/modules/demux/mkv.cpp +++ b/modules/demux/mkv.cpp @@ -2576,7 +2576,7 @@ int demux_sys_t::EventThread( vlc_object_t *p_this ) p_ev->b_key = VLC_FALSE; /* catch all key event */ - var_AddCallback( p_ev->p_vlc, "key-pressed", EventKey, p_ev ); + var_AddCallback( p_ev->p_libvlc, "key-pressed", EventKey, p_ev ); /* main loop */ while( !p_ev->b_die ) @@ -2594,7 +2594,7 @@ int demux_sys_t::EventThread( vlc_object_t *p_this ) if( p_ev->b_key ) { vlc_value_t valk; - struct vlc_t::hotkey *p_hotkeys = p_ev->p_vlc->p_hotkeys; + struct libvlc_int_t::hotkey *p_hotkeys = p_ev->p_libvlc->p_hotkeys; int i, i_action = -1; msg_Dbg( p_ev->p_demux, "Handle Key Event"); @@ -2603,7 +2603,7 @@ int demux_sys_t::EventThread( vlc_object_t *p_this ) pci_t *pci = (pci_t *) &p_sys->pci_packet; - var_Get( p_ev->p_vlc, "key-pressed", &valk ); + var_Get( p_ev->p_libvlc, "key-pressed", &valk ); for( i = 0; p_hotkeys[i].psz_action != NULL; i++ ) { if( p_hotkeys[i].i_key == valk.i_int ) @@ -2878,7 +2878,7 @@ int demux_sys_t::EventThread( vlc_object_t *p_this ) var_DelCallback( p_vout, "mouse-clicked", EventMouse, p_ev ); vlc_object_release( p_vout ); } - var_DelCallback( p_ev->p_vlc, "key-pressed", EventKey, p_ev ); + var_DelCallback( p_ev->p_libvlc, "key-pressed", EventKey, p_ev ); vlc_mutex_destroy( &p_ev->lock ); diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c index 13d7905f41..6c282ead39 100644 --- a/modules/demux/mp4/libmp4.c +++ b/modules/demux/mp4/libmp4.c @@ -1150,7 +1150,7 @@ static int MP4_ReadBox_sample_soun( stream_t *p_stream, MP4_Box_t *p_box ) if( p_box->i_type == FOURCC_drms ) { p_box->data.p_sample_soun->p_drms = - drms_alloc( p_stream->p_vlc->psz_homedir ); + drms_alloc( p_stream->p_libvlc->psz_homedir ); if( p_box->data.p_sample_soun->p_drms == NULL ) { diff --git a/modules/gui/beos/AudioOutput.cpp b/modules/gui/beos/AudioOutput.cpp index 9088a0afbc..f68b206279 100644 --- a/modules/gui/beos/AudioOutput.cpp +++ b/modules/gui/beos/AudioOutput.cpp @@ -151,18 +151,18 @@ static void Play( void * _p_aout, void * _p_buffer, size_t i_size, if( p_aout_buffer != NULL ) { - p_aout->p_vlc->pf_memcpy( p_buffer, p_aout_buffer->p_buffer, + p_aout->p_libvlc->pf_memcpy( p_buffer, p_aout_buffer->p_buffer, MIN( i_size, p_aout_buffer->i_nb_bytes ) ); if( p_aout_buffer->i_nb_bytes < i_size ) { - p_aout->p_vlc->pf_memset( p_buffer + p_aout_buffer->i_nb_bytes, + p_aout->p_libvlc->pf_memset( p_buffer + p_aout_buffer->i_nb_bytes, 0, i_size - p_aout_buffer->i_nb_bytes ); } aout_BufferFree( p_aout_buffer ); } else { - p_aout->p_vlc->pf_memset( p_buffer, 0, i_size ); + p_aout->p_libvlc->pf_memset( p_buffer, 0, i_size ); } } diff --git a/modules/gui/beos/PreferencesWindow.cpp b/modules/gui/beos/PreferencesWindow.cpp index 71a326cf25..f50fc9f04e 100644 --- a/modules/gui/beos/PreferencesWindow.cpp +++ b/modules/gui/beos/PreferencesWindow.cpp @@ -766,7 +766,7 @@ void ConfigWidget::Apply( bool doIt ) { val.i_int |= KEY_MODIFIER_SHIFT; } - var_Set( p_intf->p_vlc, fName, val ); + var_Set( p_intf->p_libvlc, fName, val ); } } else diff --git a/modules/gui/beos/VideoOutput.cpp b/modules/gui/beos/VideoOutput.cpp index e70773c24d..a578a07fb3 100644 --- a/modules/gui/beos/VideoOutput.cpp +++ b/modules/gui/beos/VideoOutput.cpp @@ -464,7 +464,7 @@ VideoWindow::MessageReceived( BMessage *p_message ) { val.i_int |= KEY_MODIFIER_CTRL; } - var_Set( p_vout->p_vlc, "key-pressed", val ); + var_Set( p_vout->p_libvlc, "key-pressed", val ); free( keys ); free( chars ); diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m index 1ac699b5d7..b5cf1dfc3c 100644 --- a/modules/gui/macosx/controls.m +++ b/modules/gui/macosx/controls.m @@ -82,7 +82,7 @@ } val.i_int = config_GetInt( p_intf, "key-play-pause" ); - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); } /* Small helper method */ @@ -116,7 +116,7 @@ vlc_value_t val; intf_thread_t * p_intf = VLCIntf; val.i_int = config_GetInt( p_intf, "key-stop" ); - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); } - (IBAction)faster:(id)sender @@ -124,7 +124,7 @@ vlc_value_t val; intf_thread_t * p_intf = VLCIntf; val.i_int = config_GetInt( p_intf, "key-faster" ); - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); } - (IBAction)slower:(id)sender @@ -132,7 +132,7 @@ vlc_value_t val; intf_thread_t * p_intf = VLCIntf; val.i_int = config_GetInt( p_intf, "key-slower" ); - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); } - (IBAction)prev:(id)sender @@ -140,7 +140,7 @@ vlc_value_t val; intf_thread_t * p_intf = VLCIntf; val.i_int = config_GetInt( p_intf, "key-prev" ); - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); } - (IBAction)next:(id)sender @@ -148,7 +148,7 @@ vlc_value_t val; intf_thread_t * p_intf = VLCIntf; val.i_int = config_GetInt( p_intf, "key-next" ); - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); } - (IBAction)random:(id)sender @@ -254,7 +254,7 @@ vlc_value_t val; intf_thread_t * p_intf = VLCIntf; val.i_int = config_GetInt( p_intf, "key-jump+short" ); - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); } - (IBAction)backward:(id)sender @@ -262,7 +262,7 @@ vlc_value_t val; intf_thread_t * p_intf = VLCIntf; val.i_int = config_GetInt( p_intf, "key-jump-short" ); - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); } @@ -271,7 +271,7 @@ vlc_value_t val; intf_thread_t * p_intf = VLCIntf; val.i_int = config_GetInt( p_intf, "key-vol-up" ); - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); /* Manage volume status */ [o_main manageVolumeSlider]; } @@ -281,7 +281,7 @@ vlc_value_t val; intf_thread_t * p_intf = VLCIntf; val.i_int = config_GetInt( p_intf, "key-vol-down" ); - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); /* Manage volume status */ [o_main manageVolumeSlider]; } @@ -291,7 +291,7 @@ vlc_value_t val; intf_thread_t * p_intf = VLCIntf; val.i_int = config_GetInt( p_intf, "key-vol-mute" ); - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); /* Manage volume status */ [o_main manageVolumeSlider]; } @@ -301,7 +301,7 @@ intf_thread_t * p_intf = VLCIntf; audio_volume_t i_volume = (audio_volume_t)[sender intValue]; int i_volume_step = 0; - i_volume_step = config_GetInt( p_intf->p_vlc, "volume-step" ); + i_volume_step = config_GetInt( p_intf->p_libvlc, "volume-step" ); aout_VolumeSet( p_intf, i_volume * i_volume_step ); /* Manage volume status */ [o_main manageVolumeSlider]; diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m index 10b28d0736..f91947a33d 100644 --- a/modules/gui/macosx/intf.m +++ b/modules/gui/macosx/intf.m @@ -828,7 +828,7 @@ static VLCMain *_o_sharedMainInstance = nil; int i; val.i_int = 0; - p_hotkeys = p_intf->p_vlc->p_hotkeys; + p_hotkeys = p_intf->p_libvlc->p_hotkeys; i_pressed_modifiers = [o_event modifierFlags]; @@ -864,7 +864,7 @@ static VLCMain *_o_sharedMainInstance = nil; { if( p_hotkeys[i].i_key == val.i_int ) { - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); return YES; } } @@ -1018,7 +1018,7 @@ static VLCMain *_o_sharedMainInstance = nil; { vlc_value_t val; - if( p_intf->p_vlc->b_die == VLC_TRUE ) + if( p_intf->p_libvlc->b_die == VLC_TRUE ) { [o_timer invalidate]; return; @@ -1183,7 +1183,7 @@ static VLCMain *_o_sharedMainInstance = nil; o_text = [NSString stringWithFormat: _NS("Volume: %d%%"), i_lastShownVolume * 400 / AOUT_VOLUME_MAX]; if( i_lastShownVolume != -1 ) [self setScrollField:o_text stopAfter:1000000]; - i_volume_step = config_GetInt( p_intf->p_vlc, "volume-step" ); + i_volume_step = config_GetInt( p_intf->p_libvlc, "volume-step" ); [o_volumeslider setFloatValue: (float)i_lastShownVolume / i_volume_step]; [o_volumeslider setEnabled: TRUE]; p_intf->p_sys->b_mute = ( i_lastShownVolume == 0 ); diff --git a/modules/gui/macosx/prefs_widgets.m b/modules/gui/macosx/prefs_widgets.m index 7eb5831bb9..9b9d3702ac 100644 --- a/modules/gui/macosx/prefs_widgets.m +++ b/modules/gui/macosx/prefs_widgets.m @@ -966,7 +966,7 @@ if( MACOS_VERSION >= 10.3 ) \ case CONFIG_ITEM_KEY: /* So you don't need to restart to have the changes take effect */ val.i_int = [self intValue]; - var_Set( VLCIntf->p_vlc, psz_name, val ); + var_Set( VLCIntf->p_libvlc, psz_name, val ); case CONFIG_ITEM_INTEGER: case CONFIG_ITEM_BOOL: config_PutInt( VLCIntf, psz_name, [self intValue] ); diff --git a/modules/gui/macosx/sfilters.m b/modules/gui/macosx/sfilters.m index 6d68b8c3d5..4265cf10e6 100644 --- a/modules/gui/macosx/sfilters.m +++ b/modules/gui/macosx/sfilters.m @@ -352,7 +352,7 @@ static VLCsFilters *_o_sharedInstance = nil; } if( p_input ) - var_Set( p_input->p_libvlc, "marq-marquee", val ); + var_Set( p_input->p_libvlc_global, "marq-marquee", val ); config_PutPsz( p_intf, "marq-marquee", val.psz_string ); } @@ -362,7 +362,7 @@ static VLCsFilters *_o_sharedInstance = nil; val.i_int = [[o_marq_pos_radio selectedCell] tag]; if( p_input ) - var_Set( p_input->p_libvlc, "marq-position", val ); + var_Set( p_input->p_libvlc_global, "marq-position", val ); config_PutInt( p_intf, "marq-position", val.i_int ); } @@ -373,7 +373,7 @@ static VLCsFilters *_o_sharedInstance = nil; indexOfSelectedItem]] objectAtIndex: 1] UTF8String], NULL, 0 ); if( p_input ) - var_Set( p_input->p_libvlc, "marq-color", val ); + var_Set( p_input->p_libvlc_global, "marq-color", val ); config_PutInt( p_intf, "marq-color", val.i_int ); } @@ -383,7 +383,7 @@ static VLCsFilters *_o_sharedInstance = nil; val.i_int = [o_marq_opaque_sld intValue]; if( p_input ) - var_Set( p_input->p_libvlc, "marq-opacity", val ); + var_Set( p_input->p_libvlc_global, "marq-opacity", val ); config_PutInt( p_intf, "marq-opacity", val.i_int ); } @@ -393,7 +393,7 @@ static VLCsFilters *_o_sharedInstance = nil; val.i_int = [[o_marq_size_pop titleOfSelectedItem] intValue]; if( p_input ) - var_Set( p_input->p_libvlc, "marq-size", val ); + var_Set( p_input->p_libvlc_global, "marq-size", val ); config_PutInt( p_intf, "marq-size", val.i_int ); } @@ -403,7 +403,7 @@ static VLCsFilters *_o_sharedInstance = nil; val.i_int = [o_marq_tmOut_fld intValue]; if( p_input ) - var_Set( p_input->p_libvlc, "marq-timeout", val ); + var_Set( p_input->p_libvlc_global, "marq-timeout", val ); config_PutInt( p_intf, "marq-timeout", val.i_int ); } @@ -422,7 +422,7 @@ static VLCsFilters *_o_sharedInstance = nil; } if( p_input ) - var_Set( p_input->p_libvlc, "time-format", val ); + var_Set( p_input->p_libvlc_global, "time-format", val ); config_PutPsz( p_intf, "time-format", val.psz_string ); } @@ -432,7 +432,7 @@ static VLCsFilters *_o_sharedInstance = nil; val.i_int = [[o_time_pos_radio selectedCell] tag]; if( p_input ) - var_Set( p_input->p_libvlc, "time-position", val ); + var_Set( p_input->p_libvlc_global, "time-position", val ); config_PutInt( p_intf, "time-position", val.i_int ); } @@ -443,7 +443,7 @@ static VLCsFilters *_o_sharedInstance = nil; indexOfSelectedItem]] objectAtIndex: 1] UTF8String], NULL, 0 ); if( p_input ) - var_Set( p_input->p_libvlc, "time-color", val ); + var_Set( p_input->p_libvlc_global, "time-color", val ); config_PutInt( p_intf, "time-color", val.i_int ); } @@ -453,7 +453,7 @@ static VLCsFilters *_o_sharedInstance = nil; val.i_int = [o_time_opaque_sld intValue]; if( p_input ) - var_Set( p_input->p_libvlc, "time-opacity", val ); + var_Set( p_input->p_libvlc_global, "time-opacity", val ); config_PutInt( p_intf, "time-opacity", val.i_int ); } @@ -463,7 +463,7 @@ static VLCsFilters *_o_sharedInstance = nil; val.i_int = [[o_time_size_pop titleOfSelectedItem] intValue]; if( p_input ) - var_Set( p_input->p_libvlc, "time-size", val ); + var_Set( p_input->p_libvlc_global, "time-size", val ); config_PutInt( p_intf, "time-size", val.i_int ); } @@ -474,7 +474,7 @@ static VLCsFilters *_o_sharedInstance = nil; val.i_int = [o_logo_opaque_sld intValue]; if( p_input ) - var_Set( p_input->p_libvlc, "logo-transparency", val ); + var_Set( p_input->p_libvlc_global, "logo-transparency", val ); config_PutInt( p_intf, "logo-transparency", val.i_int ); } @@ -484,7 +484,7 @@ static VLCsFilters *_o_sharedInstance = nil; val.i_int = [[o_logo_pos_radio selectedCell] tag]; if( p_input ) - var_Set( p_input->p_libvlc, "logo-position", val ); + var_Set( p_input->p_libvlc_global, "logo-position", val ); config_PutInt( p_intf, "logo-position", val.i_int ); } diff --git a/modules/gui/macosx/vout.m b/modules/gui/macosx/vout.m index 1b788c6f7d..21b04592ca 100644 --- a/modules/gui/macosx/vout.m +++ b/modules/gui/macosx/vout.m @@ -54,8 +54,8 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, vout_thread_t *p_vout = (vout_thread_t *)p_this; msg_Dbg( p_vout, "set %d", new_val.i_int ); - var_Create( p_vout->p_vlc, "video-device", VLC_VAR_INTEGER ); - var_Set( p_vout->p_vlc, "video-device", new_val ); + var_Create( p_vout->p_libvlc, "video-device", VLC_VAR_INTEGER ); + var_Set( p_vout->p_libvlc, "video-device", new_val ); val.b_bool = VLC_TRUE; var_Set( p_vout, "intf-change", val ); @@ -174,13 +174,13 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, p_real_vout = [VLCVoutView getRealVout: p_vout]; /* Get the pref value when this is the first time, otherwise retrieve the device from the top level video-device var */ - if( var_Type( p_real_vout->p_vlc, "video-device" ) == 0 ) + if( var_Type( p_real_vout->p_libvlc, "video-device" ) == 0 ) { i_device = var_GetInteger( p_vout, "macosx-vdev" ); } else { - i_device = var_GetInteger( p_real_vout->p_vlc, "video-device" ); + i_device = var_GetInteger( p_real_vout->p_libvlc, "video-device" ); } /* Setup the menuitem for the multiple displays. */ @@ -442,12 +442,12 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, { vlc_value_t val; val.i_int = config_GetInt( p_vout, "key-play-pause" ); - var_Set( p_vout->p_vlc, "key-pressed", val ); + var_Set( p_vout->p_libvlc, "key-pressed", val ); } else { val.i_int |= CocoaKeyToVLC( key ); - var_Set( p_vout->p_vlc, "key-pressed", val ); + var_Set( p_vout->p_libvlc, "key-pressed", val ); } } else @@ -665,7 +665,7 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, id o_return = nil; vout_thread_t * p_real_vout = [VLCVoutView getRealVout: p_vout]; - var_Get( p_vout->p_vlc, "drawable", &value_drawable ); + var_Get( p_vout->p_libvlc, "drawable", &value_drawable ); var_Create( p_vout, "macosx-vdev", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); var_Create( p_vout, "macosx-fill", VLC_VAR_BOOL | VLC_VAR_DOINHERIT ); @@ -921,8 +921,8 @@ int DeviceCallback( vlc_object_t *p_this, const char *psz_variable, b_init_ok = VLC_FALSE; p_real_vout = [VLCVoutView getRealVout: p_vout]; - i_device = var_GetInteger( p_real_vout->p_vlc, "video-device" ); - b_black = var_GetBool( p_real_vout->p_vlc, "macosx-black" ); + i_device = var_GetInteger( p_real_vout->p_libvlc, "video-device" ); + b_black = var_GetBool( p_real_vout->p_libvlc, "macosx-black" ); /* Find out on which screen to open the window */ if( i_device <= 0 || i_device > (int)[o_screens count] ) diff --git a/modules/gui/macosx/voutgl.m b/modules/gui/macosx/voutgl.m index 050d2d7711..6d613c56d6 100644 --- a/modules/gui/macosx/voutgl.m +++ b/modules/gui/macosx/voutgl.m @@ -113,7 +113,7 @@ int E_(OpenVideoGL) ( vlc_object_t * p_this ) vlc_mutex_init( p_vout, &p_vout->p_sys->lock ); - var_Get( p_vout->p_vlc, "drawable", &value_drawable ); + var_Get( p_vout->p_libvlc, "drawable", &value_drawable ); if( value_drawable.i_int != 0 ) { static const GLint ATTRIBUTES[] = { @@ -455,25 +455,25 @@ static int aglInit( vout_thread_t * p_vout ) Rect viewBounds; Rect clipBounds; - var_Get( p_vout->p_vlc, "drawable", &val ); + var_Get( p_vout->p_libvlc, "drawable", &val ); p_vout->p_sys->agl_drawable = (AGLDrawable)val.i_int; aglSetDrawable(p_vout->p_sys->agl_ctx, p_vout->p_sys->agl_drawable); - var_Get( p_vout->p_vlc, "drawable-view-top", &val ); + var_Get( p_vout->p_libvlc, "drawable-view-top", &val ); viewBounds.top = val.i_int; - var_Get( p_vout->p_vlc, "drawable-view-left", &val ); + var_Get( p_vout->p_libvlc, "drawable-view-left", &val ); viewBounds.left = val.i_int; - var_Get( p_vout->p_vlc, "drawable-view-bottom", &val ); + var_Get( p_vout->p_libvlc, "drawable-view-bottom", &val ); viewBounds.bottom = val.i_int; - var_Get( p_vout->p_vlc, "drawable-view-right", &val ); + var_Get( p_vout->p_libvlc, "drawable-view-right", &val ); viewBounds.right = val.i_int; - var_Get( p_vout->p_vlc, "drawable-clip-top", &val ); + var_Get( p_vout->p_libvlc, "drawable-clip-top", &val ); clipBounds.top = val.i_int; - var_Get( p_vout->p_vlc, "drawable-clip-left", &val ); + var_Get( p_vout->p_libvlc, "drawable-clip-left", &val ); clipBounds.left = val.i_int; - var_Get( p_vout->p_vlc, "drawable-clip-bottom", &val ); + var_Get( p_vout->p_libvlc, "drawable-clip-bottom", &val ); clipBounds.bottom = val.i_int; - var_Get( p_vout->p_vlc, "drawable-clip-right", &val ); + var_Get( p_vout->p_libvlc, "drawable-clip-right", &val ); clipBounds.right = val.i_int; aglSetViewport(p_vout, viewBounds, clipBounds); diff --git a/modules/gui/macosx/voutqt.m b/modules/gui/macosx/voutqt.m index 92d36e6cb0..105287e749 100644 --- a/modules/gui/macosx/voutqt.m +++ b/modules/gui/macosx/voutqt.m @@ -140,14 +140,14 @@ int E_(OpenVideoQT) ( vlc_object_t *p_this ) /* Are we embedded? If so, the drawable value will be a pointer to a * CGrafPtr that we're expected to use */ - var_Get( p_vout->p_vlc, "drawable", &value_drawable ); + var_Get( p_vout->p_libvlc, "drawable", &value_drawable ); if( value_drawable.i_int != 0 ) p_vout->p_sys->b_embedded = VLC_TRUE; else p_vout->p_sys->b_embedded = VLC_FALSE; - p_vout->p_sys->b_cpu_has_simd = (p_vout->p_libvlc->i_cpu & CPU_CAPABILITY_ALTIVEC) - | (p_vout->p_libvlc->i_cpu & CPU_CAPABILITY_MMXEXT); + p_vout->p_sys->b_cpu_has_simd = (p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_ALTIVEC) + | (p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT); msg_Dbg( p_vout, "we do%s have SIMD enabled CPU", p_vout->p_sys->b_cpu_has_simd ? "" : "n't" ); /* Initialize QuickTime */ @@ -165,8 +165,8 @@ int E_(OpenVideoQT) ( vlc_object_t *p_this ) return VLC_EGENERIC; } - /* Damn QT isn't thread safe. so keep a lock in the p_vlc object */ - vlc_mutex_lock( &p_vout->p_vlc->quicktime_lock ); + /* Damn QT isn't thread safe. so keep a lock in the p_libvlc object */ + vlc_mutex_lock( &p_vout->p_libvlc->quicktime_lock ); /* Can we find the right chroma ? */ if( p_vout->p_sys->b_cpu_has_simd ) @@ -179,7 +179,7 @@ int E_(OpenVideoQT) ( vlc_object_t *p_this ) err = FindCodec( kYUV420CodecType, bestSpeedCodec, nil, &p_vout->p_sys->img_dc ); } - vlc_mutex_unlock( &p_vout->p_vlc->quicktime_lock ); + vlc_mutex_unlock( &p_vout->p_libvlc->quicktime_lock ); if( err == noErr && p_vout->p_sys->img_dc != 0 ) { @@ -284,7 +284,7 @@ static int InitVideo ( vout_thread_t *p_vout ) /* Create the clipping mask */ p_vout->p_sys->clip_mask = NewRgn(); UpdateEmbeddedGeometry(p_vout); - var_AddCallback(p_vout->p_vlc, "drawableredraw", DrawableRedraw, p_vout); + var_AddCallback(p_vout->p_libvlc, "drawableredraw", DrawableRedraw, p_vout); } QTScaleMatrix( p_vout ); @@ -336,7 +336,7 @@ static void EndVideo( vout_thread_t *p_vout ) if( !p_vout->b_fullscreen && p_vout->p_sys->b_embedded ) { - var_DelCallback(p_vout->p_vlc, "drawableredraw", DrawableRedraw, p_vout); + var_DelCallback(p_vout->p_libvlc, "drawableredraw", DrawableRedraw, p_vout); DisposeRgn(p_vout->p_sys->clip_mask); } @@ -494,7 +494,7 @@ static int CoToggleFullscreen( vout_thread_t *p_vout ) } else { - var_DelCallback(p_vout->p_vlc, "drawableredraw", DrawableRedraw, p_vout); + var_DelCallback(p_vout->p_libvlc, "drawableredraw", DrawableRedraw, p_vout); DisposeRgn(p_vout->p_sys->clip_mask); } } @@ -538,7 +538,7 @@ static int CoToggleFullscreen( vout_thread_t *p_vout ) /* Create the clipping mask */ p_vout->p_sys->clip_mask = NewRgn(); UpdateEmbeddedGeometry(p_vout); - var_AddCallback(p_vout->p_vlc, "drawableredraw", DrawableRedraw, p_vout); + var_AddCallback(p_vout->p_libvlc, "drawableredraw", DrawableRedraw, p_vout); } QTScaleMatrix( p_vout ); @@ -586,17 +586,17 @@ static void UpdateEmbeddedGeometry( vout_thread_t *p_vout ) vlc_value_t valt, vall, valb, valr, valx, valy, valw, valh, valportx, valporty; - var_Get( p_vout->p_vlc, "drawable", &val ); - var_Get( p_vout->p_vlc, "drawablet", &valt ); - var_Get( p_vout->p_vlc, "drawablel", &vall ); - var_Get( p_vout->p_vlc, "drawableb", &valb ); - var_Get( p_vout->p_vlc, "drawabler", &valr ); - var_Get( p_vout->p_vlc, "drawablex", &valx ); - var_Get( p_vout->p_vlc, "drawabley", &valy ); - var_Get( p_vout->p_vlc, "drawablew", &valw ); - var_Get( p_vout->p_vlc, "drawableh", &valh ); - var_Get( p_vout->p_vlc, "drawableportx", &valportx ); - var_Get( p_vout->p_vlc, "drawableporty", &valporty ); + var_Get( p_vout->p_libvlc, "drawable", &val ); + var_Get( p_vout->p_libvlc, "drawablet", &valt ); + var_Get( p_vout->p_libvlc, "drawablel", &vall ); + var_Get( p_vout->p_libvlc, "drawableb", &valb ); + var_Get( p_vout->p_libvlc, "drawabler", &valr ); + var_Get( p_vout->p_libvlc, "drawablex", &valx ); + var_Get( p_vout->p_libvlc, "drawabley", &valy ); + var_Get( p_vout->p_libvlc, "drawablew", &valw ); + var_Get( p_vout->p_libvlc, "drawableh", &valh ); + var_Get( p_vout->p_libvlc, "drawableportx", &valportx ); + var_Get( p_vout->p_libvlc, "drawableporty", &valporty ); /* portx, porty contains values for SetOrigin() function which isn't used, instead use QT Translate matrix */ @@ -616,7 +616,7 @@ static void UpdateEmbeddedGeometry( vout_thread_t *p_vout ) /* reset drawableredraw variable indicating we are ready to take changes in video geometry */ val.i_int=0; - var_Set( p_vout->p_vlc, "drawableredraw", val ); + var_Set( p_vout->p_libvlc, "drawableredraw", val ); } /***************************************************************************** diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c index 4a2895694f..a63d7ba312 100644 --- a/modules/gui/ncurses.c +++ b/modules/gui/ncurses.c @@ -235,7 +235,7 @@ static int Open( vlc_object_t *p_this ) /* Set quiet mode */ val.i_int = -1; - var_Set( p_intf->p_vlc, "verbose", val ); + var_Set( p_intf->p_libvlc, "verbose", val ); /* Set defaul playlist view */ p_sys->i_current_view = VIEW_CATEGORY; @@ -262,7 +262,7 @@ static int Open( vlc_object_t *p_this ) } else { - p_sys->psz_current_dir = strdup( p_intf->p_vlc->psz_homedir ); + p_sys->psz_current_dir = strdup( p_intf->p_libvlc->psz_homedir ); } p_sys->i_dir_entries = 0; @@ -834,7 +834,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key ) case 'q': case 'Q': case 0x1b: /* Esc */ - p_intf->p_vlc->b_die = VLC_TRUE; + p_intf->p_libvlc->b_die = VLC_TRUE; return 0; /* Box switching */ diff --git a/modules/gui/pda/pda.c b/modules/gui/pda/pda.c index fe42eeb4fc..0f5be409b3 100644 --- a/modules/gui/pda/pda.c +++ b/modules/gui/pda/pda.c @@ -326,7 +326,7 @@ static void Run( intf_thread_t *p_intf ) /* Sleep to avoid using all CPU - since some interfaces need to * access keyboard events, a 100ms delay is a good compromise */ gdk_threads_leave(); - if (p_intf->p_libvlc->i_cpu & CPU_CAPABILITY_FPU) + if (p_intf->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU) msleep( INTF_IDLE_SLEEP ); else msleep( 1000 ); @@ -336,7 +336,7 @@ static void Run( intf_thread_t *p_intf ) msg_Dbg( p_intf, "Manage GTK keyboard events using timeouts" ); /* Sleep to avoid using all CPU - since some interfaces needs to access * keyboard events, a 1000ms delay is a good compromise */ - if (p_intf->p_libvlc->i_cpu & CPU_CAPABILITY_FPU) + if (p_intf->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU) i_dummy = gtk_timeout_add( INTF_IDLE_SLEEP / 1000, (GtkFunction)Manage, p_intf ); else i_dummy = gtk_timeout_add( 1000, (GtkFunction)Manage, p_intf ); @@ -447,7 +447,7 @@ static int Manage( intf_thread_t *p_intf ) i_time = var_GetTime( p_intf->p_sys->p_input, "time" ); i_length = var_GetTime( p_intf->p_sys->p_input, "length" ); - if (p_intf->p_libvlc->i_cpu & CPU_CAPABILITY_FPU) + if (p_intf->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU) { /* Manage the slider for CPU_CAPABILITY_FPU hardware */ if( p_intf->p_sys->b_playing ) diff --git a/modules/gui/pda/pda_callbacks.c b/modules/gui/pda/pda_callbacks.c index f3bdf14ed5..73d8b38fac 100644 --- a/modules/gui/pda/pda_callbacks.c +++ b/modules/gui/pda/pda_callbacks.c @@ -342,7 +342,7 @@ gboolean onPDADeleteEvent(GtkWidget *widget, GdkEvent *event, gpointer user_data intf_thread_t *p_intf = GtkGetIntf( widget ); vlc_mutex_lock( &p_intf->change_lock ); - p_intf->p_vlc->b_die = VLC_TRUE; + p_intf->p_libvlc->b_die = VLC_TRUE; vlc_mutex_unlock( &p_intf->change_lock ); msg_Dbg( p_intf, "about to exit vlc ... signaled" ); diff --git a/modules/gui/qnx/vout.c b/modules/gui/qnx/vout.c index 34b14a2695..67a410fcd7 100644 --- a/modules/gui/qnx/vout.c +++ b/modules/gui/qnx/vout.c @@ -338,7 +338,7 @@ static int QNXManage( vout_thread_t *p_vout ) switch( p_ev->event_f ) { case Ph_WM_CLOSE: - p_vout->p_vlc->b_die = 1; + p_vout->p_libvlc->b_die = 1; break; case Ph_WM_MOVE: @@ -368,7 +368,7 @@ static int QNXManage( vout_thread_t *p_vout ) { case Pk_q: case Pk_Q: - p_vout->p_vlc->b_die = 1; + p_vout->p_libvlc->b_die = 1; break; case Pk_f: diff --git a/modules/gui/qt4/dialogs/messages.cpp b/modules/gui/qt4/dialogs/messages.cpp index 87c3a8e3cd..57d87d35fd 100644 --- a/modules/gui/qt4/dialogs/messages.cpp +++ b/modules/gui/qt4/dialogs/messages.cpp @@ -153,7 +153,7 @@ bool MessagesDialog::save() { QString saveLogFileName = QFileDialog::getSaveFileName( this, qtr("Choose a filename to save the logs under..."), - p_intf->p_vlc->psz_homedir, + p_intf->p_libvlc->psz_homedir, "Texts / Logs (*.log *.txt);; All (*.*) "); if( saveLogFileName != NULL ) diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp index b4b414ed30..e35e70a501 100644 --- a/modules/gui/qt4/dialogs_provider.cpp +++ b/modules/gui/qt4/dialogs_provider.cpp @@ -261,7 +261,7 @@ QStringList DialogsProvider::showSimpleOpen() FileTypes += ");; All Files (*.*)" ; FileTypes.replace(QString(";*"), QString(" *")); return QFileDialog::getOpenFileNames( NULL, qfu(I_POP_SEL_FILES ), - p_intf->p_vlc->psz_homedir, FileTypes ); + p_intf->p_libvlc->psz_homedir, FileTypes ); } void DialogsProvider::bookmarksDialog() diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index ffe5ee814e..3a0a5ad34a 100644 --- a/modules/gui/qt4/main_interface.cpp +++ b/modules/gui/qt4/main_interface.cpp @@ -216,7 +216,7 @@ void MainInterface::keyPressEvent( QKeyEvent *e ) } if( i_vlck >= 0 ) { - var_SetInteger( p_intf->p_vlc, "key-pressed", i_vlck ); + var_SetInteger( p_intf->p_libvlc, "key-pressed", i_vlck ); e->accept(); } else diff --git a/modules/gui/skins2/src/top_window.cpp b/modules/gui/skins2/src/top_window.cpp index a0c55aa0cd..5089b6ac3e 100644 --- a/modules/gui/skins2/src/top_window.cpp +++ b/modules/gui/skins2/src/top_window.cpp @@ -253,7 +253,7 @@ void TopWindow::processEvent( EvtKey &rEvtKey ) val.i_int |= KEY_MODIFIER_SHIFT; } - var_Set( getIntf()->p_vlc, "key-pressed", val ); + var_Set( getIntf()->p_libvlc, "key-pressed", val ); } // Always store the modifier, which can be needed for scroll events @@ -298,7 +298,7 @@ void TopWindow::processEvent( EvtScroll &rEvtScroll ) // Add the modifiers val.i_int |= m_currModifier; - var_Set( getIntf()->p_vlc, "key-pressed", val ); + var_Set( getIntf()->p_libvlc, "key-pressed", val ); } } diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp index d1478a381c..fc04626fc3 100644 --- a/modules/gui/skins2/src/vlcproc.cpp +++ b/modules/gui/skins2/src/vlcproc.cpp @@ -230,7 +230,7 @@ void VlcProc::dropVout() void VlcProc::manage() { // Did the user request to quit vlc ? - if( getIntf()->b_die || getIntf()->p_vlc->b_die ) + if( getIntf()->b_die || getIntf()->p_libvlc->b_die ) { CmdQuit *pCmd = new CmdQuit( getIntf() ); AsyncQueue *pQueue = AsyncQueue::instance( getIntf() ); diff --git a/modules/gui/skins2/win32/win32_factory.cpp b/modules/gui/skins2/win32/win32_factory.cpp index e4885b31e2..94e8156cf1 100644 --- a/modules/gui/skins2/win32/win32_factory.cpp +++ b/modules/gui/skins2/win32/win32_factory.cpp @@ -225,15 +225,15 @@ bool Win32Factory::init() } // Initialize the resource path - m_resourcePath.push_back( (string)getIntf()->p_vlc->psz_homedir + + m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_homedir + "\\" + CONFIG_DIR + "\\skins" ); - m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_vlcpath + + m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath + "\\skins" ); - m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_vlcpath + + m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath + "\\skins2" ); - m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_vlcpath + + m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath + "\\share\\skins" ); - m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_vlcpath + + m_resourcePath.push_back( (string)getIntf()->p_libvlc_global->psz_vlcpath + "\\share\\skins2" ); // All went well diff --git a/modules/gui/skins2/x11/x11_factory.cpp b/modules/gui/skins2/x11/x11_factory.cpp index a010836b37..405df09026 100644 --- a/modules/gui/skins2/x11/x11_factory.cpp +++ b/modules/gui/skins2/x11/x11_factory.cpp @@ -71,7 +71,7 @@ bool X11Factory::init() ConnectionNumber( pDisplay ) ); // Initialize the resource path - m_resourcePath.push_back( (string)getIntf()->p_vlc->psz_homedir + + m_resourcePath.push_back( (string)getIntf()->p_libvlc->psz_homedir + m_dirSep + CONFIG_DIR + "/skins2" ); m_resourcePath.push_back( (string)"share/skins2" ); m_resourcePath.push_back( (string)DATA_PATH + "/skins2" ); diff --git a/modules/gui/wince/messages.cpp b/modules/gui/wince/messages.cpp index 6e6795067b..65431bf3ea 100644 --- a/modules/gui/wince/messages.cpp +++ b/modules/gui/wince/messages.cpp @@ -209,13 +209,13 @@ void Messages::UpdateLog() { case VLC_MSG_ERR: case VLC_MSG_INFO: - if( p_intf->p_libvlc->i_verbose < 0 ) continue; + if( p_intf->p_libvlc_global->i_verbose < 0 ) continue; break; case VLC_MSG_WARN: - if( p_intf->p_libvlc->i_verbose < 1 ) continue; + if( p_intf->p_libvlc_global->i_verbose < 1 ) continue; break; case VLC_MSG_DBG: - if( p_intf->p_libvlc->i_verbose < 2 ) continue; + if( p_intf->p_libvlc_global->i_verbose < 2 ) continue; break; } diff --git a/modules/gui/wince/preferences.cpp b/modules/gui/wince/preferences.cpp index 31c478aea6..971f9c19f8 100644 --- a/modules/gui/wince/preferences.cpp +++ b/modules/gui/wince/preferences.cpp @@ -819,7 +819,7 @@ void PrefsPanel::ApplyChanges() case CONFIG_ITEM_KEY: /* So you don't need to restart to have the changes take effect */ val.i_int = control->GetIntValue(); - var_Set( p_intf->p_vlc, control->GetName(), val ); + var_Set( p_intf->p_libvlc, control->GetName(), val ); case CONFIG_ITEM_INTEGER: case CONFIG_ITEM_BOOL: config_PutInt( p_intf, control->GetName(), diff --git a/modules/gui/wxwidgets/dialogs/preferences.cpp b/modules/gui/wxwidgets/dialogs/preferences.cpp index 225b180d8a..d3d7d66194 100644 --- a/modules/gui/wxwidgets/dialogs/preferences.cpp +++ b/modules/gui/wxwidgets/dialogs/preferences.cpp @@ -1077,7 +1077,7 @@ void PrefsPanel::ApplyChanges() case CONFIG_ITEM_KEY: /* So you don't need to restart to have the changes take effect */ val.i_int = control->GetIntValue(); - var_Set( p_intf->p_vlc, control->GetName().mb_str(), val ); + var_Set( p_intf->p_libvlc, control->GetName().mb_str(), val ); case CONFIG_ITEM_INTEGER: case CONFIG_ITEM_BOOL: config_PutInt( p_intf, control->GetName().mb_str(), diff --git a/modules/gui/wxwidgets/interface.cpp b/modules/gui/wxwidgets/interface.cpp index 028365e3ed..83c9325d82 100644 --- a/modules/gui/wxwidgets/interface.cpp +++ b/modules/gui/wxwidgets/interface.cpp @@ -809,7 +809,7 @@ static int ConvertHotkey( int i_hotkey ) void Interface::SetupHotkeys() { - struct vlc_t::hotkey *p_hotkeys = p_intf->p_vlc->p_hotkeys; + struct libvlc_int_t::hotkey *p_hotkeys = p_intf->p_libvlc->p_hotkeys; int i_hotkeys; /* Count number of hoteys */ diff --git a/modules/gui/wxwidgets/menus.cpp b/modules/gui/wxwidgets/menus.cpp index 24e8915972..4a70e08e85 100644 --- a/modules/gui/wxwidgets/menus.cpp +++ b/modules/gui/wxwidgets/menus.cpp @@ -997,10 +997,10 @@ void MenuEvtHandler::OnMenuEvent( wxCommandEvent& event ) vlc_value_t val; val.i_int = - p_intf->p_vlc->p_hotkeys[event.GetId() - i_hotkey_event].i_key; + p_intf->p_libvlc->p_hotkeys[event.GetId() - i_hotkey_event].i_key; /* Get the key combination and send it to the hotkey handler */ - var_Set( p_intf->p_vlc, "key-pressed", val ); + var_Set( p_intf->p_libvlc, "key-pressed", val ); return; } diff --git a/modules/misc/dummy/input.c b/modules/misc/dummy/input.c index e6f62e273f..6d6da6b2dc 100644 --- a/modules/misc/dummy/input.c +++ b/modules/misc/dummy/input.c @@ -209,7 +209,7 @@ static int Demux( demux_t *p_demux ) switch( p_sys->i_command ) { case COMMAND_QUIT: - b_eof = p_demux->p_vlc->b_die = VLC_TRUE; + b_eof = p_demux->p_libvlc->b_die = VLC_TRUE; break; case COMMAND_PAUSE: diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c index 95de9edab1..deefaff102 100644 --- a/modules/misc/gnutls.c +++ b/modules/misc/gnutls.c @@ -666,7 +666,7 @@ gnutls_ClientCreate( tls_t *p_tls ) char *psz_path; if( asprintf( &psz_path, "%s/"CONFIG_DIR"/ssl/certs", - p_tls->p_vlc->psz_homedir ) != -1 ) + p_tls->p_libvlc->psz_homedir ) != -1 ) { gnutls_Addx509Directory( (vlc_object_t *)p_session, p_sys->x509_cred, psz_path, VLC_FALSE ); @@ -689,7 +689,7 @@ gnutls_ClientCreate( tls_t *p_tls ) char *psz_path; if( asprintf( &psz_path, "%s/"CONFIG_DIR"/ssl/private", - p_tls->p_vlc->psz_homedir ) == -1 ) + p_tls->p_libvlc->psz_homedir ) == -1 ) { gnutls_certificate_free_credentials( p_sys->x509_cred ); goto error; @@ -1203,18 +1203,18 @@ Open( vlc_object_t *p_this ) vlc_value_t lock, count; - var_Create( p_this->p_libvlc, "gnutls_mutex", VLC_VAR_MUTEX ); - var_Get( p_this->p_libvlc, "gnutls_mutex", &lock ); + var_Create( p_this->p_libvlc_global, "gnutls_mutex", VLC_VAR_MUTEX ); + var_Get( p_this->p_libvlc_global, "gnutls_mutex", &lock ); vlc_mutex_lock( lock.p_address ); /* Initialize GnuTLS only once */ - var_Create( p_this->p_libvlc, "gnutls_count", VLC_VAR_INTEGER ); - var_Get( p_this->p_libvlc, "gnutls_count", &count); + var_Create( p_this->p_libvlc_global, "gnutls_count", VLC_VAR_INTEGER ); + var_Get( p_this->p_libvlc_global, "gnutls_count", &count); if( count.i_int == 0) { #ifdef NEED_THREAD_CONTEXT - __p_gcry_data = VLC_OBJECT( p_this->p_vlc ); + __p_gcry_data = VLC_OBJECT( p_this->p_libvlc ); #endif gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_vlc); @@ -1237,7 +1237,7 @@ Open( vlc_object_t *p_this ) } count.i_int++; - var_Set( p_this->p_libvlc, "gnutls_count", count); + var_Set( p_this->p_libvlc_global, "gnutls_count", count); vlc_mutex_unlock( lock.p_address ); p_tls->pf_server_create = gnutls_ServerCreate; @@ -1257,14 +1257,14 @@ Close( vlc_object_t *p_this ) vlc_value_t lock, count; - var_Create( p_this->p_libvlc, "gnutls_mutex", VLC_VAR_MUTEX ); - var_Get( p_this->p_libvlc, "gnutls_mutex", &lock ); + var_Create( p_this->p_libvlc_global, "gnutls_mutex", VLC_VAR_MUTEX ); + var_Get( p_this->p_libvlc_global, "gnutls_mutex", &lock ); vlc_mutex_lock( lock.p_address ); - var_Create( p_this->p_libvlc, "gnutls_count", VLC_VAR_INTEGER ); - var_Get( p_this->p_libvlc, "gnutls_count", &count); + var_Create( p_this->p_libvlc_global, "gnutls_count", VLC_VAR_INTEGER ); + var_Get( p_this->p_libvlc_global, "gnutls_count", &count); count.i_int--; - var_Set( p_this->p_libvlc, "gnutls_count", count); + var_Set( p_this->p_libvlc_global, "gnutls_count", count); if( count.i_int == 0 ) { diff --git a/modules/misc/gtk_main.c b/modules/misc/gtk_main.c index 6a97ee3848..517202ece0 100644 --- a/modules/misc/gtk_main.c +++ b/modules/misc/gtk_main.c @@ -86,9 +86,9 @@ static int Open( vlc_object_t *p_this ) vlc_value_t lockval; /* FIXME: put this in the module (de)initialization ASAP */ - var_Create( p_this->p_libvlc, "gtk", VLC_VAR_MUTEX ); + var_Create( p_this->p_libvlc_global, "gtk", VLC_VAR_MUTEX ); - var_Get( p_this->p_libvlc, "gtk", &lockval ); + var_Get( p_this->p_libvlc_global, "gtk", &lockval ); vlc_mutex_lock( lockval.p_address ); if( i_refcount > 0 ) @@ -115,7 +115,7 @@ static int Open( vlc_object_t *p_this ) vlc_object_destroy( p_gtk_main ); i_refcount--; vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_this->p_libvlc, "gtk" ); + var_Destroy( p_this->p_libvlc_global, "gtk" ); return VLC_ETHREAD; } @@ -132,7 +132,7 @@ static void Close( vlc_object_t *p_this ) { vlc_value_t lockval; - var_Get( p_this->p_libvlc, "gtk", &lockval ); + var_Get( p_this->p_libvlc_global, "gtk", &lockval ); vlc_mutex_lock( lockval.p_address ); i_refcount--; @@ -140,7 +140,7 @@ static void Close( vlc_object_t *p_this ) if( i_refcount > 0 ) { vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_this->p_libvlc, "gtk" ); + var_Destroy( p_this->p_libvlc_global, "gtk" ); return; } @@ -151,7 +151,7 @@ static void Close( vlc_object_t *p_this ) p_gtk_main = NULL; vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_this->p_libvlc, "gtk" ); + var_Destroy( p_this->p_libvlc_global, "gtk" ); } static gint foo( gpointer bar ) { return TRUE; } @@ -178,7 +178,7 @@ static void GtkMain( vlc_object_t *p_this ) #endif #if defined(MODULE_NAME_IS_gnome_main) - gnome_init( p_this->p_vlc->psz_object_name, VERSION, i_args, p_args ); + gnome_init( p_this->p_libvlc->psz_object_name, VERSION, i_args, p_args ); #elif defined(MODULE_NAME_IS_gnome2_main) gnome_program_init( PACKAGE, VERSION, LIBGNOMEUI_MODULE, i_args, p_args, diff --git a/modules/misc/logger.c b/modules/misc/logger.c index d9c7dc1943..606804a9c0 100644 --- a/modules/misc/logger.c +++ b/modules/misc/logger.c @@ -201,7 +201,7 @@ static int Open( vlc_object_t *p_this ) if( !psz_file ) { #ifdef __APPLE__ - char *psz_homedir = p_this->p_vlc->psz_homedir; + char *psz_homedir = p_this->p_libvlc->psz_homedir; if( !psz_homedir ) { diff --git a/modules/misc/memcpy/memcpy.c b/modules/misc/memcpy/memcpy.c index 4bd7a56d09..d605e59e1e 100644 --- a/modules/misc/memcpy/memcpy.c +++ b/modules/misc/memcpy/memcpy.c @@ -63,11 +63,11 @@ static int Activate ( vlc_object_t *p_this ) { #ifdef MODULE_NAME_IS_memcpy - p_this->p_vlc->pf_memcpy = memcpy; - p_this->p_vlc->pf_memset = memset; + p_this->p_libvlc->pf_memcpy = memcpy; + p_this->p_libvlc->pf_memset = memset; #else - p_this->p_vlc->pf_memcpy = fast_memcpy; - p_this->p_vlc->pf_memset = NULL; + p_this->p_libvlc->pf_memcpy = fast_memcpy; + p_this->p_libvlc->pf_memset = NULL; #endif return VLC_SUCCESS; diff --git a/modules/misc/memcpy/memcpyaltivec.c b/modules/misc/memcpy/memcpyaltivec.c index 99f2057ed2..d80c49a209 100644 --- a/modules/misc/memcpy/memcpyaltivec.c +++ b/modules/misc/memcpy/memcpyaltivec.c @@ -45,7 +45,7 @@ static void * fast_memcpy ( void * to, const void * from, size_t len ); *****************************************************************************/ static int Activate ( vlc_object_t *p_this ) { - p_this->p_vlc->pf_memcpy = fast_memcpy; + p_this->p_libvlc->pf_memcpy = fast_memcpy; return VLC_SUCCESS; } diff --git a/modules/misc/qte_main.cpp b/modules/misc/qte_main.cpp index d0411ab9fd..8bdfcfeddd 100644 --- a/modules/misc/qte_main.cpp +++ b/modules/misc/qte_main.cpp @@ -86,9 +86,9 @@ static int Open( vlc_object_t *p_this ) vlc_value_t lockval; /* FIXME: put this in the module (de)initialization ASAP */ - var_Create( p_this->p_libvlc, "qte", VLC_VAR_MUTEX ); + var_Create( p_this->p_libvlc_global, "qte", VLC_VAR_MUTEX ); - var_Get( p_this->p_libvlc, "qte", &lockval ); + var_Get( p_this->p_libvlc_global, "qte", &lockval ); vlc_mutex_lock( (vlc_mutex_t *) lockval.p_address ); if( i_refcount > 0 ) @@ -109,7 +109,7 @@ static int Open( vlc_object_t *p_this ) vlc_object_destroy( p_qte_main ); i_refcount--; vlc_mutex_unlock( (vlc_mutex_t *) lockval.p_address ); - var_Destroy( p_this->p_libvlc, "qte" ); + var_Destroy( p_this->p_libvlc_global, "qte" ); return VLC_ETHREAD; } @@ -129,7 +129,7 @@ static void Close( vlc_object_t *p_this ) { vlc_value_t lockval; - var_Get( p_this->p_libvlc, "qte", &lockval ); + var_Get( p_this->p_libvlc_global, "qte", &lockval ); vlc_mutex_lock( (vlc_mutex_t *) lockval.p_address ); i_refcount--; @@ -137,7 +137,7 @@ static void Close( vlc_object_t *p_this ) if( i_refcount > 0 ) { vlc_mutex_unlock( (vlc_mutex_t *) lockval.p_address ); - var_Destroy( p_this->p_libvlc, "qte" ); + var_Destroy( p_this->p_libvlc_global, "qte" ); return; } p_qte_main->p_qte_application->quit(); @@ -153,7 +153,7 @@ static void Close( vlc_object_t *p_this ) p_qte_main = NULL; vlc_mutex_unlock( (vlc_mutex_t *) lockval.p_address ); - var_Destroy( p_this->p_libvlc, "qte" ); + var_Destroy( p_this->p_libvlc_global, "qte" ); } /***************************************************************************** diff --git a/modules/misc/testsuite/playlist.c b/modules/misc/testsuite/playlist.c index 6aaf7a3551..8296b5e022 100644 --- a/modules/misc/testsuite/playlist.c +++ b/modules/misc/testsuite/playlist.c @@ -305,7 +305,7 @@ static void StressTest( vlc_object_t *p_this ) if( p_sys->b_error == VLC_FALSE ) { - p_this->p_vlc->b_die = VLC_TRUE; + p_this->p_libvlc->b_die = VLC_TRUE; } else { diff --git a/modules/misc/testsuite/test4.c b/modules/misc/testsuite/test4.c index 1e8de5ac49..891d27030d 100644 --- a/modules/misc/testsuite/test4.c +++ b/modules/misc/testsuite/test4.c @@ -61,18 +61,18 @@ static int Signal ( vlc_object_t *, char const *, *****************************************************************************/ vlc_module_begin(); set_description( _("Miscellaneous stress tests") ); - var_Create( p_module->p_libvlc, "foo-test", + var_Create( p_module->p_libvlc_global, "foo-test", VLC_VAR_VOID | VLC_VAR_ISCOMMAND ); - var_AddCallback( p_module->p_libvlc, "foo-test", Foo, NULL ); - var_Create( p_module->p_libvlc, "callback-test", + var_AddCallback( p_module->p_libvlc_global, "foo-test", Foo, NULL ); + var_Create( p_module->p_libvlc_global, "callback-test", VLC_VAR_VOID | VLC_VAR_ISCOMMAND ); - var_AddCallback( p_module->p_libvlc, "callback-test", Callback, NULL ); - var_Create( p_module->p_libvlc, "stress-test", + var_AddCallback( p_module->p_libvlc_global, "callback-test", Callback, NULL ); + var_Create( p_module->p_libvlc_global, "stress-test", VLC_VAR_STRING | VLC_VAR_ISCOMMAND ); - var_AddCallback( p_module->p_libvlc, "stress-test", Stress, NULL ); - var_Create( p_module->p_libvlc, "signal", + var_AddCallback( p_module->p_libvlc_global, "stress-test", Stress, NULL ); + var_Create( p_module->p_libvlc_global, "signal", VLC_VAR_STRING | VLC_VAR_ISCOMMAND ); - var_AddCallback( p_module->p_libvlc, "signal", Signal, NULL ); + var_AddCallback( p_module->p_libvlc_global, "signal", Signal, NULL ); vlc_module_end(); /***************************************************************************** diff --git a/modules/mux/mpeg/pes.c b/modules/mux/mpeg/pes.c index 0128f1a695..4dfd4df252 100644 --- a/modules/mux/mpeg/pes.c +++ b/modules/mux/mpeg/pes.c @@ -304,7 +304,7 @@ int E_( EStoPES )( sout_instance_t *p_sout, block_t **pp_pes, block_t *p_es, p_pes->i_length = 0; if( i_pes_payload > 0 ) { - p_sout->p_vlc->pf_memcpy( p_pes->p_buffer + i_pes_header, + p_sout->p_libvlc->pf_memcpy( p_pes->p_buffer + i_pes_header, p_data, i_pes_payload ); } i_pes_count++; diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c index b169903884..018790081c 100644 --- a/modules/mux/mpeg/ts.c +++ b/modules/mux/mpeg/ts.c @@ -1653,7 +1653,7 @@ static block_t *FixPES( sout_mux_t *p_mux, block_fifo_t *p_fifo ) else if( i_size > STD_PES_PAYLOAD ) { block_t *p_new = block_New( p_mux, STD_PES_PAYLOAD ); - p_mux->p_vlc->pf_memcpy( p_new->p_buffer, p_data->p_buffer, STD_PES_PAYLOAD ); + p_mux->p_libvlc->pf_memcpy( p_new->p_buffer, p_data->p_buffer, STD_PES_PAYLOAD ); p_new->i_pts = p_data->i_pts; p_new->i_dts = p_data->i_dts; p_new->i_length = p_data->i_length * STD_PES_PAYLOAD @@ -1682,7 +1682,7 @@ static block_t *FixPES( sout_mux_t *p_mux, block_fifo_t *p_fifo ) } i_copy = __MIN( STD_PES_PAYLOAD - i_size, p_next->i_buffer ); - p_mux->p_vlc->pf_memcpy( &p_data->p_buffer[i_size], p_next->p_buffer, + p_mux->p_libvlc->pf_memcpy( &p_data->p_buffer[i_size], p_next->p_buffer, i_copy ); p_next->i_pts += p_next->i_length * i_copy / p_next->i_buffer; p_next->i_dts += p_next->i_length * i_copy / p_next->i_buffer; diff --git a/modules/services_discovery/daap.c b/modules/services_discovery/daap.c index 5051b0d8f1..b812778738 100644 --- a/modules/services_discovery/daap.c +++ b/modules/services_discovery/daap.c @@ -159,9 +159,9 @@ static int Open( vlc_object_t *p_this ) p_sys->p_db->pp_hosts = NULL; p_sys->p_db->i_hosts = 0; - var_Create( p_sd->p_vlc, "daap-db", VLC_VAR_ADDRESS ); + var_Create( p_sd->p_libvlc, "daap-db", VLC_VAR_ADDRESS ); val.p_address = p_sys->p_db; - var_Set( p_sd->p_vlc, "daap-db", val ); + var_Set( p_sd->p_libvlc, "daap-db", val ); vlc_mutex_init( p_sd, &p_sys->p_db->search_lock ); @@ -219,7 +219,7 @@ static int OpenAccess( vlc_object_t *p_this ) p_access->p_sys = p_sys = malloc( sizeof( access_sys_t ) ); memset( p_sys, 0, sizeof( access_sys_t ) ); - i_ret = var_Get( p_access->p_vlc , "daap-db", &val ); + i_ret = var_Get( p_access->p_libvlc , "daap-db", &val ); p_sys->p_db = val.p_address; if( p_sys->p_db == NULL || i_ret ) @@ -322,7 +322,7 @@ static void Close( vlc_object_t *p_this ) FreeHost( p_sd, p_sys->p_db->pp_hosts[i] ); } - var_Destroy( p_sd->p_vlc, "daap-db" ); + var_Destroy( p_sd->p_libvlc, "daap-db" ); if( p_playlist ) { diff --git a/modules/stream_out/bridge.c b/modules/stream_out/bridge.c index e1174d36f2..3d53d05e96 100644 --- a/modules/stream_out/bridge.c +++ b/modules/stream_out/bridge.c @@ -81,7 +81,7 @@ vlc_module_begin(); ID_OFFSET_LONGTEXT, VLC_FALSE ); set_callbacks( OpenIn, CloseIn ); - var_Create( p_module->p_libvlc, "bridge-lock", VLC_VAR_MUTEX ); + var_Create( p_module->p_libvlc_global, "bridge-lock", VLC_VAR_MUTEX ); vlc_module_end(); @@ -126,11 +126,11 @@ typedef struct bridge_t #define GetBridge(a) __GetBridge( VLC_OBJECT(a) ) static bridge_t *__GetBridge( vlc_object_t *p_object ) { - libvlc_t *p_libvlc = p_object->p_libvlc; + libvlc_global_data_t *p_libvlc_global = p_object->p_libvlc_global; bridge_t *p_bridge; vlc_value_t val; - if( var_Get( p_libvlc, "bridge-struct", &val ) != VLC_SUCCESS ) + if( var_Get( p_libvlc_global, "bridge-struct", &val ) != VLC_SUCCESS ) { p_bridge = NULL; } @@ -170,7 +170,7 @@ static int OpenOut( vlc_object_t *p_this ) p_sys = malloc( sizeof( out_sout_stream_sys_t ) ); p_sys->b_inited = VLC_FALSE; - var_Get( p_this->p_libvlc, "bridge-lock", &val ); + var_Get( p_this->p_libvlc_global, "bridge-lock", &val ); p_sys->p_lock = val.p_address; var_Get( p_stream, SOUT_CFG_PREFIX_OUT "id", &val ); @@ -218,14 +218,14 @@ static sout_stream_id_t * AddOut( sout_stream_t *p_stream, es_format_t *p_fmt ) p_bridge = GetBridge( p_stream ); if ( p_bridge == NULL ) { - libvlc_t *p_libvlc = p_stream->p_libvlc; + libvlc_global_data_t *p_libvlc_global = p_stream->p_libvlc_global; vlc_value_t val; p_bridge = malloc( sizeof( bridge_t ) ); - var_Create( p_libvlc, "bridge-struct", VLC_VAR_ADDRESS ); + var_Create( p_libvlc_global, "bridge-struct", VLC_VAR_ADDRESS ); val.p_address = p_bridge; - var_Set( p_libvlc, "bridge-struct", val ); + var_Set( p_libvlc_global, "bridge-struct", val ); p_bridge->i_es_num = 0; p_bridge->pp_es = NULL; @@ -354,7 +354,7 @@ static int OpenIn( vlc_object_t *p_this ) sout_CfgParse( p_stream, SOUT_CFG_PREFIX_IN, ppsz_sout_options_in, p_stream->p_cfg ); - var_Get( p_this->p_libvlc, "bridge-lock", &val ); + var_Get( p_this->p_libvlc_global, "bridge-lock", &val ); p_sys->p_lock = val.p_address; var_Get( p_stream, SOUT_CFG_PREFIX_IN "id-offset", &val ); @@ -518,12 +518,12 @@ static int SendIn( sout_stream_t *p_stream, sout_stream_id_t *id, if( b_no_es ) { - libvlc_t *p_libvlc = p_stream->p_libvlc; + libvlc_global_data_t *p_libvlc_global = p_stream->p_libvlc_global; for ( i = 0; i < p_bridge->i_es_num; i++ ) free( p_bridge->pp_es[i] ); free( p_bridge->pp_es ); free( p_bridge ); - var_Destroy( p_libvlc, "bridge-struct" ); + var_Destroy( p_libvlc_global, "bridge-struct" ); } vlc_mutex_unlock( p_sys->p_lock ); diff --git a/modules/stream_out/mosaic_bridge.c b/modules/stream_out/mosaic_bridge.c index 51d0922d59..1e059f51f4 100644 --- a/modules/stream_out/mosaic_bridge.c +++ b/modules/stream_out/mosaic_bridge.c @@ -133,7 +133,7 @@ vlc_module_begin(); set_callbacks( Open, Close ); - var_Create( p_module->p_libvlc, "mosaic-lock", VLC_VAR_MUTEX ); + var_Create( p_module->p_libvlc_global, "mosaic-lock", VLC_VAR_MUTEX ); vlc_module_end(); static const char *ppsz_sout_options[] = { @@ -147,7 +147,7 @@ static int Open( vlc_object_t *p_this ) { sout_stream_t *p_stream = (sout_stream_t *)p_this; sout_stream_sys_t *p_sys; - libvlc_t *p_libvlc = p_this->p_libvlc; + libvlc_global_data_t *p_libvlc_global = p_this->p_libvlc_global; vlc_value_t val; sout_CfgParse( p_stream, SOUT_CFG_PREFIX, ppsz_sout_options, @@ -157,7 +157,7 @@ static int Open( vlc_object_t *p_this ) p_stream->p_sys = p_sys; p_sys->b_inited = VLC_FALSE; - var_Get( p_libvlc, "mosaic-lock", &val ); + var_Get( p_libvlc_global, "mosaic-lock", &val ); p_sys->p_lock = val.p_address; var_Get( p_stream, SOUT_CFG_PREFIX "id", &val ); @@ -269,14 +269,14 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt ) p_bridge = GetBridge( p_stream ); if ( p_bridge == NULL ) { - libvlc_t *p_libvlc = p_stream->p_libvlc; + libvlc_global_data_t *p_libvlc_global = p_stream->p_libvlc_global; vlc_value_t val; p_bridge = malloc( sizeof( bridge_t ) ); - var_Create( p_libvlc, "mosaic-struct", VLC_VAR_ADDRESS ); + var_Create( p_libvlc_global, "mosaic-struct", VLC_VAR_ADDRESS ); val.p_address = p_bridge; - var_Set( p_libvlc, "mosaic-struct", val ); + var_Set( p_libvlc_global, "mosaic-struct", val ); p_bridge->i_es_num = 0; p_bridge->pp_es = NULL; @@ -375,12 +375,12 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id ) if ( b_last_es ) { - libvlc_t *p_libvlc = p_stream->p_libvlc; + libvlc_global_data_t *p_libvlc_global = p_stream->p_libvlc_global; for ( i = 0; i < p_bridge->i_es_num; i++ ) free( p_bridge->pp_es[i] ); free( p_bridge->pp_es ); free( p_bridge ); - var_Destroy( p_libvlc, "mosaic-struct" ); + var_Destroy( p_libvlc_global, "mosaic-struct" ); } vlc_mutex_unlock( p_sys->p_lock ); diff --git a/modules/stream_out/switcher.c b/modules/stream_out/switcher.c index 71e554c2c5..7d5b9c7bee 100644 --- a/modules/stream_out/switcher.c +++ b/modules/stream_out/switcher.c @@ -353,19 +353,19 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) /* Set CPU capabilities */ id->ff_enc_c->dsp_mask = 0; - if( !(p_stream->p_libvlc->i_cpu & CPU_CAPABILITY_MMX) ) + if( !(p_stream->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMX) ) { id->ff_enc_c->dsp_mask |= FF_MM_MMX; } - if( !(p_stream->p_libvlc->i_cpu & CPU_CAPABILITY_MMXEXT) ) + if( !(p_stream->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT) ) { id->ff_enc_c->dsp_mask |= FF_MM_MMXEXT; } - if( !(p_stream->p_libvlc->i_cpu & CPU_CAPABILITY_3DNOW) ) + if( !(p_stream->p_libvlc_global->i_cpu & CPU_CAPABILITY_3DNOW) ) { id->ff_enc_c->dsp_mask |= FF_MM_3DNOW; } - if( !(p_stream->p_libvlc->i_cpu & CPU_CAPABILITY_SSE) ) + if( !(p_stream->p_libvlc_global->i_cpu & CPU_CAPABILITY_SSE) ) { id->ff_enc_c->dsp_mask |= FF_MM_SSE; id->ff_enc_c->dsp_mask |= FF_MM_SSE2; @@ -726,19 +726,19 @@ static mtime_t VideoCommand( sout_stream_t *p_stream, sout_stream_id_t *id ) /* Set CPU capabilities */ id->ff_enc_c->dsp_mask = 0; - if( !(p_stream->p_libvlc->i_cpu & CPU_CAPABILITY_MMX) ) + if( !(p_stream->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMX) ) { id->ff_enc_c->dsp_mask |= FF_MM_MMX; } - if( !(p_stream->p_libvlc->i_cpu & CPU_CAPABILITY_MMXEXT) ) + if( !(p_stream->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT) ) { id->ff_enc_c->dsp_mask |= FF_MM_MMXEXT; } - if( !(p_stream->p_libvlc->i_cpu & CPU_CAPABILITY_3DNOW) ) + if( !(p_stream->p_libvlc_global->i_cpu & CPU_CAPABILITY_3DNOW) ) { id->ff_enc_c->dsp_mask |= FF_MM_3DNOW; } - if( !(p_stream->p_libvlc->i_cpu & CPU_CAPABILITY_SSE) ) + if( !(p_stream->p_libvlc_global->i_cpu & CPU_CAPABILITY_SSE) ) { id->ff_enc_c->dsp_mask |= FF_MM_SSE; id->ff_enc_c->dsp_mask |= FF_MM_SSE2; @@ -854,7 +854,7 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id, = id->ff_enc_c->coded_frame->motion_subsample_log2; id->p_frame->mb_type = malloc( ((mb_width + 1) * (mb_height + 1) + 1) * sizeof(uint32_t) ); - p_stream->p_vlc->pf_memcpy( id->p_frame->mb_type, + p_stream->p_libvlc->pf_memcpy( id->p_frame->mb_type, id->ff_enc_c->coded_frame->mb_type, (mb_width + 1) * mb_height * sizeof(id->p_frame->mb_type[0])); @@ -871,7 +871,7 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id, { id->p_frame->motion_val[i] = malloc( 2 * stride * height * sizeof(int16_t) ); - p_stream->p_vlc->pf_memcpy( id->p_frame->motion_val[i], + p_stream->p_libvlc->pf_memcpy( id->p_frame->motion_val[i], id->ff_enc_c->coded_frame->motion_val[i], 2 * stride * height * sizeof(int16_t) ); } @@ -879,7 +879,7 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id, { id->p_frame->ref_index[i] = malloc( b8_stride * 2 * mb_height * sizeof(int8_t) ); - p_stream->p_vlc->pf_memcpy( id->p_frame->ref_index[i], + p_stream->p_libvlc->pf_memcpy( id->p_frame->ref_index[i], id->ff_enc_c->coded_frame->ref_index[i], b8_stride * 2 * mb_height * sizeof(int8_t)); } @@ -888,7 +888,7 @@ static block_t *VideoGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id, #endif p_out = block_New( p_stream, i_out ); - p_stream->p_vlc->pf_memcpy( p_out->p_buffer, id->p_buffer_out, i_out ); + p_stream->p_libvlc->pf_memcpy( p_out->p_buffer, id->p_buffer_out, i_out ); p_out->i_length = p_buffer->i_length; p_out->i_pts = p_buffer->i_dts; p_out->i_dts = p_buffer->i_dts; @@ -931,7 +931,7 @@ static block_t *AudioGetBuffer( sout_stream_t *p_stream, sout_stream_id_t *id, return NULL; p_out = block_New( p_stream, i_out ); - p_stream->p_vlc->pf_memcpy( p_out->p_buffer, id->p_buffer_out, i_out ); + p_stream->p_libvlc->pf_memcpy( p_out->p_buffer, id->p_buffer_out, i_out ); p_out->i_length = p_buffer->i_length; p_out->i_pts = p_buffer->i_dts; p_out->i_dts = p_buffer->i_dts; diff --git a/modules/video_chroma/i420_rgb.h b/modules/video_chroma/i420_rgb.h index 9ff6243f8e..83781a092b 100644 --- a/modules/video_chroma/i420_rgb.h +++ b/modules/video_chroma/i420_rgb.h @@ -276,7 +276,7 @@ void E_(I420_RGB32) ( vout_thread_t *, picture_t *, picture_t * ); while( (i_scale_count -= p_vout->render.i_height) > 0 ) \ { \ /* Height increment: copy previous picture line */ \ - p_vout->p_vlc->pf_memcpy( p_pic, p_pic_start, \ + p_vout->p_libvlc->pf_memcpy( p_pic, p_pic_start, \ p_vout->output.i_width * BPP ); \ p_pic = (void*)((uint8_t*)p_pic + p_dest->p->i_pitch ); \ } \ diff --git a/modules/video_chroma/i420_ymga.c b/modules/video_chroma/i420_ymga.c index 835fb38918..0119538e84 100644 --- a/modules/video_chroma/i420_ymga.c +++ b/modules/video_chroma/i420_ymga.c @@ -107,7 +107,7 @@ static void I420_YMGA( vout_thread_t *p_vout, picture_t *p_source, int i_x; /* Copy the Y part */ - p_vout->p_vlc->pf_memcpy( p_dest->Y_PIXELS, p_source->Y_PIXELS, + p_vout->p_libvlc->pf_memcpy( p_dest->Y_PIXELS, p_source->Y_PIXELS, p_dest->p[Y_PLANE].i_pitch * p_dest->p[Y_PLANE].i_visible_lines ); /* Copy the U:V part */ diff --git a/modules/video_filter/clone.c b/modules/video_filter/clone.c index d64e7ec4a3..53b2dcf43e 100644 --- a/modules/video_filter/clone.c +++ b/modules/video_filter/clone.c @@ -343,7 +343,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic ) if( i_in_pitch == i_copy_pitch && i_out_pitch == i_copy_pitch ) { - p_vout->p_vlc->pf_memcpy( p_out, p_in, i_in_pitch + p_vout->p_libvlc->pf_memcpy( p_out, p_in, i_in_pitch * p_outpic->p[i_plane].i_visible_lines ); } else @@ -353,7 +353,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic ) while( p_in < p_in_end ) { - p_vout->p_vlc->pf_memcpy( p_out, p_in, i_copy_pitch ); + p_vout->p_libvlc->pf_memcpy( p_out, p_in, i_copy_pitch ); p_in += i_in_pitch; p_out += i_out_pitch; } diff --git a/modules/video_filter/crop.c b/modules/video_filter/crop.c index 516c40c3cf..8afda570b5 100644 --- a/modules/video_filter/crop.c +++ b/modules/video_filter/crop.c @@ -406,7 +406,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic ) while( p_out < p_out_end ) { - p_vout->p_vlc->pf_memcpy( p_out, p_in, i_copy_pitch ); + p_vout->p_libvlc->pf_memcpy( p_out, p_in, i_copy_pitch ); p_in += i_in_pitch; p_out += i_out_pitch; } diff --git a/modules/video_filter/deinterlace.c b/modules/video_filter/deinterlace.c index 3815825efc..9b4a03cde4 100644 --- a/modules/video_filter/deinterlace.c +++ b/modules/video_filter/deinterlace.c @@ -207,7 +207,7 @@ static int Create( vlc_object_t *p_this ) vlc_mutex_init( p_vout, &p_vout->p_sys->filter_lock ); #if defined(CAN_COMPILE_C_ALTIVEC) - if( p_vout->p_libvlc->i_cpu & CPU_CAPABILITY_ALTIVEC ) + if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_ALTIVEC ) { p_vout->p_sys->pf_merge = MergeAltivec; p_vout->p_sys->pf_end_merge = NULL; @@ -215,7 +215,7 @@ static int Create( vlc_object_t *p_this ) else #endif #if defined(CAN_COMPILE_SSE) - if( p_vout->p_libvlc->i_cpu & CPU_CAPABILITY_SSE2 ) + if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_SSE2 ) { p_vout->p_sys->pf_merge = MergeSSE2; p_vout->p_sys->pf_end_merge = EndMMX; @@ -223,7 +223,7 @@ static int Create( vlc_object_t *p_this ) else #endif #if defined(CAN_COMPILE_MMXEXT) - if( p_vout->p_libvlc->i_cpu & CPU_CAPABILITY_MMXEXT ) + if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT ) { p_vout->p_sys->pf_merge = MergeMMXEXT; p_vout->p_sys->pf_end_merge = EndMMX; @@ -231,7 +231,7 @@ static int Create( vlc_object_t *p_this ) else #endif #if defined(CAN_COMPILE_3DNOW) - if( p_vout->p_libvlc->i_cpu & CPU_CAPABILITY_3DNOW ) + if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_3DNOW ) { p_vout->p_sys->pf_merge = Merge3DNow; p_vout->p_sys->pf_end_merge = End3DNow; @@ -591,7 +591,7 @@ static void RenderDiscard( vout_thread_t *p_vout, for( ; p_out < p_out_end ; ) { - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); p_out += p_outpic->p[i_plane].i_pitch; @@ -607,10 +607,10 @@ static void RenderDiscard( vout_thread_t *p_vout, { for( ; p_out < p_out_end ; ) { - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); p_out += p_outpic->p[i_plane].i_pitch; - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); p_out += p_outpic->p[i_plane].i_pitch; p_in += i_increment; @@ -620,7 +620,7 @@ static void RenderDiscard( vout_thread_t *p_vout, { for( ; p_out < p_out_end ; ) { - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); p_out += p_outpic->p[i_plane].i_pitch; p_in += i_increment; @@ -660,7 +660,7 @@ static void RenderBob( vout_thread_t *p_vout, /* For BOTTOM field we need to add the first line */ if( i_field == 1 ) { - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); p_in += p_pic->p[i_plane].i_pitch; p_out += p_outpic->p[i_plane].i_pitch; @@ -670,19 +670,19 @@ static void RenderBob( vout_thread_t *p_vout, for( ; p_out < p_out_end ; ) { - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); p_out += p_outpic->p[i_plane].i_pitch; - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); p_in += 2 * p_pic->p[i_plane].i_pitch; p_out += p_outpic->p[i_plane].i_pitch; } - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); /* For TOP field we need to add the last line */ @@ -690,7 +690,7 @@ static void RenderBob( vout_thread_t *p_vout, { p_in += p_pic->p[i_plane].i_pitch; p_out += p_outpic->p[i_plane].i_pitch; - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); } break; @@ -699,7 +699,7 @@ static void RenderBob( vout_thread_t *p_vout, /* For BOTTOM field we need to add the first line */ if( i_field == 1 ) { - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); p_in += p_pic->p[i_plane].i_pitch; p_out += p_outpic->p[i_plane].i_pitch; @@ -711,12 +711,12 @@ static void RenderBob( vout_thread_t *p_vout, { for( ; p_out < p_out_end ; ) { - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); p_out += p_outpic->p[i_plane].i_pitch; - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); p_in += 2 * p_pic->p[i_plane].i_pitch; @@ -727,7 +727,7 @@ static void RenderBob( vout_thread_t *p_vout, { for( ; p_out < p_out_end ; ) { - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); p_out += p_outpic->p[i_plane].i_pitch; @@ -735,7 +735,7 @@ static void RenderBob( vout_thread_t *p_vout, } } - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); /* For TOP field we need to add the last line */ @@ -743,7 +743,7 @@ static void RenderBob( vout_thread_t *p_vout, { p_in += p_pic->p[i_plane].i_pitch; p_out += p_outpic->p[i_plane].i_pitch; - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); } break; @@ -775,7 +775,7 @@ static void RenderLinear( vout_thread_t *p_vout, /* For BOTTOM field we need to add the first line */ if( i_field == 1 ) { - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); p_in += p_pic->p[i_plane].i_pitch; p_out += p_outpic->p[i_plane].i_pitch; @@ -785,7 +785,7 @@ static void RenderLinear( vout_thread_t *p_vout, for( ; p_out < p_out_end ; ) { - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); p_out += p_outpic->p[i_plane].i_pitch; @@ -797,7 +797,7 @@ static void RenderLinear( vout_thread_t *p_vout, p_out += p_outpic->p[i_plane].i_pitch; } - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); /* For TOP field we need to add the last line */ @@ -805,7 +805,7 @@ static void RenderLinear( vout_thread_t *p_vout, { p_in += p_pic->p[i_plane].i_pitch; p_out += p_outpic->p[i_plane].i_pitch; - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); } } @@ -863,7 +863,7 @@ static void RenderBlend( vout_thread_t *p_vout, case VLC_FOURCC('I','Y','U','V'): case VLC_FOURCC('Y','V','1','2'): /* First line: simple copy */ - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); p_out += p_outpic->p[i_plane].i_pitch; @@ -880,7 +880,7 @@ static void RenderBlend( vout_thread_t *p_vout, case VLC_FOURCC('I','4','2','2'): /* First line: simple copy */ - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch ); p_out += p_outpic->p[i_plane].i_pitch; @@ -1964,7 +1964,7 @@ static void RenderX( vout_thread_t *p_vout, uint8_t *src = &p_pic->p[i_plane].p_pixels[8*y*i_src]; #ifdef CAN_COMPILE_MMXEXT - if( p_vout->p_libvlc->i_cpu & CPU_CAPABILITY_MMXEXT ) + if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT ) XDeintBand8x8MMXEXT( dst, i_dst, src, i_src, i_mbx, i_modx ); else #endif @@ -1991,7 +1991,7 @@ static void RenderX( vout_thread_t *p_vout, } #ifdef CAN_COMPILE_MMXEXT - if( p_vout->p_libvlc->i_cpu & CPU_CAPABILITY_MMXEXT ) + if( p_vout->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT ) emms(); #endif } diff --git a/modules/video_filter/gradient.c b/modules/video_filter/gradient.c index 97ce1aabf5..eb6f7c9523 100644 --- a/modules/video_filter/gradient.c +++ b/modules/video_filter/gradient.c @@ -341,18 +341,18 @@ static void FilterGradient( filter_t *p_filter, picture_t *p_inpic, if( p_filter->p_sys->b_cartoon ) { - p_filter->p_vlc->pf_memcpy( p_outpic->p[U_PLANE].p_pixels, + p_filter->p_libvlc->pf_memcpy( p_outpic->p[U_PLANE].p_pixels, p_inpic->p[U_PLANE].p_pixels, p_outpic->p[U_PLANE].i_lines * p_outpic->p[U_PLANE].i_pitch ); - p_filter->p_vlc->pf_memcpy( p_outpic->p[V_PLANE].p_pixels, + p_filter->p_libvlc->pf_memcpy( p_outpic->p[V_PLANE].p_pixels, p_inpic->p[V_PLANE].p_pixels, p_outpic->p[V_PLANE].i_lines * p_outpic->p[V_PLANE].i_pitch ); } else { - p_filter->p_vlc->pf_memset( p_outpic->p[U_PLANE].p_pixels, 0x80, + p_filter->p_libvlc->pf_memset( p_outpic->p[U_PLANE].p_pixels, 0x80, p_outpic->p[U_PLANE].i_lines * p_outpic->p[U_PLANE].i_pitch ); - p_filter->p_vlc->pf_memset( p_outpic->p[V_PLANE].p_pixels, 0x80, + p_filter->p_libvlc->pf_memset( p_outpic->p[V_PLANE].p_pixels, 0x80, p_outpic->p[V_PLANE].i_lines * p_outpic->p[V_PLANE].i_pitch ); } @@ -488,18 +488,18 @@ static void FilterEdge( filter_t *p_filter, picture_t *p_inpic, if( p_filter->p_sys->b_cartoon ) { - p_filter->p_vlc->pf_memcpy( p_outpic->p[U_PLANE].p_pixels, + p_filter->p_libvlc->pf_memcpy( p_outpic->p[U_PLANE].p_pixels, p_inpic->p[U_PLANE].p_pixels, p_outpic->p[U_PLANE].i_lines * p_outpic->p[U_PLANE].i_pitch ); - p_filter->p_vlc->pf_memcpy( p_outpic->p[V_PLANE].p_pixels, + p_filter->p_libvlc->pf_memcpy( p_outpic->p[V_PLANE].p_pixels, p_inpic->p[V_PLANE].p_pixels, p_outpic->p[V_PLANE].i_lines * p_outpic->p[V_PLANE].i_pitch ); } else { - p_filter->p_vlc->pf_memset( p_outpic->p[Y_PLANE].p_pixels, 0xff, + p_filter->p_libvlc->pf_memset( p_outpic->p[Y_PLANE].p_pixels, 0xff, p_outpic->p[Y_PLANE].i_lines * p_outpic->p[Y_PLANE].i_pitch ); - p_filter->p_vlc->pf_memset( p_outpic->p[U_PLANE].p_pixels, 0x80, + p_filter->p_libvlc->pf_memset( p_outpic->p[U_PLANE].p_pixels, 0x80, p_outpic->p[U_PLANE].i_lines * p_outpic->p[U_PLANE].i_pitch ); memset( p_outpic->p[V_PLANE].p_pixels, 0x80, p_outpic->p[V_PLANE].i_lines * p_outpic->p[V_PLANE].i_pitch ); @@ -660,13 +660,13 @@ static void FilterHough( filter_t *p_filter, picture_t *p_inpic, memset( p_hough, 0, i_diag * i_nb_steps * sizeof(int) ); - p_filter->p_vlc->pf_memcpy( + p_filter->p_libvlc->pf_memcpy( p_outpic->p[Y_PLANE].p_pixels, p_inpic->p[Y_PLANE].p_pixels, p_outpic->p[Y_PLANE].i_lines * p_outpic->p[Y_PLANE].i_pitch ); - p_filter->p_vlc->pf_memcpy( + p_filter->p_libvlc->pf_memcpy( p_outpic->p[U_PLANE].p_pixels, p_inpic->p[U_PLANE].p_pixels, p_outpic->p[U_PLANE].i_lines * p_outpic->p[U_PLANE].i_pitch ); - p_filter->p_vlc->pf_memcpy( + p_filter->p_libvlc->pf_memcpy( p_outpic->p[V_PLANE].p_pixels, p_inpic->p[V_PLANE].p_pixels, p_outpic->p[V_PLANE].i_lines * p_outpic->p[V_PLANE].i_pitch ); diff --git a/modules/video_filter/logo.c b/modules/video_filter/logo.c index cd74ad2b98..c212391b9c 100644 --- a/modules/video_filter/logo.c +++ b/modules/video_filter/logo.c @@ -724,7 +724,7 @@ static int CreateFilter( vlc_object_t *p_this ) /* Hook used for callback variables */ p_logo_list->psz_filename = - var_CreateGetString( p_filter->p_libvlc , "logo-file" ); + var_CreateGetString( p_filter->p_libvlc_global , "logo-file" ); if( !p_logo_list->psz_filename || !*p_logo_list->psz_filename ) { msg_Err( p_this, "logo file not specified" ); @@ -733,22 +733,22 @@ static int CreateFilter( vlc_object_t *p_this ) return VLC_EGENERIC; } - p_sys->posx = var_CreateGetInteger( p_filter->p_libvlc , "logo-x" ); - p_sys->posy = var_CreateGetInteger( p_filter->p_libvlc , "logo-y" ); - p_sys->pos = var_CreateGetInteger( p_filter->p_libvlc , "logo-position" ); + p_sys->posx = var_CreateGetInteger( p_filter->p_libvlc_global , "logo-x" ); + p_sys->posy = var_CreateGetInteger( p_filter->p_libvlc_global , "logo-y" ); + p_sys->pos = var_CreateGetInteger( p_filter->p_libvlc_global , "logo-position" ); p_logo_list->i_alpha = __MAX( __MIN( var_CreateGetInteger( - p_filter->p_libvlc, "logo-transparency"), 255 ), 0 ); + p_filter->p_libvlc_global, "logo-transparency"), 255 ), 0 ); p_logo_list->i_delay = - var_CreateGetInteger( p_filter->p_libvlc , "logo-delay" ); + var_CreateGetInteger( p_filter->p_libvlc_global , "logo-delay" ); p_logo_list->i_repeat = - var_CreateGetInteger( p_filter->p_libvlc , "logo-repeat" ); + var_CreateGetInteger( p_filter->p_libvlc_global , "logo-repeat" ); - var_AddCallback( p_filter->p_libvlc, "logo-file", LogoCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "logo-x", LogoCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "logo-y", LogoCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "logo-position", LogoCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "logo-transparency", LogoCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "logo-repeat", LogoCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "logo-file", LogoCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "logo-x", LogoCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "logo-y", LogoCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "logo-position", LogoCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "logo-transparency", LogoCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "logo-repeat", LogoCallback, p_sys ); vlc_mutex_init( p_filter, &p_logo_list->lock ); vlc_mutex_lock( &p_logo_list->lock ); @@ -780,13 +780,13 @@ static void DestroyFilter( vlc_object_t *p_this ) free( p_sys ); /* Delete the logo variables from INPUT */ - var_Destroy( p_filter->p_libvlc , "logo-file" ); - var_Destroy( p_filter->p_libvlc , "logo-x" ); - var_Destroy( p_filter->p_libvlc , "logo-y" ); - var_Destroy( p_filter->p_libvlc , "logo-delay" ); - var_Destroy( p_filter->p_libvlc , "logo-repeat" ); - var_Destroy( p_filter->p_libvlc , "logo-position" ); - var_Destroy( p_filter->p_libvlc , "logo-transparency" ); + var_Destroy( p_filter->p_libvlc_global , "logo-file" ); + var_Destroy( p_filter->p_libvlc_global , "logo-x" ); + var_Destroy( p_filter->p_libvlc_global , "logo-y" ); + var_Destroy( p_filter->p_libvlc_global , "logo-delay" ); + var_Destroy( p_filter->p_libvlc_global , "logo-repeat" ); + var_Destroy( p_filter->p_libvlc_global , "logo-position" ); + var_Destroy( p_filter->p_libvlc_global , "logo-transparency" ); } /***************************************************************************** diff --git a/modules/video_filter/marq.c b/modules/video_filter/marq.c index eea4709fd2..5935bb46dc 100644 --- a/modules/video_filter/marq.c +++ b/modules/video_filter/marq.c @@ -161,23 +161,23 @@ static int CreateFilter( vlc_object_t *p_this ) p_sys->p_style = malloc( sizeof( text_style_t ) ); memcpy( p_sys->p_style, &default_text_style, sizeof( text_style_t ) ); - p_sys->i_xoff = var_CreateGetInteger( p_filter->p_libvlc , "marq-x" ); - p_sys->i_yoff = var_CreateGetInteger( p_filter->p_libvlc , "marq-y" ); - p_sys->i_timeout = var_CreateGetInteger( p_filter->p_libvlc , "marq-timeout" ); - p_sys->i_pos = var_CreateGetInteger( p_filter->p_libvlc , "marq-position" ); - p_sys->psz_marquee = var_CreateGetString( p_filter->p_libvlc, "marq-marquee" ); - p_sys->p_style->i_font_alpha = 255 - var_CreateGetInteger( p_filter->p_libvlc , "marq-opacity" ); - p_sys->p_style->i_font_color = var_CreateGetInteger( p_filter->p_libvlc , "marq-color" ); - p_sys->p_style->i_font_size = var_CreateGetInteger( p_filter->p_libvlc , "marq-size" ); - - var_AddCallback( p_filter->p_libvlc, "marq-x", MarqueeCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "marq-y", MarqueeCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "marq-marquee", MarqueeCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "marq-timeout", MarqueeCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "marq-position", MarqueeCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "marq-color", MarqueeCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "marq-opacity", MarqueeCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "marq-size", MarqueeCallback, p_sys ); + p_sys->i_xoff = var_CreateGetInteger( p_filter->p_libvlc_global , "marq-x" ); + p_sys->i_yoff = var_CreateGetInteger( p_filter->p_libvlc_global , "marq-y" ); + p_sys->i_timeout = var_CreateGetInteger( p_filter->p_libvlc_global , "marq-timeout" ); + p_sys->i_pos = var_CreateGetInteger( p_filter->p_libvlc_global , "marq-position" ); + p_sys->psz_marquee = var_CreateGetString( p_filter->p_libvlc_global, "marq-marquee" ); + p_sys->p_style->i_font_alpha = 255 - var_CreateGetInteger( p_filter->p_libvlc_global , "marq-opacity" ); + p_sys->p_style->i_font_color = var_CreateGetInteger( p_filter->p_libvlc_global , "marq-color" ); + p_sys->p_style->i_font_size = var_CreateGetInteger( p_filter->p_libvlc_global , "marq-size" ); + + var_AddCallback( p_filter->p_libvlc_global, "marq-x", MarqueeCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "marq-y", MarqueeCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "marq-marquee", MarqueeCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "marq-timeout", MarqueeCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "marq-position", MarqueeCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "marq-color", MarqueeCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "marq-opacity", MarqueeCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "marq-size", MarqueeCallback, p_sys ); /* Misc init */ p_filter->pf_sub_filter = Filter; @@ -199,23 +199,23 @@ static void DestroyFilter( vlc_object_t *p_this ) free( p_sys ); /* Delete the marquee variables */ - var_DelCallback( p_filter->p_libvlc, "marq-x", MarqueeCallback, p_sys ); - var_DelCallback( p_filter->p_libvlc, "marq-y", MarqueeCallback, p_sys ); - var_DelCallback( p_filter->p_libvlc, "marq-marquee", MarqueeCallback, p_sys ); - var_DelCallback( p_filter->p_libvlc, "marq-timeout", MarqueeCallback, p_sys ); - var_DelCallback( p_filter->p_libvlc, "marq-position", MarqueeCallback, p_sys ); - var_DelCallback( p_filter->p_libvlc, "marq-color", MarqueeCallback, p_sys ); - var_DelCallback( p_filter->p_libvlc, "marq-opacity", MarqueeCallback, p_sys ); - var_DelCallback( p_filter->p_libvlc, "marq-size", MarqueeCallback, p_sys ); - - var_Destroy( p_filter->p_libvlc , "marq-marquee" ); - var_Destroy( p_filter->p_libvlc , "marq-x" ); - var_Destroy( p_filter->p_libvlc , "marq-y" ); - var_Destroy( p_filter->p_libvlc , "marq-timeout" ); - var_Destroy( p_filter->p_libvlc , "marq-position" ); - var_Destroy( p_filter->p_libvlc , "marq-color"); - var_Destroy( p_filter->p_libvlc , "marq-opacity"); - var_Destroy( p_filter->p_libvlc , "marq-size"); + var_DelCallback( p_filter->p_libvlc_global, "marq-x", MarqueeCallback, p_sys ); + var_DelCallback( p_filter->p_libvlc_global, "marq-y", MarqueeCallback, p_sys ); + var_DelCallback( p_filter->p_libvlc_global, "marq-marquee", MarqueeCallback, p_sys ); + var_DelCallback( p_filter->p_libvlc_global, "marq-timeout", MarqueeCallback, p_sys ); + var_DelCallback( p_filter->p_libvlc_global, "marq-position", MarqueeCallback, p_sys ); + var_DelCallback( p_filter->p_libvlc_global, "marq-color", MarqueeCallback, p_sys ); + var_DelCallback( p_filter->p_libvlc_global, "marq-opacity", MarqueeCallback, p_sys ); + var_DelCallback( p_filter->p_libvlc_global, "marq-size", MarqueeCallback, p_sys ); + + var_Destroy( p_filter->p_libvlc_global , "marq-marquee" ); + var_Destroy( p_filter->p_libvlc_global , "marq-x" ); + var_Destroy( p_filter->p_libvlc_global , "marq-y" ); + var_Destroy( p_filter->p_libvlc_global , "marq-timeout" ); + var_Destroy( p_filter->p_libvlc_global , "marq-position" ); + var_Destroy( p_filter->p_libvlc_global , "marq-color"); + var_Destroy( p_filter->p_libvlc_global , "marq-opacity"); + var_Destroy( p_filter->p_libvlc_global , "marq-size"); } /**************************************************************************** diff --git a/modules/video_filter/mosaic.c b/modules/video_filter/mosaic.c index da42df8471..4dc35e0e8c 100644 --- a/modules/video_filter/mosaic.c +++ b/modules/video_filter/mosaic.c @@ -213,7 +213,7 @@ vlc_module_begin(); add_integer( "mosaic-bsvt", 17, NULL, BLUESCREENVTOL_TEXT, BLUESCREENVTOL_LONGTEXT, VLC_FALSE ); - var_Create( p_module->p_libvlc, "mosaic-lock", VLC_VAR_MUTEX ); + var_Create( p_module->p_libvlc_global, "mosaic-lock", VLC_VAR_MUTEX ); vlc_module_end(); @@ -224,7 +224,7 @@ static int CreateFilter( vlc_object_t *p_this ) { filter_t *p_filter = (filter_t *)p_this; filter_sys_t *p_sys; - libvlc_t *p_libvlc = p_filter->p_libvlc; + libvlc_global_data_t *p_libvlc_global = p_filter->p_libvlc_global; char *psz_order; int i_index; vlc_value_t val; @@ -246,16 +246,16 @@ static int CreateFilter( vlc_object_t *p_this ) vlc_mutex_init( p_filter, &p_sys->lock ); vlc_mutex_lock( &p_sys->lock ); - var_Get( p_libvlc, "mosaic-lock", &val ); + var_Get( p_libvlc_global, "mosaic-lock", &val ); p_sys->p_lock = val.p_address; #define GET_VAR( name, min, max ) \ p_sys->i_##name = __MIN( max, __MAX( min, \ var_CreateGetInteger( p_filter, "mosaic-" #name ) ) ); \ var_Destroy( p_filter, "mosaic-" #name ); \ - var_Create( p_libvlc, "mosaic-" #name, VLC_VAR_INTEGER ); \ - var_SetInteger( p_libvlc, "mosaic-" #name, p_sys->i_##name ); \ - var_AddCallback( p_libvlc, "mosaic-" #name, MosaicCallback, p_sys ); + var_Create( p_libvlc_global, "mosaic-" #name, VLC_VAR_INTEGER ); \ + var_SetInteger( p_libvlc_global, "mosaic-" #name, p_sys->i_##name ); \ + var_AddCallback( p_libvlc_global, "mosaic-" #name, MosaicCallback, p_sys ); GET_VAR( width, 0, INT_MAX ); GET_VAR( height, 0, INT_MAX ); @@ -266,9 +266,9 @@ static int CreateFilter( vlc_object_t *p_this ) if( p_sys->i_align == 3 || p_sys->i_align == 7 ) p_sys->i_align = 5; var_Destroy( p_filter, "mosaic-align" ); - var_Create( p_libvlc, "mosaic-align", VLC_VAR_INTEGER ); - var_SetInteger( p_libvlc, "mosaic-align", p_sys->i_align ); - var_AddCallback( p_libvlc, "mosaic-align", MosaicCallback, p_sys ); + var_Create( p_libvlc_global, "mosaic-align", VLC_VAR_INTEGER ); + var_SetInteger( p_libvlc_global, "mosaic-align", p_sys->i_align ); + var_AddCallback( p_libvlc_global, "mosaic-align", MosaicCallback, p_sys ); GET_VAR( vborder, 0, INT_MAX ); GET_VAR( hborder, 0, INT_MAX ); @@ -281,9 +281,9 @@ static int CreateFilter( vlc_object_t *p_this ) p_sys->b_ar = var_CreateGetBool( p_filter, "mosaic-keep-aspect-ratio" ); var_Destroy( p_filter, "mosaic-keep-aspect-ratio" ); - var_Create( p_libvlc, "mosaic-keep-aspect-ratio", VLC_VAR_INTEGER ); - var_SetBool( p_libvlc, "mosaic-keep-aspect-ratio", p_sys->b_ar ); - var_AddCallback( p_libvlc, "mosaic-keep-aspect-ratio", MosaicCallback, + var_Create( p_libvlc_global, "mosaic-keep-aspect-ratio", VLC_VAR_INTEGER ); + var_SetBool( p_libvlc_global, "mosaic-keep-aspect-ratio", p_sys->b_ar ); + var_AddCallback( p_libvlc_global, "mosaic-keep-aspect-ratio", MosaicCallback, p_sys ); p_sys->b_keep = var_CreateGetBool( p_filter, "mosaic-keep-picture" ); @@ -296,8 +296,8 @@ static int CreateFilter( vlc_object_t *p_this ) p_sys->ppsz_order = NULL; psz_order = var_CreateGetString( p_filter, "mosaic-order" ); - var_Create( p_libvlc, "mosaic-order", VLC_VAR_STRING); - var_AddCallback( p_libvlc, "mosaic-order", MosaicCallback, p_sys ); + var_Create( p_libvlc_global, "mosaic-order", VLC_VAR_STRING); + var_AddCallback( p_libvlc_global, "mosaic-order", MosaicCallback, p_sys ); if( psz_order[0] != 0 ) { @@ -323,9 +323,9 @@ static int CreateFilter( vlc_object_t *p_this ) GET_VAR( bsvt, 0x00, 0xff ); p_sys->b_bs = var_CreateGetBool( p_filter, "mosaic-bs" ); var_Destroy( p_filter, "mosaic-bs" ); - var_Create( p_libvlc, "mosaic-bs", VLC_VAR_INTEGER ); - var_SetBool( p_libvlc, "mosaic-bs", p_sys->b_bs ); - var_AddCallback( p_libvlc, "mosaic-bs", MosaicCallback, p_sys ); + var_Create( p_libvlc_global, "mosaic-bs", VLC_VAR_INTEGER ); + var_SetBool( p_libvlc_global, "mosaic-bs", p_sys->b_bs ); + var_AddCallback( p_libvlc_global, "mosaic-bs", MosaicCallback, p_sys ); if( p_sys->b_bs && p_sys->b_keep ) { msg_Warn( p_filter, "mosaic-keep-picture needs to be disabled for" @@ -344,7 +344,7 @@ static void DestroyFilter( vlc_object_t *p_this ) { filter_t *p_filter = (filter_t*)p_this; filter_sys_t *p_sys = p_filter->p_sys; - libvlc_t *p_libvlc = p_filter->p_libvlc; + libvlc_global_data_t *p_libvlc_global = p_filter->p_libvlc_global; int i_index; vlc_mutex_lock( &p_sys->lock ); @@ -363,24 +363,24 @@ static void DestroyFilter( vlc_object_t *p_this ) free( p_sys->ppsz_order ); } - var_Destroy( p_libvlc, "mosaic-alpha" ); - var_Destroy( p_libvlc, "mosaic-height" ); - var_Destroy( p_libvlc, "mosaic-align" ); - var_Destroy( p_libvlc, "mosaic-width" ); - var_Destroy( p_libvlc, "mosaic-xoffset" ); - var_Destroy( p_libvlc, "mosaic-yoffset" ); - var_Destroy( p_libvlc, "mosaic-vborder" ); - var_Destroy( p_libvlc, "mosaic-hborder" ); - var_Destroy( p_libvlc, "mosaic-position" ); - var_Destroy( p_libvlc, "mosaic-rows" ); - var_Destroy( p_libvlc, "mosaic-cols" ); - var_Destroy( p_libvlc, "mosaic-keep-aspect-ratio" ); - - var_Destroy( p_libvlc, "mosaic-bsu" ); - var_Destroy( p_libvlc, "mosaic-bsv" ); - var_Destroy( p_libvlc, "mosaic-bsut" ); - var_Destroy( p_libvlc, "mosaic-bsvt" ); - var_Destroy( p_libvlc, "mosaic-bs" ); + var_Destroy( p_libvlc_global, "mosaic-alpha" ); + var_Destroy( p_libvlc_global, "mosaic-height" ); + var_Destroy( p_libvlc_global, "mosaic-align" ); + var_Destroy( p_libvlc_global, "mosaic-width" ); + var_Destroy( p_libvlc_global, "mosaic-xoffset" ); + var_Destroy( p_libvlc_global, "mosaic-yoffset" ); + var_Destroy( p_libvlc_global, "mosaic-vborder" ); + var_Destroy( p_libvlc_global, "mosaic-hborder" ); + var_Destroy( p_libvlc_global, "mosaic-position" ); + var_Destroy( p_libvlc_global, "mosaic-rows" ); + var_Destroy( p_libvlc_global, "mosaic-cols" ); + var_Destroy( p_libvlc_global, "mosaic-keep-aspect-ratio" ); + + var_Destroy( p_libvlc_global, "mosaic-bsu" ); + var_Destroy( p_libvlc_global, "mosaic-bsv" ); + var_Destroy( p_libvlc_global, "mosaic-bsut" ); + var_Destroy( p_libvlc_global, "mosaic-bsvt" ); + var_Destroy( p_libvlc_global, "mosaic-bs" ); if( p_sys->p_pic ) p_sys->p_pic->pf_release( p_sys->p_pic ); vlc_mutex_unlock( &p_sys->lock ); diff --git a/modules/video_filter/mosaic.h b/modules/video_filter/mosaic.h index 81af77c915..49099a4d45 100644 --- a/modules/video_filter/mosaic.h +++ b/modules/video_filter/mosaic.h @@ -40,11 +40,11 @@ typedef struct bridge_t #define GetBridge(a) __GetBridge( VLC_OBJECT(a) ) static bridge_t *__GetBridge( vlc_object_t *p_object ) { - libvlc_t *p_libvlc = p_object->p_libvlc; + libvlc_global_data_t *p_libvlc_global = p_object->p_libvlc_global; bridge_t *p_bridge; vlc_value_t val; - if( var_Get( p_libvlc, "mosaic-struct", &val ) != VLC_SUCCESS ) + if( var_Get( p_libvlc_global, "mosaic-struct", &val ) != VLC_SUCCESS ) { p_bridge = NULL; } diff --git a/modules/video_filter/motionblur.c b/modules/video_filter/motionblur.c index ed0f5114e1..cc81b08165 100644 --- a/modules/video_filter/motionblur.c +++ b/modules/video_filter/motionblur.c @@ -295,7 +295,7 @@ static void CopyPicture( vout_thread_t * p_vout, if( p_src->p[i].i_pitch == p_dest->p[i].i_pitch ) { /* There are margins, but with the same width : perfect ! */ - p_vout->p_vlc->pf_memcpy( + p_vout->p_libvlc->pf_memcpy( p_dest->p[i].p_pixels, p_src->p[i].p_pixels, p_src->p[i].i_pitch * p_src->p[i].i_visible_lines ); } @@ -308,7 +308,7 @@ static void CopyPicture( vout_thread_t * p_vout, for( i_line = p_src->p[i].i_visible_lines; i_line--; ) { - p_vout->p_vlc->pf_memcpy( p_out, p_in, + p_vout->p_libvlc->pf_memcpy( p_out, p_in, p_src->p[i].i_visible_pitch ); p_in += p_src->p[i].i_pitch; p_out += p_dest->p[i].i_pitch; diff --git a/modules/video_filter/motiondetect.c b/modules/video_filter/motiondetect.c index fb386be1c8..8ed4fe6eed 100644 --- a/modules/video_filter/motiondetect.c +++ b/modules/video_filter/motiondetect.c @@ -341,7 +341,7 @@ static void MotionDetect( vout_thread_t *p_vout, picture_t *p_inpic, i_num_lines = p_inpic->p[i_index].i_visible_lines; i_size = p_inpic->p[i_index].i_lines * p_inpic->p[i_index].i_pitch; - p_vout->p_vlc->pf_memcpy( p_out, p_in, i_size ); + p_vout->p_libvlc->pf_memcpy( p_out, p_in, i_size ); switch( i_index ) { case Y_PLANE: @@ -415,7 +415,7 @@ static void MotionDetect( vout_thread_t *p_vout, picture_t *p_inpic, p_in = p_inpic->p[i_index].p_pixels; p_out = p_outpic->p[i_index].p_pixels; - p_vout->p_vlc->pf_memcpy( p_last_in, p_in, i_size ); + p_vout->p_libvlc->pf_memcpy( p_last_in, p_in, i_size ); break; default: break; diff --git a/modules/video_filter/opencv_example.cpp b/modules/video_filter/opencv_example.cpp index ab73a2c176..2c74ca6041 100644 --- a/modules/video_filter/opencv_example.cpp +++ b/modules/video_filter/opencv_example.cpp @@ -99,11 +99,11 @@ static int OpenFilter( vlc_object_t *p_this ) //create the VIDEO_FILTER_EVENT_VARIABLE vlc_value_t val; - if (var_Create( p_filter->p_libvlc, VIDEO_FILTER_EVENT_VARIABLE, VLC_VAR_ADDRESS | VLC_VAR_DOINHERIT ) != VLC_SUCCESS) + if (var_Create( p_filter->p_libvlc_global, VIDEO_FILTER_EVENT_VARIABLE, VLC_VAR_ADDRESS | VLC_VAR_DOINHERIT ) != VLC_SUCCESS) msg_Err( p_filter, "Could not create %s\n", VIDEO_FILTER_EVENT_VARIABLE); val.p_address = &(p_sys->event_info); - if (var_Set( p_filter->p_libvlc, VIDEO_FILTER_EVENT_VARIABLE, val )!=VLC_SUCCESS) + if (var_Set( p_filter->p_libvlc_global, VIDEO_FILTER_EVENT_VARIABLE, val )!=VLC_SUCCESS) msg_Err( p_filter, "Could not set %s\n", VIDEO_FILTER_EVENT_VARIABLE); //OpenCV init specific to this example @@ -133,7 +133,7 @@ static void CloseFilter( vlc_object_t *p_this ) free( p_sys ); - var_Destroy( p_filter->p_libvlc, VIDEO_FILTER_EVENT_VARIABLE); + var_Destroy( p_filter->p_libvlc_global, VIDEO_FILTER_EVENT_VARIABLE); } /**************************************************************************** @@ -225,7 +225,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) } if (faces && (faces->total > 0)) //raise the video filter event - var_Change( p_filter->p_libvlc, VIDEO_FILTER_EVENT_VARIABLE, VLC_VAR_TRIGGER_CALLBACKS, NULL, NULL ); + var_Change( p_filter->p_libvlc_global, VIDEO_FILTER_EVENT_VARIABLE, VLC_VAR_TRIGGER_CALLBACKS, NULL, NULL ); } else msg_Err( p_filter, "No cascade - is opencv-haarcascade-file valid?" ); diff --git a/modules/video_filter/psychedelic.c b/modules/video_filter/psychedelic.c index 4fb31b6ace..ab6f92e53f 100644 --- a/modules/video_filter/psychedelic.c +++ b/modules/video_filter/psychedelic.c @@ -173,7 +173,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) } /* luminance */ - p_filter->p_vlc->pf_memcpy( + p_filter->p_libvlc->pf_memcpy( p_outpic->p[Y_PLANE].p_pixels, p_pic->p[Y_PLANE].p_pixels, p_outpic->p[Y_PLANE].i_lines * p_outpic->p[Y_PLANE].i_pitch ); diff --git a/modules/video_filter/ripple.c b/modules/video_filter/ripple.c index de43d2d3e2..e2157e3a3b 100644 --- a/modules/video_filter/ripple.c +++ b/modules/video_filter/ripple.c @@ -151,7 +151,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) for( i_line = 0 ; i_line < i_first_line ; i_line++ ) { - p_filter->p_vlc->pf_memcpy( p_out, p_in, + p_filter->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_index].i_visible_pitch ); p_in += p_pic->p[i_index].i_pitch; p_out += p_outpic->p[i_index].i_pitch; @@ -173,7 +173,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) { if( i_offset < 0 ) { - p_filter->p_vlc->pf_memcpy( p_out, p_in - i_offset, + p_filter->p_libvlc->pf_memcpy( p_out, p_in - i_offset, p_pic->p[i_index].i_visible_pitch + i_offset ); p_in -= p_pic->p[i_index].i_pitch; p_out += p_outpic->p[i_index].i_pitch; @@ -181,7 +181,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) } else { - p_filter->p_vlc->pf_memcpy( p_out + i_offset, p_in, + p_filter->p_libvlc->pf_memcpy( p_out + i_offset, p_in, p_pic->p[i_index].i_visible_pitch - i_offset ); memset( p_out, black_pixel, i_offset ); p_in -= p_pic->p[i_index].i_pitch; @@ -190,7 +190,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) } else { - p_filter->p_vlc->pf_memcpy( p_out, p_in, + p_filter->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_index].i_visible_pitch ); p_in -= p_pic->p[i_index].i_pitch; p_out += p_outpic->p[i_index].i_pitch; diff --git a/modules/video_filter/swscale/filter.c b/modules/video_filter/swscale/filter.c index e3c50ecacc..5b50217340 100644 --- a/modules/video_filter/swscale/filter.c +++ b/modules/video_filter/swscale/filter.c @@ -119,23 +119,23 @@ static int OpenFilter( vlc_object_t *p_this ) return VLC_EGENERIC; } - swscale_fast_memcpy = p_filter->p_vlc->pf_memcpy; + swscale_fast_memcpy = p_filter->p_libvlc->pf_memcpy; /* Set CPU capabilities */ p_sys->i_cpu_mask = 0; - if( p_filter->p_libvlc->i_cpu & CPU_CAPABILITY_MMX ) + if( p_filter->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMX ) { p_sys->i_cpu_mask |= SWS_CPU_CAPS_MMX; } - if( p_filter->p_libvlc->i_cpu & CPU_CAPABILITY_MMXEXT ) + if( p_filter->p_libvlc_global->i_cpu & CPU_CAPABILITY_MMXEXT ) { p_sys->i_cpu_mask |= SWS_CPU_CAPS_MMX2; } - if( p_filter->p_libvlc->i_cpu & CPU_CAPABILITY_3DNOW ) + if( p_filter->p_libvlc_global->i_cpu & CPU_CAPABILITY_3DNOW ) { p_sys->i_cpu_mask |= SWS_CPU_CAPS_3DNOW; } - if( p_filter->p_libvlc->i_cpu & CPU_CAPABILITY_ALTIVEC ) + if( p_filter->p_libvlc_global->i_cpu & CPU_CAPABILITY_ALTIVEC ) { p_sys->i_cpu_mask |= SWS_CPU_CAPS_ALTIVEC; } diff --git a/modules/video_filter/time.c b/modules/video_filter/time.c index b6855d6b74..f3d7eee5fc 100644 --- a/modules/video_filter/time.c +++ b/modules/video_filter/time.c @@ -145,22 +145,22 @@ static int CreateFilter( vlc_object_t *p_this ) memcpy( p_sys->p_style, &default_text_style, sizeof( text_style_t ) ); /* Hook used for callback variables */ - p_sys->i_xoff = var_CreateGetInteger( p_filter->p_libvlc , "time-x" ); - p_sys->i_yoff = var_CreateGetInteger( p_filter->p_libvlc , "time-y" ); - p_sys->psz_format = var_CreateGetString( p_filter->p_libvlc, "time-format" ); - p_sys->i_pos = var_CreateGetInteger( p_filter->p_libvlc , "time-position" ); + p_sys->i_xoff = var_CreateGetInteger( p_filter->p_libvlc_global , "time-x" ); + p_sys->i_yoff = var_CreateGetInteger( p_filter->p_libvlc_global , "time-y" ); + p_sys->psz_format = var_CreateGetString( p_filter->p_libvlc_global, "time-format" ); + p_sys->i_pos = var_CreateGetInteger( p_filter->p_libvlc_global , "time-position" ); - p_sys->p_style->i_font_alpha = 255 - var_CreateGetInteger( p_filter->p_libvlc , "time-opacity" ); - p_sys->p_style->i_font_color = var_CreateGetInteger( p_filter->p_libvlc , "time-color" ); - p_sys->p_style->i_font_size = var_CreateGetInteger( p_filter->p_libvlc , "time-size" ); + p_sys->p_style->i_font_alpha = 255 - var_CreateGetInteger( p_filter->p_libvlc_global , "time-opacity" ); + p_sys->p_style->i_font_color = var_CreateGetInteger( p_filter->p_libvlc_global , "time-color" ); + p_sys->p_style->i_font_size = var_CreateGetInteger( p_filter->p_libvlc_global , "time-size" ); - var_AddCallback( p_filter->p_libvlc, "time-x", TimeCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "time-y", TimeCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "time-format", TimeCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "time-position", TimeCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "time-color", TimeCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "time-opacity", TimeCallback, p_sys ); - var_AddCallback( p_filter->p_libvlc, "time-size", TimeCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "time-x", TimeCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "time-y", TimeCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "time-format", TimeCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "time-position", TimeCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "time-color", TimeCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "time-opacity", TimeCallback, p_sys ); + var_AddCallback( p_filter->p_libvlc_global, "time-size", TimeCallback, p_sys ); /* Misc init */ p_filter->pf_sub_filter = Filter; @@ -181,13 +181,13 @@ static void DestroyFilter( vlc_object_t *p_this ) free( p_sys ); /* Delete the time variables */ - var_Destroy( p_filter->p_libvlc , "time-format" ); - var_Destroy( p_filter->p_libvlc , "time-x" ); - var_Destroy( p_filter->p_libvlc , "time-y" ); - var_Destroy( p_filter->p_libvlc , "time-position" ); - var_Destroy( p_filter->p_libvlc , "time-color"); - var_Destroy( p_filter->p_libvlc , "time-opacity"); - var_Destroy( p_filter->p_libvlc , "time-size"); + var_Destroy( p_filter->p_libvlc_global , "time-format" ); + var_Destroy( p_filter->p_libvlc_global , "time-x" ); + var_Destroy( p_filter->p_libvlc_global , "time-y" ); + var_Destroy( p_filter->p_libvlc_global , "time-position" ); + var_Destroy( p_filter->p_libvlc_global , "time-color"); + var_Destroy( p_filter->p_libvlc_global , "time-opacity"); + var_Destroy( p_filter->p_libvlc_global , "time-size"); } static char *FormatTime(char *tformat ) diff --git a/modules/video_filter/transform.c b/modules/video_filter/transform.c index 0cdee98904..2f771e8445 100644 --- a/modules/video_filter/transform.c +++ b/modules/video_filter/transform.c @@ -397,7 +397,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic ) for( ; p_in < p_in_end ; ) { p_in_end -= p_pic->p[i_index].i_pitch; - p_vout->p_vlc->pf_memcpy( p_out, p_in_end, + p_vout->p_libvlc->pf_memcpy( p_out, p_in_end, p_pic->p[i_index].i_visible_pitch ); p_out += p_pic->p[i_index].i_pitch; } diff --git a/modules/video_filter/wall.c b/modules/video_filter/wall.c index 50113a9cb8..adf27b33a4 100644 --- a/modules/video_filter/wall.c +++ b/modules/video_filter/wall.c @@ -533,7 +533,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic ) while( p_in < p_in_end ) { - p_vout->p_vlc->pf_memcpy( p_out, p_in, i_copy_pitch ); + p_vout->p_libvlc->pf_memcpy( p_out, p_in, i_copy_pitch ); p_in += i_in_pitch; p_out += i_out_pitch; } diff --git a/modules/video_filter/wave.c b/modules/video_filter/wave.c index 7b4fe3cb56..8f9252fa87 100644 --- a/modules/video_filter/wave.c +++ b/modules/video_filter/wave.c @@ -160,7 +160,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) { if( i_offset < 0 ) { - p_filter->p_vlc->pf_memcpy( p_out, p_in - i_offset, + p_filter->p_libvlc->pf_memcpy( p_out, p_in - i_offset, p_pic->p[i_index].i_visible_pitch + i_offset ); p_in += p_pic->p[i_index].i_pitch; p_out += p_outpic->p[i_index].i_pitch; @@ -168,7 +168,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) } else { - p_filter->p_vlc->pf_memcpy( p_out + i_offset, p_in, + p_filter->p_libvlc->pf_memcpy( p_out + i_offset, p_in, p_pic->p[i_index].i_visible_pitch - i_offset ); memset( p_out, black_pixel, i_offset ); p_in += p_pic->p[i_index].i_pitch; @@ -177,7 +177,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) } else { - p_filter->p_vlc->pf_memcpy( p_out, p_in, + p_filter->p_libvlc->pf_memcpy( p_out, p_in, p_pic->p[i_index].i_visible_pitch ); p_in += p_pic->p[i_index].i_pitch; p_out += p_outpic->p[i_index].i_pitch; diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c index e486d06696..bb71e7944f 100644 --- a/modules/video_output/caca.c +++ b/modules/video_output/caca.c @@ -331,7 +331,7 @@ static int Manage( vout_thread_t *p_vout ) continue; } - var_Set( p_vout->p_vlc, "key-pressed", val ); + var_Set( p_vout->p_libvlc, "key-pressed", val ); } return VLC_SUCCESS; diff --git a/modules/video_output/directx/events.c b/modules/video_output/directx/events.c index 3149341853..4122baa183 100644 --- a/modules/video_output/directx/events.c +++ b/modules/video_output/directx/events.c @@ -269,7 +269,7 @@ void E_(DirectXEventThread)( event_thread_t *p_event ) val.i_int |= KEY_MODIFIER_ALT; } - var_Set( p_event->p_vlc, "key-pressed", val ); + var_Set( p_event->p_libvlc, "key-pressed", val ); } break; @@ -297,7 +297,7 @@ void E_(DirectXEventThread)( event_thread_t *p_event ) val.i_int |= KEY_MODIFIER_ALT; } - var_Set( p_event->p_vlc, "key-pressed", val ); + var_Set( p_event->p_libvlc, "key-pressed", val ); } break; diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c index cef404213f..c4f092bf7f 100644 --- a/modules/video_output/fb.c +++ b/modules/video_output/fb.c @@ -381,7 +381,7 @@ static int Manage( vout_thread_t *p_vout ) switch( buf ) { case 'q': - p_vout->p_vlc->b_die = 1; + p_vout->p_libvlc->b_die = 1; break; default: diff --git a/modules/video_output/ggi.c b/modules/video_output/ggi.c index 01e9e86e78..c39f632d36 100644 --- a/modules/video_output/ggi.c +++ b/modules/video_output/ggi.c @@ -293,7 +293,7 @@ static int Manage( vout_thread_t *p_vout ) case 'q': case 'Q': case GIIUC_Escape: - p_vout->p_vlc->b_die = 1; + p_vout->p_libvlc->b_die = 1; break; default: diff --git a/modules/video_output/glide.c b/modules/video_output/glide.c index 380e1bf0b6..334b5ff080 100644 --- a/modules/video_output/glide.c +++ b/modules/video_output/glide.c @@ -207,7 +207,7 @@ static int Manage( vout_thread_t *p_vout ) switch( (char)buf ) { case 'q': - p_vout->p_vlc->b_die = 1; + p_vout->p_libvlc->b_die = 1; break; default: diff --git a/modules/video_output/qte/qte.cpp b/modules/video_output/qte/qte.cpp index e5149efeb9..99f9895463 100644 --- a/modules/video_output/qte/qte.cpp +++ b/modules/video_output/qte/qte.cpp @@ -395,7 +395,7 @@ static int Manage( vout_thread_t *p_vout ) // SDL_ShowCursor( 0 ); // } // -// if( p_vout->p_vlc->b_die ) +// if( p_vout->p_libvlc->b_die ) // p_vout->p_sys->bRunning = FALSE; return 0; diff --git a/modules/video_output/sdl.c b/modules/video_output/sdl.c index 9cd4fd73ea..9daa2d4f6d 100644 --- a/modules/video_output/sdl.c +++ b/modules/video_output/sdl.c @@ -110,7 +110,7 @@ vlc_module_begin(); add_shortcut( "sdl" ); set_callbacks( Open, Close ); /* XXX: check for conflicts with the SDL audio output */ - var_Create( p_module->p_libvlc, "sdl", VLC_VAR_MUTEX ); + var_Create( p_module->p_libvlc_global, "sdl", VLC_VAR_MUTEX ); #if defined( __i386__ ) || defined( __x86_64__ ) /* On i386, SDL is linked against svgalib */ linked_with_a_crap_library_which_uses_atexit(); @@ -133,7 +133,7 @@ static int Open ( vlc_object_t *p_this ) char *psz_method; #endif - var_Get( p_this->p_libvlc, "sdl", &lockval ); + var_Get( p_this->p_libvlc_global, "sdl", &lockval ); vlc_mutex_lock( lockval.p_address ); if( SDL_WasInit( SDL_INIT_VIDEO ) != 0 ) @@ -417,7 +417,7 @@ static int Manage( vout_thread_t *p_vout ) break; case SDL_QUIT: - p_vout->p_vlc->b_die = 1; + p_vout->p_libvlc->b_die = 1; break; case SDL_KEYDOWN: /* if a key is pressed */ @@ -431,12 +431,12 @@ static int Manage( vout_thread_t *p_vout ) } else { - p_vout->p_vlc->b_die = 1; + p_vout->p_libvlc->b_die = 1; } break; case SDLK_q: /* quit */ - p_vout->p_vlc->b_die = 1; + p_vout->p_libvlc->b_die = 1; break; case SDLK_f: /* switch to fullscreen */ diff --git a/modules/video_output/snapshot.c b/modules/video_output/snapshot.c index 6ae4e65ab5..b0242ac5ed 100644 --- a/modules/video_output/snapshot.c +++ b/modules/video_output/snapshot.c @@ -322,7 +322,6 @@ static int Init( vout_thread_t *p_vout ) static void Destroy( vlc_object_t *p_this ) { vout_thread_t *p_vout = ( vout_thread_t * )p_this; - vlc_object_t *p_vlc; int i_index; vlc_object_release( p_vout->p_sys->p_input ); @@ -330,14 +329,7 @@ static void Destroy( vlc_object_t *p_this ) var_Destroy( p_this, "snapshot-height" ); var_Destroy( p_this, "snapshot-datasize" ); - p_vlc = vlc_object_find( p_this, VLC_OBJECT_ROOT, FIND_PARENT ); - if( p_vlc ) - { - /* UnRegister the snapshot vout module at the root level */ - /* var_Destroy (p_vlc, "snapshot-id"); */ - var_Destroy( p_this->p_libvlc, "snapshot-id" ); - vlc_object_release( p_vlc ); - } + var_Destroy( p_this->p_libvlc_global, "snapshot-id" ); for( i_index = 0 ; i_index < p_vout->p_sys->i_size ; i_index++ ) { @@ -378,9 +370,9 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic ) i_index = p_vout->p_sys->i_index; - p_vout->p_vlc->pf_memcpy( p_vout->p_sys->p_list[i_index]->p_data, - p_pic->p->p_pixels, - p_vout->p_sys->i_datasize ); + p_vout->p_libvlc->pf_memcpy( p_vout->p_sys->p_list[i_index]->p_data, + p_pic->p->p_pixels, + p_vout->p_sys->i_datasize ); i_date = snapshot_GetMovietime( p_vout ); diff --git a/modules/video_output/svgalib.c b/modules/video_output/svgalib.c index 0f9d405f5f..0df01d3893 100644 --- a/modules/video_output/svgalib.c +++ b/modules/video_output/svgalib.c @@ -231,7 +231,7 @@ static int Manage( vout_thread_t *p_vout ) if( keyboard_keypressed(SCANCODE_ESCAPE) || keyboard_keypressed(SCANCODE_Q ) ) { - p_vout->p_vlc->b_die = VLC_TRUE; + p_vout->p_libvlc->b_die = VLC_TRUE; } return VLC_SUCCESS; diff --git a/modules/video_output/wingdi.c b/modules/video_output/wingdi.c index ac8d7ee60a..d98f3c5603 100644 --- a/modules/video_output/wingdi.c +++ b/modules/video_output/wingdi.c @@ -883,7 +883,7 @@ static void EventThread ( vlc_object_t *p_event ) switch( msg.wParam ) { case VK_ESCAPE: - p_event->p_vlc->b_die = VLC_TRUE; + p_event->p_libvlc->b_die = VLC_TRUE; break; } TranslateMessage( &msg ); @@ -894,7 +894,7 @@ static void EventThread ( vlc_object_t *p_event ) { case 'q': case 'Q': - p_event->p_vlc->b_die = VLC_TRUE; + p_event->p_libvlc->b_die = VLC_TRUE; break; } break; diff --git a/modules/video_output/x11/xcommon.c b/modules/video_output/x11/xcommon.c index 5a016c5a9e..c2aa6af0b4 100644 --- a/modules/video_output/x11/xcommon.c +++ b/modules/video_output/x11/xcommon.c @@ -662,7 +662,7 @@ static int ManageVideo( vout_thread_t *p_vout ) { val.i_int |= KEY_MODIFIER_ALT; } - var_Set( p_vout->p_vlc, "key-pressed", val ); + var_Set( p_vout->p_libvlc, "key-pressed", val ); } } /* Mouse click */ @@ -843,9 +843,9 @@ static int ManageVideo( vout_thread_t *p_vout ) { /* (if this is the last a collection of expose events...) */ #if 0 - if( p_vout->p_vlc->p_input_bank->pp_input[0] != NULL ) + if( p_vout->p_libvlc->p_input_bank->pp_input[0] != NULL ) { - if( PAUSE_S == p_vout->p_vlc->p_input_bank->pp_input[0] + if( PAUSE_S == p_vout->p_libvlc->p_input_bank->pp_input[0] ->stream.control.i_status ) { /* XVideoDisplay( p_vout )*/; @@ -1055,7 +1055,7 @@ static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win ) XSetWMNormalHints( p_vout->p_sys->p_display, p_win->base_window, &xsize_hints ); XSetCommand( p_vout->p_sys->p_display, p_win->base_window, - p_vout->p_vlc->ppsz_argv, p_vout->p_vlc->i_argc ); + p_vout->p_libvlc->ppsz_argv, p_vout->p_libvlc->i_argc ); if( !var_GetBool( p_vout, "video-deco") ) { diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c index 65eed6fa5c..c14a9a4f14 100644 --- a/src/audio_output/dec.c +++ b/src/audio_output/dec.c @@ -166,7 +166,7 @@ aout_input_t * __aout_DecNew( vlc_object_t * p_this, { return NULL; } - vlc_object_attach( *pp_aout, p_this->p_vlc ); + vlc_object_attach( *pp_aout, p_this->p_libvlc ); } else { @@ -343,7 +343,7 @@ int aout_DecPlay( aout_instance_t * p_aout, aout_input_t * p_input, / p_input->input.i_rate; aout_BufferAlloc( &p_input->input_alloc, duration, NULL, p_new_buffer ); - p_aout->p_vlc->pf_memcpy( p_new_buffer->p_buffer, p_buffer->p_buffer, + p_aout->p_libvlc->pf_memcpy( p_new_buffer->p_buffer, p_buffer->p_buffer, p_buffer->i_nb_bytes ); p_new_buffer->i_nb_samples = p_buffer->i_nb_samples; p_new_buffer->i_nb_bytes = p_buffer->i_nb_bytes; diff --git a/src/audio_output/intf.c b/src/audio_output/intf.c index 1a36db4ee3..55fcec8711 100644 --- a/src/audio_output/intf.c +++ b/src/audio_output/intf.c @@ -100,7 +100,7 @@ int __aout_VolumeSet( vlc_object_t * p_object, audio_volume_t i_volume ) config_PutInt( p_object, "volume", i_volume ); val.b_bool = VLC_TRUE; - var_Set( p_object->p_vlc, "volume-change", val ); + var_Set( p_object->p_libvlc, "volume-change", val ); if ( p_aout == NULL ) return 0; @@ -156,7 +156,7 @@ int __aout_VolumeUp( vlc_object_t * p_object, int i_nb_steps, FIND_ANYWHERE ); int i_result = 0, i_volume = 0, i_volume_step = 0; - i_volume_step = config_GetInt( p_object->p_vlc, "volume-step" ); + i_volume_step = config_GetInt( p_object->p_libvlc, "volume-step" ); i_volume = config_GetInt( p_object, "volume" ); i_volume += i_volume_step * i_nb_steps; if ( i_volume > AOUT_VOLUME_MAX ) @@ -164,8 +164,8 @@ int __aout_VolumeUp( vlc_object_t * p_object, int i_nb_steps, i_volume = AOUT_VOLUME_MAX; } config_PutInt( p_object, "volume", i_volume ); - var_Create( p_object->p_libvlc, "saved-volume", VLC_VAR_INTEGER ); - var_SetInteger( p_object->p_libvlc, "saved-volume" , + var_Create( p_object->p_libvlc_global, "saved-volume", VLC_VAR_INTEGER ); + var_SetInteger( p_object->p_libvlc_global, "saved-volume" , (audio_volume_t) i_volume ); if ( pi_volume != NULL ) *pi_volume = (audio_volume_t) i_volume; @@ -196,7 +196,7 @@ int __aout_VolumeDown( vlc_object_t * p_object, int i_nb_steps, FIND_ANYWHERE ); int i_result = 0, i_volume = 0, i_volume_step = 0; - i_volume_step = config_GetInt( p_object->p_vlc, "volume-step" ); + i_volume_step = config_GetInt( p_object->p_libvlc, "volume-step" ); i_volume = config_GetInt( p_object, "volume" ); i_volume -= i_volume_step * i_nb_steps; if ( i_volume < AOUT_VOLUME_MIN ) @@ -204,8 +204,8 @@ int __aout_VolumeDown( vlc_object_t * p_object, int i_nb_steps, i_volume = AOUT_VOLUME_MIN; } config_PutInt( p_object, "volume", i_volume ); - var_Create( p_object->p_libvlc, "saved-volume", VLC_VAR_INTEGER ); - var_SetInteger( p_object->p_libvlc, "saved-volume", (audio_volume_t) i_volume ); + var_Create( p_object->p_libvlc_global, "saved-volume", VLC_VAR_INTEGER ); + var_SetInteger( p_object->p_libvlc_global, "saved-volume", (audio_volume_t) i_volume ); if ( pi_volume != NULL ) *pi_volume = (audio_volume_t) i_volume; if ( p_aout == NULL ) return 0; @@ -237,15 +237,15 @@ int __aout_VolumeMute( vlc_object_t * p_object, audio_volume_t * pi_volume ) { /* Mute */ i_result = aout_VolumeSet( p_object, AOUT_VOLUME_MIN ); - var_Create( p_object->p_libvlc, "saved-volume", VLC_VAR_INTEGER ); - var_SetInteger( p_object->p_libvlc, "saved-volume", (int)i_volume ); + var_Create( p_object->p_libvlc_global, "saved-volume", VLC_VAR_INTEGER ); + var_SetInteger( p_object->p_libvlc_global, "saved-volume", (int)i_volume ); if ( pi_volume != NULL ) *pi_volume = AOUT_VOLUME_MIN; } else { /* Un-mute */ - var_Create( p_object->p_libvlc, "saved-volume", VLC_VAR_INTEGER ); - i_volume = (audio_volume_t)var_GetInteger( p_object->p_libvlc, + var_Create( p_object->p_libvlc_global, "saved-volume", VLC_VAR_INTEGER ); + i_volume = (audio_volume_t)var_GetInteger( p_object->p_libvlc_global, "saved-volume" ); i_result = aout_VolumeSet( p_object, i_volume ); if ( pi_volume != NULL ) *pi_volume = i_volume; diff --git a/src/audio_output/output.c b/src/audio_output/output.c index f97d7b8554..c193a6439e 100644 --- a/src/audio_output/output.c +++ b/src/audio_output/output.c @@ -176,7 +176,7 @@ int aout_OutputNew( aout_instance_t * p_aout, { /* Non-S/PDIF mixer only deals with float32 or fixed32. */ p_aout->mixer.mixer.i_format - = (p_aout->p_libvlc->i_cpu & CPU_CAPABILITY_FPU) ? + = (p_aout->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU) ? VLC_FOURCC('f','l','3','2') : VLC_FOURCC('f','i','3','2'); aout_FormatPrepare( &p_aout->mixer.mixer ); diff --git a/src/control/audio.c b/src/control/audio.c index c28b70b448..3f39582434 100644 --- a/src/control/audio.c +++ b/src/control/audio.c @@ -33,7 +33,7 @@ void libvlc_audio_toggle_mute( libvlc_instance_t *p_instance, libvlc_exception_t *p_e ) { - aout_VolumeMute( p_instance->p_vlc, NULL ); + aout_VolumeMute( p_instance->p_libvlc_int, NULL ); } vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *p_instance, @@ -60,12 +60,12 @@ void libvlc_audio_set_mute( libvlc_instance_t *p_instance, vlc_bool_t status, { return; } - aout_VolumeMute( p_instance->p_vlc, NULL ); + aout_VolumeMute( p_instance->p_libvlc_int, NULL ); } else { /* the aout_VolumeMute is a toggle function, so this is enough. */ - aout_VolumeMute( p_instance->p_vlc, NULL ); + aout_VolumeMute( p_instance->p_libvlc_int, NULL ); } } @@ -77,7 +77,7 @@ int libvlc_audio_get_volume( libvlc_instance_t *p_instance, { audio_volume_t i_volume; - aout_VolumeGet( p_instance->p_vlc, &i_volume ); + aout_VolumeGet( p_instance->p_libvlc_int, &i_volume ); return i_volume*200/AOUT_VOLUME_MAX; } @@ -92,7 +92,7 @@ void libvlc_audio_set_volume( libvlc_instance_t *p_instance, int i_volume, if( i_volume >= 0 && i_volume <= 200 ) { i_volume = i_volume * AOUT_VOLUME_MAX / 200; - aout_VolumeSet( p_instance->p_vlc, i_volume ); + aout_VolumeSet( p_instance->p_libvlc_int, i_volume ); } else { diff --git a/src/control/core.c b/src/control/core.c index e7d22653ce..6675f81219 100644 --- a/src/control/core.c +++ b/src/control/core.c @@ -84,12 +84,12 @@ libvlc_instance_t * libvlc_new( int argc, char **argv, { int i_vlc_id; libvlc_instance_t *p_new; - vlc_t *p_vlc; + libvlc_int_t *p_libvlc_int; i_vlc_id = VLC_Create(); - p_vlc = (vlc_t* ) vlc_current_object( i_vlc_id ); + p_libvlc_int = (libvlc_int_t* ) vlc_current_object( i_vlc_id ); - if( !p_vlc ) RAISENULL( "VLC initialization failed" ); + if( !p_libvlc_int ) RAISENULL( "VLC initialization failed" ); p_new = (libvlc_instance_t *)malloc( sizeof( libvlc_instance_t ) ); if( !p_new ) RAISENULL( "Out of memory" ); @@ -100,8 +100,8 @@ libvlc_instance_t * libvlc_new( int argc, char **argv, VLC_Init( i_vlc_id, argc, argv ); - p_new->p_vlc = p_vlc; - p_new->p_playlist = (playlist_t *)vlc_object_find( p_new->p_vlc, + p_new->p_libvlc_int = p_libvlc_int; + p_new->p_playlist = (playlist_t *)vlc_object_find( p_new->p_libvlc_int, VLC_OBJECT_PLAYLIST, FIND_CHILD ); p_new->p_vlm = NULL; @@ -115,7 +115,7 @@ void libvlc_destroy( libvlc_instance_t *p_instance ) { if( p_instance->p_playlist ) vlc_object_release( p_instance->p_playlist ); - vlc_object_release( p_instance->p_vlc ); + vlc_object_release( p_instance->p_libvlc_int ); VLC_CleanUp( p_instance->i_vlc_id ); VLC_Destroy( p_instance->i_vlc_id ); } diff --git a/src/control/input.c b/src/control/input.c index f859084bac..8cc3d1aaa1 100644 --- a/src/control/input.c +++ b/src/control/input.c @@ -44,8 +44,8 @@ input_thread_t *libvlc_get_input_thread( libvlc_input_t *p_input, if( !p_input ) RAISENULL( "Input is NULL" ); p_input_thread = (input_thread_t*)vlc_object_get( - p_input->p_instance->p_vlc, - p_input->i_input_id ); + p_input->p_instance->p_libvlc_int, + p_input->i_input_id ); if( !p_input_thread ) RAISENULL( "Input does not exist" ); return p_input_thread; diff --git a/src/control/mediacontrol_init.c b/src/control/mediacontrol_init.c index b0e090b1fd..2d0232715c 100644 --- a/src/control/mediacontrol_init.c +++ b/src/control/mediacontrol_init.c @@ -71,7 +71,7 @@ mediacontrol_Instance* mediacontrol_new( char** args, mediacontrol_Exception *ex return NULL; } - retval->p_vlc = p_vlc; + retval->p_libvlc = p_vlc; retval->vlc_object_id = p_vlc_id; /* We can keep references on these, which should not change. Is it true ? */ @@ -96,7 +96,7 @@ mediacontrol_exit( mediacontrol_Instance *self ) vlc_object_release( (vlc_object_t* )self->p_playlist ); vlc_object_release( (vlc_object_t* )self->p_intf ); - vlc_object_release( (vlc_object_t*)self->p_vlc ); + vlc_object_release( (vlc_object_t*)self->p_libvlc ); VLC_CleanUp( self->vlc_object_id ); VLC_Destroy( self->vlc_object_id ); diff --git a/src/control/video.c b/src/control/video.c index 4459c5aaa1..6b3edb77a5 100644 --- a/src/control/video.c +++ b/src/control/video.c @@ -46,7 +46,7 @@ static vout_thread_t *GetVout( libvlc_input_t *p_input, } p_input_thread = (input_thread_t*)vlc_object_get( - p_input->p_instance->p_vlc, + p_input->p_instance->p_libvlc_int, p_input->i_input_id ); if( !p_input_thread ) { @@ -155,7 +155,7 @@ libvlc_video_take_snapshot( libvlc_input_t *p_input, char *psz_filepath, } p_input_thread = (input_thread_t*)vlc_object_get( - p_input->p_instance->p_vlc, + p_input->p_instance->p_libvlc_int, p_input->i_input_id ); if( !p_input_thread ) { @@ -240,7 +240,7 @@ void libvlc_video_set_parent( libvlc_instance_t *p_instance, libvlc_drawable_t d libvlc_exception_t *p_e ) { /* set as default for future vout instances */ - var_SetInteger(p_instance->p_vlc, "drawable", (int)d); + var_SetInteger(p_instance->p_libvlc_int, "drawable", (int)d); if( libvlc_playlist_isplaying(p_instance, p_e) ) { @@ -263,8 +263,8 @@ void libvlc_video_set_size( libvlc_instance_t *p_instance, int width, int height libvlc_exception_t *p_e ) { /* set as default for future vout instances */ - config_PutInt(p_instance->p_vlc, "width", width); - config_PutInt(p_instance->p_vlc, "height", height); + config_PutInt(p_instance->p_libvlc_int, "width", width); + config_PutInt(p_instance->p_libvlc_int, "height", height); if( libvlc_playlist_isplaying(p_instance, p_e) ) { @@ -297,14 +297,14 @@ void libvlc_video_set_viewport( libvlc_instance_t *p_instance, clip = view; /* set as default for future vout instances */ - var_SetInteger( p_instance->p_vlc, "drawable-view-top", view->top ); - var_SetInteger( p_instance->p_vlc, "drawable-view-left", view->left ); - var_SetInteger( p_instance->p_vlc, "drawable-view-bottom", view->bottom ); - var_SetInteger( p_instance->p_vlc, "drawable-view-right", view->right ); - var_SetInteger( p_instance->p_vlc, "drawable-clip-top", clip->top ); - var_SetInteger( p_instance->p_vlc, "drawable-clip-left", clip->left ); - var_SetInteger( p_instance->p_vlc, "drawable-clip-bottom", clip->bottom ); - var_SetInteger( p_instance->p_vlc, "drawable-clip-right", clip->right ); + var_SetInteger( p_instance->p_libvlc_int, "drawable-view-top", view->top ); + var_SetInteger( p_instance->p_libvlc_int, "drawable-view-left", view->left ); + var_SetInteger( p_instance->p_libvlc_int, "drawable-view-bottom", view->bottom ); + var_SetInteger( p_instance->p_libvlc_int, "drawable-view-right", view->right ); + var_SetInteger( p_instance->p_libvlc_int, "drawable-clip-top", clip->top ); + var_SetInteger( p_instance->p_libvlc_int, "drawable-clip-left", clip->left ); + var_SetInteger( p_instance->p_libvlc_int, "drawable-clip-bottom", clip->bottom ); + var_SetInteger( p_instance->p_libvlc_int, "drawable-clip-right", clip->right ); if( libvlc_playlist_isplaying(p_instance, p_e) ) { diff --git a/src/control/vlm.c b/src/control/vlm.c index a770e5d731..8f2d617ae9 100644 --- a/src/control/vlm.c +++ b/src/control/vlm.c @@ -33,7 +33,7 @@ void InitVLM( libvlc_instance_t *p_instance ) { #ifdef ENABLE_VLM if( p_instance->p_vlm ) return; - p_instance->p_vlm = vlm_New( p_instance->p_vlc ); + p_instance->p_vlm = vlm_New( p_instance->p_libvlc_int ); #else p_instance->p_vlm = NULL; #endif diff --git a/src/input/es_out.c b/src/input/es_out.c index 047074a1b3..b92d0d84b2 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -1026,7 +1026,7 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block ) else i_delay = 0; - if( p_input->p_libvlc->b_stats ) + if( p_input->p_libvlc_global->b_stats ) { vlc_mutex_lock( &p_input->counters.counters_lock ); stats_UpdateInteger( p_input, p_input->counters.p_demux_read, diff --git a/src/input/input.c b/src/input/input.c index 3826284a78..5df9377903 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -685,7 +685,7 @@ static int Init( input_thread_t * p_input, vlc_bool_t b_quick ) /* Prepare statistics */ #define INIT_COUNTER( p, type, compute ) p_input->counters.p_##p = \ stats_CounterCreate( p_input, VLC_VAR_##type, STATS_##compute); - if( p_input->p_libvlc->b_stats ) + if( p_input->p_libvlc_global->b_stats ) { INIT_COUNTER( read_bytes, INTEGER, COUNTER ); INIT_COUNTER( read_packets, INTEGER, COUNTER ); @@ -721,7 +721,7 @@ static int Init( input_thread_t * p_input, vlc_bool_t b_quick ) free( psz ); return VLC_EGENERIC; } - if( p_input->p_libvlc->b_stats ) + if( p_input->p_libvlc_global->b_stats ) { INIT_COUNTER( sout_sent_packets, INTEGER, COUNTER ); INIT_COUNTER (sout_sent_bytes, INTEGER, COUNTER ); @@ -1114,7 +1114,7 @@ static void End( input_thread_t * p_input ) input_EsOutDelete( p_input->p_es_out ); #define CL_CO( c ) stats_CounterClean( p_input->counters.p_##c ); p_input->counters.p_##c = NULL; - if( p_input->p_libvlc->b_stats ) + if( p_input->p_libvlc_global->b_stats ) { vlc_mutex_lock( &p_input->counters.counters_lock ); CL_CO( read_bytes ); diff --git a/src/input/stream.c b/src/input/stream.c index 09115af62c..453cc11ea1 100644 --- a/src/input/stream.c +++ b/src/input/stream.c @@ -1655,7 +1655,7 @@ static block_t *AReadBlock( stream_t *s, vlc_bool_t *pb_eof ) { p_block = p_access->pf_block( p_access ); if( pb_eof ) *pb_eof = p_access->info.b_eof; - if( p_input && p_block && p_access->p_libvlc->b_stats ) + if( p_input && p_block && p_access->p_libvlc_global->b_stats ) { vlc_object_yield( p_input ); vlc_mutex_lock( &p_input->counters.counters_lock ); diff --git a/src/interface/interface.c b/src/interface/interface.c index 2c06f3d6c1..b04a59a6fd 100644 --- a/src/interface/interface.c +++ b/src/interface/interface.c @@ -168,17 +168,17 @@ int intf_RunThread( intf_thread_t *p_intf ) } } - if( p_intf->b_block && strncmp( p_intf->p_vlc->psz_object_name, + if( p_intf->b_block && strncmp( p_intf->p_libvlc->psz_object_name, "clivlc", 6) ) { o_pool = [[NSAutoreleasePool alloc] init]; [VLCApplication sharedApplication]; - [NSApp setVLC: p_intf->p_vlc]; + [NSApp setVLC: p_intf->p_libvlc]; } if( p_intf->b_block && ( !strncmp( p_intf->p_module->psz_object_name, "macosx" , 6 ) || - !strncmp( p_intf->p_vlc->psz_object_name, "clivlc", 6 ) ) ) + !strncmp( p_intf->p_libvlc->psz_object_name, "clivlc", 6 ) ) ) { /* VLC in normal primary interface mode */ RunInterface( p_intf ); @@ -307,11 +307,11 @@ static void Manager( intf_thread_t *p_intf ) { msleep( INTF_IDLE_SLEEP ); - if( p_intf->p_vlc->b_die ) + if( p_intf->p_libvlc->b_die ) { p_intf->b_die = VLC_TRUE; #ifdef __APPLE__ - if( strncmp( p_intf->p_vlc->psz_object_name, "clivlc", 6 ) ) + if( strncmp( p_intf->p_libvlc->psz_object_name, "clivlc", 6 ) ) { [NSApp stop: NULL]; } @@ -440,7 +440,7 @@ static int AddIntfCallback( vlc_object_t *p_this, char const *psz_cmd, /* Try to create the interface */ sprintf( psz_intf, "%s,none", newval.psz_string ); - p_intf = intf_Create( p_this->p_vlc, psz_intf, 0, NULL ); + p_intf = intf_Create( p_this->p_libvlc, psz_intf, 0, NULL ); free( psz_intf ); if( p_intf == NULL ) { diff --git a/src/libvlc.c b/src/libvlc.c index a006aae9c3..df71f5de1f 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -86,9 +86,9 @@ /***************************************************************************** * The evil global variable. We handle it with care, don't worry. *****************************************************************************/ -static libvlc_t libvlc; -static libvlc_t * p_libvlc; -static vlc_t * p_static_vlc; +static libvlc_global_data_t libvlc_global; +static libvlc_global_data_t * p_libvlc_global; +static libvlc_int_t * p_static_vlc; /***************************************************************************** * Local prototypes @@ -100,10 +100,10 @@ static int AddIntfInternal( int i_object, char const *psz_module, void LocaleInit( vlc_object_t * ); void LocaleDeinit( void ); static void SetLanguage ( char const * ); -static int GetFilenames ( vlc_t *, int, char *[] ); -static void Help ( vlc_t *, char const *psz_help_name ); -static void Usage ( vlc_t *, char const *psz_module_name ); -static void ListModules ( vlc_t * ); +static int GetFilenames ( libvlc_int_t *, int, char *[] ); +static void Help ( libvlc_int_t *, char const *psz_help_name ); +static void Usage ( libvlc_int_t *, char const *psz_module_name ); +static void ListModules ( libvlc_int_t * ); static void Version ( void ); #ifdef WIN32 @@ -115,7 +115,7 @@ static int ConsoleWidth ( void ); static int VerboseCallback( vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void * ); -static void InitDeviceValues( vlc_t * ); +static void InitDeviceValues( libvlc_int_t * ); /***************************************************************************** * vlc_current_object: return the current object. @@ -123,11 +123,11 @@ static void InitDeviceValues( vlc_t * ); * If i_object is non-zero, return the corresponding object. Otherwise, * return the statically allocated p_vlc object. *****************************************************************************/ -vlc_t * vlc_current_object( int i_object ) +libvlc_int_t * vlc_current_object( int i_object ) { if( i_object ) { - return vlc_object_get( p_libvlc, i_object ); + return vlc_object_get( p_libvlc_global, i_object ); } return p_static_vlc; @@ -185,15 +185,15 @@ char const * VLC_Error( int i_err ) int VLC_Create( void ) { int i_ret; - vlc_t * p_vlc = NULL; + libvlc_int_t * p_libvlc = NULL; vlc_value_t lockval; /* &libvlc never changes, so we can safely call this multiple times. */ - p_libvlc = &libvlc; + p_libvlc_global = &libvlc_global; /* vlc_threads_init *must* be the first internal call! No other call is * allowed before the thread system has been initialized. */ - i_ret = vlc_threads_init( p_libvlc ); + i_ret = vlc_threads_init( p_libvlc_global ); if( i_ret < 0 ) { return i_ret; @@ -201,65 +201,66 @@ int VLC_Create( void ) /* Now that the thread system is initialized, we don't have much, but * at least we have var_Create */ - var_Create( p_libvlc, "libvlc", VLC_VAR_MUTEX ); - var_Get( p_libvlc, "libvlc", &lockval ); + var_Create( p_libvlc_global, "libvlc", VLC_VAR_MUTEX ); + var_Get( p_libvlc_global, "libvlc", &lockval ); vlc_mutex_lock( lockval.p_address ); - if( !libvlc.b_ready ) + if( !libvlc_global.b_ready ) { char *psz_env; /* Guess what CPU we have */ - libvlc.i_cpu = CPUCapabilities(); + libvlc_global.i_cpu = CPUCapabilities(); /* Find verbosity from VLC_VERBOSE environment variable */ psz_env = getenv( "VLC_VERBOSE" ); - libvlc.i_verbose = psz_env ? atoi( psz_env ) : -1; + libvlc_global.i_verbose = psz_env ? atoi( psz_env ) : -1; #if defined( HAVE_ISATTY ) && !defined( WIN32 ) - libvlc.b_color = isatty( 2 ); /* 2 is for stderr */ + libvlc_global.b_color = isatty( 2 ); /* 2 is for stderr */ #else - libvlc.b_color = VLC_FALSE; + libvlc_global.b_color = VLC_FALSE; #endif /* Initialize message queue */ - msg_Create( p_libvlc ); + msg_Create( p_libvlc_global ); /* Announce who we are */ - msg_Dbg( p_libvlc, COPYRIGHT_MESSAGE ); - msg_Dbg( p_libvlc, "libvlc was configured with %s", CONFIGURE_LINE ); + msg_Dbg( p_libvlc_global, COPYRIGHT_MESSAGE ); + msg_Dbg( p_libvlc_global, "libvlc was configured with %s", + CONFIGURE_LINE ); /* The module bank will be initialized later */ - libvlc.p_module_bank = NULL; + libvlc_global.p_module_bank = NULL; - libvlc.b_ready = VLC_TRUE; + libvlc_global.b_ready = VLC_TRUE; } vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_libvlc, "libvlc" ); + var_Destroy( p_libvlc_global, "libvlc" ); /* Allocate a vlc object */ - p_vlc = vlc_object_create( p_libvlc, VLC_OBJECT_VLC ); - if( p_vlc == NULL ) + p_libvlc = vlc_object_create( p_libvlc_global, VLC_OBJECT_LIBVLC ); + if( p_libvlc == NULL ) { return VLC_EGENERIC; } - p_vlc->thread_id = 0; + p_libvlc->thread_id = 0; - p_vlc->psz_object_name = "root"; + p_libvlc->psz_object_name = "root"; /* Initialize mutexes */ - vlc_mutex_init( p_vlc, &p_vlc->config_lock ); + vlc_mutex_init( p_libvlc, &p_libvlc->config_lock ); #ifdef __APPLE__ - vlc_mutex_init( p_vlc, &p_vlc->quicktime_lock ); - vlc_thread_set_priority( p_vlc, VLC_THREAD_PRIORITY_LOW ); + vlc_mutex_init( p_libvlc, &p_libvlc->quicktime_lock ); + vlc_thread_set_priority( p_libvlc, VLC_THREAD_PRIORITY_LOW ); #endif /* Store our newly allocated structure in the global list */ - vlc_object_attach( p_vlc, p_libvlc ); + vlc_object_attach( p_libvlc, p_libvlc_global ); /* Store data for the non-reentrant API */ - p_static_vlc = p_vlc; + p_static_vlc = p_libvlc; - return p_vlc->i_object_id; + return p_libvlc->i_object_id; } /***************************************************************************** @@ -280,7 +281,6 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) char * psz_control; vlc_bool_t b_exit = VLC_FALSE; int i_ret = VLC_EEXIT; - vlc_t * p_vlc = vlc_current_object( i_object ); module_t *p_help_module; playlist_t *p_playlist; vlc_value_t val; @@ -290,8 +290,9 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) char * psz_language; #endif #endif + libvlc_int_t * p_libvlc = vlc_current_object( i_object ); - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } @@ -299,21 +300,21 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) /* * System specific initialization code */ - system_Init( p_vlc, &i_argc, ppsz_argv ); + system_Init( p_libvlc, &i_argc, ppsz_argv ); /* Get the executable name (similar to the basename command) */ if( i_argc > 0 ) { - p_vlc->psz_object_name = p_tmp = ppsz_argv[ 0 ]; + p_libvlc->psz_object_name = p_tmp = ppsz_argv[ 0 ]; while( *p_tmp ) { - if( *p_tmp == '/' ) p_vlc->psz_object_name = ++p_tmp; + if( *p_tmp == '/' ) p_libvlc->psz_object_name = ++p_tmp; else ++p_tmp; } } else { - p_vlc->psz_object_name = "vlc"; + p_libvlc->psz_object_name = "vlc"; } /* @@ -325,50 +326,50 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) * Global iconv, must be done after setlocale() * so that vlc_current_charset() works. */ - LocaleInit( (vlc_object_t *)p_vlc ); + LocaleInit( (vlc_object_t *)p_libvlc ); /* Translate "C" to the language code: "fr", "en_GB", "nl", "ru"... */ - msg_Dbg( p_vlc, "translation test: code is \"%s\"", _("C") ); + msg_Dbg( p_libvlc, "translation test: code is \"%s\"", _("C") ); /* Initialize the module bank and load the configuration of the * main module. We need to do this at this stage to be able to display * a short help if required by the user. (short help == main module * options) */ - module_InitBank( p_vlc ); + module_InitBank( p_libvlc ); /* Hack: insert the help module here */ - p_help_module = vlc_object_create( p_vlc, VLC_OBJECT_MODULE ); + p_help_module = vlc_object_create( p_libvlc, VLC_OBJECT_MODULE ); if( p_help_module == NULL ) { - module_EndBank( p_vlc ); - if( i_object ) vlc_object_release( p_vlc ); + module_EndBank( p_libvlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_EGENERIC; } p_help_module->psz_object_name = "help"; p_help_module->psz_longname = N_("Help options"); config_Duplicate( p_help_module, p_help_config ); - vlc_object_attach( p_help_module, libvlc.p_module_bank ); + vlc_object_attach( p_help_module, libvlc_global.p_module_bank ); /* End hack */ - if( config_LoadCmdLine( p_vlc, &i_argc, ppsz_argv, VLC_TRUE ) ) + if( config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE ) ) { vlc_object_detach( p_help_module ); config_Free( p_help_module ); vlc_object_destroy( p_help_module ); - module_EndBank( p_vlc ); - if( i_object ) vlc_object_release( p_vlc ); + module_EndBank( p_libvlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_EGENERIC; } /* Check for short help option */ - if( config_GetInt( p_vlc, "help" ) ) + if( config_GetInt( p_libvlc, "help" ) ) { - Help( p_vlc, "help" ); + Help( p_libvlc, "help" ); b_exit = VLC_TRUE; i_ret = VLC_EEXITSUCCESS; } /* Check for version option */ - else if( config_GetInt( p_vlc, "version" ) ) + else if( config_GetInt( p_libvlc, "version" ) ) { Version(); b_exit = VLC_TRUE; @@ -376,27 +377,27 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) } /* Set the config file stuff */ - p_vlc->psz_homedir = config_GetHomeDir(); - p_vlc->psz_userdir = config_GetUserDir(); - if( p_vlc->psz_userdir == NULL ) - p_vlc->psz_userdir = strdup(p_vlc->psz_homedir); - p_vlc->psz_configfile = config_GetPsz( p_vlc, "config" ); - if( p_vlc->psz_configfile != NULL && p_vlc->psz_configfile[0] == '~' - && p_vlc->psz_configfile[1] == '/' ) - { - char *psz = malloc( strlen(p_vlc->psz_userdir) - + strlen(p_vlc->psz_configfile) ); + p_libvlc->psz_homedir = config_GetHomeDir(); + p_libvlc->psz_userdir = config_GetUserDir(); + if( p_libvlc->psz_userdir == NULL ) + p_libvlc->psz_userdir = strdup(p_libvlc->psz_homedir); + p_libvlc->psz_configfile = config_GetPsz( p_libvlc, "config" ); + if( p_libvlc->psz_configfile != NULL && p_libvlc->psz_configfile[0] == '~' + && p_libvlc->psz_configfile[1] == '/' ) + { + char *psz = malloc( strlen(p_libvlc->psz_userdir) + + strlen(p_libvlc->psz_configfile) ); /* This is incomplete : we should also support the ~cmassiot/ syntax. */ - sprintf( psz, "%s/%s", p_vlc->psz_userdir, - p_vlc->psz_configfile + 2 ); - free( p_vlc->psz_configfile ); - p_vlc->psz_configfile = psz; + sprintf( psz, "%s/%s", p_libvlc->psz_userdir, + p_libvlc->psz_configfile + 2 ); + free( p_libvlc->psz_configfile ); + p_libvlc->psz_configfile = psz; } /* Check for plugins cache options */ - if( config_GetInt( p_vlc, "reset-plugins-cache" ) ) + if( config_GetInt( p_libvlc, "reset-plugins-cache" ) ) { - libvlc.p_module_bank->b_cache_delete = VLC_TRUE; + libvlc_global.p_module_bank->b_cache_delete = VLC_TRUE; } /* Hack: remove the help module here */ @@ -404,32 +405,32 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) /* End hack */ /* Will be re-done properly later on */ - p_vlc->p_libvlc->i_verbose = config_GetInt( p_vlc, "verbose" ); + p_libvlc->p_libvlc_global->i_verbose = config_GetInt( p_libvlc, "verbose" ); /* Check for daemon mode */ #ifndef WIN32 - if( config_GetInt( p_vlc, "daemon" ) ) + if( config_GetInt( p_libvlc, "daemon" ) ) { #if HAVE_DAEMON if( daemon( 1, 0) != 0 ) { - msg_Err( p_vlc, "Unable to fork vlc to daemon mode" ); + msg_Err( p_libvlc, "Unable to fork vlc to daemon mode" ); b_exit = VLC_TRUE; } - p_vlc->p_libvlc->b_daemon = VLC_TRUE; + p_libvlc->p_libvlc_global->b_daemon = VLC_TRUE; /* lets check if we need to write the pidfile */ - char * psz_pidfile = config_GetPsz( p_vlc, "pidfile" ); + char * psz_pidfile = config_GetPsz( p_libvlc, "pidfile" ); - msg_Dbg( p_vlc, "psz_pidfile is %s", psz_pidfile ); + msg_Dbg( p_libvlc, "psz_pidfile is %s", psz_pidfile ); if( psz_pidfile != NULL ) { FILE *pidfile; pid_t i_pid = getpid (); - msg_Dbg( p_vlc, "our PID is %d, writing it to %s", i_pid, psz_pidfile ); + msg_Dbg( p_libvlc, "our PID is %d, writing it to %s", i_pid, psz_pidfile ); pidfile = utf8_fopen( psz_pidfile,"w" ); if( pidfile != NULL ) @@ -439,7 +440,7 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) } else { - msg_Err( p_vlc, "Cannot open pid file for writing: %s, error: %s", + msg_Err( p_libvlc, "Cannot open pid file for writing: %s, error: %s", psz_pidfile, strerror(errno) ); } } @@ -451,25 +452,25 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) if( ( i_pid = fork() ) < 0 ) { - msg_Err( p_vlc, "Unable to fork vlc to daemon mode" ); + msg_Err( p_libvlc, "Unable to fork vlc to daemon mode" ); b_exit = VLC_TRUE; } else if( i_pid ) { /* This is the parent, exit right now */ - msg_Dbg( p_vlc, "closing parent process" ); + msg_Dbg( p_libvlc, "closing parent process" ); b_exit = VLC_TRUE; i_ret = VLC_EEXITSUCCESS; } else { /* We are the child */ - msg_Dbg( p_vlc, "daemon spawned" ); + msg_Dbg( p_libvlc, "daemon spawned" ); close( STDIN_FILENO ); close( STDOUT_FILENO ); close( STDERR_FILENO ); - p_vlc->p_libvlc->b_daemon = VLC_TRUE; + p_libvlc->p_libvlc_global->b_daemon = VLC_TRUE; } #endif } @@ -479,8 +480,8 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) { config_Free( p_help_module ); vlc_object_destroy( p_help_module ); - module_EndBank( p_vlc ); - if( i_object ) vlc_object_release( p_vlc ); + module_EndBank( p_libvlc ); + if( i_object ) vlc_object_release( p_libvlc ); return i_ret; } @@ -490,26 +491,26 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) # if defined (WIN32) || defined (__APPLE__) /* This ain't really nice to have to reload the config here but it seems * the only way to do it. */ - config_LoadConfigFile( p_vlc, "main" ); - config_LoadCmdLine( p_vlc, &i_argc, ppsz_argv, VLC_TRUE ); + config_LoadConfigFile( p_libvlc, "main" ); + config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE ); /* Check if the user specified a custom language */ - psz_language = config_GetPsz( p_vlc, "language" ); + psz_language = config_GetPsz( p_libvlc, "language" ); if( psz_language && *psz_language && strcmp( psz_language, "auto" ) ) { - vlc_bool_t b_cache_delete = libvlc.p_module_bank->b_cache_delete; + vlc_bool_t b_cache_delete = libvlc_global.p_module_bank->b_cache_delete; /* Reset the default domain */ SetLanguage( psz_language ); /* Translate "C" to the language code: "fr", "en_GB", "nl", "ru"... */ - msg_Dbg( p_vlc, "translation test: code is \"%s\"", _("C") ); + msg_Dbg( p_libvlc, "translation test: code is \"%s\"", _("C") ); - module_EndBank( p_vlc ); - module_InitBank( p_vlc ); - config_LoadConfigFile( p_vlc, "main" ); - config_LoadCmdLine( p_vlc, &i_argc, ppsz_argv, VLC_TRUE ); - libvlc.p_module_bank->b_cache_delete = b_cache_delete; + module_EndBank( p_libvlc ); + module_InitBank( p_libvlc ); + config_LoadConfigFile( p_libvlc, "main" ); + config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE ); + libvlc_global.p_module_bank->b_cache_delete = b_cache_delete; } if( psz_language ) free( psz_language ); # endif @@ -521,59 +522,59 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) * list of configuration options exported by each module and loads their * default values. */ - module_LoadBuiltins( p_vlc ); - module_LoadPlugins( p_vlc ); - if( p_vlc->b_die ) + module_LoadBuiltins( p_libvlc ); + module_LoadPlugins( p_libvlc ); + if( p_libvlc->b_die ) { b_exit = VLC_TRUE; } - msg_Dbg( p_vlc, "module bank initialized, found %i modules", - libvlc.p_module_bank->i_children ); + msg_Dbg( p_libvlc, "module bank initialized, found %i modules", + libvlc_global.p_module_bank->i_children ); /* Hack: insert the help module here */ - vlc_object_attach( p_help_module, libvlc.p_module_bank ); + vlc_object_attach( p_help_module, libvlc_global.p_module_bank ); /* End hack */ /* Check for help on modules */ - if( (p_tmp = config_GetPsz( p_vlc, "module" )) ) + if( (p_tmp = config_GetPsz( p_libvlc, "module" )) ) { - Help( p_vlc, p_tmp ); + Help( p_libvlc, p_tmp ); free( p_tmp ); b_exit = VLC_TRUE; i_ret = VLC_EEXITSUCCESS; } /* Check for long help option */ - else if( config_GetInt( p_vlc, "longhelp" ) ) + else if( config_GetInt( p_libvlc, "longhelp" ) ) { - Help( p_vlc, "longhelp" ); + Help( p_libvlc, "longhelp" ); b_exit = VLC_TRUE; i_ret = VLC_EEXITSUCCESS; } /* Check for module list option */ - else if( config_GetInt( p_vlc, "list" ) ) + else if( config_GetInt( p_libvlc, "list" ) ) { - ListModules( p_vlc ); + ListModules( p_libvlc ); b_exit = VLC_TRUE; i_ret = VLC_EEXITSUCCESS; } /* Check for config file options */ - if( config_GetInt( p_vlc, "reset-config" ) ) + if( config_GetInt( p_libvlc, "reset-config" ) ) { vlc_object_detach( p_help_module ); - config_ResetAll( p_vlc ); - config_LoadCmdLine( p_vlc, &i_argc, ppsz_argv, VLC_TRUE ); - config_SaveConfigFile( p_vlc, NULL ); - vlc_object_attach( p_help_module, libvlc.p_module_bank ); + config_ResetAll( p_libvlc ); + config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE ); + config_SaveConfigFile( p_libvlc, NULL ); + vlc_object_attach( p_help_module, libvlc_global.p_module_bank ); } - if( config_GetInt( p_vlc, "save-config" ) ) + if( config_GetInt( p_libvlc, "save-config" ) ) { vlc_object_detach( p_help_module ); - config_LoadConfigFile( p_vlc, NULL ); - config_LoadCmdLine( p_vlc, &i_argc, ppsz_argv, VLC_TRUE ); - config_SaveConfigFile( p_vlc, NULL ); - vlc_object_attach( p_help_module, libvlc.p_module_bank ); + config_LoadConfigFile( p_libvlc, NULL ); + config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_TRUE ); + config_SaveConfigFile( p_libvlc, NULL ); + vlc_object_attach( p_help_module, libvlc_global.p_module_bank ); } /* Hack: remove the help module here */ @@ -584,29 +585,29 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) { config_Free( p_help_module ); vlc_object_destroy( p_help_module ); - module_EndBank( p_vlc ); - if( i_object ) vlc_object_release( p_vlc ); + module_EndBank( p_libvlc ); + if( i_object ) vlc_object_release( p_libvlc ); return i_ret; } /* * Init device values */ - InitDeviceValues( p_vlc ); + InitDeviceValues( p_libvlc ); /* * Override default configuration with config file settings */ - config_LoadConfigFile( p_vlc, NULL ); + config_LoadConfigFile( p_libvlc, NULL ); /* Hack: insert the help module here */ - vlc_object_attach( p_help_module, libvlc.p_module_bank ); + vlc_object_attach( p_help_module, libvlc_global.p_module_bank ); /* End hack */ /* * Override configuration with command line settings */ - if( config_LoadCmdLine( p_vlc, &i_argc, ppsz_argv, VLC_FALSE ) ) + if( config_LoadCmdLine( p_libvlc, &i_argc, ppsz_argv, VLC_FALSE ) ) { #ifdef WIN32 ShowConsole( VLC_FALSE ); @@ -618,8 +619,8 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) vlc_object_detach( p_help_module ); config_Free( p_help_module ); vlc_object_destroy( p_help_module ); - module_EndBank( p_vlc ); - if( i_object ) vlc_object_release( p_vlc ); + module_EndBank( p_libvlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_EGENERIC; } @@ -632,52 +633,53 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) /* * System specific configuration */ - system_Configure( p_vlc, &i_argc, ppsz_argv ); + system_Configure( p_libvlc, &i_argc, ppsz_argv ); /* * Message queue options */ - var_Create( p_vlc, "verbose", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); - if( config_GetInt( p_vlc, "quiet" ) ) + var_Create( p_libvlc, "verbose", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); + if( config_GetInt( p_libvlc, "quiet" ) ) { val.i_int = -1; - var_Set( p_vlc, "verbose", val ); + var_Set( p_libvlc, "verbose", val ); } - var_AddCallback( p_vlc, "verbose", VerboseCallback, NULL ); - var_Change( p_vlc, "verbose", VLC_VAR_TRIGGER_CALLBACKS, NULL, NULL ); + var_AddCallback( p_libvlc, "verbose", VerboseCallback, NULL ); + var_Change( p_libvlc, "verbose", VLC_VAR_TRIGGER_CALLBACKS, NULL, NULL ); - libvlc.b_color = libvlc.b_color && config_GetInt( p_vlc, "color" ); + libvlc_global.b_color = libvlc_global.b_color && + config_GetInt( p_libvlc, "color" ); /* * Output messages that may still be in the queue */ - msg_Flush( p_vlc ); + msg_Flush( p_libvlc ); - /* p_vlc initialization. FIXME ? */ + /* p_libvlc initialization. FIXME ? */ - if( !config_GetInt( p_vlc, "fpu" ) ) - libvlc.i_cpu &= ~CPU_CAPABILITY_FPU; + if( !config_GetInt( p_libvlc, "fpu" ) ) + libvlc_global.i_cpu &= ~CPU_CAPABILITY_FPU; #if defined( __i386__ ) || defined( __x86_64__ ) - if( !config_GetInt( p_vlc, "mmx" ) ) - libvlc.i_cpu &= ~CPU_CAPABILITY_MMX; - if( !config_GetInt( p_vlc, "3dn" ) ) - libvlc.i_cpu &= ~CPU_CAPABILITY_3DNOW; - if( !config_GetInt( p_vlc, "mmxext" ) ) - libvlc.i_cpu &= ~CPU_CAPABILITY_MMXEXT; - if( !config_GetInt( p_vlc, "sse" ) ) - libvlc.i_cpu &= ~CPU_CAPABILITY_SSE; - if( !config_GetInt( p_vlc, "sse2" ) ) - libvlc.i_cpu &= ~CPU_CAPABILITY_SSE2; + if( !config_GetInt( p_libvlc, "mmx" ) ) + libvlc_global.i_cpu &= ~CPU_CAPABILITY_MMX; + if( !config_GetInt( p_libvlc, "3dn" ) ) + libvlc_global.i_cpu &= ~CPU_CAPABILITY_3DNOW; + if( !config_GetInt( p_libvlc, "mmxext" ) ) + libvlc_global.i_cpu &= ~CPU_CAPABILITY_MMXEXT; + if( !config_GetInt( p_libvlc, "sse" ) ) + libvlc_global.i_cpu &= ~CPU_CAPABILITY_SSE; + if( !config_GetInt( p_libvlc, "sse2" ) ) + libvlc_global.i_cpu &= ~CPU_CAPABILITY_SSE2; #endif #if defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ ) - if( !config_GetInt( p_vlc, "altivec" ) ) - libvlc.i_cpu &= ~CPU_CAPABILITY_ALTIVEC; + if( !config_GetInt( p_libvlc, "altivec" ) ) + libvlc_global.i_cpu &= ~CPU_CAPABILITY_ALTIVEC; #endif #define PRINT_CAPABILITY( capability, string ) \ - if( libvlc.i_cpu & capability ) \ + if( libvlc_global.i_cpu & capability ) \ { \ strncat( p_capabilities, string " ", \ sizeof(p_capabilities) - strlen(p_capabilities) ); \ @@ -695,49 +697,49 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) PRINT_CAPABILITY( CPU_CAPABILITY_SSE2, "SSE2" ); PRINT_CAPABILITY( CPU_CAPABILITY_ALTIVEC, "AltiVec" ); PRINT_CAPABILITY( CPU_CAPABILITY_FPU, "FPU" ); - msg_Dbg( p_vlc, "CPU has capabilities %s", p_capabilities ); + msg_Dbg( p_libvlc, "CPU has capabilities %s", p_capabilities ); /* * Choose the best memcpy module */ - p_vlc->p_memcpy_module = module_Need( p_vlc, "memcpy", "$memcpy", 0 ); + p_libvlc->p_memcpy_module = module_Need( p_libvlc, "memcpy", "$memcpy", 0 ); - if( p_vlc->pf_memcpy == NULL ) + if( p_libvlc->pf_memcpy == NULL ) { - p_vlc->pf_memcpy = memcpy; + p_libvlc->pf_memcpy = memcpy; } - if( p_vlc->pf_memset == NULL ) + if( p_libvlc->pf_memset == NULL ) { - p_vlc->pf_memset = memset; + p_libvlc->pf_memset = memset; } - libvlc.b_stats = config_GetInt( p_vlc, "stats" ); - libvlc.i_timers = 0; - libvlc.pp_timers = NULL; - vlc_mutex_init( p_vlc, &libvlc.timer_lock ); + libvlc_global.b_stats = config_GetInt( p_libvlc, "stats" ); + libvlc_global.i_timers = 0; + libvlc_global.pp_timers = NULL; + vlc_mutex_init( p_libvlc, &libvlc_global.timer_lock ); /* * Initialize hotkey handling */ - var_Create( p_vlc, "key-pressed", VLC_VAR_INTEGER ); - p_vlc->p_hotkeys = malloc( sizeof(p_hotkeys) ); + var_Create( p_libvlc, "key-pressed", VLC_VAR_INTEGER ); + p_libvlc->p_hotkeys = malloc( sizeof(p_hotkeys) ); /* Do a copy (we don't need to modify the strings) */ - memcpy( p_vlc->p_hotkeys, p_hotkeys, sizeof(p_hotkeys) ); + memcpy( p_libvlc->p_hotkeys, p_hotkeys, sizeof(p_hotkeys) ); /* * Initialize playlist and get commandline files */ - p_playlist = playlist_ThreadCreate( p_vlc ); + p_playlist = playlist_ThreadCreate( p_libvlc ); if( !p_playlist ) { - msg_Err( p_vlc, "playlist initialization failed" ); - if( p_vlc->p_memcpy_module != NULL ) + msg_Err( p_libvlc, "playlist initialization failed" ); + if( p_libvlc->p_memcpy_module != NULL ) { - module_Unneed( p_vlc, p_vlc->p_memcpy_module ); + module_Unneed( p_libvlc, p_libvlc->p_memcpy_module ); } - module_EndBank( p_vlc ); - if( i_object ) vlc_object_release( p_vlc ); + module_EndBank( p_libvlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_EGENERIC; } @@ -752,8 +754,8 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) /* * Load background interfaces */ - psz_modules = config_GetPsz( p_vlc, "extraintf" ); - psz_control = config_GetPsz( p_vlc, "control" ); + psz_modules = config_GetPsz( p_libvlc, "extraintf" ); + psz_control = config_GetPsz( p_libvlc, "control" ); if( psz_modules && *psz_modules && psz_control && *psz_control ) { @@ -801,68 +803,68 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) * Currently, only for X */ #ifdef HAVE_X11_XLIB_H - if( config_GetInt( p_vlc, "disable-screensaver" ) == 1 ) + if( config_GetInt( p_libvlc, "disable-screensaver" ) == 1 ) { VLC_AddIntf( 0, "screensaver,none", VLC_FALSE, VLC_FALSE ); } #endif - if( config_GetInt( p_vlc, "file-logging" ) == 1 ) + if( config_GetInt( p_libvlc, "file-logging" ) == 1 ) { VLC_AddIntf( 0, "logger,none", VLC_FALSE, VLC_FALSE ); } #ifdef HAVE_SYSLOG_H - if( config_GetInt( p_vlc, "syslog" ) == 1 ) + if( config_GetInt( p_libvlc, "syslog" ) == 1 ) { char *psz_logmode = "logmode=syslog"; AddIntfInternal( 0, "logger,none", VLC_FALSE, VLC_FALSE, 1, &psz_logmode ); } #endif - if( config_GetInt( p_vlc, "show-intf" ) == 1 ) + if( config_GetInt( p_libvlc, "show-intf" ) == 1 ) { VLC_AddIntf( 0, "showintf,none", VLC_FALSE, VLC_FALSE ); } - if( config_GetInt( p_vlc, "network-synchronisation") == 1 ) + if( config_GetInt( p_libvlc, "network-synchronisation") == 1 ) { VLC_AddIntf( 0, "netsync,none", VLC_FALSE, VLC_FALSE ); } /* - * FIXME: kludge to use a p_vlc-local variable for the Mozilla plugin + * FIXME: kludge to use a p_libvlc-local variable for the Mozilla plugin */ - var_Create( p_vlc, "drawable", VLC_VAR_INTEGER ); - var_Create( p_vlc, "drawable-view-top", VLC_VAR_INTEGER ); - var_Create( p_vlc, "drawable-view-left", VLC_VAR_INTEGER ); - var_Create( p_vlc, "drawable-view-bottom", VLC_VAR_INTEGER ); - var_Create( p_vlc, "drawable-view-right", VLC_VAR_INTEGER ); - var_Create( p_vlc, "drawable-clip-top", VLC_VAR_INTEGER ); - var_Create( p_vlc, "drawable-clip-left", VLC_VAR_INTEGER ); - var_Create( p_vlc, "drawable-clip-bottom", VLC_VAR_INTEGER ); - var_Create( p_vlc, "drawable-clip-right", VLC_VAR_INTEGER ); + var_Create( p_libvlc, "drawable", VLC_VAR_INTEGER ); + var_Create( p_libvlc, "drawable-view-top", VLC_VAR_INTEGER ); + var_Create( p_libvlc, "drawable-view-left", VLC_VAR_INTEGER ); + var_Create( p_libvlc, "drawable-view-bottom", VLC_VAR_INTEGER ); + var_Create( p_libvlc, "drawable-view-right", VLC_VAR_INTEGER ); + var_Create( p_libvlc, "drawable-clip-top", VLC_VAR_INTEGER ); + var_Create( p_libvlc, "drawable-clip-left", VLC_VAR_INTEGER ); + var_Create( p_libvlc, "drawable-clip-bottom", VLC_VAR_INTEGER ); + var_Create( p_libvlc, "drawable-clip-right", VLC_VAR_INTEGER ); /* Create volume callback system. */ - var_Create( p_vlc, "volume-change", VLC_VAR_BOOL ); + var_Create( p_libvlc, "volume-change", VLC_VAR_BOOL ); /* * Get input filenames given as commandline arguments */ - GetFilenames( p_vlc, i_argc, ppsz_argv ); + GetFilenames( p_libvlc, i_argc, ppsz_argv ); /* * Get --open argument */ - var_Create( p_vlc, "open", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); - var_Get( p_vlc, "open", &val ); + var_Create( p_libvlc, "open", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); + var_Get( p_libvlc, "open", &val ); if ( val.psz_string != NULL && *val.psz_string ) { - VLC_AddTarget( p_vlc->i_object_id, val.psz_string, NULL, 0, + VLC_AddTarget( p_libvlc->i_object_id, val.psz_string, NULL, 0, PLAYLIST_INSERT, 0 ); } if ( val.psz_string != NULL ) free( val.psz_string ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_SUCCESS; } @@ -890,16 +892,16 @@ int VLC_AddIntf( int i_object, char const *psz_module, *****************************************************************************/ int VLC_Die( int i_object ) { - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_vlc->b_die = VLC_TRUE; + p_libvlc->b_die = VLC_TRUE; - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_SUCCESS; } @@ -913,10 +915,10 @@ int VLC_CleanUp( int i_object ) vout_thread_t * p_vout; aout_instance_t * p_aout; announce_handler_t * p_announce; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } @@ -924,8 +926,8 @@ int VLC_CleanUp( int i_object ) /* * Ask the interfaces to stop and destroy them */ - msg_Dbg( p_vlc, "removing all interfaces" ); - while( (p_intf = vlc_object_find( p_vlc, VLC_OBJECT_INTF, FIND_CHILD )) ) + msg_Dbg( p_libvlc, "removing all interfaces" ); + while( (p_intf = vlc_object_find( p_libvlc, VLC_OBJECT_INTF, FIND_CHILD )) ) { intf_StopThread( p_intf ); vlc_object_detach( p_intf ); @@ -936,8 +938,8 @@ int VLC_CleanUp( int i_object ) /* * Free playlist */ - msg_Dbg( p_vlc, "removing playlist handler" ); - while( (p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST, + msg_Dbg( p_libvlc, "removing playlist handler" ); + while( (p_playlist = vlc_object_find( p_libvlc, VLC_OBJECT_PLAYLIST, FIND_CHILD )) ) { vlc_object_detach( p_playlist ); @@ -948,8 +950,8 @@ int VLC_CleanUp( int i_object ) /* * Free video outputs */ - msg_Dbg( p_vlc, "removing all video outputs" ); - while( (p_vout = vlc_object_find( p_vlc, VLC_OBJECT_VOUT, FIND_CHILD )) ) + msg_Dbg( p_libvlc, "removing all video outputs" ); + while( (p_vout = vlc_object_find( p_libvlc, VLC_OBJECT_VOUT, FIND_CHILD )) ) { vlc_object_detach( p_vout ); vlc_object_release( p_vout ); @@ -959,30 +961,30 @@ int VLC_CleanUp( int i_object ) /* * Free audio outputs */ - msg_Dbg( p_vlc, "removing all audio outputs" ); - while( (p_aout = vlc_object_find( p_vlc, VLC_OBJECT_AOUT, FIND_CHILD )) ) + msg_Dbg( p_libvlc, "removing all audio outputs" ); + while( (p_aout = vlc_object_find( p_libvlc, VLC_OBJECT_AOUT, FIND_CHILD )) ) { vlc_object_detach( (vlc_object_t *)p_aout ); vlc_object_release( (vlc_object_t *)p_aout ); aout_Delete( p_aout ); } - stats_TimersDumpAll( p_vlc ); - stats_TimersClean( p_vlc ); + stats_TimersDumpAll( p_libvlc ); + stats_TimersClean( p_libvlc ); /* * Free announce handler(s?) */ - while( (p_announce = vlc_object_find( p_vlc, VLC_OBJECT_ANNOUNCE, + while( (p_announce = vlc_object_find( p_libvlc, VLC_OBJECT_ANNOUNCE, FIND_CHILD ) ) ) { - msg_Dbg( p_vlc, "removing announce handler" ); + msg_Dbg( p_libvlc, "removing announce handler" ); vlc_object_detach( p_announce ); vlc_object_release( p_announce ); announce_HandlerDestroy( p_announce ); } - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_SUCCESS; } @@ -994,9 +996,9 @@ int VLC_CleanUp( int i_object ) *****************************************************************************/ int VLC_Destroy( int i_object ) { - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } @@ -1004,68 +1006,68 @@ int VLC_Destroy( int i_object ) /* * Free allocated memory */ - if( p_vlc->p_memcpy_module ) + if( p_libvlc->p_memcpy_module ) { - module_Unneed( p_vlc, p_vlc->p_memcpy_module ); - p_vlc->p_memcpy_module = NULL; + module_Unneed( p_libvlc, p_libvlc->p_memcpy_module ); + p_libvlc->p_memcpy_module = NULL; } /* * Free module bank ! */ - module_EndBank( p_vlc ); + module_EndBank( p_libvlc ); - if( p_vlc->psz_homedir ) + if( p_libvlc->psz_homedir ) { - free( p_vlc->psz_homedir ); - p_vlc->psz_homedir = NULL; + free( p_libvlc->psz_homedir ); + p_libvlc->psz_homedir = NULL; } - if( p_vlc->psz_userdir ) + if( p_libvlc->psz_userdir ) { - free( p_vlc->psz_userdir ); - p_vlc->psz_userdir = NULL; + free( p_libvlc->psz_userdir ); + p_libvlc->psz_userdir = NULL; } - if( p_vlc->psz_configfile ) + if( p_libvlc->psz_configfile ) { - free( p_vlc->psz_configfile ); - p_vlc->psz_configfile = NULL; + free( p_libvlc->psz_configfile ); + p_libvlc->psz_configfile = NULL; } - if( p_vlc->p_hotkeys ) + if( p_libvlc->p_hotkeys ) { - free( p_vlc->p_hotkeys ); - p_vlc->p_hotkeys = NULL; + free( p_libvlc->p_hotkeys ); + p_libvlc->p_hotkeys = NULL; } /* * System specific cleaning code */ - system_End( p_vlc ); + system_End( p_libvlc ); /* * Free message queue. * Nobody shall use msg_* afterward. */ - msg_Flush( p_vlc ); - msg_Destroy( p_libvlc ); + msg_Flush( p_libvlc ); + msg_Destroy( p_libvlc_global ); /* Destroy global iconv */ LocaleDeinit(); /* Destroy mutexes */ - vlc_mutex_destroy( &p_vlc->config_lock ); + vlc_mutex_destroy( &p_libvlc->config_lock ); - vlc_object_detach( p_vlc ); + vlc_object_detach( p_libvlc ); /* Release object before destroying it */ - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); - vlc_object_destroy( p_vlc ); + vlc_object_destroy( p_libvlc ); /* Stop thread system: last one out please shut the door! */ - vlc_threads_end( p_libvlc ); + vlc_threads_end( p_libvlc_global ); return VLC_SUCCESS; } @@ -1075,10 +1077,10 @@ int VLC_Destroy( int i_object ) *****************************************************************************/ int VLC_VariableSet( int i_object, char const *psz_var, vlc_value_t value ) { - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); int i_ret; - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } @@ -1090,33 +1092,33 @@ int VLC_VariableSet( int i_object, char const *psz_var, vlc_value_t value ) module_config_t *p_item; char const *psz_newvar = psz_var + 6; - p_item = config_FindConfig( VLC_OBJECT(p_vlc), psz_newvar ); + p_item = config_FindConfig( VLC_OBJECT(p_libvlc), psz_newvar ); if( p_item ) { switch( p_item->i_type ) { case CONFIG_ITEM_BOOL: - config_PutInt( p_vlc, psz_newvar, value.b_bool ); + config_PutInt( p_libvlc, psz_newvar, value.b_bool ); break; case CONFIG_ITEM_INTEGER: - config_PutInt( p_vlc, psz_newvar, value.i_int ); + config_PutInt( p_libvlc, psz_newvar, value.i_int ); break; case CONFIG_ITEM_FLOAT: - config_PutFloat( p_vlc, psz_newvar, value.f_float ); + config_PutFloat( p_libvlc, psz_newvar, value.f_float ); break; default: - config_PutPsz( p_vlc, psz_newvar, value.psz_string ); + config_PutPsz( p_libvlc, psz_newvar, value.psz_string ); break; } - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_SUCCESS; } } - i_ret = var_Set( p_vlc, psz_var, value ); + i_ret = var_Set( p_libvlc, psz_var, value ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return i_ret; } @@ -1125,17 +1127,17 @@ int VLC_VariableSet( int i_object, char const *psz_var, vlc_value_t value ) *****************************************************************************/ int VLC_VariableGet( int i_object, char const *psz_var, vlc_value_t *p_value ) { - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); int i_ret; - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - i_ret = var_Get( p_vlc , psz_var, p_value ); + i_ret = var_Get( p_libvlc , psz_var, p_value ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return i_ret; } @@ -1145,9 +1147,9 @@ int VLC_VariableGet( int i_object, char const *psz_var, vlc_value_t *p_value ) int VLC_VariableType( int i_object, char const *psz_var, int *pi_type ) { int i_type; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } @@ -1159,7 +1161,7 @@ int VLC_VariableType( int i_object, char const *psz_var, int *pi_type ) module_config_t *p_item; char const *psz_newvar = psz_var + 6; - p_item = config_FindConfig( VLC_OBJECT(p_vlc), psz_newvar ); + p_item = config_FindConfig( VLC_OBJECT(p_libvlc), psz_newvar ); if( p_item ) { @@ -1183,9 +1185,9 @@ int VLC_VariableType( int i_object, char const *psz_var, int *pi_type ) i_type = 0; } else - i_type = VLC_VAR_TYPE & var_Type( p_vlc , psz_var ); + i_type = VLC_VAR_TYPE & var_Type( p_libvlc , psz_var ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); if( i_type > 0 ) { @@ -1207,23 +1209,23 @@ int VLC_AddTarget( int i_object, char const *psz_target, { int i_err; playlist_t *p_playlist; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); + p_playlist = vlc_object_find( p_libvlc, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); if( p_playlist == NULL ) { - msg_Dbg( p_vlc, "no playlist present, creating one" ); - p_playlist = playlist_ThreadCreate( p_vlc ); + msg_Dbg( p_libvlc, "no playlist present, creating one" ); + p_playlist = playlist_ThreadCreate( p_libvlc ); if( p_playlist == NULL ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_EGENERIC; } @@ -1235,7 +1237,7 @@ int VLC_AddTarget( int i_object, char const *psz_target, vlc_object_release( p_playlist ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return i_err; } @@ -1245,26 +1247,26 @@ int VLC_AddTarget( int i_object, char const *psz_target, int VLC_Play( int i_object ) { playlist_t * p_playlist; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); + p_playlist = vlc_object_find( p_libvlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); if( !p_playlist ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } playlist_Play( p_playlist ); vlc_object_release( p_playlist ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_SUCCESS; } @@ -1274,26 +1276,26 @@ int VLC_Play( int i_object ) int VLC_Pause( int i_object ) { playlist_t * p_playlist; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); + p_playlist = vlc_object_find( p_libvlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); if( !p_playlist ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } playlist_Pause( p_playlist ); vlc_object_release( p_playlist ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_SUCCESS; } @@ -1303,26 +1305,26 @@ int VLC_Pause( int i_object ) int VLC_Stop( int i_object ) { playlist_t * p_playlist; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); + p_playlist = vlc_object_find( p_libvlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); if( !p_playlist ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } playlist_Stop( p_playlist ); vlc_object_release( p_playlist ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_SUCCESS; } @@ -1334,19 +1336,19 @@ vlc_bool_t VLC_IsPlaying( int i_object ) playlist_t * p_playlist; vlc_bool_t b_playing; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); + p_playlist = vlc_object_find( p_libvlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); if( !p_playlist ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } @@ -1362,7 +1364,7 @@ vlc_bool_t VLC_IsPlaying( int i_object ) } vlc_object_release( p_playlist ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return b_playing; } @@ -1379,26 +1381,26 @@ float VLC_PositionGet( int i_object ) { input_thread_t *p_input; vlc_value_t val; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_input = vlc_object_find( p_vlc, VLC_OBJECT_INPUT, FIND_CHILD ); + p_input = vlc_object_find( p_libvlc, VLC_OBJECT_INPUT, FIND_CHILD ); if( !p_input ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } var_Get( p_input, "position", &val ); vlc_object_release( p_input ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return val.f_float; } @@ -1417,19 +1419,19 @@ float VLC_PositionSet( int i_object, float i_position ) { input_thread_t *p_input; vlc_value_t val; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_input = vlc_object_find( p_vlc, VLC_OBJECT_INPUT, FIND_CHILD ); + p_input = vlc_object_find( p_libvlc, VLC_OBJECT_INPUT, FIND_CHILD ); if( !p_input ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } @@ -1438,7 +1440,7 @@ float VLC_PositionSet( int i_object, float i_position ) var_Get( p_input, "position", &val ); vlc_object_release( p_input ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return val.f_float; } @@ -1455,26 +1457,26 @@ int VLC_TimeGet( int i_object ) { input_thread_t *p_input; vlc_value_t val; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_input = vlc_object_find( p_vlc, VLC_OBJECT_INPUT, FIND_CHILD ); + p_input = vlc_object_find( p_libvlc, VLC_OBJECT_INPUT, FIND_CHILD ); if( !p_input ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } var_Get( p_input, "time", &val ); vlc_object_release( p_input ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return val.i_time / 1000000; } @@ -1495,19 +1497,19 @@ int VLC_TimeSet( int i_object, int i_seconds, vlc_bool_t b_relative ) { input_thread_t *p_input; vlc_value_t val; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_input = vlc_object_find( p_vlc, VLC_OBJECT_INPUT, FIND_CHILD ); + p_input = vlc_object_find( p_libvlc, VLC_OBJECT_INPUT, FIND_CHILD ); if( !p_input ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } @@ -1525,7 +1527,7 @@ int VLC_TimeSet( int i_object, int i_seconds, vlc_bool_t b_relative ) } vlc_object_release( p_input ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_SUCCESS; } @@ -1542,26 +1544,26 @@ int VLC_LengthGet( int i_object ) { input_thread_t *p_input; vlc_value_t val; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_input = vlc_object_find( p_vlc, VLC_OBJECT_INPUT, FIND_CHILD ); + p_input = vlc_object_find( p_libvlc, VLC_OBJECT_INPUT, FIND_CHILD ); if( !p_input ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } var_Get( p_input, "length", &val ); vlc_object_release( p_input ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return val.i_time / 1000000L; } @@ -1578,19 +1580,19 @@ float VLC_SpeedFaster( int i_object ) { input_thread_t *p_input; vlc_value_t val; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_input = vlc_object_find( p_vlc, VLC_OBJECT_INPUT, FIND_CHILD ); + p_input = vlc_object_find( p_libvlc, VLC_OBJECT_INPUT, FIND_CHILD ); if( !p_input ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } @@ -1599,7 +1601,7 @@ float VLC_SpeedFaster( int i_object ) var_Get( p_input, "rate", &val ); vlc_object_release( p_input ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return val.f_float / INPUT_RATE_DEFAULT; } @@ -1616,19 +1618,19 @@ float VLC_SpeedSlower( int i_object ) { input_thread_t *p_input; vlc_value_t val; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_input = vlc_object_find( p_vlc, VLC_OBJECT_INPUT, FIND_CHILD ); + p_input = vlc_object_find( p_libvlc, VLC_OBJECT_INPUT, FIND_CHILD ); if( !p_input ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } @@ -1637,7 +1639,7 @@ float VLC_SpeedSlower( int i_object ) var_Get( p_input, "rate", &val ); vlc_object_release( p_input ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return val.f_float / INPUT_RATE_DEFAULT; } @@ -1666,26 +1668,26 @@ int VLC_PlaylistNumberOfItems( int i_object ) { int i_size; playlist_t * p_playlist; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); + p_playlist = vlc_object_find( p_libvlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); if( !p_playlist ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } i_size = p_playlist->i_size; vlc_object_release( p_playlist ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return i_size; } @@ -1700,26 +1702,26 @@ int VLC_PlaylistNumberOfItems( int i_object ) int VLC_PlaylistNext( int i_object ) { playlist_t * p_playlist; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); + p_playlist = vlc_object_find( p_libvlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); if( !p_playlist ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } playlist_Next( p_playlist ); vlc_object_release( p_playlist ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_SUCCESS; } @@ -1734,26 +1736,26 @@ int VLC_PlaylistNext( int i_object ) int VLC_PlaylistPrev( int i_object ) { playlist_t * p_playlist; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); + p_playlist = vlc_object_find( p_libvlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); if( !p_playlist ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } playlist_Prev( p_playlist ); vlc_object_release( p_playlist ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_SUCCESS; } @@ -1764,19 +1766,19 @@ int VLC_PlaylistPrev( int i_object ) int VLC_PlaylistClear( int i_object ) { playlist_t * p_playlist; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); + p_playlist = vlc_object_find( p_libvlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); if( !p_playlist ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } @@ -1784,7 +1786,7 @@ int VLC_PlaylistClear( int i_object ) vlc_object_release( p_playlist ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_SUCCESS; } @@ -1798,10 +1800,10 @@ int VLC_PlaylistClear( int i_object ) int VLC_VolumeSet( int i_object, int i_volume ) { audio_volume_t i_vol = 0; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } @@ -1809,10 +1811,10 @@ int VLC_VolumeSet( int i_object, int i_volume ) if( i_volume >= 0 && i_volume <= 200 ) { i_vol = i_volume * AOUT_VOLUME_MAX / 200; - aout_VolumeSet( p_vlc, i_vol ); + aout_VolumeSet( p_libvlc, i_vol ); } - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return i_vol * 200 / AOUT_VOLUME_MAX; } @@ -1827,17 +1829,17 @@ int VLC_VolumeSet( int i_object, int i_volume ) int VLC_VolumeGet( int i_object ) { audio_volume_t i_volume; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - aout_VolumeGet( p_vlc, &i_volume ); + aout_VolumeGet( p_libvlc, &i_volume ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return i_volume*200/AOUT_VOLUME_MAX; } @@ -1849,17 +1851,17 @@ int VLC_VolumeGet( int i_object ) */ int VLC_VolumeMute( int i_object ) { - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); /* Check that the handle is valid */ - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - aout_VolumeMute( p_vlc, NULL ); + aout_VolumeMute( p_libvlc, NULL ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_SUCCESS; } @@ -1869,25 +1871,25 @@ int VLC_VolumeMute( int i_object ) int VLC_FullScreen( int i_object ) { vout_thread_t *p_vout; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } - p_vout = vlc_object_find( p_vlc, VLC_OBJECT_VOUT, FIND_CHILD ); + p_vout = vlc_object_find( p_libvlc, VLC_OBJECT_VOUT, FIND_CHILD ); if( !p_vout ) { - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_ENOOBJ; } p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; vlc_object_release( p_vout ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_SUCCESS; } @@ -1900,32 +1902,32 @@ static int AddIntfInternal( int i_object, char const *psz_module, { int i_err; intf_thread_t *p_intf; - vlc_t *p_vlc = vlc_current_object( i_object ); + libvlc_int_t *p_libvlc = vlc_current_object( i_object ); - if( !p_vlc ) + if( !p_libvlc ) { return VLC_ENOOBJ; } #ifndef WIN32 - if( p_vlc->p_libvlc->b_daemon && b_block && !psz_module ) + if( p_libvlc->p_libvlc_global->b_daemon && b_block && !psz_module ) { /* Daemon mode hack. * We prefer the dummy interface if none is specified. */ - char *psz_interface = config_GetPsz( p_vlc, "intf" ); + char *psz_interface = config_GetPsz( p_libvlc, "intf" ); if( !psz_interface || !*psz_interface ) psz_module = "dummy"; if( psz_interface ) free( psz_interface ); } #endif /* Try to create the interface */ - p_intf = intf_Create( p_vlc, psz_module ? psz_module : "$intf", + p_intf = intf_Create( p_libvlc, psz_module ? psz_module : "$intf", i_options, ppsz_options ); if( p_intf == NULL ) { - msg_Err( p_vlc, "interface \"%s\" initialization failed", psz_module ); - if( i_object ) vlc_object_release( p_vlc ); + msg_Err( p_libvlc, "interface \"%s\" initialization failed", psz_module ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_EGENERIC; } @@ -1940,11 +1942,11 @@ static int AddIntfInternal( int i_object, char const *psz_module, { vlc_object_detach( p_intf ); intf_Destroy( p_intf ); - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return i_err; } - if( i_object ) vlc_object_release( p_vlc ); + if( i_object ) vlc_object_release( p_libvlc ); return VLC_SUCCESS; }; @@ -1998,7 +2000,7 @@ static void SetLanguage ( char const *psz_lang ) #if !defined( __APPLE__ ) && !defined( WIN32 ) && !defined( SYS_BEOS ) psz_path = LOCALEDIR; #else - snprintf( psz_tmp, sizeof(psz_tmp), "%s/%s", libvlc.psz_vlcpath, + snprintf( psz_tmp, sizeof(psz_tmp), "%s/%s", libvlc_global.psz_vlcpath, "locale" ); psz_path = psz_tmp; #endif @@ -2019,7 +2021,7 @@ static void SetLanguage ( char const *psz_lang ) * Parse command line for input files as well as their associated options. * An option always follows its associated input and begins with a ":". *****************************************************************************/ -static int GetFilenames( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] ) +static int GetFilenames( libvlc_int_t *p_vlc, int i_argc, char *ppsz_argv[] ) { int i_opt, i_options; @@ -2056,7 +2058,7 @@ static int GetFilenames( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] ) ***************************************************************************** * Print a short inline help. Message interface is initialized at this stage. *****************************************************************************/ -static void Help( vlc_t *p_this, char const *psz_help_name ) +static void Help( libvlc_int_t *p_this, char const *psz_help_name ) { #ifdef WIN32 ShowConsole( VLC_TRUE ); @@ -2088,7 +2090,7 @@ static void Help( vlc_t *p_this, char const *psz_help_name ) ***************************************************************************** * Print a short inline help. Message interface is initialized at this stage. *****************************************************************************/ -static void Usage( vlc_t *p_this, char const *psz_module_name ) +static void Usage( libvlc_int_t *p_this, char const *psz_module_name ) { #define FORMAT_STRING " %s --%s%s%s%s%s%s%s " /* short option ------' | | | | | | | @@ -2372,7 +2374,7 @@ static void Usage( vlc_t *p_this, char const *psz_module_name ) * Print a list of all available modules (builtins and plugins) and a short * description for each one. *****************************************************************************/ -static void ListModules( vlc_t *p_this ) +static void ListModules( libvlc_int_t *p_this ) { vlc_list_t *p_list; module_t *p_parser; @@ -2535,11 +2537,11 @@ static int ConsoleWidth( void ) static int VerboseCallback( vlc_object_t *p_this, const char *psz_variable, vlc_value_t old_val, vlc_value_t new_val, void *param) { - vlc_t *p_vlc = (vlc_t *)p_this; + libvlc_int_t *p_vlc = (libvlc_int_t *)p_this; if( new_val.i_int >= -1 ) { - p_vlc->p_libvlc->i_verbose = __MIN( new_val.i_int, 2 ); + p_vlc->p_libvlc_global->i_verbose = __MIN( new_val.i_int, 2 ); } return VLC_SUCCESS; } @@ -2549,7 +2551,7 @@ static int VerboseCallback( vlc_object_t *p_this, const char *psz_variable, ***************************************************************************** * This function inits the dvd, vcd and cd-audio values *****************************************************************************/ -static void InitDeviceValues( vlc_t *p_vlc ) +static void InitDeviceValues( libvlc_int_t *p_vlc ) { #ifdef HAVE_HAL LibHalContext * ctx; diff --git a/src/misc/beos_specific.cpp b/src/misc/beos_specific.cpp index 7e0e74c29d..aa36cc6434 100644 --- a/src/misc/beos_specific.cpp +++ b/src/misc/beos_specific.cpp @@ -79,11 +79,11 @@ static void AppThread( vlc_object_t *p_appthread ); *****************************************************************************/ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) { - p_this->p_libvlc->p_appthread = + p_this->p_libvlc_global->p_appthread = (vlc_object_t *)vlc_object_create( p_this, sizeof(vlc_object_t) ); /* Create the BApplication thread and wait for initialization */ - vlc_thread_create( p_this->p_libvlc->p_appthread, "app thread", AppThread, + vlc_thread_create( p_this->p_libvlc_global->p_appthread, "app thread", AppThread, VLC_THREAD_PRIORITY_LOW, VLC_TRUE ); } @@ -102,10 +102,10 @@ void system_End( vlc_t *p_this ) /* Tell the BApplication to die */ be_app->PostMessage( REALLY_QUIT ); - vlc_thread_join( p_this->p_libvlc->p_appthread ); - vlc_object_destroy( p_this->p_libvlc->p_appthread ); + vlc_thread_join( p_this->p_libvlc_global->p_appthread ); + vlc_object_destroy( p_this->p_libvlc_global->p_appthread ); - free( p_this->p_libvlc->psz_vlcpath ); + free( p_this->p_libvlc_global->psz_vlcpath ); } /* following functions are local */ @@ -117,7 +117,7 @@ static void AppThread( vlc_object_t * p_this ) { VlcApplication * BeApp = new VlcApplication("application/x-vnd.videolan-vlc"); - vlc_object_attach( p_this, p_this->p_vlc ); + vlc_object_attach( p_this, p_this->p_libvlc ); BeApp->p_this = p_this; BeApp->Run(); vlc_object_detach( p_this ); @@ -172,7 +172,7 @@ void VlcApplication::ReadyToRun( ) BEntry entry( &info.ref ); entry.GetPath( &path ); path.GetParent( &path ); - p_this->p_libvlc->psz_vlcpath = strdup( path.Path() ); + p_this->p_libvlc_global->psz_vlcpath = strdup( path.Path() ); /* Tell the main thread we are finished initializing the BApplication */ vlc_thread_ready( p_this ); @@ -233,7 +233,7 @@ bool VlcApplication::QuitRequested() { if( !fReadyToQuit ) { - p_this->p_vlc->b_die = 1; + p_this->p_libvlc->b_die = 1; return false; } diff --git a/src/misc/block.c b/src/misc/block.c index be4e45388d..694acf8d0f 100644 --- a/src/misc/block.c +++ b/src/misc/block.c @@ -77,7 +77,7 @@ block_t *__block_New( vlc_object_t *p_obj, int i_size ) p_block->pf_release = BlockRelease; /* Is ok, as no comunication between p_vlc */ - p_block->p_manager = VLC_OBJECT( p_obj->p_vlc ); + p_block->p_manager = VLC_OBJECT( p_obj->p_libvlc ); p_block->p_sys = p_sys; return p_block; diff --git a/src/misc/charset.c b/src/misc/charset.c index e5a1746cfa..aa1cee32a3 100644 --- a/src/misc/charset.c +++ b/src/misc/charset.c @@ -345,7 +345,7 @@ vlc_bool_t vlc_current_charset( char **psz_charset ) char *__vlc_fix_readdir_charset( vlc_object_t *p_this, const char *psz_string ) { #ifdef __APPLE__ - if ( p_this->p_libvlc->iconv_macosx != (vlc_iconv_t)-1 ) + if ( p_this->p_libvlc_global->iconv_macosx != (vlc_iconv_t)-1 ) { const char *psz_in = psz_string; size_t i_in = strlen(psz_in); @@ -353,10 +353,10 @@ char *__vlc_fix_readdir_charset( vlc_object_t *p_this, const char *psz_string ) char *psz_utf8 = malloc(i_out + 1); char *psz_out = psz_utf8; - vlc_mutex_lock( &p_this->p_libvlc->iconv_lock ); - size_t i_ret = vlc_iconv( p_this->p_libvlc->iconv_macosx, + vlc_mutex_lock( &p_this->p_libvlc_global->iconv_lock ); + size_t i_ret = vlc_iconv( p_this->p_libvlc_global->iconv_macosx, &psz_in, &i_in, &psz_out, &i_out ); - vlc_mutex_unlock( &p_this->p_libvlc->iconv_lock ); + vlc_mutex_unlock( &p_this->p_libvlc_global->iconv_lock ); if( i_ret == (size_t)-1 || i_in ) { msg_Warn( p_this, diff --git a/src/misc/configuration.c b/src/misc/configuration.c index d20e2d9dd9..ce2dd518be 100644 --- a/src/misc/configuration.c +++ b/src/misc/configuration.c @@ -726,7 +726,7 @@ void __config_ResetAll( vlc_object_t *p_this ) module_t *p_module; /* Acquire config file lock */ - vlc_mutex_lock( &p_this->p_vlc->config_lock ); + vlc_mutex_lock( &p_this->p_libvlc->config_lock ); p_list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE ); @@ -748,7 +748,7 @@ void __config_ResetAll( vlc_object_t *p_this ) } vlc_list_release( p_list ); - vlc_mutex_unlock( &p_this->p_vlc->config_lock ); + vlc_mutex_unlock( &p_this->p_libvlc->config_lock ); } /***************************************************************************** @@ -768,10 +768,10 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name ) char *psz_filename, *psz_homedir, *psz_configfile; int i_index; - psz_configfile = p_this->p_vlc->psz_configfile; + psz_configfile = p_this->p_libvlc->psz_configfile; if( !psz_configfile || !psz_configfile ) { - psz_homedir = p_this->p_vlc->psz_homedir; + psz_homedir = p_this->p_libvlc->psz_homedir; if( !psz_homedir ) { msg_Err( p_this, "psz_homedir is null" ); @@ -798,14 +798,14 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name ) msg_Dbg( p_this, "opening config file %s", psz_filename ); /* Acquire config file lock */ - vlc_mutex_lock( &p_this->p_vlc->config_lock ); + vlc_mutex_lock( &p_this->p_libvlc->config_lock ); file = utf8_fopen( psz_filename, "rt" ); if( !file ) { msg_Warn( p_this, "config file %s does not exist yet", psz_filename ); free( psz_filename ); - vlc_mutex_unlock( &p_this->p_vlc->config_lock ); + vlc_mutex_unlock( &p_this->p_libvlc->config_lock ); return -1; } @@ -953,7 +953,7 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name ) fclose( file ); free( psz_filename ); - vlc_mutex_unlock( &p_this->p_vlc->config_lock ); + vlc_mutex_unlock( &p_this->p_libvlc->config_lock ); return 0; } @@ -1009,16 +1009,16 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name, int i_index; /* Acquire config file lock */ - vlc_mutex_lock( &p_this->p_vlc->config_lock ); + vlc_mutex_lock( &p_this->p_libvlc->config_lock ); - psz_configfile = p_this->p_vlc->psz_configfile; + psz_configfile = p_this->p_libvlc->psz_configfile; if( !psz_configfile || !psz_configfile ) { - psz_homedir = p_this->p_vlc->psz_homedir; + psz_homedir = p_this->p_libvlc->psz_homedir; if( !psz_homedir ) { msg_Err( p_this, "psz_homedir is null" ); - vlc_mutex_unlock( &p_this->p_vlc->config_lock ); + vlc_mutex_unlock( &p_this->p_libvlc->config_lock ); return -1; } psz_filename = (char *)malloc( sizeof("/" CONFIG_DIR "/" CONFIG_FILE) + @@ -1030,7 +1030,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name, if( !psz_filename ) { msg_Err( p_this, "out of memory" ); - vlc_mutex_unlock( &p_this->p_vlc->config_lock ); + vlc_mutex_unlock( &p_this->p_libvlc->config_lock ); return -1; } @@ -1044,7 +1044,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name, if( !psz_filename ) { msg_Err( p_this, "out of memory" ); - vlc_mutex_unlock( &p_this->p_vlc->config_lock ); + vlc_mutex_unlock( &p_this->p_libvlc->config_lock ); return -1; } } @@ -1070,7 +1070,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name, msg_Err( p_this, "out of memory" ); if( file ) fclose( file ); free( psz_filename ); - vlc_mutex_unlock( &p_this->p_vlc->config_lock ); + vlc_mutex_unlock( &p_this->p_libvlc->config_lock ); return -1; } p_bigbuffer[0] = 0; @@ -1146,7 +1146,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name, psz_filename ); free( psz_filename ); vlc_list_release( p_list ); - vlc_mutex_unlock( &p_this->p_vlc->config_lock ); + vlc_mutex_unlock( &p_this->p_libvlc->config_lock ); return -1; } @@ -1277,7 +1277,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name, fclose( file ); free( psz_filename ); - vlc_mutex_unlock( &p_this->p_vlc->config_lock ); + vlc_mutex_unlock( &p_this->p_libvlc->config_lock ); return 0; } @@ -1290,7 +1290,7 @@ int config_AutoSaveConfigFile( vlc_object_t *p_this ) int i_index, i_count; /* Check if there's anything to save */ - vlc_mutex_lock( &p_this->p_vlc->config_lock ); + vlc_mutex_lock( &p_this->p_libvlc->config_lock ); p_list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE ); i_count = p_list->i_count; for( i_index = 0; i_index < i_count; i_index++ ) @@ -1308,7 +1308,7 @@ int config_AutoSaveConfigFile( vlc_object_t *p_this ) if( p_item->i_type != CONFIG_HINT_END ) break; } vlc_list_release( p_list ); - vlc_mutex_unlock( &p_this->p_vlc->config_lock ); + vlc_mutex_unlock( &p_this->p_libvlc->config_lock ); if( i_index == i_count ) return VLC_SUCCESS; return SaveConfigFile( p_this, 0, VLC_TRUE ); @@ -1343,8 +1343,8 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[], char *psz_shortopts; /* Set default configuration and copy arguments */ - p_this->p_vlc->i_argc = *pi_argc; - p_this->p_vlc->ppsz_argv = ppsz_argv; + p_this->p_libvlc->i_argc = *pi_argc; + p_this->p_libvlc->ppsz_argv = ppsz_argv; #ifdef __APPLE__ /* When VLC.app is run by double clicking in Mac OS X, the 2nd arg @@ -1417,7 +1417,7 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[], vlc_list_release( p_list ); return -1; } - memcpy( ppsz_argv, p_this->p_vlc->ppsz_argv, + memcpy( ppsz_argv, p_this->p_libvlc->ppsz_argv, *pi_argc * sizeof(char *) ); } @@ -1656,7 +1656,7 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[], { fprintf( stderr, "%s: unknown option" " or missing mandatory argument ", - p_this->p_vlc->psz_object_name ); + p_this->p_libvlc->psz_object_name ); if( optopt ) { fprintf( stderr, "`-%c'\n", optopt ); @@ -1666,7 +1666,7 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[], fprintf( stderr, "`%s'\n", ppsz_argv[optind-1] ); } fprintf( stderr, "Try `%s --help' for more information.\n", - p_this->p_vlc->psz_object_name ); + p_this->p_libvlc->psz_object_name ); for( i_index = 0; p_longopts[i_index].name; i_index++ ) free( (char *)p_longopts[i_index].name ); @@ -1694,14 +1694,14 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[], const char *config_GetDataDir( const vlc_object_t *p_this ) { #if defined (WIN32) || defined (UNDER_CE) - return p_this->p_libvlc->psz_vlcpath; + return p_this->p_libvlc_global->psz_vlcpath; #elif defined(__APPLE__) || defined (SYS_BEOS) static char path[PATH_MAX] = ""; if( *path == '\0' ) { snprintf( path, sizeof( path ), "%s/share", - p_this->p_libvlc->psz_vlcpath ); + p_this->p_libvlc_global->psz_vlcpath ); path[sizeof( path ) - 1] = '\0'; } return path; diff --git a/src/misc/darwin_specific.m b/src/misc/darwin_specific.m index 4130b13aab..e9e8f7bd41 100644 --- a/src/misc/darwin_specific.m +++ b/src/misc/darwin_specific.m @@ -87,7 +87,7 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) char *p_char, *p_oldchar = &i_dummy; /* Get the full program path and name */ - p_char = p_this->p_libvlc->psz_vlcpath = strdup( ppsz_argv[ 0 ] ); + p_char = p_this->p_libvlc_global->psz_vlcpath = strdup( ppsz_argv[ 0 ] ); /* Remove trailing program name */ for( ; *p_char ; ) @@ -125,8 +125,8 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) [o_pool release]; } - vlc_mutex_init( p_this, &p_this->p_libvlc->iconv_lock ); - p_this->p_libvlc->iconv_macosx = vlc_iconv_open( "UTF-8", "UTF-8-MAC" ); + vlc_mutex_init( p_this, &p_this->p_libvlc_global->iconv_lock ); + p_this->p_libvlc_global->iconv_macosx = vlc_iconv_open( "UTF-8", "UTF-8-MAC" ); } /***************************************************************************** @@ -142,10 +142,10 @@ void system_Configure( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) *****************************************************************************/ void system_End( vlc_t *p_this ) { - free( p_this->p_libvlc->psz_vlcpath ); + free( p_this->p_libvlc_global->psz_vlcpath ); - if ( p_this->p_libvlc->iconv_macosx != (vlc_iconv_t)-1 ) - vlc_iconv_close( p_this->p_libvlc->iconv_macosx ); - vlc_mutex_destroy( &p_this->p_libvlc->iconv_lock ); + if ( p_this->p_libvlc_global->iconv_macosx != (vlc_iconv_t)-1 ) + vlc_iconv_close( p_this->p_libvlc_global->iconv_macosx ); + vlc_mutex_destroy( &p_this->p_libvlc_global->iconv_lock ); } diff --git a/src/misc/devices.c b/src/misc/devices.c index 26403ed95e..3d8f6be141 100644 --- a/src/misc/devices.c +++ b/src/misc/devices.c @@ -31,7 +31,7 @@ void devices_ProbeCreate( vlc_object_t *p_this ) { intf_thread_t * p_probe; - p_this->p_libvlc->p_probe = NULL; + p_this->p_libvlc_global->p_probe = NULL; /* Allocate structure */ p_probe = vlc_object_create( p_this, VLC_OBJECT_INTF ); @@ -48,5 +48,5 @@ void devices_ProbeCreate( vlc_object_t *p_this ) return; } - p_this->p_libvlc->p_probe = p_probe; + p_this->p_libvlc_global->p_probe = p_probe; } diff --git a/src/misc/messages.c b/src/misc/messages.c index e77c647f57..a83821ee67 100644 --- a/src/misc/messages.c +++ b/src/misc/messages.c @@ -75,17 +75,17 @@ static void CreateMsgQueue( vlc_object_t *p_this, int i_queue ); */ void __msg_Create( vlc_object_t *p_this ) { - vlc_mutex_init( p_this, &(p_this->p_libvlc->msg_bank.lock) ); + vlc_mutex_init( p_this, &(p_this->p_libvlc_global->msg_bank.lock) ); CreateMsgQueue( p_this, MSG_QUEUE_NORMAL ); CreateMsgQueue( p_this, MSG_QUEUE_HTTPD_ACCESS ); #ifdef UNDER_CE - p_this->p_libvlc->msg_bank.pp_queues[MSG_QUEUE_NORMAL]->logfile = + p_this->p_libvlc_global->msg_bank.pp_queues[MSG_QUEUE_NORMAL]->logfile = CreateFile( L"vlc-log.txt", GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, NULL ); - SetFilePointer( p_this->p_libvlc->msg_bank.pp_queues[MSG_QUEUE_NORMAL]-> + SetFilePointer( p_this->p_libvlc_global->msg_bank.pp_queues[MSG_QUEUE_NORMAL]-> logfile, 0, NULL, FILE_END ); #endif @@ -105,8 +105,8 @@ static void CreateMsgQueue( vlc_object_t *p_this, int i_queue ) p_queue->i_sub = 0; p_queue->pp_sub = NULL; - INSERT_ELEM( p_this->p_libvlc->msg_bank.pp_queues, - p_this->p_libvlc->msg_bank.i_queues, + INSERT_ELEM( p_this->p_libvlc_global->msg_bank.pp_queues, + p_this->p_libvlc_global->msg_bank.i_queues, i_queue, p_queue ); } @@ -118,11 +118,11 @@ void __msg_Flush( vlc_object_t *p_this ) { int i; - for( i = 0 ; i < p_this->p_libvlc->msg_bank.i_queues; i++ ) + for( i = 0 ; i < p_this->p_libvlc_global->msg_bank.i_queues; i++ ) { - vlc_mutex_lock( &p_this->p_libvlc->msg_bank.pp_queues[i]->lock ); - FlushMsg( p_this->p_libvlc->msg_bank.pp_queues[i] ); - vlc_mutex_unlock( &p_this->p_libvlc->msg_bank.pp_queues[i]->lock ); + vlc_mutex_lock( &p_this->p_libvlc_global->msg_bank.pp_queues[i]->lock ); + FlushMsg( p_this->p_libvlc_global->msg_bank.pp_queues[i] ); + vlc_mutex_unlock( &p_this->p_libvlc_global->msg_bank.pp_queues[i]->lock ); } } @@ -136,9 +136,9 @@ void __msg_Flush( vlc_object_t *p_this ) void __msg_Destroy( vlc_object_t *p_this ) { int i; - for( i = p_this->p_libvlc->msg_bank.i_queues -1 ; i >= 0; i-- ) + for( i = p_this->p_libvlc_global->msg_bank.i_queues -1 ; i >= 0; i-- ) { - msg_queue_t *p_queue = p_this->p_libvlc->msg_bank.pp_queues[i]; + msg_queue_t *p_queue = p_this->p_libvlc_global->msg_bank.pp_queues[i]; if( p_queue->i_sub ) { msg_Err( p_this, "stale interface subscribers" ); @@ -147,15 +147,15 @@ void __msg_Destroy( vlc_object_t *p_this ) #ifdef UNDER_CE if( i == MSG_QUEUE_NORMAL ) - CloseHandle( p_this->p_libvlc->msg_bank.pp_queues[MSG_QUEUE_NORMAL]->logfile ); + CloseHandle( p_this->p_libvlc_global->msg_bank.pp_queues[MSG_QUEUE_NORMAL]->logfile ); #endif /* Destroy lock */ vlc_mutex_destroy( &p_queue->lock ); - REMOVE_ELEM( p_this->p_libvlc->msg_bank.pp_queues, - p_this->p_libvlc->msg_bank.i_queues, i ); + REMOVE_ELEM( p_this->p_libvlc_global->msg_bank.pp_queues, + p_this->p_libvlc_global->msg_bank.i_queues, i ); free( p_queue ); } - vlc_mutex_destroy( &(p_this->p_libvlc->msg_bank.lock) ); + vlc_mutex_destroy( &(p_this->p_libvlc_global->msg_bank.lock) ); } /** @@ -163,7 +163,7 @@ void __msg_Destroy( vlc_object_t *p_this ) */ msg_subscription_t *__msg_Subscribe( vlc_object_t *p_this, int i_queue ) { - msg_bank_t *p_bank = &p_this->p_libvlc->msg_bank; + msg_bank_t *p_bank = &p_this->p_libvlc_global->msg_bank; msg_subscription_t *p_sub = malloc( sizeof( msg_subscription_t ) ); msg_queue_t *p_queue = NULL; int i; @@ -209,7 +209,7 @@ msg_subscription_t *__msg_Subscribe( vlc_object_t *p_this, int i_queue ) */ void __msg_Unsubscribe( vlc_object_t *p_this, msg_subscription_t *p_sub ) { - msg_bank_t *p_bank = &p_this->p_libvlc->msg_bank; + msg_bank_t *p_bank = &p_this->p_libvlc_global->msg_bank; int i,j; vlc_mutex_lock( &p_bank->lock ); @@ -319,7 +319,7 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue_id, int i_type, return; } - p_bank = &p_this->p_libvlc->msg_bank; + p_bank = &p_this->p_libvlc_global->msg_bank; /* * Convert message to string @@ -547,23 +547,23 @@ static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item ) switch( i_type ) { case VLC_MSG_ERR: - if( p_this->p_libvlc->i_verbose < 0 ) return; + if( p_this->p_libvlc_global->i_verbose < 0 ) return; break; case VLC_MSG_INFO: - if( p_this->p_libvlc->i_verbose < 0 ) return; + if( p_this->p_libvlc_global->i_verbose < 0 ) return; break; case VLC_MSG_WARN: - if( p_this->p_libvlc->i_verbose < 1 ) return; + if( p_this->p_libvlc_global->i_verbose < 1 ) return; break; case VLC_MSG_DBG: - if( p_this->p_libvlc->i_verbose < 2 ) return; + if( p_this->p_libvlc_global->i_verbose < 2 ) return; break; } switch( p_item->i_object_type ) { case VLC_OBJECT_ROOT: psz_object = "root"; break; - case VLC_OBJECT_VLC: psz_object = "vlc"; break; + case VLC_OBJECT_LIBVLC: psz_object = "libvlc"; break; case VLC_OBJECT_MODULE: psz_object = "module"; break; case VLC_OBJECT_INTF: psz_object = "interface"; break; case VLC_OBJECT_PLAYLIST: psz_object = "playlist"; break; @@ -585,7 +585,7 @@ static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item ) } #ifdef UNDER_CE -# define CE_WRITE(str) WriteFile( p_this->p_libvlc->msg_bank.pp_queues[MSG_QUEUE_NORMAL]->logfile, \ +# define CE_WRITE(str) WriteFile( p_this->p_libvlc_global->msg_bank.pp_queues[MSG_QUEUE_NORMAL]->logfile, \ str, strlen(str), &i_dummy, NULL ); CE_WRITE( p_item->psz_module ); CE_WRITE( " " ); @@ -594,11 +594,11 @@ static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item ) CE_WRITE( ": " ); CE_WRITE( p_item->psz_msg ); CE_WRITE( "\r\n" ); - FlushFileBuffers( p_this->p_libvlc->msg_bank.pp_queues[MSG_QUEUE_NORMAL]->logfile ); + FlushFileBuffers( p_this->p_libvlc_global->msg_bank.pp_queues[MSG_QUEUE_NORMAL]->logfile ); #else /* Send the message to stderr */ - if( p_this->p_libvlc->b_color ) + if( p_this->p_libvlc_global->b_color ) { if( p_item->psz_header ) { diff --git a/src/misc/modules.c b/src/misc/modules.c index 0d7f67e0b4..33b0a8bfaf 100644 --- a/src/misc/modules.c +++ b/src/misc/modules.c @@ -175,18 +175,18 @@ void __module_InitBank( vlc_object_t *p_this ) module_bank_t *p_bank; vlc_value_t lockval; - var_Create( p_this->p_libvlc, "libvlc", VLC_VAR_MUTEX ); - var_Get( p_this->p_libvlc, "libvlc", &lockval ); + var_Create( p_this->p_libvlc_global, "libvlc", VLC_VAR_MUTEX ); + var_Get( p_this->p_libvlc_global, "libvlc", &lockval ); vlc_mutex_lock( lockval.p_address ); - if( p_this->p_libvlc->p_module_bank ) + if( p_this->p_libvlc_global->p_module_bank ) { - p_this->p_libvlc->p_module_bank->i_usage++; + p_this->p_libvlc_global->p_module_bank->i_usage++; vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_this->p_libvlc, "libvlc" ); + var_Destroy( p_this->p_libvlc_global, "libvlc" ); return; } vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_this->p_libvlc, "libvlc" ); + var_Destroy( p_this->p_libvlc_global, "libvlc" ); p_bank = vlc_object_create( p_this, sizeof(module_bank_t) ); p_bank->psz_object_name = "module bank"; @@ -204,8 +204,8 @@ void __module_InitBank( vlc_object_t *p_this ) #endif /* Everything worked, attach the object */ - p_this->p_libvlc->p_module_bank = p_bank; - vlc_object_attach( p_bank, p_this->p_libvlc ); + p_this->p_libvlc_global->p_module_bank = p_bank; + vlc_object_attach( p_bank, p_this->p_libvlc_global ); module_LoadMain( p_this ); @@ -235,28 +235,28 @@ void __module_EndBank( vlc_object_t *p_this ) module_t * p_next; vlc_value_t lockval; - var_Create( p_this->p_libvlc, "libvlc", VLC_VAR_MUTEX ); - var_Get( p_this->p_libvlc, "libvlc", &lockval ); + var_Create( p_this->p_libvlc_global, "libvlc", VLC_VAR_MUTEX ); + var_Get( p_this->p_libvlc_global, "libvlc", &lockval ); vlc_mutex_lock( lockval.p_address ); - if( !p_this->p_libvlc->p_module_bank ) + if( !p_this->p_libvlc_global->p_module_bank ) { vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_this->p_libvlc, "libvlc" ); + var_Destroy( p_this->p_libvlc_global, "libvlc" ); return; } - if( --p_this->p_libvlc->p_module_bank->i_usage ) + if( --p_this->p_libvlc_global->p_module_bank->i_usage ) { vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_this->p_libvlc, "libvlc" ); + var_Destroy( p_this->p_libvlc_global, "libvlc" ); return; } vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_this->p_libvlc, "libvlc" ); + var_Destroy( p_this->p_libvlc_global, "libvlc" ); config_AutoSaveConfigFile( p_this ); #ifdef HAVE_DYNAMIC_PLUGINS -#define p_bank p_this->p_libvlc->p_module_bank +#define p_bank p_this->p_libvlc_global->p_module_bank if( p_bank->b_cache ) CacheSave( p_this ); while( p_bank->i_loaded_cache-- ) { @@ -276,11 +276,11 @@ void __module_EndBank( vlc_object_t *p_this ) #undef p_bank #endif - vlc_object_detach( p_this->p_libvlc->p_module_bank ); + vlc_object_detach( p_this->p_libvlc_global->p_module_bank ); - while( p_this->p_libvlc->p_module_bank->i_children ) + while( p_this->p_libvlc_global->p_module_bank->i_children ) { - p_next = (module_t *)p_this->p_libvlc->p_module_bank->pp_children[0]; + p_next = (module_t *)p_this->p_libvlc_global->p_module_bank->pp_children[0]; if( DeleteModule( p_next ) ) { @@ -294,8 +294,8 @@ void __module_EndBank( vlc_object_t *p_this ) } } - vlc_object_destroy( p_this->p_libvlc->p_module_bank ); - p_this->p_libvlc->p_module_bank = NULL; + vlc_object_destroy( p_this->p_libvlc_global->p_module_bank ); + p_this->p_libvlc_global->p_module_bank = NULL; return; } @@ -312,18 +312,18 @@ void __module_LoadMain( vlc_object_t *p_this ) { vlc_value_t lockval; - var_Create( p_this->p_libvlc, "libvlc", VLC_VAR_MUTEX ); - var_Get( p_this->p_libvlc, "libvlc", &lockval ); + var_Create( p_this->p_libvlc_global, "libvlc", VLC_VAR_MUTEX ); + var_Get( p_this->p_libvlc_global, "libvlc", &lockval ); vlc_mutex_lock( lockval.p_address ); - if( p_this->p_libvlc->p_module_bank->b_main ) + if( p_this->p_libvlc_global->p_module_bank->b_main ) { vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_this->p_libvlc, "libvlc" ); + var_Destroy( p_this->p_libvlc_global, "libvlc" ); return; } - p_this->p_libvlc->p_module_bank->b_main = VLC_TRUE; + p_this->p_libvlc_global->p_module_bank->b_main = VLC_TRUE; vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_this->p_libvlc, "libvlc" ); + var_Destroy( p_this->p_libvlc_global, "libvlc" ); AllocateBuiltinModule( p_this, vlc_entry__main ); } @@ -337,18 +337,18 @@ void __module_LoadBuiltins( vlc_object_t * p_this ) { vlc_value_t lockval; - var_Create( p_this->p_libvlc, "libvlc", VLC_VAR_MUTEX ); - var_Get( p_this->p_libvlc, "libvlc", &lockval ); + var_Create( p_this->p_libvlc_global, "libvlc", VLC_VAR_MUTEX ); + var_Get( p_this->p_libvlc_global, "libvlc", &lockval ); vlc_mutex_lock( lockval.p_address ); - if( p_this->p_libvlc->p_module_bank->b_builtins ) + if( p_this->p_libvlc_global->p_module_bank->b_builtins ) { vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_this->p_libvlc, "libvlc" ); + var_Destroy( p_this->p_libvlc_global, "libvlc" ); return; } - p_this->p_libvlc->p_module_bank->b_builtins = VLC_TRUE; + p_this->p_libvlc_global->p_module_bank->b_builtins = VLC_TRUE; vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_this->p_libvlc, "libvlc" ); + var_Destroy( p_this->p_libvlc_global, "libvlc" ); msg_Dbg( p_this, "checking builtin modules" ); ALLOCATE_ALL_BUILTINS(); @@ -364,26 +364,26 @@ void __module_LoadPlugins( vlc_object_t * p_this ) #ifdef HAVE_DYNAMIC_PLUGINS vlc_value_t lockval; - var_Create( p_this->p_libvlc, "libvlc", VLC_VAR_MUTEX ); - var_Get( p_this->p_libvlc, "libvlc", &lockval ); + var_Create( p_this->p_libvlc_global, "libvlc", VLC_VAR_MUTEX ); + var_Get( p_this->p_libvlc_global, "libvlc", &lockval ); vlc_mutex_lock( lockval.p_address ); - if( p_this->p_libvlc->p_module_bank->b_plugins ) + if( p_this->p_libvlc_global->p_module_bank->b_plugins ) { vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_this->p_libvlc, "libvlc" ); + var_Destroy( p_this->p_libvlc_global, "libvlc" ); return; } - p_this->p_libvlc->p_module_bank->b_plugins = VLC_TRUE; + p_this->p_libvlc_global->p_module_bank->b_plugins = VLC_TRUE; vlc_mutex_unlock( lockval.p_address ); - var_Destroy( p_this->p_libvlc, "libvlc" ); + var_Destroy( p_this->p_libvlc_global, "libvlc" ); msg_Dbg( p_this, "checking plugin modules" ); if( config_GetInt( p_this, "plugins-cache" ) ) - p_this->p_libvlc->p_module_bank->b_cache = VLC_TRUE; + p_this->p_libvlc_global->p_module_bank->b_cache = VLC_TRUE; - if( p_this->p_libvlc->p_module_bank->b_cache || - p_this->p_libvlc->p_module_bank->b_cache_delete ) CacheLoad( p_this ); + if( p_this->p_libvlc_global->p_module_bank->b_cache || + p_this->p_libvlc_global->p_module_bank->b_cache_delete ) CacheLoad( p_this ); AllocateAllPlugins( p_this ); #endif @@ -492,7 +492,7 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability, } /* Test if we have the required CPU */ - if( (p_module->i_cpu & p_this->p_libvlc->i_cpu) != p_module->i_cpu ) + if( (p_module->i_cpu & p_this->p_libvlc_global->i_cpu) != p_module->i_cpu ) { continue; } @@ -560,7 +560,7 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability, if( !i_shortcuts && p_module->psz_program && !strcmp( psz_capability, "interface" ) && !strcmp( p_module->psz_program, - p_this->p_vlc->psz_object_name ) ) + p_this->p_libvlc->psz_object_name ) ) { if( !b_intf ) { @@ -779,7 +779,7 @@ static void AllocateAllPlugins( vlc_object_t *p_this ) #endif { int i_dirlen = strlen( *ppsz_path ); - i_dirlen += strlen( p_this->p_libvlc->psz_vlcpath ) + 2; + i_dirlen += strlen( p_this->p_libvlc_global->psz_vlcpath ) + 2; psz_fullpath = malloc( i_dirlen ); if( psz_fullpath == NULL ) @@ -788,10 +788,10 @@ static void AllocateAllPlugins( vlc_object_t *p_this ) } #ifdef WIN32 sprintf( psz_fullpath, "%s\\%s", - p_this->p_libvlc->psz_vlcpath, *ppsz_path ); + p_this->p_libvlc_global->psz_vlcpath, *ppsz_path ); #else sprintf( psz_fullpath, "%s/%s", - p_this->p_libvlc->psz_vlcpath, *ppsz_path ); + p_this->p_libvlc_global->psz_vlcpath, *ppsz_path ); #endif } else @@ -836,7 +836,7 @@ static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir, #endif char * psz_file; - if( p_this->p_vlc->b_die || i_maxdepth < 0 ) + if( p_this->p_libvlc->b_die || i_maxdepth < 0 ) { return; } @@ -926,7 +926,7 @@ static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir, AllocatePluginFile( p_this, psz_file, i_time, i_size ); } } - while( !p_this->p_vlc->b_die && FindNextFile( handle, &finddata ) ); + while( !p_this->p_libvlc->b_die && FindNextFile( handle, &finddata ) ); /* Close the directory */ FindClose( handle ); @@ -941,7 +941,7 @@ static void AllocatePluginDir( vlc_object_t *p_this, const char *psz_dir, i_dirlen = strlen( psz_dir ); /* Parse the directory and try to load all files it contains. */ - while( !p_this->p_vlc->b_die && (file = readdir( dir )) ) + while( !p_this->p_libvlc->b_die && (file = readdir( dir )) ) { struct stat statbuf; unsigned int i_len; @@ -1050,13 +1050,13 @@ static int AllocatePluginFile( vlc_object_t * p_this, char * psz_file, /* msg_Dbg( p_this, "plugin \"%s\", %s", p_module->psz_object_name, p_module->psz_longname ); */ - vlc_object_attach( p_module, p_this->p_libvlc->p_module_bank ); + vlc_object_attach( p_module, p_this->p_libvlc_global->p_module_bank ); } - if( !p_this->p_libvlc->p_module_bank->b_cache ) return 0; + if( !p_this->p_libvlc_global->p_module_bank->b_cache ) return 0; /* Add entry to cache */ -#define p_bank p_this->p_libvlc->p_module_bank +#define p_bank p_this->p_libvlc_global->p_module_bank p_bank->pp_cache = realloc( p_bank->pp_cache, (p_bank->i_cache + 1) * sizeof(void *) ); p_bank->pp_cache[p_bank->i_cache] = malloc( sizeof(module_cache_t) ); @@ -1098,7 +1098,7 @@ static module_t * AllocatePlugin( vlc_object_t * p_this, char * psz_file ) p_module->psz_filename = psz_file; p_module->handle = handle; #ifndef HAVE_SHARED_LIBVLC - p_module->p_symbols = &p_this->p_libvlc->p_module_bank->symbols; + p_module->p_symbols = &p_this->p_libvlc_global->p_module_bank->symbols; #endif p_module->b_loaded = VLC_TRUE; @@ -1225,7 +1225,7 @@ static int AllocateBuiltinModule( vlc_object_t * p_this, /* msg_Dbg( p_this, "builtin \"%s\", %s", p_module->psz_object_name, p_module->psz_longname ); */ - vlc_object_attach( p_module, p_this->p_libvlc->p_module_bank ); + vlc_object_attach( p_module, p_this->p_libvlc_global->p_module_bank ); return 0; } @@ -1599,7 +1599,7 @@ static void CacheLoad( vlc_object_t *p_this ) module_cache_t **pp_cache = 0; int32_t i_file_size, i_marker; - psz_homedir = p_this->p_vlc->psz_homedir; + psz_homedir = p_this->p_libvlc->psz_homedir; if( !psz_homedir ) { msg_Err( p_this, "psz_homedir is null" ); @@ -1614,7 +1614,7 @@ static void CacheLoad( vlc_object_t *p_this ) return; } - if( p_this->p_libvlc->p_module_bank->b_cache_delete ) + if( p_this->p_libvlc_global->p_module_bank->b_cache_delete ) { #if !defined( UNDER_CE ) unlink( psz_filename ); @@ -1703,10 +1703,10 @@ static void CacheLoad( vlc_object_t *p_this ) return; } - p_this->p_libvlc->p_module_bank->i_loaded_cache = 0; + p_this->p_libvlc_global->p_module_bank->i_loaded_cache = 0; fread( &i_cache, sizeof(char), sizeof(i_cache), file ); if( i_cache ) - pp_cache = p_this->p_libvlc->p_module_bank->pp_loaded_cache = + pp_cache = p_this->p_libvlc_global->p_module_bank->pp_loaded_cache = malloc( i_cache * sizeof(void *) ); #define LOAD_IMMEDIATE(a) \ @@ -1731,7 +1731,7 @@ static void CacheLoad( vlc_object_t *p_this ) int i_submodules; pp_cache[i] = malloc( sizeof(module_cache_t) ); - p_this->p_libvlc->p_module_bank->i_loaded_cache++; + p_this->p_libvlc_global->p_module_bank->i_loaded_cache++; /* Load common info */ LOAD_STRING( pp_cache[i]->psz_file ); @@ -1797,7 +1797,7 @@ static void CacheLoad( vlc_object_t *p_this ) msg_Warn( p_this, "plugins cache not loaded (corrupted)" ); /* TODO: cleanup */ - p_this->p_libvlc->p_module_bank->i_loaded_cache = 0; + p_this->p_libvlc_global->p_module_bank->i_loaded_cache = 0; fclose( file ); return; @@ -1926,7 +1926,7 @@ static void CacheSave( vlc_object_t *p_this ) module_cache_t **pp_cache; int32_t i_file_size = 0; - psz_homedir = p_this->p_vlc->psz_homedir; + psz_homedir = p_this->p_libvlc->psz_homedir; if( !psz_homedir ) { msg_Err( p_this, "psz_homedir is null" ); @@ -1992,8 +1992,8 @@ static void CacheSave( vlc_object_t *p_this ) i_file_size = ftell( file ); fwrite( &i_file_size, sizeof(char), sizeof(i_file_size), file ); - i_cache = p_this->p_libvlc->p_module_bank->i_cache; - pp_cache = p_this->p_libvlc->p_module_bank->pp_cache; + i_cache = p_this->p_libvlc_global->p_module_bank->i_cache; + pp_cache = p_this->p_libvlc_global->p_module_bank->pp_cache; fwrite( &i_cache, sizeof(char), sizeof(i_cache), file ); @@ -2178,8 +2178,8 @@ static module_cache_t *CacheFind( vlc_object_t *p_this, char *psz_file, module_cache_t **pp_cache; int i_cache, i; - pp_cache = p_this->p_libvlc->p_module_bank->pp_loaded_cache; - i_cache = p_this->p_libvlc->p_module_bank->i_loaded_cache; + pp_cache = p_this->p_libvlc_global->p_module_bank->pp_loaded_cache; + i_cache = p_this->p_libvlc_global->p_module_bank->i_loaded_cache; for( i = 0; i < i_cache; i++ ) { diff --git a/src/misc/objects.c b/src/misc/objects.c index b140f931b6..92a279db1d 100644 --- a/src/misc/objects.c +++ b/src/misc/objects.c @@ -105,12 +105,12 @@ void * __vlc_object_create( vlc_object_t *p_this, int i_type ) switch( i_type ) { case VLC_OBJECT_ROOT: - i_size = sizeof(libvlc_t); + i_size = sizeof(libvlc_global_data_t); psz_type = "root"; break; - case VLC_OBJECT_VLC: - i_size = sizeof(vlc_t); - psz_type = "vlc"; + case VLC_OBJECT_LIBVLC: + i_size = sizeof(libvlc_int_t); + psz_type = "libvlc"; break; case VLC_OBJECT_MODULE: i_size = sizeof(module_t); @@ -268,35 +268,34 @@ void * __vlc_object_create( vlc_object_t *p_this, int i_type ) if( i_type == VLC_OBJECT_ROOT ) { - /* If i_type is root, then p_new is actually p_libvlc */ - p_new->p_libvlc = (libvlc_t*)p_new; - p_new->p_vlc = NULL; + /* If i_type is root, then p_new is actually p_libvlc_global */ + p_new->p_libvlc_global = (libvlc_global_data_t*)p_new; + p_new->p_libvlc = NULL; - p_new->p_libvlc->i_counter = 0; + p_new->p_libvlc_global->i_counter = 0; p_new->i_object_id = 0; - p_new->p_libvlc->i_objects = 1; - p_new->p_libvlc->pp_objects = malloc( sizeof(vlc_object_t *) ); - p_new->p_libvlc->pp_objects[0] = p_new; + p_new->p_libvlc_global->i_objects = 1; + p_new->p_libvlc_global->pp_objects = malloc( sizeof(vlc_object_t *) ); + p_new->p_libvlc_global->pp_objects[0] = p_new; p_new->b_attached = VLC_TRUE; } else { - p_new->p_libvlc = p_this->p_libvlc; - p_new->p_vlc = ( i_type == VLC_OBJECT_VLC ) ? (vlc_t*)p_new - : p_this->p_vlc; + p_new->p_libvlc_global = p_this->p_libvlc_global; + p_new->p_libvlc = ( i_type == VLC_OBJECT_LIBVLC ) ? (libvlc_int_t*)p_new + : p_this->p_libvlc; vlc_mutex_lock( &structure_lock ); - p_new->p_libvlc->i_counter++; - p_new->i_object_id = p_new->p_libvlc->i_counter; + p_new->p_libvlc_global->i_counter++; + p_new->i_object_id = p_new->p_libvlc_global->i_counter; /* Wooohaa! If *this* fails, we're in serious trouble! Anyway it's * useless to try and recover anything if pp_objects gets smashed. */ - INSERT_ELEM( p_new->p_libvlc->pp_objects, - p_new->p_libvlc->i_objects, - p_new->p_libvlc->i_objects, - p_new ); + TAB_APPEND( p_new->p_libvlc_global->i_objects, + p_new->p_libvlc_global->pp_objects, + p_new ); vlc_mutex_unlock( &structure_lock ); } @@ -397,9 +396,9 @@ void __vlc_object_destroy( vlc_object_t *p_this ) if( p_this->i_object_type == VLC_OBJECT_ROOT ) { /* We are the root object ... no need to lock. */ - free( p_this->p_libvlc->pp_objects ); - p_this->p_libvlc->pp_objects = NULL; - p_this->p_libvlc->i_objects--; + free( p_this->p_libvlc_global->pp_objects ); + p_this->p_libvlc_global->pp_objects = NULL; + p_this->p_libvlc_global->i_objects--; vlc_mutex_destroy( &structure_lock ); } @@ -411,10 +410,10 @@ void __vlc_object_destroy( vlc_object_t *p_this ) /* Wooohaa! If *this* fails, we're in serious trouble! Anyway it's * useless to try and recover anything if pp_objects gets smashed. */ - i_index = FindIndex( p_this, p_this->p_libvlc->pp_objects, - p_this->p_libvlc->i_objects ); - REMOVE_ELEM( p_this->p_libvlc->pp_objects, - p_this->p_libvlc->i_objects, i_index ); + i_index = FindIndex( p_this, p_this->p_libvlc_global->pp_objects, + p_this->p_libvlc_global->i_objects ); + REMOVE_ELEM( p_this->p_libvlc_global->pp_objects, + p_this->p_libvlc_global->i_objects, i_index ); vlc_mutex_unlock( &structure_lock ); } @@ -440,10 +439,10 @@ void * __vlc_object_get( vlc_object_t *p_this, int i_id ) vlc_mutex_lock( &structure_lock ); - pp_objects = p_this->p_libvlc->pp_objects; + pp_objects = p_this->p_libvlc_global->pp_objects; /* Perform our dichotomy */ - for( i_max = p_this->p_libvlc->i_objects - 1 ; ; ) + for( i_max = p_this->p_libvlc_global->i_objects - 1 ; ; ) { i_middle = i_max / 2; @@ -517,15 +516,15 @@ void * __vlc_object_find( vlc_object_t *p_this, int i_type, int i_mode ) /* Find the root */ while( p_root->p_parent != NULL && - p_root != VLC_OBJECT( p_this->p_vlc ) ) + p_root != VLC_OBJECT( p_this->p_libvlc ) ) { p_root = p_root->p_parent; } p_found = FindObject( p_root, i_type, (i_mode & ~0x000f)|FIND_CHILD ); - if( p_found == NULL && p_root != VLC_OBJECT( p_this->p_vlc ) ) + if( p_found == NULL && p_root != VLC_OBJECT( p_this->p_libvlc ) ) { - p_found = FindObject( VLC_OBJECT( p_this->p_vlc ), + p_found = FindObject( VLC_OBJECT( p_this->p_libvlc ), i_type, (i_mode & ~0x000f)|FIND_CHILD ); } } @@ -633,8 +632,8 @@ vlc_list_t * __vlc_list_find( vlc_object_t *p_this, int i_type, int i_mode ) switch( i_mode & 0x000f ) { case FIND_ANYWHERE: - pp_current = p_this->p_libvlc->pp_objects; - pp_end = pp_current + p_this->p_libvlc->i_objects; + pp_current = p_this->p_libvlc_global->pp_objects; + pp_end = pp_current + p_this->p_libvlc_global->i_objects; for( ; pp_current < pp_end ; pp_current++ ) { @@ -646,7 +645,7 @@ vlc_list_t * __vlc_list_find( vlc_object_t *p_this, int i_type, int i_mode ) } p_list = NewList( i_count ); - pp_current = p_this->p_libvlc->pp_objects; + pp_current = p_this->p_libvlc_global->pp_objects; for( ; pp_current < pp_end ; pp_current++ ) { @@ -712,7 +711,7 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd, } else { - p_object = p_this->p_vlc ? VLC_OBJECT(p_this->p_vlc) : p_this; + p_object = p_this->p_libvlc ? VLC_OBJECT(p_this->p_libvlc) : p_this; } vlc_mutex_lock( &structure_lock ); @@ -733,8 +732,8 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd, vlc_mutex_lock( &structure_lock ); - pp_current = p_this->p_libvlc->pp_objects; - pp_end = pp_current + p_this->p_libvlc->i_objects; + pp_current = p_this->p_libvlc_global->pp_objects; + pp_end = pp_current + p_this->p_libvlc_global->i_objects; for( ; pp_current < pp_end ; pp_current++ ) { diff --git a/src/misc/stats.c b/src/misc/stats.c index 6fe487e903..8d9a81433a 100644 --- a/src/misc/stats.c +++ b/src/misc/stats.c @@ -78,7 +78,7 @@ counter_t * __stats_CounterCreate( vlc_object_t *p_this, int __stats_Update( vlc_object_t *p_this, counter_t *p_counter, vlc_value_t val, vlc_value_t *val_new ) { - if( !p_this->p_libvlc->b_stats || !p_counter ) return VLC_EGENERIC; + if( !p_this->p_libvlc_global->b_stats || !p_counter ) return VLC_EGENERIC; return CounterUpdate( p_this, p_counter, val, val_new ); } @@ -91,7 +91,7 @@ int __stats_Update( vlc_object_t *p_this, counter_t *p_counter, */ int __stats_Get( vlc_object_t *p_this, counter_t *p_counter, vlc_value_t *val ) { - if( !p_this->p_libvlc->b_stats || !p_counter || p_counter->i_samples == 0 ) + if( !p_this->p_libvlc_global->b_stats || !p_counter || p_counter->i_samples == 0 ) { val->i_int = val->f_float = 0.0; return VLC_EGENERIC; @@ -135,7 +135,7 @@ int __stats_Get( vlc_object_t *p_this, counter_t *p_counter, vlc_value_t *val ) void stats_ComputeInputStats( input_thread_t *p_input, input_stats_t *p_stats ) { - if( !p_input->p_libvlc->b_stats ) return; + if( !p_input->p_libvlc_global->b_stats ) return; vlc_mutex_lock( &p_input->counters.counters_lock ); vlc_mutex_lock( &p_stats->lock ); @@ -223,7 +223,7 @@ void __stats_ComputeGlobalStats( vlc_object_t *p_obj, global_stats_t *p_stats ) vlc_list_t *p_list; int i_index; - if( !p_obj->p_libvlc->b_stats ) return; + if( !p_obj->p_libvlc_global->b_stats ) return; vlc_mutex_lock( &p_stats->lock ); @@ -268,31 +268,31 @@ void __stats_TimerStart( vlc_object_t *p_obj, const char *psz_name, { int i; counter_t *p_counter = NULL; - if( !p_obj->p_libvlc->b_stats ) return; - vlc_mutex_lock( &p_obj->p_libvlc->timer_lock ); + if( !p_obj->p_libvlc_global->b_stats ) return; + vlc_mutex_lock( &p_obj->p_libvlc_global->timer_lock ); - for( i = 0 ; i < p_obj->p_libvlc->i_timers; i++ ) + for( i = 0 ; i < p_obj->p_libvlc_global->i_timers; i++ ) { - if( p_obj->p_libvlc->pp_timers[i]->i_id == i_id ) + if( p_obj->p_libvlc_global->pp_timers[i]->i_id == i_id ) { - p_counter = p_obj->p_libvlc->pp_timers[i]; + p_counter = p_obj->p_libvlc_global->pp_timers[i]; break; } } if( !p_counter ) { counter_sample_t *p_sample; - p_counter = stats_CounterCreate( p_obj->p_libvlc, VLC_VAR_TIME, + p_counter = stats_CounterCreate( p_obj->p_libvlc_global, VLC_VAR_TIME, STATS_TIMER ); if( !p_counter ) { - vlc_mutex_unlock( &p_obj->p_libvlc->timer_lock ); + vlc_mutex_unlock( &p_obj->p_libvlc_global->timer_lock ); return; } p_counter->psz_name = strdup( psz_name ); p_counter->i_id = i_id; - INSERT_ELEM( p_obj->p_libvlc->pp_timers, p_obj->p_libvlc->i_timers, - p_obj->p_libvlc->i_timers, p_counter ); + INSERT_ELEM( p_obj->p_libvlc_global->pp_timers, p_obj->p_libvlc_global->i_timers, + p_obj->p_libvlc_global->i_timers, p_counter ); /* 1st sample : if started: start_date, else last_time, b_started */ p_sample = (counter_sample_t *)malloc( sizeof( counter_sample_t ) ); @@ -308,80 +308,80 @@ void __stats_TimerStart( vlc_object_t *p_obj, const char *psz_name, if( p_counter->pp_samples[0]->value.b_bool == VLC_TRUE ) { msg_Warn( p_obj, "timer %s was already started !", psz_name ); - vlc_mutex_unlock( &p_obj->p_libvlc->timer_lock ); + vlc_mutex_unlock( &p_obj->p_libvlc_global->timer_lock ); return; } p_counter->pp_samples[0]->value.b_bool = VLC_TRUE; p_counter->pp_samples[0]->date = mdate(); - vlc_mutex_unlock( &p_obj->p_libvlc->timer_lock ); + vlc_mutex_unlock( &p_obj->p_libvlc_global->timer_lock ); } void __stats_TimerStop( vlc_object_t *p_obj, unsigned int i_id ) { counter_t *p_counter = NULL; int i; - if( !p_obj->p_libvlc->b_stats ) return; - vlc_mutex_lock( &p_obj->p_libvlc->timer_lock ); - for( i = 0 ; i < p_obj->p_libvlc->i_timers; i++ ) + if( !p_obj->p_libvlc_global->b_stats ) return; + vlc_mutex_lock( &p_obj->p_libvlc_global->timer_lock ); + for( i = 0 ; i < p_obj->p_libvlc_global->i_timers; i++ ) { - if( p_obj->p_libvlc->pp_timers[i]->i_id == i_id ) + if( p_obj->p_libvlc_global->pp_timers[i]->i_id == i_id ) { - p_counter = p_obj->p_libvlc->pp_timers[i]; + p_counter = p_obj->p_libvlc_global->pp_timers[i]; break; } } if( !p_counter || p_counter->i_samples != 2 ) { msg_Err( p_obj, "timer does not exist" ); - vlc_mutex_unlock( &p_obj->p_libvlc->timer_lock ); + vlc_mutex_unlock( &p_obj->p_libvlc_global->timer_lock ); return; } p_counter->pp_samples[0]->value.b_bool = VLC_FALSE; p_counter->pp_samples[1]->value.i_int += 1; p_counter->pp_samples[0]->date = mdate() - p_counter->pp_samples[0]->date; p_counter->pp_samples[1]->date += p_counter->pp_samples[0]->date; - vlc_mutex_unlock( &p_obj->p_libvlc->timer_lock ); + vlc_mutex_unlock( &p_obj->p_libvlc_global->timer_lock ); } void __stats_TimerDump( vlc_object_t *p_obj, unsigned int i_id ) { counter_t *p_counter = NULL; int i; - if( !p_obj->p_libvlc->b_stats ) return; - vlc_mutex_lock( &p_obj->p_libvlc->timer_lock ); - for( i = 0 ; i < p_obj->p_libvlc->i_timers; i++ ) + if( !p_obj->p_libvlc_global->b_stats ) return; + vlc_mutex_lock( &p_obj->p_libvlc_global->timer_lock ); + for( i = 0 ; i < p_obj->p_libvlc_global->i_timers; i++ ) { - if( p_obj->p_libvlc->pp_timers[i]->i_id == i_id ) + if( p_obj->p_libvlc_global->pp_timers[i]->i_id == i_id ) { - p_counter = p_obj->p_libvlc->pp_timers[i]; + p_counter = p_obj->p_libvlc_global->pp_timers[i]; break; } } TimerDump( p_obj, p_counter, VLC_TRUE ); - vlc_mutex_unlock( &p_obj->p_libvlc->timer_lock ); + vlc_mutex_unlock( &p_obj->p_libvlc_global->timer_lock ); } void __stats_TimersDumpAll( vlc_object_t *p_obj ) { int i; - if( !p_obj->p_libvlc->b_stats ) return; - vlc_mutex_lock( &p_obj->p_libvlc->timer_lock ); - for ( i = 0 ; i< p_obj->p_libvlc->i_timers ; i++ ) - TimerDump( p_obj, p_obj->p_libvlc->pp_timers[i], VLC_FALSE ); - vlc_mutex_unlock( &p_obj->p_libvlc->timer_lock ); + if( !p_obj->p_libvlc_global->b_stats ) return; + vlc_mutex_lock( &p_obj->p_libvlc_global->timer_lock ); + for ( i = 0 ; i< p_obj->p_libvlc_global->i_timers ; i++ ) + TimerDump( p_obj, p_obj->p_libvlc_global->pp_timers[i], VLC_FALSE ); + vlc_mutex_unlock( &p_obj->p_libvlc_global->timer_lock ); } void __stats_TimersClean( vlc_object_t *p_obj ) { int i; - vlc_mutex_lock( &p_obj->p_libvlc->timer_lock ); - for ( i = p_obj->p_libvlc->i_timers -1 ; i >= 0; i-- ) + vlc_mutex_lock( &p_obj->p_libvlc_global->timer_lock ); + for ( i = p_obj->p_libvlc_global->i_timers -1 ; i >= 0; i-- ) { - counter_t *p_counter = p_obj->p_libvlc->pp_timers[i]; - REMOVE_ELEM( p_obj->p_libvlc->pp_timers, p_obj->p_libvlc->i_timers, i ); + counter_t *p_counter = p_obj->p_libvlc_global->pp_timers[i]; + REMOVE_ELEM( p_obj->p_libvlc_global->pp_timers, p_obj->p_libvlc_global->i_timers, i ); stats_CounterClean( p_counter ); } - vlc_mutex_unlock( &p_obj->p_libvlc->timer_lock ); + vlc_mutex_unlock( &p_obj->p_libvlc_global->timer_lock ); } void stats_CounterClean( counter_t *p_c ) diff --git a/src/misc/threads.c b/src/misc/threads.c index f7142c96a4..b372e748f7 100644 --- a/src/misc/threads.c +++ b/src/misc/threads.c @@ -71,7 +71,7 @@ struct vlc_namedmutex_t *****************************************************************************/ int __vlc_threads_init( vlc_object_t *p_this ) { - libvlc_t *p_libvlc = (libvlc_t *)p_this; + libvlc_global_data_t *p_libvlc_global = (libvlc_global_data_t *)p_this; int i_ret = VLC_SUCCESS; /* If we have lazy mutex initialization, use it. Otherwise, we just @@ -91,7 +91,7 @@ int __vlc_threads_init( vlc_object_t *p_this ) i_status = VLC_THREADS_PENDING; /* We should be safe now. Do all the initialization stuff we want. */ - p_libvlc->b_ready = VLC_FALSE; + p_libvlc_global->b_ready = VLC_FALSE; #if defined( PTH_INIT_IN_PTH_H ) i_ret = ( pth_init() == FALSE ); @@ -112,25 +112,25 @@ int __vlc_threads_init( vlc_object_t *p_this ) hInstLib = LoadLibrary( "kernel32" ); if( hInstLib ) { - p_libvlc->SignalObjectAndWait = + p_libvlc_global->SignalObjectAndWait = (SIGNALOBJECTANDWAIT)GetProcAddress( hInstLib, "SignalObjectAndWait" ); } } else { - p_libvlc->SignalObjectAndWait = NULL; + p_libvlc_global->SignalObjectAndWait = NULL; } - p_libvlc->b_fast_mutex = 0; - p_libvlc->i_win9x_cv = 0; + p_libvlc_global->b_fast_mutex = 0; + p_libvlc_global->i_win9x_cv = 0; #elif defined( HAVE_KERNEL_SCHEDULER_H ) #elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) #elif defined( HAVE_CTHREADS_H ) #endif - p_root = vlc_object_create( p_libvlc, VLC_OBJECT_ROOT ); + p_root = vlc_object_create( p_libvlc_global, VLC_OBJECT_ROOT ); if( p_root == NULL ) i_ret = VLC_ENOMEM; @@ -243,8 +243,8 @@ int __vlc_mutex_init( vlc_object_t *p_this, vlc_mutex_t *p_mutex ) * function and have a 100% correct vlc_cond_wait() implementation. * As this function is not available on Win9x, we can use the faster * CriticalSections */ - if( p_this->p_libvlc->SignalObjectAndWait && - !p_this->p_libvlc->b_fast_mutex ) + if( p_this->p_libvlc_global->SignalObjectAndWait && + !p_this->p_libvlc_global->b_fast_mutex ) { /* We are running on NT/2K/XP, we can use SignalObjectAndWait */ p_mutex->mutex = CreateMutex( 0, FALSE, 0 ); @@ -393,10 +393,11 @@ int __vlc_cond_init( vlc_object_t *p_this, vlc_cond_t *p_condvar ) p_condvar->i_waiting_threads = 0; /* Misc init */ - p_condvar->i_win9x_cv = p_this->p_libvlc->i_win9x_cv; - p_condvar->SignalObjectAndWait = p_this->p_libvlc->SignalObjectAndWait; + p_condvar->i_win9x_cv = p_this->p_libvlc_global->i_win9x_cv; + p_condvar->SignalObjectAndWait = p_this->p_libvlc_global->SignalObjectAndWait; - if( (p_condvar->SignalObjectAndWait && !p_this->p_libvlc->b_fast_mutex) + if( (p_condvar->SignalObjectAndWait && + !p_this->p_libvlc_global->b_fast_mutex) || p_condvar->i_win9x_cv == 0 ) { /* Create an auto-reset event. */ diff --git a/src/misc/update.c b/src/misc/update.c index 2aca964fb1..07f6375673 100644 --- a/src/misc/update.c +++ b/src/misc/update.c @@ -124,7 +124,7 @@ update_t *__update_New( vlc_object_t *p_this ) vlc_mutex_init( p_this, &p_update->lock ); - p_update->p_vlc = p_this->p_vlc; + p_update->p_libvlc = p_this->p_libvlc; p_update->p_releases = NULL; p_update->i_releases = 0; @@ -237,17 +237,17 @@ void GetMirrorsList( update_t *p_update, vlc_bool_t b_force ) return; } - p_xml = xml_Create( p_update->p_vlc ); + p_xml = xml_Create( p_update->p_libvlc ); if( !p_xml ) { - msg_Err( p_update->p_vlc, "Failed to open XML parser" ); + msg_Err( p_update->p_libvlc, "Failed to open XML parser" ); goto error; } - p_stream = stream_UrlNew( p_update->p_vlc, UPDATE_VLC_MIRRORS_URL ); + p_stream = stream_UrlNew( p_update->p_libvlc, UPDATE_VLC_MIRRORS_URL ); if( !p_stream ) { - msg_Err( p_update->p_vlc, "Failed to open %s for reading", + msg_Err( p_update->p_libvlc, "Failed to open %s for reading", UPDATE_VLC_MIRRORS_URL ); goto error; } @@ -256,7 +256,7 @@ void GetMirrorsList( update_t *p_update, vlc_bool_t b_force ) if( !p_xml_reader ) { - msg_Err( p_update->p_vlc, "Failed to open %s for parsing", + msg_Err( p_update->p_libvlc, "Failed to open %s for parsing", UPDATE_VLC_MIRRORS_URL ); goto error; } @@ -271,7 +271,7 @@ void GetMirrorsList( update_t *p_update, vlc_bool_t b_force ) switch( xml_ReaderNodeType( p_xml_reader ) ) { case -1: - msg_Err( p_update->p_vlc, "Error while parsing %s", + msg_Err( p_update->p_libvlc, "Error while parsing %s", UPDATE_VLC_MIRRORS_URL ); goto error; @@ -279,7 +279,7 @@ void GetMirrorsList( update_t *p_update, vlc_bool_t b_force ) psz_eltname = xml_ReaderName( p_xml_reader ); if( !psz_eltname ) { - msg_Err( p_update->p_vlc, "Error while parsing %s", + msg_Err( p_update->p_libvlc, "Error while parsing %s", UPDATE_VLC_MIRRORS_URL ); goto error; } @@ -291,7 +291,7 @@ void GetMirrorsList( update_t *p_update, vlc_bool_t b_force ) if( !psz_name || !psz_value ) { - msg_Err( p_update->p_vlc, "Error while parsing %s", + msg_Err( p_update->p_libvlc, "Error while parsing %s", UPDATE_VLC_MIRRORS_URL ); goto error; } @@ -334,7 +334,7 @@ void GetMirrorsList( update_t *p_update, vlc_bool_t b_force ) psz_eltname = xml_ReaderName( p_xml_reader ); if( !psz_eltname ) { - msg_Err( p_update->p_vlc, "Error while parsing %s", + msg_Err( p_update->p_libvlc, "Error while parsing %s", UPDATE_VLC_MIRRORS_URL ); goto error; } @@ -414,17 +414,17 @@ void GetFilesList( update_t *p_update, vlc_bool_t b_force ) return; } - p_xml = xml_Create( p_update->p_vlc ); + p_xml = xml_Create( p_update->p_libvlc ); if( !p_xml ) { - msg_Err( p_update->p_vlc, "Failed to open XML parser" ); + msg_Err( p_update->p_libvlc, "Failed to open XML parser" ); goto error; } - p_stream = stream_UrlNew( p_update->p_vlc, UPDATE_VLC_STATUS_URL ); + p_stream = stream_UrlNew( p_update->p_libvlc, UPDATE_VLC_STATUS_URL ); if( !p_stream ) { - msg_Err( p_update->p_vlc, "Failed to open %s for reading", + msg_Err( p_update->p_libvlc, "Failed to open %s for reading", UPDATE_VLC_STATUS_URL ); goto error; } @@ -433,7 +433,7 @@ void GetFilesList( update_t *p_update, vlc_bool_t b_force ) if( !p_xml_reader ) { - msg_Err( p_update->p_vlc, "Failed to open %s for parsing", + msg_Err( p_update->p_libvlc, "Failed to open %s for parsing", UPDATE_VLC_STATUS_URL ); goto error; } @@ -448,7 +448,7 @@ void GetFilesList( update_t *p_update, vlc_bool_t b_force ) switch( xml_ReaderNodeType( p_xml_reader ) ) { case -1: - msg_Err( p_update->p_vlc, "Error while parsing %s", + msg_Err( p_update->p_libvlc, "Error while parsing %s", UPDATE_VLC_STATUS_URL ); goto error; @@ -456,7 +456,7 @@ void GetFilesList( update_t *p_update, vlc_bool_t b_force ) psz_eltname = xml_ReaderName( p_xml_reader ); if( !psz_eltname ) { - msg_Err( p_update->p_vlc, "Error while parsing %s", + msg_Err( p_update->p_libvlc, "Error while parsing %s", UPDATE_VLC_STATUS_URL ); goto error; } @@ -468,7 +468,7 @@ void GetFilesList( update_t *p_update, vlc_bool_t b_force ) if( !psz_name || !psz_value ) { - msg_Err( p_update->p_vlc, "Error while parsing %s", + msg_Err( p_update->p_libvlc, "Error while parsing %s", UPDATE_VLC_STATUS_URL ); goto error; } @@ -616,7 +616,7 @@ void GetFilesList( update_t *p_update, vlc_bool_t b_force ) psz_eltname = xml_ReaderName( p_xml_reader ); if( !psz_eltname ) { - msg_Err( p_update->p_vlc, "Error while parsing %s", + msg_Err( p_update->p_libvlc, "Error while parsing %s", UPDATE_VLC_STATUS_URL ); goto error; } @@ -1207,7 +1207,7 @@ void update_download_for_real( download_thread_t *p_this ); void update_download( update_iterator_t *p_uit, char *psz_dest ) { download_thread_t *p_dt = - vlc_object_create( p_uit->p_u->p_vlc, sizeof( download_thread_t ) ); + vlc_object_create( p_uit->p_u->p_libvlc, sizeof( download_thread_t ) ); p_dt->psz_dest = strdup( psz_dest ); p_dt->psz_src = strdup( p_uit->file.psz_url ); @@ -1251,7 +1251,7 @@ void update_download_for_real( download_thread_t *p_this ) char *psz_dest = p_this->psz_dest; char *psz_src = p_this->psz_src; stream_t *p_stream; - vlc_t *p_vlc = p_this->p_vlc; + libvlc_int_t *p_libvlc = p_this->p_libvlc; FILE *p_file = NULL; void *p_buffer; @@ -1265,16 +1265,16 @@ void update_download_for_real( download_thread_t *p_this ) asprintf( &psz_status, "%s\nDownloading... 0.0/? %.1f%% done", p_this->psz_status, 0.0 ); - i_progress = intf_UserProgress( p_vlc, "Downloading...", + i_progress = intf_UserProgress( p_libvlc, "Downloading...", psz_status, 0.0, 0 ); - p_stream = stream_UrlNew( p_vlc, psz_src ); + p_stream = stream_UrlNew( p_libvlc, psz_src ); if( !p_stream ) { - msg_Err( p_vlc, "Failed to open %s for reading", psz_src ); - intf_UserFatal( p_vlc, VLC_TRUE, "Error while Downloading...", + msg_Err( p_libvlc, "Failed to open %s for reading", psz_src ); + intf_UserFatal( p_libvlc, VLC_TRUE, "Error while Downloading...", "VLC failed to open %s for reading.", psz_src ); - intf_UserHide( p_vlc, i_progress ); + intf_UserHide( p_libvlc, i_progress ); } else { @@ -1282,10 +1282,10 @@ void update_download_for_real( download_thread_t *p_this ) p_file = utf8_fopen( psz_dest, "w" ); if( !p_file ) { - msg_Err( p_vlc, "Failed to open %s for writing", psz_dest ); - intf_UserFatal( p_vlc, VLC_TRUE, "Error while Downloading...", + msg_Err( p_libvlc, "Failed to open %s for writing", psz_dest ); + intf_UserFatal( p_libvlc, VLC_TRUE, "Error while Downloading...", "VLC failed to open %s for writing.", psz_dest ); - intf_UserHide( p_vlc, i_progress ); + intf_UserHide( p_libvlc, i_progress ); } else { @@ -1310,7 +1310,7 @@ void update_download_for_real( download_thread_t *p_this ) p_this->psz_status, psz_s1, psz_s2, f_progress ); free( psz_s1 ); free( psz_s2 ); - intf_ProgressUpdate( p_vlc, i_progress, + intf_ProgressUpdate( p_libvlc, i_progress, psz_status, f_progress, 0 ); } @@ -1323,7 +1323,7 @@ void update_download_for_real( download_thread_t *p_this ) asprintf( &psz_status, "%s\nDone %s (100.00%%)", p_this->psz_status, psz_s2 ); free( psz_s2 ); - intf_ProgressUpdate( p_vlc, i_progress, psz_status, 100.0, 0 ); + intf_ProgressUpdate( p_libvlc, i_progress, psz_status, 100.0, 0 ); free( psz_status ); } } diff --git a/src/misc/vlm.c b/src/misc/vlm.c index 1e7ee80414..b8c5b262b5 100644 --- a/src/misc/vlm.c +++ b/src/misc/vlm.c @@ -74,8 +74,8 @@ vlm_t *__vlm_New ( vlc_object_t *p_this ) char *psz_vlmconf; /* to be sure to avoid multiple creation */ - var_Create( p_this->p_libvlc, "vlm_mutex", VLC_VAR_MUTEX ); - var_Get( p_this->p_libvlc, "vlm_mutex", &lockval ); + var_Create( p_this->p_libvlc_global, "vlm_mutex", VLC_VAR_MUTEX ); + var_Get( p_this->p_libvlc_global, "vlm_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); if( !(p_vlm = vlc_object_find( p_this, VLC_OBJECT_VLM, FIND_ANYWHERE )) ) @@ -87,7 +87,7 @@ vlm_t *__vlm_New ( vlc_object_t *p_this ) return NULL; } - vlc_mutex_init( p_this->p_vlc, &p_vlm->lock ); + vlc_mutex_init( p_this->p_libvlc, &p_vlm->lock ); p_vlm->i_media = 0; p_vlm->media = NULL; p_vlm->i_vod = 0; @@ -95,7 +95,7 @@ vlm_t *__vlm_New ( vlc_object_t *p_this ) p_vlm->schedule = NULL; vlc_object_yield( p_vlm ); - vlc_object_attach( p_vlm, p_this->p_vlc ); + vlc_object_attach( p_vlm, p_this->p_libvlc ); } vlc_mutex_unlock( lockval.p_address ); @@ -139,7 +139,7 @@ void vlm_Delete( vlm_t *p_vlm ) { vlc_value_t lockval; - var_Get( p_vlm->p_libvlc, "vlm_mutex", &lockval ); + var_Get( p_vlm->p_libvlc_global, "vlm_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); vlc_object_release( p_vlm ); diff --git a/src/misc/win32_specific.c b/src/misc/win32_specific.c index 55f5abd533..bc8a249f9f 100644 --- a/src/misc/win32_specific.c +++ b/src/misc/win32_specific.c @@ -72,7 +72,7 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) if( (psz_vlc = strrchr( psz_path, '\\' )) ) *psz_vlc = '\0'; - p_this->p_libvlc->psz_vlcpath = strdup( psz_path ); + p_this->p_libvlc_global->psz_vlcpath = strdup( psz_path ); /* Set the default file-translation mode */ #if !defined( UNDER_CE ) @@ -120,8 +120,8 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND, UINT, WPARAM, LPARAM ); void system_Configure( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) { #if !defined( UNDER_CE ) - p_this->p_libvlc->b_fast_mutex = config_GetInt( p_this, "fast-mutex" ); - p_this->p_libvlc->i_win9x_cv = config_GetInt( p_this, "win9x-cv-method" ); + p_this->p_libvlc_global->b_fast_mutex = config_GetInt( p_this, "fast-mutex" ); + p_this->p_libvlc_global->i_win9x_cv = config_GetInt( p_this, "win9x-cv-method" ); /* Raise default priority of the current process */ #ifndef ABOVE_NORMAL_PRIORITY_CLASS @@ -351,10 +351,10 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam, *****************************************************************************/ void system_End( vlc_t *p_this ) { - if( p_this && p_this->p_libvlc && p_this->p_libvlc->psz_vlcpath ) + if( p_this && p_this->p_libvlc_global && p_this->p_libvlc_global->psz_vlcpath ) { - free( p_this->p_libvlc->psz_vlcpath ); - p_this->p_libvlc->psz_vlcpath = NULL; + free( p_this->p_libvlc_global->psz_vlcpath ); + p_this->p_libvlc_global->psz_vlcpath = NULL; } WSACleanup(); diff --git a/src/network/httpd.c b/src/network/httpd.c index aaae10fd4a..6e1af91c6a 100644 --- a/src/network/httpd.c +++ b/src/network/httpd.c @@ -986,8 +986,8 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname, } /* to be sure to avoid multiple creation */ - var_Create( p_this->p_libvlc, "httpd_mutex", VLC_VAR_MUTEX ); - var_Get( p_this->p_libvlc, "httpd_mutex", &lockval ); + var_Create( p_this->p_libvlc_global, "httpd_mutex", VLC_VAR_MUTEX ); + var_Get( p_this->p_libvlc_global, "httpd_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); if( !(httpd = vlc_object_find( p_this, VLC_OBJECT_HTTPD, FIND_ANYWHERE )) ) @@ -1004,7 +1004,7 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname, httpd->host = NULL; vlc_object_yield( httpd ); - vlc_object_attach( httpd, p_this->p_vlc ); + vlc_object_attach( httpd, p_this->p_libvlc ); } /* verify if it already exist */ @@ -1119,7 +1119,7 @@ void httpd_HostDelete( httpd_host_t *host ) vlc_value_t lockval; int i; - var_Get( httpd->p_libvlc, "httpd_mutex", &lockval ); + var_Get( httpd->p_libvlc_global, "httpd_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); host->i_ref--; diff --git a/src/network/tls.c b/src/network/tls.c index eb145d148f..17e671080c 100644 --- a/src/network/tls.c +++ b/src/network/tls.c @@ -37,8 +37,8 @@ tls_Init( vlc_object_t *p_this ) tls_t *p_tls; vlc_value_t lockval; - var_Create( p_this->p_libvlc, "tls_mutex", VLC_VAR_MUTEX ); - var_Get( p_this->p_libvlc, "tls_mutex", &lockval ); + var_Create( p_this->p_libvlc_global, "tls_mutex", VLC_VAR_MUTEX ); + var_Get( p_this->p_libvlc_global, "tls_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); p_tls = vlc_object_find( p_this, VLC_OBJECT_TLS, FIND_ANYWHERE ); @@ -61,7 +61,7 @@ tls_Init( vlc_object_t *p_this ) return NULL; } - vlc_object_attach( p_tls, p_this->p_vlc ); + vlc_object_attach( p_tls, p_this->p_libvlc ); vlc_object_yield( p_tls ); msg_Dbg( p_tls, "TLS/SSL provider initialized" ); } @@ -76,7 +76,7 @@ tls_Deinit( tls_t *p_tls ) int i; vlc_value_t lockval; - var_Get( p_tls->p_libvlc, "tls_mutex", &lockval ); + var_Get( p_tls->p_libvlc_global, "tls_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); vlc_object_release( p_tls ); diff --git a/src/osd/osd.c b/src/osd/osd.c index 76f1ce208b..2980b83ab3 100644 --- a/src/osd/osd.c +++ b/src/osd/osd.c @@ -61,8 +61,8 @@ osd_menu_t *__osd_MenuCreate( vlc_object_t *p_this, const char *psz_file ) int i_steps = 0; /* to be sure to avoid multiple creation */ - var_Create( p_this->p_libvlc, "osd_mutex", VLC_VAR_MUTEX ); - var_Get( p_this->p_libvlc, "osd_mutex", &lockval ); + var_Create( p_this->p_libvlc_global, "osd_mutex", VLC_VAR_MUTEX ); + var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); if( ( p_osd = vlc_object_find( p_this, VLC_OBJECT_OSDMENU, FIND_ANYWHERE ) ) == NULL ) @@ -98,7 +98,7 @@ osd_menu_t *__osd_MenuCreate( vlc_object_t *p_this, const char *psz_file ) p_osd->i_width, p_osd->i_height, NULL ); vlc_object_yield( p_osd ); - vlc_object_attach( p_osd, p_this->p_vlc ); + vlc_object_attach( p_osd, p_this->p_libvlc ); /* Signal when an update of OSD menu is needed */ var_Create( p_osd, "osd-menu-update", VLC_VAR_BOOL ); @@ -124,7 +124,7 @@ void __osd_MenuDelete( vlc_object_t *p_this, osd_menu_t *p_osd ) if( !p_osd || !p_this ) return; - var_Get( p_this->p_libvlc, "osd_mutex", &lockval ); + var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); vlc_object_release( p_osd ); @@ -204,7 +204,7 @@ void __osd_MenuShow( vlc_object_t *p_this ) return; } - var_Get( p_this->p_libvlc, "osd_mutex", &lockval ); + var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); #if defined(OSD_MENU_DEBUG) @@ -245,7 +245,7 @@ void __osd_MenuHide( vlc_object_t *p_this ) return; } - var_Get( p_this->p_libvlc, "osd_mutex", &lockval ); + var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); #if defined(OSD_MENU_DEBUG) @@ -278,7 +278,7 @@ void __osd_MenuActivate( vlc_object_t *p_this ) return; } - var_Get( p_this->p_libvlc, "osd_mutex", &lockval ); + var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); #if defined(OSD_MENU_DEBUG) @@ -313,7 +313,7 @@ void __osd_MenuActivate( vlc_object_t *p_this ) p_button->p_current_state->p_pic ); osd_SetMenuUpdate( p_osd, VLC_TRUE ); osd_SetMenuVisible( p_osd, VLC_TRUE ); - osd_SetKeyPressed( VLC_OBJECT(p_osd->p_vlc), config_GetInt( p_osd, p_button->psz_action ) ); + osd_SetKeyPressed( VLC_OBJECT(p_osd->p_libvlc), config_GetInt( p_osd, p_button->psz_action ) ); #if defined(OSD_MENU_DEBUG) msg_Dbg( p_osd, "select (%d, %s)", config_GetInt( p_osd, p_button->psz_action ), p_button->psz_action ); #endif @@ -340,7 +340,7 @@ void __osd_MenuNext( vlc_object_t *p_this ) return; } - var_Get( p_this->p_libvlc, "osd_mutex", &lockval ); + var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); p_button = p_osd->p_state->p_visible; @@ -390,7 +390,7 @@ void __osd_MenuPrev( vlc_object_t *p_this ) return; } - var_Get( p_this->p_libvlc, "osd_mutex", &lockval ); + var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); p_button = p_osd->p_state->p_visible; @@ -443,7 +443,7 @@ void __osd_MenuUp( vlc_object_t *p_this ) return; } - var_Get( p_this->p_libvlc, "osd_mutex", &lockval ); + var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); p_button = p_osd->p_state->p_visible; @@ -479,7 +479,7 @@ void __osd_MenuUp( vlc_object_t *p_this ) */ if( p_button->b_range ) { - osd_SetKeyPressed( VLC_OBJECT(p_osd->p_vlc), config_GetInt(p_osd, p_button->psz_action) ); + osd_SetKeyPressed( VLC_OBJECT(p_osd->p_libvlc), config_GetInt(p_osd, p_button->psz_action) ); #if defined(OSD_MENU_DEBUG) msg_Dbg( p_osd, "select (%d, %s)", val.i_int, p_button->psz_action ); #endif @@ -514,7 +514,7 @@ void __osd_MenuDown( vlc_object_t *p_this ) return; } - var_Get( p_this->p_libvlc, "osd_mutex", &lockval ); + var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); p_button = p_osd->p_state->p_visible; @@ -550,7 +550,7 @@ void __osd_MenuDown( vlc_object_t *p_this ) */ if( p_button->b_range ) { - osd_SetKeyPressed( VLC_OBJECT(p_osd->p_vlc), config_GetInt(p_osd, p_button->psz_action_down) ); + osd_SetKeyPressed( VLC_OBJECT(p_osd->p_libvlc), config_GetInt(p_osd, p_button->psz_action_down) ); #if defined(OSD_MENU_DEBUG) msg_Dbg( p_osd, "select (%d, %s)", val.i_int, p_button->psz_action_down ); #endif @@ -568,7 +568,7 @@ static int osd_VolumeStep( vlc_object_t *p_this, int i_volume, int i_steps ) { int i_volume_step = 0; - i_volume_step = config_GetInt( p_this->p_vlc, "volume-step" ); + i_volume_step = config_GetInt( p_this->p_libvlc, "volume-step" ); return (i_volume/i_volume_step); } @@ -592,7 +592,7 @@ void __osd_Volume( vlc_object_t *p_this ) return; } - var_Get( p_this->p_libvlc, "osd_mutex", &lockval ); + var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); vlc_mutex_lock( lockval.p_address ); p_button = p_osd->p_state->p_volume; diff --git a/src/playlist/engine.c b/src/playlist/engine.c index f66a33b6b4..5a9c6694f5 100644 --- a/src/playlist/engine.c +++ b/src/playlist/engine.c @@ -333,7 +333,7 @@ void playlist_MainLoop( playlist_t *p_playlist ) if( b_playexit == VLC_TRUE ) { msg_Info( p_playlist, "end of playlist, exiting" ); - p_playlist->p_vlc->b_die = VLC_TRUE; + p_playlist->p_libvlc->b_die = VLC_TRUE; } p_playlist->status.i_status = PLAYLIST_STOPPED; PL_UNLOCK diff --git a/src/playlist/loadsave.c b/src/playlist/loadsave.c index b32c0ce0a2..ce6ea10d36 100644 --- a/src/playlist/loadsave.c +++ b/src/playlist/loadsave.c @@ -127,7 +127,7 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename , int playlist_MLLoad( playlist_t *p_playlist ) { - char *psz_uri, *psz_homedir =p_playlist->p_vlc->psz_homedir; + char *psz_uri, *psz_homedir =p_playlist->p_libvlc->psz_homedir; input_item_t *p_input; if( !config_GetInt( p_playlist, "media-library") ) return VLC_SUCCESS; @@ -156,7 +156,7 @@ int playlist_MLLoad( playlist_t *p_playlist ) int playlist_MLDump( playlist_t *p_playlist ) { - char *psz_uri, *psz_homedir =p_playlist->p_vlc->psz_homedir; + char *psz_uri, *psz_homedir =p_playlist->p_libvlc->psz_homedir; if( !config_GetInt( p_playlist, "media-library") ) return VLC_SUCCESS; if( !psz_homedir ) { diff --git a/src/stream_output/announce.c b/src/stream_output/announce.c index 4e31148a35..12f983344a 100644 --- a/src/stream_output/announce.c +++ b/src/stream_output/announce.c @@ -226,9 +226,7 @@ announce_handler_t *__announce_HandlerCreate( vlc_object_t *p_this ) } p_announce->p_sap = NULL; - - vlc_object_attach( p_announce, p_this->p_vlc); - + vlc_object_attach( p_announce, p_this->p_libvlc); return p_announce; } diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c index c8bc465ce4..48bc20b2bb 100644 --- a/src/stream_output/stream_output.c +++ b/src/stream_output/stream_output.c @@ -363,7 +363,7 @@ int sout_AccessOutWrite( sout_access_out_t *p_access, block_t *p_buffer ) int i_total = 0; p_access->i_writes++; p_access->i_sent_bytes += p_buffer->i_buffer; - if( p_access->p_libvlc->b_stats && p_access->i_writes % 30 == 0 ) + if( p_access->p_libvlc_global->b_stats && p_access->i_writes % 30 == 0 ) { /* Access_out -> sout_instance -> input_thread_t */ input_thread_t *p_input = diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c index 57e15e8349..8f0944f96f 100644 --- a/src/video_output/vout_intf.c +++ b/src/video_output/vout_intf.c @@ -92,7 +92,7 @@ void *vout_RequestWindow( vout_thread_t *p_vout, *pi_height_hint = p_vout->i_window_height; /* Check whether someone provided us with a window ID */ - var_Get( p_vout->p_vlc, "drawable", &val ); + var_Get( p_vout->p_libvlc, "drawable", &val ); if( val.i_int ) return (void *)val.i_int; /* Find if the main interface supports embedding */ @@ -550,14 +550,14 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic ) #if defined(__APPLE__) || defined(SYS_BEOS) - if( !val.psz_string && p_vout->p_vlc->psz_homedir ) + if( !val.psz_string && p_vout->p_libvlc->psz_homedir ) { asprintf( &val.psz_string, "%s/Desktop", - p_vout->p_vlc->psz_homedir ); + p_vout->p_libvlc->psz_homedir ); } #elif defined(WIN32) && !defined(UNDER_CE) - if( !val.psz_string && p_vout->p_vlc->psz_homedir ) + if( !val.psz_string && p_vout->p_libvlc->psz_homedir ) { /* Get the My Pictures folder path */ @@ -604,7 +604,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic ) if( p_mypicturesdir == NULL ) { asprintf( &val.psz_string, "%s/" CONFIG_DIR, - p_vout->p_vlc->psz_homedir ); + p_vout->p_libvlc->psz_homedir ); } else { @@ -614,10 +614,10 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic ) } #else - if( !val.psz_string && p_vout->p_vlc->psz_homedir ) + if( !val.psz_string && p_vout->p_libvlc->psz_homedir ) { asprintf( &val.psz_string, "%s/" CONFIG_DIR, - p_vout->p_vlc->psz_homedir ); + p_vout->p_libvlc->psz_homedir ); } #endif diff --git a/src/video_output/vout_pictures.c b/src/video_output/vout_pictures.c index 0cb0c72c77..ca1f4ab188 100644 --- a/src/video_output/vout_pictures.c +++ b/src/video_output/vout_pictures.c @@ -920,7 +920,7 @@ void __vout_CopyPicture( vlc_object_t *p_this, if( p_src->p[i].i_pitch == p_dest->p[i].i_pitch ) { /* There are margins, but with the same width : perfect ! */ - p_this->p_vlc->pf_memcpy( + p_this->p_libvlc->pf_memcpy( p_dest->p[i].p_pixels, p_src->p[i].p_pixels, p_src->p[i].i_pitch * p_src->p[i].i_visible_lines ); } @@ -933,7 +933,7 @@ void __vout_CopyPicture( vlc_object_t *p_this, for( i_line = p_src->p[i].i_visible_lines; i_line--; ) { - p_this->p_vlc->pf_memcpy( p_out, p_in, + p_this->p_libvlc->pf_memcpy( p_out, p_in, p_src->p[i].i_visible_pitch ); p_in += p_src->p[i].i_pitch; p_out += p_dest->p[i].i_pitch; -- 2.39.2