Objects


Data Structures

struct  vlc_object_t
 The main vlc_object_t structure. More...

VLC_COMMON_MEMBERS these members are common for all vlc objects

const char * vlc_object_t::psz_object_type
char * vlc_object_t::psz_header
int vlc_object_t::i_flags
volatile bool vlc_object_t::b_error
 set by the object
volatile bool vlc_object_t::b_die
 set by the outside
bool vlc_object_t::b_force
 set by the outside (eg.
bool vlc_object_t::be_sure_to_add_VLC_COMMON_MEMBERS_to_struct
 Just a reminder so that people don't cast garbage.
libvlc_int_tvlc_object_t::p_libvlc
 (root of all evil) - 1
vlc_object_tvlc_object_t::p_parent
 our parent

Defines

#define VLC_OBJECT_INPUT   (-7)
#define VLC_OBJECT_DECODER   (-8)
#define VLC_OBJECT_VOUT   (-9)
#define VLC_OBJECT_AOUT   (-10)
#define VLC_OBJECT_GENERIC   (-666)
#define FIND_PARENT   0x0001
#define FIND_CHILD   0x0002
#define FIND_ANYWHERE   0x0003
#define FIND_STRICT   0x0010
#define OBJECT_FLAGS_NODBG   0x0001
#define OBJECT_FLAGS_QUIET   0x0002
#define OBJECT_FLAGS_NOINTERACT   0x0004
#define vlc_object_get_name(o)   vlc_object_get_name(VLC_OBJECT(o))
#define vlc_object_create(a, b)   __vlc_object_create( VLC_OBJECT(a), b )
#define vlc_object_set_destructor(a, b)   __vlc_object_set_destructor( VLC_OBJECT(a), b )
#define vlc_object_detach(a)   __vlc_object_detach( VLC_OBJECT(a) )
#define vlc_object_attach(a, b)   __vlc_object_attach( VLC_OBJECT(a), VLC_OBJECT(b) )
#define vlc_object_find(a, b, c)   __vlc_object_find( VLC_OBJECT(a),b,c)
#define vlc_object_find_name(a, b, c)   vlc_object_find_name( VLC_OBJECT(a),b,c)
#define vlc_object_hold(a)   __vlc_object_hold( VLC_OBJECT(a) )
#define vlc_object_release(a)   __vlc_object_release( VLC_OBJECT(a) )
#define vlc_list_children(a)   __vlc_list_children( VLC_OBJECT(a) )
#define vlc_object_kill(a)   __vlc_object_kill( VLC_OBJECT(a) )
#define vlc_object_alive(a)   vlc_object_alive( VLC_OBJECT(a) )

Typedefs

typedef void(* vlc_destructor_t )(struct vlc_object_t *)

Functions

void * __vlc_object_create (vlc_object_t *, int)
 Allocates and initializes a vlc object.
void __vlc_object_set_destructor (vlc_object_t *, vlc_destructor_t)
 Set the destructor of a vlc object.
void __vlc_object_attach (vlc_object_t *, vlc_object_t *)
 attach object to a parent object
void __vlc_object_detach (vlc_object_t *)
 detach object from its parent
void * __vlc_object_find (vlc_object_t *, int, int)
vlc_object_tvlc_object_find_name (vlc_object_t *, const char *, int)
 Finds a named object and increment its reference count.
void * __vlc_object_hold (vlc_object_t *)
 Increment an object reference counter.
void __vlc_object_release (vlc_object_t *)
vlc_list_t__vlc_list_children (vlc_object_t *)
 Gets the list of children of an objects, and increment their reference count.
void vlc_list_release (vlc_list_t *)
char * vlc_object_get_name (const vlc_object_t *)
void __vlc_object_kill (vlc_object_t *)
 Requests termination of an object, cancels the object thread, and make the object wait pipe (if it exists) readable.
static bool vlc_object_alive (const vlc_object_t *obj)

Define Documentation

#define FIND_ANYWHERE   0x0003

#define FIND_CHILD   0x0002

#define FIND_PARENT   0x0001

#define FIND_STRICT   0x0010

#define OBJECT_FLAGS_NODBG   0x0001

Referenced by __vlc_custom_create(), and QueueMsg().

#define OBJECT_FLAGS_NOINTERACT   0x0004

#define OBJECT_FLAGS_QUIET   0x0002

#define vlc_list_children (  )     __vlc_list_children( VLC_OBJECT(a) )

Referenced by DumpObject(), and ObjectKillChildrens().

#define vlc_object_alive (  )     vlc_object_alive( VLC_OBJECT(a) )

#define VLC_OBJECT_AOUT   (-10)

#define vlc_object_attach ( a,
 )     __vlc_object_attach( VLC_OBJECT(a), VLC_OBJECT(b) )

#define vlc_object_create ( a,
 )     __vlc_object_create( VLC_OBJECT(a), b )

#define VLC_OBJECT_DECODER   (-8)

#define vlc_object_detach (  )     __vlc_object_detach( VLC_OBJECT(a) )

#define vlc_object_find ( a,
b,
 )     __vlc_object_find( VLC_OBJECT(a),b,c)

#define vlc_object_find_name ( a,
b,
 )     vlc_object_find_name( VLC_OBJECT(a),b,c)

#define VLC_OBJECT_GENERIC   (-666)

#define vlc_object_get_name (  )     vlc_object_get_name(VLC_OBJECT(o))

Referenced by DumpObject(), objnamecmp(), and PrintObject().

#define vlc_object_hold (  )     __vlc_object_hold( VLC_OBJECT(a) )

#define VLC_OBJECT_INPUT   (-7)

#define vlc_object_kill (  )     __vlc_object_kill( VLC_OBJECT(a) )

#define vlc_object_release (  )     __vlc_object_release( VLC_OBJECT(a) )

Referenced by __access_New(), __aout_VolumeGet(), __aout_VolumeSet(), __demux_New(), __input_CreateAndStart(), __input_Read(), __osd_MenuDelete(), __pl_Release(), __sout_NewInstance(), __str_format_meta(), __stream_MemoryNew(), __stream_UrlNew(), __var_Command(), __vlc_object_detach(), __vlc_object_release(), __vlm_New(), __vout_Create(), __vout_OSDMessage(), __vout_Request(), __xml_Create(), PodcastConfigDialog::accept(), access_Delete(), ACL_Destroy(), Add(), VLCBookmarks::add:, AddCropVariableCallback(), aout_EnableFilter(), aout_FiltersDestroyPipeline(), aout_FindAndRestart(), aout_InputNew(), aout_MixerDelete(), aout_MixerNew(), Atmo_Shutdown(), ChapterMenu::AttachedToWindow(), TitleMenu::AttachedToWindow(), LanguageMenu::AttachedToWindow(), AudioConfig(), QVLCMenu::AudioPopupMenu(), VLCEqualizer::awakeFromNib, VLCEqualizer::bandSliderUpdated:, Callback(), CDDAFixupPlaylist(), CDDAOpen(), VLCExtended::changeAFiltersString:onOrOff:, VLCEqualizer::changePreset:, VLCExtended::changeVideoFiltersString:onOrOff:, VLCExtended::changeVoutFiltersString:onOrOff:, CheckAndStopFadeThread(), ChromaCreate(), ChromaDestroy(), VLCBookmarks::clear:, Close(), CloseEncoder(), CloseFilter(), CloseTextRenderer(), ConfigItem::ConfigItem(), CreateDecoder(), CreateFilter(), CreateVout(), Deactivate(), DecoderProcessSpu(), DeinterlaceSave(), Del(), DelCropVariableCallback(), delete_input(), DeleteDecoder(), DeleteEncoder(), DeleteFilter(), InputManager::delInput(), Demux(), demux_Delete(), demux_PacketizerDestroy(), demux_PacketizerNew(), DemuxOpen(), DestroyAout(), DestroyFilter(), dialog_Login(), dialog_ProgressCreate(), dialog_Question(), dialog_VFatal(), Dummy(), DumpCommand(), VLCBookmarks::edit:, VLCBookmarks::edit_ok:, End(), VLCEmbeddedWindow::enterFullscreen, VLCEqualizer::equalizerUpdated, EvaluateRPN(), EventIntf(), demux_sys_t::EventThread(), CmdUpdateItem::execute(), CmdSnapshot::execute(), CmdFaster::execute(), CmdSlower::execute(), CmdFullscreen::execute(), CmdDvdRootMenu::execute(), CmdDvdPreviousChapter::execute(), CmdDvdNextChapter::execute(), CmdDvdPreviousTitle::execute(), CmdDvdNextTitle::execute(), CmdLabeled::execute_on(), VLCBookmarks::extract:, Filter(), filter_chain_AppendFilterInternal(), filter_chain_DeleteFilterInternal(), filter_DeleteBlend(), FilterCallback(), FilterRelease(), FindArt(), FindFilter(), ActionsManager::fullscreen(), get_marquee_object(), getAout(), GetCurrentItem(), GetVideoSize(), GetVout(), getVout(), gnutls_ServerSessionPrepare(), gnutls_SessionClose(), VLCBookmarks::goToBookmark:, VLCControls::goToSpecificTime:, HandleKey(), httpd_TLSHostNew(), Init(), Input(), input_DecoderDelete(), input_DecoderNew(), input_DecoderSetCcState(), input_item_WriteMeta(), input_Preparse(), InputChange(), InputSourceMeta(), intf_Create(), intf_DestroyAll(), ItemChange(), VLCControls::keyEvent:, libvlc_audio_get_channel(), libvlc_audio_get_track(), libvlc_audio_get_track_count(), libvlc_audio_output_get_device_type(), libvlc_audio_output_set_device_type(), libvlc_audio_set_channel(), libvlc_audio_set_track(), libvlc_get_fullscreen(), libvlc_get_track_description(), libvlc_InternalCleanup(), libvlc_InternalDestroy(), libvlc_media_player_can_pause(), libvlc_media_player_get_chapter(), libvlc_media_player_get_chapter_count(), libvlc_media_player_get_chapter_count_for_title(), libvlc_media_player_get_fps(), libvlc_media_player_get_length(), libvlc_media_player_get_position(), libvlc_media_player_get_rate(), libvlc_media_player_get_state(), libvlc_media_player_get_time(), libvlc_media_player_get_title(), libvlc_media_player_get_title_count(), libvlc_media_player_has_vout(), libvlc_media_player_is_seekable(), libvlc_media_player_next_chapter(), libvlc_media_player_next_frame(), libvlc_media_player_pause(), libvlc_media_player_play(), libvlc_media_player_previous_chapter(), libvlc_media_player_set_chapter(), libvlc_media_player_set_position(), libvlc_media_player_set_rate(), libvlc_media_player_set_time(), libvlc_media_player_set_title(), libvlc_media_player_will_play(), libvlc_set_fullscreen(), libvlc_toggle_fullscreen(), libvlc_toggle_teletext(), libvlc_video_get_aspect_ratio(), libvlc_video_get_crop_geometry(), libvlc_video_get_height(), libvlc_video_get_marquee_option_as_int(), libvlc_video_get_marquee_option_as_string(), libvlc_video_get_scale(), libvlc_video_get_spu(), libvlc_video_get_spu_count(), libvlc_video_get_teletext(), libvlc_video_get_track(), libvlc_video_get_track_count(), libvlc_video_get_width(), libvlc_video_set_aspect_ratio(), libvlc_video_set_crop_geometry(), libvlc_video_set_deinterlace(), libvlc_video_set_marquee_option_as_int(), libvlc_video_set_marquee_option_as_string(), libvlc_video_set_scale(), libvlc_video_set_spu(), libvlc_video_set_subtitle_file(), libvlc_video_set_teletext(), libvlc_video_set_track(), libvlc_video_take_snapshot(), LoadFontsFromAttachments(), LoopInput(), MacroDo(), VLCMain::manage, VLCMain::manageIntf:, MarshalStatus(), mediacontrol_display_text(), mediacontrol_snapshot(), Menu(), MMSHOpen(), SeekSlider::MouseUp(), Timer::Notify(), VlcProc::on_intf_event_changed(), Interface::OnFastStream(), OnMenuEvent(), Interface::OnPlayStream(), Interface::OnSlowStream(), onSystrayChange(), onTaskBarChange(), Interface::OnVideoOnTop(), VLCExtended::opaqueSliderAction:, Open(), OpenDecoder(), OpenDisplay(), OpenFilter(), OpenWindow(), ParseExecute(), Play(), PlayItem(), Playlist(), playlist_Export(), PopupMenu(), QVLCMenu::PopupMenu(), PositionGet(), PositionSet(), PostProcessSetFilterQuality(), VLCEqualizer::preampSliderUpdated:, PutAction(), ReadMetaData(), Reassemble(), Redraw(), RefreshAudioMenu(), RefreshMenu(), RefreshNavigMenu(), RefreshVideoMenu(), VLCMain::refreshVoutDeviceMenu:, release_input_thread(), release_video(), ReleaseFilter(), VLCBookmarks::remove:, RenderCursor(), RequestAout(), VLCMain::resetScrollField, Run(), RunIntf(), Send(), EqualizerPreamp::set(), VLCMain::setupMenus, FullscreenControllerWidget::setVoutList(), VLCControls::showPosition:, VLCExtended::sliderActionAdjustImage:, VLCExtended::sliderActionMaximumAudioLevel:, ActionsManager::snapshot(), sout_AccessOutDelete(), sout_AccessOutNew(), sout_AnnounceUnRegister(), sout_DeleteInstance(), sout_InputNew(), sout_MuxDelete(), sout_MuxNew(), sout_StreamDelete(), sout_UpdateStatistic(), Spatializer::Spatializer(), spu_Attach(), spu_del_buffer(), spu_Destroy(), spu_new_buffer(), sql_Create(), sql_Destroy(), StateCallback(), StateChange(), Statistics(), stop_osdvnc(), demux_sys_t::StopUiThread(), stream_CommonDelete(), stream_CommonNew(), Stress(), system_Configure(), system_End(), InputManager::telexSetPage(), InputManager::telexSetTransparency(), VLCControls::telxNavLink:, VLCControls::telxTransparent:, VLCMain::timesliderUpdate:, tls_ClientCreate(), tls_ClientDelete(), tls_ServerCreate(), tls_ServerDelete(), VLCControls::toggleVarThread:, TrackChange(), VLCEqualizer::twopass:, UpdateCaps(), InterfaceWindow::UpdateInterface(), VLCVoutView::updateTitle, Equalizer::updateUIFromCore(), VCDClose(), VCDOpen(), video_splitter_Delete(), VideoConfig(), QVLCMenu::VideoPopupMenu(), vlc_inhibit_Create(), vlc_inhibit_Destroy(), vlc_list_release(), vlclua_fullscreen(), vlclua_gc_release(), vlclua_get_title(), vlclua_input_info(), vlclua_playlist_current(), vlclua_playlist_status(), vlclua_release_playlist_internal(), vlclua_spu_channel_clear(), vlclua_spu_channel_register(), vlm_ControlMediaAdd(), vlm_ControlMediaDel(), vlm_ControlMediaInstanceStart(), vlm_Delete(), vlm_MediaInstanceDelete(), vlm_OnMediaUpdate(), vnc_worker_thread(), Volume(), VolumeMove(), vout_Destructor(), vout_display_Delete(), vout_display_New(), vout_OSDIcon(), vout_OSDSlider(), vout_window_Delete(), vout_window_New(), WaitPreparsed(), VLCControls::windowAction:, WindowClose(), WindowOpen(), WMCOPYWNDPROC(), xml_Delete(), CmdLabeled::~CmdLabeled(), InterfaceWindow::~InterfaceWindow(), MenuItemData::~MenuItemData(), QVLCVariable::~QVLCVariable(), VlcProc::~VlcProc(), and VoutWindow::~VoutWindow().

#define vlc_object_set_destructor ( a,
 )     __vlc_object_set_destructor( VLC_OBJECT(a), b )

#define VLC_OBJECT_VOUT   (-9)


Typedef Documentation

typedef void(* vlc_destructor_t)(struct vlc_object_t *)


Function Documentation

vlc_list_t* __vlc_list_children ( vlc_object_t obj  ) 

Gets the list of children of an objects, and increment their reference count.

Returns:
a list (possibly empty) or NULL in case of error.

References i, vlc_object_internals_t::i_children, vlc_list_t::i_count, libvlc_lock(), libvlc_unlock(), NewList(), vlc_object_t::p_libvlc, vlc_value_t::p_object, vlc_list_t::p_values, vlc_object_internals_t::pp_children, vlc_internals, and vlc_object_hold.

void __vlc_object_attach ( vlc_object_t p_this,
vlc_object_t p_parent 
)

attach object to a parent object

This function sets p_this as a child of p_parent, and p_parent as a parent of p_this. This link can be undone using vlc_object_detach.

References vlc_object_internals_t::i_children, INSERT_ELEM, libvlc_lock(), libvlc_unlock(), vlc_object_t::p_libvlc, vlc_object_t::p_parent, vlc_object_internals_t::pp_children, vlc_internals, and vlc_object_hold.

void* __vlc_object_create ( vlc_object_t p_this,
int  i_type 
)

Allocates and initializes a vlc object.

Parameters:
i_type known object type (all of them are negative integer values), or object byte size (always positive).
Returns:
the new object, or NULL on error.

References psz_type, vlc_custom_create, VLC_OBJECT_AOUT, VLC_OBJECT_DECODER, and VLC_OBJECT_GENERIC.

void __vlc_object_detach ( vlc_object_t p_this  ) 

detach object from its parent

This function removes all links between an object and its parent.

References libvlc_lock(), libvlc_unlock(), vlc_object_t::p_libvlc, vlc_object_t::p_parent, vlc_object_detach_unlocked(), and vlc_object_release.

void* __vlc_object_find ( vlc_object_t ,
int  ,
int   
)

void* __vlc_object_hold ( vlc_object_t  ) 

void __vlc_object_kill ( vlc_object_t p_this  ) 

Requests termination of an object, cancels the object thread, and make the object wait pipe (if it exists) readable.

Not a cancellation point.

References vlc_object_t::b_die, msg_Dbg, pipe_lock, vlc_object_internals_t::pipes, vlc_internals, vlc_mutex_lock(), vlc_mutex_unlock(), vlc_restorecancel(), vlc_savecancel(), and vlc_thread_cancel().

void __vlc_object_release ( vlc_object_t  ) 

void __vlc_object_set_destructor ( vlc_object_t p_this,
vlc_destructor_t  pf_destructor 
)

Set the destructor of a vlc object.

This function sets the destructor of the vlc object. It will be called when the object is destroyed when the its refcount reaches 0. (It is called by the internal function vlc_object_destroy())

References vlc_object_internals_t::pf_destructor, vlc_object_internals_t::ref_spin, vlc_internals, vlc_spin_lock, and vlc_spin_unlock.

void vlc_list_release ( vlc_list_t  ) 

static bool vlc_object_alive ( const vlc_object_t obj  )  [inline, static]

vlc_object_t* vlc_object_find_name ( vlc_object_t p_this,
const char *  psz_name,
int  i_mode 
)

Finds a named object and increment its reference count.

Beware that objects found in this manner can be "owned" by another thread, be of _any_ type, and be attached to any module (if any). With such an object reference, you can set or get object variables, emit log messages, and read write-once object parameters (psz_object_type, etc). You CANNOT cast the object to a more specific object type, and you definitely cannot invoke object type-specific callbacks with this.

Parameters:
p_this object to search from
psz_name name of the object to search for
i_mode search direction: FIND_PARENT, FIND_CHILD or FIND_ANYWHERE.
Returns:
a matching object (must be released by the caller), or NULL on error.

References FIND_ANYWHERE, FIND_CHILD, FIND_STRICT, FindObjectName(), libvlc_lock(), libvlc_unlock(), msg_Warn, objnamecmp(), vlc_object_t::p_libvlc, vlc_object_t::p_parent, VLC_OBJECT, and vlc_object_hold.

char* vlc_object_get_name ( const vlc_object_t  ) 


Variable Documentation

volatile bool vlc_object_t::b_die [inherited]

volatile bool vlc_object_t::b_error [inherited]

set by the object

Referenced by __vlc_custom_create().

bool vlc_object_t::b_force [inherited]

set by the outside (eg.

module_need())

Referenced by __module_need(), __vlc_custom_create(), CDDAOpen(), and Open().

Just a reminder so that people don't cast garbage.

int vlc_object_t::i_flags [inherited]

char* vlc_object_t::psz_header [inherited]

const char* vlc_object_t::psz_object_type [inherited]


Generated on Sat Nov 21 08:06:04 2009 for VLC by  doxygen 1.5.6