Difference between revisions of "Hacker Guide/libvlc"
m (Formatting consistency, wikilinks) |
m (+{{Back to|Hacker Guide}}) |
||
Line 1: | Line 1: | ||
+ | {{Back to|Hacker Guide}} | ||
==Libvlc Startup== | ==Libvlc Startup== | ||
Latest revision as of 03:46, 17 April 2019
Libvlc Startup
Introduction
Libvlc represents the underlying API of VLC media player. VLC itself is just a wrapper around libvlc. By utilizing libvlc developers can take advantage of all the complex functionalities of vlc. Libvlc is generated as a shared library and can be wrapped up with numerous interfaces, including both Python and Java bindings. This allows the end user to build applications around the vlc code base and take advantage of all the plugins available to vlc instead of writing everything from scratch.
This document will explain how to get started using libvlc. It will step through the instantiation of a libvlc instance and explain the typical startup procedure of libvlc.
Libvlc Instantiation
Libvlc is a singleton. For each application wrapped around libvlc, only one libvlc instance should be running. In order to create an instance of libvlc, you must call libvlc_new()
. This function initializes the thread system and allocates a libvlc instance. libvlc_new()
resides in src/config/core.c.
libvlc_new()
calls libvlc_InternalInit()
which handles command line parsing, loads the module bank, and spawns a number of threads to handle various vlc subsystems. The threads are spawned from inside the function playlist_ThreadCreate()
. Below is a list of thread start functions that are run for playlist processing. The threads corresponding to these functions are spawned in the order listed.
RunPreparse()
- Perform initial parsing of the playlistRunFetcher()
- load artwork associated with playlist itemRunControlThread()
- perform playlist scheduling and playing
See Playlist for more details.
Please read the Documentation Editing Guidelines before you edit the documentation