home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2009 April / MAC_easy_04_2009.iso / Software / vlc-0.9.9a.dmg / VLC.app / Contents / MacOS / include / vlc / libvlc.h < prev    next >
Encoding:
C/C++ Source or Header  |  2009-04-04  |  39.7 KB  |  1,297 lines

  1. /*****************************************************************************
  2.  * libvlc.h:  libvlc external API
  3.  *****************************************************************************
  4.  * Copyright (C) 1998-2005 the VideoLAN team
  5.  * $Id: f262fb996a2488f2456b1fca76f2badc0733f320 $
  6.  *
  7.  * Authors: Cl√©ment Stenac <zorglub@videolan.org>
  8.  *          Jean-Paul Saman <jpsaman@videolan.org>
  9.  *          Pierre d'Herbemont <pdherbemont@videolan.org>
  10.  *
  11.  * This program is free software; you can redistribute it and/or modify
  12.  * it under the terms of the GNU General Public License as published by
  13.  * the Free Software Foundation; either version 2 of the License, or
  14.  * (at your option) any later version.
  15.  *
  16.  * This program is distributed in the hope that it will be useful,
  17.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.  * GNU General Public License for more details.
  20.  *
  21.  * You should have received a copy of the GNU General Public License
  22.  * along with this program; if not, write to the Free Software
  23.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  24.  *****************************************************************************/
  25.  
  26. /**
  27.  * \file
  28.  * This file defines libvlc external API
  29.  */
  30.  
  31. /**
  32.  * \defgroup libvlc libvlc
  33.  * This is libvlc, the base library of the VLC program.
  34.  *
  35.  * @{
  36.  */
  37.  
  38. #ifndef VLC_LIBVLC_H
  39. #define VLC_LIBVLC_H 1
  40.  
  41. #if defined (WIN32) && defined (DLL_EXPORT)
  42. # define VLC_PUBLIC_API __declspec(dllexport)
  43. #else
  44. # define VLC_PUBLIC_API
  45. #endif
  46.  
  47. #ifdef __LIBVLC__
  48. /* Avoid unuseful warnings from libvlc with our deprecated APIs */
  49. #   define VLC_DEPRECATED_API VLC_PUBLIC_API
  50. #elif defined(__GNUC__) && \
  51.       (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
  52. # define VLC_DEPRECATED_API VLC_PUBLIC_API __attribute__((deprecated))
  53. #else
  54. # define VLC_DEPRECATED_API VLC_PUBLIC_API
  55. #endif
  56.  
  57. # ifdef __cplusplus
  58. extern "C" {
  59. # endif
  60.  
  61. /*****************************************************************************
  62.  * Exception handling
  63.  *****************************************************************************/
  64. /** \defgroup libvlc_exception libvlc_exception
  65.  * \ingroup libvlc_core
  66.  * LibVLC Exceptions handling
  67.  * @{
  68.  */
  69.  
  70. /**
  71.  * Initialize an exception structure. This can be called several times to
  72.  * reuse an exception structure.
  73.  *
  74.  * \param p_exception the exception to initialize
  75.  */
  76. VLC_PUBLIC_API void libvlc_exception_init( libvlc_exception_t *p_exception );
  77.  
  78. /**
  79.  * Has an exception been raised?
  80.  *
  81.  * \param p_exception the exception to query
  82.  * \return 0 if the exception was raised, 1 otherwise
  83.  */
  84. VLC_PUBLIC_API int
  85. libvlc_exception_raised( const libvlc_exception_t *p_exception );
  86.  
  87. /**
  88.  * Raise an exception using a user-provided message.
  89.  *
  90.  * \param p_exception the exception to raise
  91.  * \param psz_format the exception message format string
  92.  * \param ... the format string arguments
  93.  */
  94. VLC_PUBLIC_API void
  95. libvlc_exception_raise( libvlc_exception_t *p_exception,
  96.                         const char *psz_format, ... );
  97.  
  98. /**
  99.  * Clear an exception object so it can be reused.
  100.  * The exception object must have be initialized.
  101.  *
  102.  * \param p_exception the exception to clear
  103.  */
  104. VLC_PUBLIC_API void libvlc_exception_clear( libvlc_exception_t * );
  105.  
  106. /**
  107.  * Get an exception's message.
  108.  *
  109.  * \param p_exception the exception to query
  110.  * \return the exception message or NULL if not applicable (exception not
  111.  *         raised, for example)
  112.  */
  113. VLC_PUBLIC_API const char *
  114. libvlc_exception_get_message( const libvlc_exception_t *p_exception );
  115.  
  116. /**@} */
  117.  
  118. /*****************************************************************************
  119.  * Core handling
  120.  *****************************************************************************/
  121.  
  122. /** \defgroup libvlc_core libvlc_core
  123.  * \ingroup libvlc
  124.  * LibVLC Core
  125.  * @{
  126.  */
  127.  
  128. /**
  129.  * Create and initialize a libvlc instance.
  130.  *
  131.  * \param argc the number of arguments
  132.  * \param argv command-line-type arguments. argv[0] must be the path of the
  133.  *        calling program.
  134.  * \param p_e an initialized exception pointer
  135.  * \return the libvlc instance
  136.  */
  137. VLC_PUBLIC_API libvlc_instance_t *
  138. libvlc_new( int , const char *const *, libvlc_exception_t *);
  139.  
  140. /**
  141.  * Return a libvlc instance identifier for legacy APIs. Use of this
  142.  * function is discouraged, you should convert your program to use the
  143.  * new API.
  144.  *
  145.  * \param p_instance the instance
  146.  * \return the instance identifier
  147.  */
  148. VLC_PUBLIC_API int libvlc_get_vlc_id( libvlc_instance_t *p_instance );
  149.  
  150. /**
  151.  * Decrement the reference count of a libvlc instance, and destroy it
  152.  * if it reaches zero.
  153.  *
  154.  * \param p_instance the instance to destroy
  155.  */
  156. VLC_PUBLIC_API void libvlc_release( libvlc_instance_t * );
  157.  
  158. /**
  159.  * Increments the reference count of a libvlc instance.
  160.  * The initial reference count is 1 after libvlc_new() returns.
  161.  *
  162.  * \param p_instance the instance to reference
  163.  */
  164. VLC_PUBLIC_API void libvlc_retain( libvlc_instance_t * );
  165.  
  166. /**
  167.  * Try to start a user interface for the libvlc instance, and wait until the
  168.  * user exits.
  169.  *
  170.  * \param p_instance the instance
  171.  * \param name interface name, or NULL for default
  172.  * \param p_exception an initialized exception pointer
  173.  */
  174. VLC_PUBLIC_API
  175. void libvlc_add_intf( libvlc_instance_t *p_instance, const char *name,
  176.                       libvlc_exception_t *p_exception );
  177.  
  178. /**
  179.  * Waits until an interface causes the instance to exit.
  180.  * You should start at least one interface first, using libvlc_add_intf().
  181.  *
  182.  * \param p_instance the instance
  183.  */
  184. VLC_PUBLIC_API
  185. void libvlc_wait( libvlc_instance_t *p_instance );
  186.  
  187. /**
  188.  * Retrieve libvlc version.
  189.  *
  190.  * Example: "0.9.0-git Grishenko"
  191.  *
  192.  * \return a string containing the libvlc version
  193.  */
  194. VLC_PUBLIC_API const char * libvlc_get_version(void);
  195.  
  196. /**
  197.  * Retrieve libvlc compiler version.
  198.  *
  199.  * Example: "gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu6)"
  200.  *
  201.  * \return a string containing the libvlc compiler version
  202.  */
  203. VLC_PUBLIC_API const char * libvlc_get_compiler(void);
  204.  
  205. /**
  206.  * Retrieve libvlc changeset.
  207.  *
  208.  * Example: "aa9bce0bc4"
  209.  *
  210.  * \return a string containing the libvlc changeset
  211.  */
  212. VLC_PUBLIC_API const char * libvlc_get_changeset(void);
  213.  
  214. /** @}*/
  215.  
  216. /*****************************************************************************
  217.  * media
  218.  *****************************************************************************/
  219. /** \defgroup libvlc_media libvlc_media
  220.  * \ingroup libvlc
  221.  * LibVLC Media
  222.  * @{
  223.  */
  224.  
  225. /**
  226.  * Create a media with the given MRL.
  227.  *
  228.  * \param p_instance the instance
  229.  * \param psz_mrl the MRL to read
  230.  * \param p_e an initialized exception pointer
  231.  * \return the newly created media
  232.  */
  233. VLC_PUBLIC_API libvlc_media_t * libvlc_media_new(
  234.                                    libvlc_instance_t *p_instance,
  235.                                    const char * psz_mrl,
  236.                                    libvlc_exception_t *p_e );
  237.  
  238. /**
  239.  * Create a media as an empty node with the passed name.
  240.  *
  241.  * \param p_instance the instance
  242.  * \param psz_name the name of the node
  243.  * \param p_e an initialized exception pointer
  244.  * \return the new empty media
  245.  */
  246. VLC_PUBLIC_API libvlc_media_t * libvlc_media_new_as_node(
  247.                                    libvlc_instance_t *p_instance,
  248.                                    const char * psz_name,
  249.                                    libvlc_exception_t *p_e );
  250.  
  251. /**
  252.  * Add an option to the media.
  253.  *
  254.  * This option will be used to determine how the media_player will
  255.  * read the media. This allows to use VLC's advanced
  256.  * reading/streaming options on a per-media basis.
  257.  *
  258.  * The options are detailed in vlc --long-help, for instance "--sout-all"
  259.  *
  260.  * \param p_instance the instance
  261.  * \param ppsz_options the options (as a string)
  262.  * \param p_e an initialized exception pointer
  263.  */
  264. VLC_PUBLIC_API void libvlc_media_add_option(
  265.                                    libvlc_media_t * p_md,
  266.                                    const char * ppsz_options,
  267.                                    libvlc_exception_t * p_e );
  268. /**
  269.  * Add an option to the media from an untrusted source.
  270.  *
  271.  * This option will be used to determine how the media_player will
  272.  * read the media. This allows to use VLC's advanced
  273.  * reading/streaming options on a per-media basis.
  274.  *
  275.  * The options are detailed in vlc --long-help, for instance "--sout-all"
  276.  *
  277.  * \param p_instance the instance
  278.  * \param ppsz_options the options (as a string)
  279.  * \param p_e an initialized exception pointer
  280.  */
  281. VLC_PUBLIC_API void libvlc_media_add_option_untrusted(
  282.                                    libvlc_media_t * p_md,
  283.                                    const char * ppsz_options,
  284.                                    libvlc_exception_t * p_e );
  285.  
  286.  
  287. /**
  288.  * Retain a reference to a media descriptor object (libvlc_media_t). Use
  289.  * libvlc_media_release() to decrement the reference count of a 
  290.  * media descriptor object.
  291.  *
  292.  * \param p_meta_desc a media descriptor object.
  293.  */
  294. VLC_PUBLIC_API void libvlc_media_retain(
  295.                                    libvlc_media_t *p_meta_desc );
  296.  
  297. /**
  298.  * Decrement the reference count of a media descriptor object. If the
  299.  * reference count is 0, then libvlc_media_release() will release the
  300.  * media descriptor object. It will send out an libvlc_MediaFreed event
  301.  * to all listeners. If the media descriptor object has been released it
  302.  * should not be used again.
  303.  *
  304.  * \param p_meta_desc a media descriptor object.
  305.  */
  306. VLC_PUBLIC_API void libvlc_media_release(
  307.                                    libvlc_media_t *p_meta_desc );
  308.  
  309.  
  310. /**
  311.  * Get the media resource locator (mrl) from a media descriptor object
  312.  *
  313.  * \param p_md a media descriptor object
  314.  * \param p_e an initialized exception object
  315.  * \return string with mrl of media descriptor object
  316.  */
  317. VLC_PUBLIC_API char * libvlc_media_get_mrl( libvlc_media_t * p_md,
  318.                                                        libvlc_exception_t * p_e );
  319.  
  320. /**
  321.  * Duplicate a media descriptor object.
  322.  *
  323.  * \param p_meta_desc a media descriptor object.
  324.  */
  325. VLC_PUBLIC_API libvlc_media_t * libvlc_media_duplicate( libvlc_media_t * );
  326.  
  327. /**
  328.  * Read the meta of the media.
  329.  *
  330.  * \param p_meta_desc the media to read
  331.  * \param e_meta_desc the meta to read
  332.  * \param p_e an initialized exception pointer
  333.  * \return the media's meta
  334.  */
  335. VLC_PUBLIC_API char * libvlc_media_get_meta(
  336.                                    libvlc_media_t *p_meta_desc,
  337.                                    libvlc_meta_t e_meta,
  338.                                    libvlc_exception_t *p_e );
  339. /**
  340.  * Get current state of media descriptor object. Possible media states
  341.  * are defined in libvlc_structures.c ( libvlc_NothingSpecial=0,
  342.  * libvlc_Opening, libvlc_Buffering, libvlc_Playing, libvlc_Paused,
  343.  * libvlc_Stopped, libvlc_Forward, libvlc_Backward, libvlc_Ended,
  344.  * libvlc_Error).
  345.  *
  346.  * @see libvlc_state_t
  347.  * \param p_meta_desc a media descriptor object
  348.  * \param p_e an initialized exception object
  349.  * \return state of media descriptor object
  350.  */
  351. VLC_PUBLIC_API libvlc_state_t libvlc_media_get_state(
  352.                                    libvlc_media_t *p_meta_desc,
  353.                                    libvlc_exception_t *p_e );
  354.  
  355. /**
  356.  * Get subitems of media descriptor object. This will increment
  357.  * the reference count of supplied media descriptor object. Use
  358.  * libvlc_media_list_release() to decrement the reference counting.
  359.  *
  360.  * \param p_md media descriptor object
  361.  * \param p_e initalized exception object
  362.  * \return list of media descriptor subitems or NULL
  363.  */
  364. VLC_PUBLIC_API libvlc_media_list_t *
  365.     libvlc_media_subitems( libvlc_media_t *p_md,
  366.                                       libvlc_exception_t *p_e );
  367. /**
  368.  * Get event manager from media descriptor object.
  369.  * NOTE: this function doesn't increment reference counting.
  370.  *
  371.  * \param p_md a media descriptor object
  372.  * \param p_e an initialized exception object
  373.  * \return event manager object
  374.  */
  375. VLC_PUBLIC_API libvlc_event_manager_t *
  376.     libvlc_media_event_manager( libvlc_media_t * p_md,
  377.                                            libvlc_exception_t * p_e );
  378.  
  379. /**
  380.  * Get duration of media descriptor object item.
  381.  *
  382.  * \param p_md media descriptor object
  383.  * \param p_e an initialized exception object
  384.  * \return duration of media item
  385.  */
  386. VLC_PUBLIC_API libvlc_time_t
  387.    libvlc_media_get_duration( libvlc_media_t * p_md,
  388.                                          libvlc_exception_t * p_e );
  389.  
  390. /**
  391.  * Get preparsed status for media descriptor object.
  392.  *
  393.  * \param p_md media descriptor object
  394.  * \param p_e an initialized exception object
  395.  * \return true if media object has been preparsed otherwise it returns false
  396.  */
  397. VLC_PUBLIC_API int
  398.    libvlc_media_is_preparsed( libvlc_media_t * p_md,
  399.                                          libvlc_exception_t * p_e );
  400.  
  401. /**
  402.  * Sets media descriptor's user_data. user_data is specialized data 
  403.  * accessed by the host application, VLC.framework uses it as a pointer to 
  404.  * an native object that references a libvlc_media_t pointer
  405.  *
  406.  * \param p_md media descriptor object
  407.  * \param p_new_user_data pointer to user data
  408.  * \param p_e an initialized exception object
  409.  */
  410. VLC_PUBLIC_API void
  411.     libvlc_media_set_user_data( libvlc_media_t * p_md,
  412.                                            void * p_new_user_data,
  413.                                            libvlc_exception_t * p_e);
  414.  
  415. /**
  416.  * Get media descriptor's user_data. user_data is specialized data 
  417.  * accessed by the host application, VLC.framework uses it as a pointer to 
  418.  * an native object that references a libvlc_media_t pointer
  419.  *
  420.  * \param p_md media descriptor object
  421.  * \param p_e an initialized exception object
  422.  */
  423. VLC_PUBLIC_API void *
  424.     libvlc_media_get_user_data( libvlc_media_t * p_md,
  425.                                            libvlc_exception_t * p_e);
  426.  
  427. /** @}*/
  428.  
  429. /*****************************************************************************
  430.  * Media Player
  431.  *****************************************************************************/
  432. /** \defgroup libvlc_media_player libvlc_media_player
  433.  * \ingroup libvlc
  434.  * LibVLC Media Player, object that let you play a media
  435.  * in a libvlc_drawable_t
  436.  * @{
  437.  */
  438.  
  439. /**
  440.  * Create an empty Media Player object
  441.  *
  442.  * \param p_libvlc_instance the libvlc instance in which the Media Player
  443.  *        should be created.
  444.  * \param p_e an initialized exception pointer
  445.  */
  446. VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new( libvlc_instance_t *, libvlc_exception_t * );
  447.  
  448. /**
  449.  * Create a Media Player object from a Media
  450.  *
  451.  * \param p_md the media. Afterwards the p_md can be safely
  452.  *        destroyed.
  453.  * \param p_e an initialized exception pointer
  454.  */
  455. VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new_from_media( libvlc_media_t *, libvlc_exception_t * );
  456.  
  457. /**
  458.  * Release a media_player after use
  459.  * Decrement the reference count of a media player object. If the
  460.  * reference count is 0, then libvlc_media_player_release() will 
  461.  * release the media player object. If the media player object 
  462.  * has been released, then it should not be used again.
  463.  *
  464.  * \param p_mi the Media Player to free
  465.  */
  466. VLC_PUBLIC_API void libvlc_media_player_release( libvlc_media_player_t * );
  467.  
  468. /**
  469.  * Retain a reference to a media player object. Use
  470.  * libvlc_media_player_release() to decrement reference count.
  471.  *
  472.  * \param p_mi media player object
  473.  */
  474. VLC_PUBLIC_API void libvlc_media_player_retain( libvlc_media_player_t * );
  475.  
  476. /** 
  477.  * Set the media that will be used by the media_player. If any,
  478.  * previous md will be released.
  479.  *
  480.  * \param p_mi the Media Player
  481.  * \param p_md the Media. Afterwards the p_md can be safely
  482.  *        destroyed.
  483.  * \param p_e an initialized exception pointer
  484.  */
  485. VLC_PUBLIC_API void libvlc_media_player_set_media( libvlc_media_player_t *, libvlc_media_t *, libvlc_exception_t * );
  486.  
  487. /**
  488.  * Get the media used by the media_player.
  489.  *
  490.  * \param p_mi the Media Player
  491.  * \param p_e an initialized exception pointer
  492.  * \return the media associated with p_mi, or NULL if no
  493.  *         media is associated
  494.  */
  495. VLC_PUBLIC_API libvlc_media_t * libvlc_media_player_get_media( libvlc_media_player_t *, libvlc_exception_t * );
  496.  
  497. /**
  498.  * Get the Event Manager from which the media player send event.
  499.  *
  500.  * \param p_mi the Media Player
  501.  * \param p_e an initialized exception pointer
  502.  * \return the event manager associated with p_mi
  503.  */
  504. VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_player_event_manager ( libvlc_media_player_t *, libvlc_exception_t * );
  505.  
  506. /**
  507.  * Play
  508.  *
  509.  * \param p_mi the Media Player
  510.  * \param p_e an initialized exception pointer
  511.  */
  512. VLC_PUBLIC_API void libvlc_media_player_play ( libvlc_media_player_t *, libvlc_exception_t * );
  513.  
  514. /**
  515.  * Pause
  516.  *
  517.  * \param p_mi the Media Player
  518.  * \param p_e an initialized exception pointer
  519.  */
  520. VLC_PUBLIC_API void libvlc_media_player_pause ( libvlc_media_player_t *, libvlc_exception_t * );
  521.  
  522. /**
  523.  * Stop
  524.  *
  525.  * \param p_mi the Media Player
  526.  * \param p_e an initialized exception pointer
  527.  */
  528. VLC_PUBLIC_API void libvlc_media_player_stop ( libvlc_media_player_t *, libvlc_exception_t * );
  529.  
  530. /**
  531.  * Set the drawable where the media player should render its video output
  532.  *
  533.  * \param p_mi the Media Player
  534.  * \param drawable the libvlc_drawable_t where the media player
  535.  *        should render its video
  536.  * \param p_e an initialized exception pointer
  537.  */
  538. VLC_PUBLIC_API void libvlc_media_player_set_drawable ( libvlc_media_player_t *, libvlc_drawable_t, libvlc_exception_t * );
  539.  
  540. /**
  541.  * Get the drawable where the media player should render its video output
  542.  *
  543.  * \param p_mi the Media Player
  544.  * \param p_e an initialized exception pointer
  545.  * \return the libvlc_drawable_t where the media player
  546.  *         should render its video
  547.  */
  548. VLC_PUBLIC_API libvlc_drawable_t
  549.                     libvlc_media_player_get_drawable ( libvlc_media_player_t *, libvlc_exception_t * );
  550.  
  551. /** \bug This might go away ... to be replaced by a broader system */
  552.  
  553. /**
  554.  * Get the current movie length (in ms).
  555.  *
  556.  * \param p_mi the Media Player
  557.  * \param p_e an initialized exception pointer
  558.  * \return the movie length (in ms).
  559.  */
  560. VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_length( libvlc_media_player_t *, libvlc_exception_t *);
  561.  
  562. /**
  563.  * Get the current movie time (in ms).
  564.  *
  565.  * \param p_mi the Media Player
  566.  * \param p_e an initialized exception pointer
  567.  * \return the movie time (in ms).
  568.  */
  569. VLC_PUBLIC_API libvlc_time_t libvlc_media_player_get_time( libvlc_media_player_t *, libvlc_exception_t *);
  570.  
  571. /**
  572.  * Set the movie time (in ms).
  573.  *
  574.  * \param p_mi the Media Player
  575.  * \param the movie time (in ms).
  576.  * \param p_e an initialized exception pointer
  577.  */
  578. VLC_PUBLIC_API void libvlc_media_player_set_time( libvlc_media_player_t *, libvlc_time_t, libvlc_exception_t *);
  579.  
  580. /**
  581.  * Get movie position.
  582.  *
  583.  * \param p_mi the Media Player
  584.  * \param p_e an initialized exception pointer
  585.  * \return movie position
  586.  */
  587. VLC_PUBLIC_API float libvlc_media_player_get_position( libvlc_media_player_t *, libvlc_exception_t *);
  588.  
  589. /**
  590.  * Set movie position.
  591.  *
  592.  * \param p_mi the Media Player
  593.  * \param p_e an initialized exception pointer
  594.  * \return movie position
  595.  */
  596. VLC_PUBLIC_API void libvlc_media_player_set_position( libvlc_media_player_t *, float, libvlc_exception_t *);
  597.  
  598. /**
  599.  * Set movie chapter
  600.  *
  601.  * \param p_mi the Media Player
  602.  * \param i_chapter chapter number to play
  603.  * \param p_e an initialized exception pointer
  604.  */
  605. VLC_PUBLIC_API void libvlc_media_player_set_chapter( libvlc_media_player_t *, int, libvlc_exception_t *);
  606.  
  607. /**
  608.  * Get movie chapter
  609.  *
  610.  * \param p_mi the Media Player
  611.  * \param p_e an initialized exception pointer
  612.  * \return chapter number currently playing
  613.  */
  614. VLC_PUBLIC_API int libvlc_media_player_get_chapter( libvlc_media_player_t *, libvlc_exception_t * );
  615.  
  616. /**
  617.  * Get movie chapter count
  618.  *
  619.  * \param p_mi the Media Player
  620.  * \param p_e an initialized exception pointer
  621.  * \return number of chapters in movie
  622.  */
  623. VLC_PUBLIC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *, libvlc_exception_t *);
  624. VLC_PUBLIC_API int libvlc_media_player_will_play        ( libvlc_media_player_t *, libvlc_exception_t *);
  625.  
  626. /**
  627.  * Get movie play rate
  628.  *
  629.  * \param p_mi the Media Player
  630.  * \param p_e an initialized exception pointer
  631.  * \return movie play rate
  632.  */
  633. VLC_PUBLIC_API float libvlc_media_player_get_rate( libvlc_media_player_t *, libvlc_exception_t *);
  634.  
  635. /**
  636.  * Set movie play rate
  637.  *
  638.  * \param p_mi the Media Player
  639.  * \param movie play rate to set
  640.  * \param p_e an initialized exception pointer
  641.  */
  642. VLC_PUBLIC_API void libvlc_media_player_set_rate( libvlc_media_player_t *, float, libvlc_exception_t *);
  643.  
  644. /**
  645.  * Get current movie state
  646.  *
  647.  * \param p_mi the Media Player
  648.  * \param p_e an initialized exception pointer
  649.  * \return current movie state as libvlc_state_t
  650.  */
  651. VLC_PUBLIC_API libvlc_state_t libvlc_media_player_get_state( libvlc_media_player_t *, libvlc_exception_t *);
  652.  
  653. /**
  654.  * Get movie fps rate
  655.  *
  656.  * \param p_mi the Media Player
  657.  * \param p_e an initialized exception pointer
  658.  * \return frames per second (fps) for this playing movie
  659.  */
  660. VLC_PUBLIC_API float libvlc_media_player_get_fps( libvlc_media_player_t *, libvlc_exception_t *);
  661.  
  662. /** end bug */
  663.  
  664. /**
  665.  * Does this media player have a video output?
  666.  *
  667.  * \param p_md the media player
  668.  * \param p_e an initialized exception pointer
  669.  */
  670. VLC_PUBLIC_API int  libvlc_media_player_has_vout( libvlc_media_player_t *, libvlc_exception_t *);
  671.  
  672. /**
  673.  * Is this media player seekable?
  674.  *
  675.  * \param p_input the input
  676.  * \param p_e an initialized exception pointer
  677.  */
  678. VLC_PUBLIC_API int libvlc_media_player_is_seekable( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
  679.  
  680. /**
  681.  * Can this media player be paused?
  682.  *
  683.  * \param p_input the input
  684.  * \param p_e an initialized exception pointer
  685.  */
  686. VLC_PUBLIC_API int libvlc_media_player_can_pause( libvlc_media_player_t *p_mi, libvlc_exception_t *p_e );
  687.  
  688. /** \defgroup libvlc_video libvlc_video
  689.  * \ingroup libvlc_media_player
  690.  * LibVLC Video handling
  691.  * @{
  692.  */
  693.  
  694. /**
  695.  * Toggle fullscreen status on video output.
  696.  *
  697.  * \param p_mediaplayer the media player
  698.  * \param p_e an initialized exception pointer
  699.  */
  700. VLC_PUBLIC_API void libvlc_toggle_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
  701.  
  702. /**
  703.  * Enable or disable fullscreen on a video output.
  704.  *
  705.  * \param p_mediaplayer the media player
  706.  * \param b_fullscreen boolean for fullscreen status
  707.  * \param p_e an initialized exception pointer
  708.  */
  709. VLC_PUBLIC_API void libvlc_set_fullscreen( libvlc_media_player_t *, int, libvlc_exception_t * );
  710.  
  711. /**
  712.  * Get current fullscreen status.
  713.  *
  714.  * \param p_mediaplayer the media player
  715.  * \param p_e an initialized exception pointer
  716.  * \return the fullscreen status (boolean)
  717.  */
  718. VLC_PUBLIC_API int libvlc_get_fullscreen( libvlc_media_player_t *, libvlc_exception_t * );
  719.  
  720. /**
  721.  * Get current video height.
  722.  *
  723.  * \param p_mediaplayer the media player
  724.  * \param p_e an initialized exception pointer
  725.  * \return the video height
  726.  */
  727. VLC_PUBLIC_API int libvlc_video_get_height( libvlc_media_player_t *, libvlc_exception_t * );
  728.  
  729. /**
  730.  * Get current video width.
  731.  *
  732.  * \param p_mediaplayer the media player
  733.  * \param p_e an initialized exception pointer
  734.  * \return the video width
  735.  */
  736. VLC_PUBLIC_API int libvlc_video_get_width( libvlc_media_player_t *, libvlc_exception_t * );
  737.  
  738. /**
  739.  * Get current video aspect ratio.
  740.  *
  741.  * \param p_mediaplayer the media player
  742.  * \param p_e an initialized exception pointer
  743.  * \return the video aspect ratio
  744.  */
  745. VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *, libvlc_exception_t * );
  746.  
  747. /**
  748.  * Set new video aspect ratio.
  749.  *
  750.  * \param p_mediaplayer the media player
  751.  * \param psz_aspect new video aspect-ratio
  752.  * \param p_e an initialized exception pointer
  753.  */
  754. VLC_PUBLIC_API void libvlc_video_set_aspect_ratio( libvlc_media_player_t *, char *, libvlc_exception_t * );
  755.  
  756. /**
  757.  * Get current video subtitle.
  758.  *
  759.  * \param p_mediaplayer the media player
  760.  * \param p_e an initialized exception pointer
  761.  * \return the video subtitle selected
  762.  */
  763. VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_player_t *, libvlc_exception_t * );
  764.  
  765. /**
  766.  * Set new video subtitle.
  767.  *
  768.  * \param p_mediaplayer the media player
  769.  * \param i_spu new video subtitle to select
  770.  * \param p_e an initialized exception pointer
  771.  */
  772. VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_player_t *, int , libvlc_exception_t * );
  773.  
  774. /**
  775.  * Set new video subtitle file.
  776.  *
  777.  * \param p_mediaplayer the media player
  778.  * \param psz_subtitle new video subtitle file
  779.  * \param p_e an initialized exception pointer
  780.  * \return the success status (boolean)
  781.  */
  782. VLC_PUBLIC_API int libvlc_video_set_subtitle_file( libvlc_media_player_t *, char *, libvlc_exception_t * );
  783.  
  784. /**
  785.  * Get current crop filter geometry.
  786.  *
  787.  * \param p_mediaplayer the media player
  788.  * \param p_e an initialized exception pointer
  789.  * \return the crop filter geometry
  790.  */
  791. VLC_PUBLIC_API char *libvlc_video_get_crop_geometry( libvlc_media_player_t *, libvlc_exception_t * );
  792.  
  793. /**
  794.  * Set new crop filter geometry.
  795.  *
  796.  * \param p_mediaplayer the media player
  797.  * \param psz_geometry new crop filter geometry
  798.  * \param p_e an initialized exception pointer
  799.  */
  800. VLC_PUBLIC_API void libvlc_video_set_crop_geometry( libvlc_media_player_t *, char *, libvlc_exception_t * );
  801.  
  802. /**
  803.  * Toggle teletext transparent status on video output.
  804.  *
  805.  * \param p_mediaplayer the media player
  806.  * \param p_e an initialized exception pointer
  807.  */
  808. VLC_PUBLIC_API void libvlc_toggle_teletext( libvlc_media_player_t *, libvlc_exception_t * );
  809.  
  810. /**
  811.  * Get current teletext page requested.
  812.  *
  813.  * \param p_mediaplayer the media player
  814.  * \param p_e an initialized exception pointer
  815.  * \return the current teletext page requested.
  816.  */
  817. VLC_PUBLIC_API int libvlc_video_get_teletext( libvlc_media_player_t *, libvlc_exception_t * );
  818.  
  819. /**
  820.  * Set new teletext page to retrieve.
  821.  *
  822.  * \param p_mediaplayer the media player
  823.  * \param i_page teletex page number requested
  824.  * \param p_e an initialized exception pointer
  825.  */
  826. VLC_PUBLIC_API void libvlc_video_set_teletext( libvlc_media_player_t *, int, libvlc_exception_t * );
  827.  
  828. /**
  829.  * Take a snapshot of the current video window.
  830.  *
  831.  * If i_width AND i_height is 0, original size is used.
  832.  * If i_width XOR i_height is 0, original aspect-ratio is preserved.
  833.  *
  834.  * \param p_mediaplayer the media player
  835.  * \param psz_filepath the path where to save the screenshot to
  836.  * \param i_width the snapshot's width
  837.  * \param i_height the snapshot's height
  838.  * \param p_e an initialized exception pointer
  839.  */
  840. VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, char *,unsigned int, unsigned int, libvlc_exception_t * );
  841.  
  842. /**
  843.  * Resize the current video output window.
  844.  *
  845.  * \param p_instance libvlc instance
  846.  * \param width new width for video output window
  847.  * \param height new height for video output window
  848.  * \param p_e an initialized exception pointer
  849.  * \return the success status (boolean)
  850.  */
  851. VLC_PUBLIC_API void libvlc_video_resize( libvlc_media_player_t *, int, int, libvlc_exception_t *);
  852.  
  853. /**
  854.  * Change the parent for the current the video output.
  855.  *
  856.  * \param p_instance libvlc instance
  857.  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
  858.  * \param p_e an initialized exception pointer
  859.  * \return the success status (boolean)
  860.  */
  861. VLC_PUBLIC_API int libvlc_video_reparent( libvlc_media_player_t *, libvlc_drawable_t, libvlc_exception_t * );
  862.  
  863. /**
  864.  * Tell windowless video output to redraw rectangular area (MacOS X only).
  865.  *
  866.  * \param p_instance libvlc instance
  867.  * \param area coordinates within video drawable
  868.  * \param p_e an initialized exception pointer
  869.  */
  870. VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_media_player_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
  871.  
  872. /**
  873.  * Set the default video output size.
  874.  *
  875.  * This setting will be used as default for all video outputs.
  876.  *
  877.  * \param p_instance libvlc instance
  878.  * \param width new width for video drawable
  879.  * \param height new height for video drawable
  880.  * \param p_e an initialized exception pointer
  881.  */
  882. VLC_PUBLIC_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
  883.  
  884. /**
  885.  * Set the default video output viewport for a windowless video output
  886.  * (MacOS X only).
  887.  *
  888.  * This setting will be used as default for all video outputs.
  889.  *
  890.  * \param p_instance libvlc instance
  891.  * \param view coordinates within video drawable
  892.  * \param clip coordinates within video drawable
  893.  * \param p_e an initialized exception pointer
  894.  */
  895. VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
  896.  
  897. /** @} video */
  898.  
  899. /** \defgroup libvlc_audio libvlc_audio
  900.  * \ingroup libvlc_media_player
  901.  * LibVLC Audio handling
  902.  * @{
  903.  */
  904.  
  905. /**
  906.  * Toggle mute status.
  907.  *
  908.  * \param p_instance libvlc instance
  909.  * \param p_e an initialized exception pointer
  910.  */
  911. VLC_PUBLIC_API void libvlc_audio_toggle_mute( libvlc_instance_t *, libvlc_exception_t * );
  912.  
  913. /**
  914.  * Get current mute status.
  915.  *
  916.  * \param p_instance libvlc instance
  917.  * \param p_e an initialized exception pointer
  918.  * \return the mute status (boolean)
  919.  */
  920. VLC_PUBLIC_API int libvlc_audio_get_mute( libvlc_instance_t *, libvlc_exception_t * );
  921.  
  922. /**
  923.  * Set mute status.
  924.  *
  925.  * \param p_instance libvlc instance
  926.  * \param status If status is true then mute, otherwise unmute
  927.  * \param p_e an initialized exception pointer
  928.  */
  929. VLC_PUBLIC_API void libvlc_audio_set_mute( libvlc_instance_t *, int , libvlc_exception_t * );
  930.  
  931. /**
  932.  * Get current audio level.
  933.  *
  934.  * \param p_instance libvlc instance
  935.  * \param p_e an initialized exception pointer
  936.  * \return the audio level (int)
  937.  */
  938. VLC_PUBLIC_API int libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * );
  939.  
  940. /**
  941.  * Set current audio level.
  942.  *
  943.  * \param p_instance libvlc instance
  944.  * \param i_volume the volume (int)
  945.  * \param p_e an initialized exception pointer
  946.  */
  947. VLC_PUBLIC_API void libvlc_audio_set_volume( libvlc_instance_t *, int, libvlc_exception_t *);
  948.  
  949. /**
  950.  * Get number of available audio tracks.
  951.  *
  952.  * \param p_mi media player
  953.  * \param p_e an initialized exception
  954.  * \return the number of available audio tracks (int)
  955.  */
  956. VLC_PUBLIC_API int libvlc_audio_get_track_count( libvlc_media_player_t *,  libvlc_exception_t * );
  957.  
  958. /**
  959.  * Get current audio track.
  960.  *
  961.  * \param p_mi media player
  962.  * \param p_e an initialized exception pointer
  963.  * \return the audio track (int)
  964.  */
  965. VLC_PUBLIC_API int libvlc_audio_get_track( libvlc_media_player_t *, libvlc_exception_t * );
  966.  
  967. /**
  968.  * Set current audio track.
  969.  *
  970.  * \param p_mi media player
  971.  * \param i_track the track (int)
  972.  * \param p_e an initialized exception pointer
  973.  */
  974. VLC_PUBLIC_API void libvlc_audio_set_track( libvlc_media_player_t *, int, libvlc_exception_t * );
  975.  
  976. /**
  977.  * Get current audio channel.
  978.  *
  979.  * \param p_instance vlc instance
  980.  * \param p_e an initialized exception pointer
  981.  * \return the audio channel (int)
  982.  */
  983. VLC_PUBLIC_API int libvlc_audio_get_channel( libvlc_instance_t *, libvlc_exception_t * );
  984.  
  985. /**
  986.  * Set current audio channel.
  987.  *
  988.  * \param p_instance vlc instance
  989.  * \param i_channel the audio channel (int)
  990.  * \param p_e an initialized exception pointer
  991.  */
  992. VLC_PUBLIC_API void libvlc_audio_set_channel( libvlc_instance_t *, int, libvlc_exception_t * );
  993.  
  994. /** @} audio */
  995.  
  996. /** @} media_player */
  997.  
  998. /*****************************************************************************
  999.  * Event handling
  1000.  *****************************************************************************/
  1001.  
  1002. /** \defgroup libvlc_event libvlc_event
  1003.  * \ingroup libvlc_core
  1004.  * LibVLC Events
  1005.  * @{
  1006.  */
  1007.  
  1008. /**
  1009.  * Register for an event notification.
  1010.  *
  1011.  * \param p_event_manager the event manager to which you want to attach to.
  1012.  *        Generally it is obtained by vlc_my_object_event_manager() where
  1013.  *        my_object is the object you want to listen to.
  1014.  * \param i_event_type the desired event to which we want to listen
  1015.  * \param f_callback the function to call when i_event_type occurs
  1016.  * \param user_data user provided data to carry with the event
  1017.  * \param p_e an initialized exception pointer
  1018.  */
  1019. VLC_PUBLIC_API void libvlc_event_attach( libvlc_event_manager_t *p_event_manager,
  1020.                                          libvlc_event_type_t i_event_type,
  1021.                                          libvlc_callback_t f_callback,
  1022.                                          void *user_data,
  1023.                                          libvlc_exception_t *p_e );
  1024.  
  1025. /**
  1026.  * Unregister an event notification.
  1027.  *
  1028.  * \param p_event_manager the event manager
  1029.  * \param i_event_type the desired event to which we want to unregister
  1030.  * \param f_callback the function to call when i_event_type occurs
  1031.  * \param p_user_data user provided data to carry with the event
  1032.  * \param p_e an initialized exception pointer
  1033.  */
  1034. VLC_PUBLIC_API void libvlc_event_detach( libvlc_event_manager_t *p_event_manager,
  1035.                                          libvlc_event_type_t i_event_type,
  1036.                                          libvlc_callback_t f_callback,
  1037.                                          void *p_user_data,
  1038.                                          libvlc_exception_t *p_e );
  1039.  
  1040. /**
  1041.  * Get an event's type name.
  1042.  *
  1043.  * \param i_event_type the desired event
  1044.  */
  1045. VLC_PUBLIC_API const char * libvlc_event_type_name( libvlc_event_type_t event_type );
  1046.  
  1047. /** @} */
  1048.  
  1049. /*****************************************************************************
  1050.  * Media Library
  1051.  *****************************************************************************/
  1052. /** \defgroup libvlc_media_library libvlc_media_library
  1053.  * \ingroup libvlc
  1054.  * LibVLC Media Library
  1055.  * @{
  1056.  */
  1057. VLC_PUBLIC_API libvlc_media_library_t *
  1058.     libvlc_media_library_new( libvlc_instance_t * p_inst,
  1059.                               libvlc_exception_t * p_e );
  1060.  
  1061. /**
  1062.  * Release media library object. This functions decrements the
  1063.  * reference count of the media library object. If it reaches 0,
  1064.  * then the object will be released.
  1065.  *
  1066.  * \param p_mlib media library object
  1067.  */
  1068. VLC_PUBLIC_API void
  1069.     libvlc_media_library_release( libvlc_media_library_t * p_mlib );
  1070.  
  1071. /**
  1072.  * Retain a reference to a media library object. This function will
  1073.  * increment the reference counting for this object. Use 
  1074.  * libvlc_media_library_release() to decrement the reference count.
  1075.  *
  1076.  * \param p_mlib media library object
  1077.  */
  1078. VLC_PUBLIC_API void
  1079.     libvlc_media_library_retain( libvlc_media_library_t * p_mlib );
  1080.  
  1081. /**
  1082.  * Load media library.
  1083.  *
  1084.  * \param p_mlib media library object
  1085.  * \param p_e an initialized exception object.
  1086.  */
  1087. VLC_PUBLIC_API void
  1088.     libvlc_media_library_load( libvlc_media_library_t * p_mlib,
  1089.                                libvlc_exception_t * p_e );
  1090.  
  1091. /**
  1092.  * Save media library.
  1093.  *
  1094.  * \param p_mlib media library object
  1095.  * \param p_e an initialized exception object.
  1096.  */
  1097. VLC_PUBLIC_API void
  1098.     libvlc_media_library_save( libvlc_media_library_t * p_mlib,
  1099.                                libvlc_exception_t * p_e );
  1100.  
  1101. /**
  1102.  * Get media library subitems.
  1103.  *
  1104.  * \param p_mlib media library object
  1105.  * \param p_e an initialized exception object.
  1106.  * \return media list subitems
  1107.  */
  1108. VLC_PUBLIC_API libvlc_media_list_t *
  1109.     libvlc_media_library_media_list( libvlc_media_library_t * p_mlib,
  1110.                                      libvlc_exception_t * p_e );
  1111.  
  1112.  
  1113. /** @} */
  1114.  
  1115.  
  1116. /*****************************************************************************
  1117.  * Services/Media Discovery
  1118.  *****************************************************************************/
  1119. /** \defgroup libvlc_media_discoverer libvlc_media_discoverer
  1120.  * \ingroup libvlc
  1121.  * LibVLC Media Discoverer
  1122.  * @{
  1123.  */
  1124.  
  1125. /**
  1126.  * Discover media service by name.
  1127.  *
  1128.  * \param p_inst libvlc instance
  1129.  * \param psz_name service name
  1130.  * \param p_e an initialized exception object
  1131.  * \return media discover object
  1132.  */
  1133. VLC_PUBLIC_API libvlc_media_discoverer_t *
  1134. libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
  1135.                                        const char * psz_name,
  1136.                                        libvlc_exception_t * p_e );
  1137.  
  1138. /**
  1139.  * Release media discover object. If the reference count reaches 0, then
  1140.  * the object will be released.
  1141.  *
  1142.  * \param p_mdis media service discover object
  1143.  */
  1144. VLC_PUBLIC_API void   libvlc_media_discoverer_release( libvlc_media_discoverer_t * p_mdis );
  1145.  
  1146. /**
  1147.  * Get media service discover object its localized name.
  1148.  *
  1149.  * \param media discover object
  1150.  * \return localized name
  1151.  */
  1152. VLC_PUBLIC_API char * libvlc_media_discoverer_localized_name( libvlc_media_discoverer_t * p_mdis );
  1153.  
  1154. /**
  1155.  * Get media service discover media list.
  1156.  *
  1157.  * \param p_mdis media service discover object
  1158.  * \return list of media items
  1159.  */
  1160. VLC_PUBLIC_API libvlc_media_list_t * libvlc_media_discoverer_media_list( libvlc_media_discoverer_t * p_mdis );
  1161.  
  1162. /**
  1163.  * Get event manager from media service discover object.
  1164.  *
  1165.  * \param p_mdis media service discover object
  1166.  * \return event manager object.
  1167.  */
  1168. VLC_PUBLIC_API libvlc_event_manager_t *
  1169.         libvlc_media_discoverer_event_manager( libvlc_media_discoverer_t * p_mdis );
  1170.  
  1171. /**
  1172.  * Query if media service discover object is running.
  1173.  *
  1174.  * \param p_mdis media service discover object
  1175.  * \return true if running, false if not
  1176.  */
  1177. VLC_PUBLIC_API int
  1178.         libvlc_media_discoverer_is_running( libvlc_media_discoverer_t * p_mdis );
  1179.  
  1180. /**@} */
  1181.  
  1182.  
  1183. /*****************************************************************************
  1184.  * Message log handling
  1185.  *****************************************************************************/
  1186.  
  1187. /** \defgroup libvlc_log libvlc_log
  1188.  * \ingroup libvlc_core
  1189.  * LibVLC Message Logging
  1190.  * @{
  1191.  */
  1192.  
  1193. /**
  1194.  * Return the VLC messaging verbosity level.
  1195.  *
  1196.  * \param p_instance libvlc instance
  1197.  * \param p_e an initialized exception pointer
  1198.  * \return verbosity level for messages
  1199.  */
  1200. VLC_PUBLIC_API unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance,
  1201.                                                   libvlc_exception_t *p_e );
  1202.  
  1203. /**
  1204.  * Set the VLC messaging verbosity level.
  1205.  *
  1206.  * \param p_instance libvlc log instance
  1207.  * \param level log level
  1208.  * \param p_e an initialized exception pointer
  1209.  */
  1210. VLC_PUBLIC_API void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level,
  1211.                                               libvlc_exception_t *p_e );
  1212.  
  1213. /**
  1214.  * Open a VLC message log instance.
  1215.  *
  1216.  * \param p_instance libvlc instance
  1217.  * \param p_e an initialized exception pointer
  1218.  * \return log message instance
  1219.  */
  1220. VLC_PUBLIC_API libvlc_log_t *libvlc_log_open( libvlc_instance_t *, libvlc_exception_t *);
  1221.  
  1222. /**
  1223.  * Close a VLC message log instance.
  1224.  *
  1225.  * \param p_log libvlc log instance
  1226.  * \param p_e an initialized exception pointer
  1227.  */
  1228. VLC_PUBLIC_API void libvlc_log_close( libvlc_log_t *, libvlc_exception_t *);
  1229.  
  1230. /**
  1231.  * Returns the number of messages in a log instance.
  1232.  *
  1233.  * \param p_log libvlc log instance
  1234.  * \param p_e an initialized exception pointer
  1235.  * \return number of log messages
  1236.  */
  1237. VLC_PUBLIC_API unsigned libvlc_log_count( const libvlc_log_t *, libvlc_exception_t *);
  1238.  
  1239. /**
  1240.  * Clear a log instance.
  1241.  *
  1242.  * All messages in the log are removed. The log should be cleared on a
  1243.  * regular basis to avoid clogging.
  1244.  *
  1245.  * \param p_log libvlc log instance
  1246.  * \param p_e an initialized exception pointer
  1247.  */
  1248. VLC_PUBLIC_API void libvlc_log_clear( libvlc_log_t *, libvlc_exception_t *);
  1249.  
  1250. /**
  1251.  * Allocate and returns a new iterator to messages in log.
  1252.  *
  1253.  * \param p_log libvlc log instance
  1254.  * \param p_e an initialized exception pointer
  1255.  * \return log iterator object
  1256.  */
  1257. VLC_PUBLIC_API libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *, libvlc_exception_t *);
  1258.  
  1259. /**
  1260.  * Release a previoulsy allocated iterator.
  1261.  *
  1262.  * \param p_iter libvlc log iterator
  1263.  * \param p_e an initialized exception pointer
  1264.  */
  1265. VLC_PUBLIC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
  1266.  
  1267. /**
  1268.  * Return whether log iterator has more messages.
  1269.  *
  1270.  * \param p_iter libvlc log iterator
  1271.  * \param p_e an initialized exception pointer
  1272.  * \return true if iterator has more message objects, else false
  1273.  */
  1274. VLC_PUBLIC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter, libvlc_exception_t *p_e );
  1275.  
  1276. /**
  1277.  * Return the next log message.
  1278.  *
  1279.  * The message contents must not be freed
  1280.  *
  1281.  * \param p_iter libvlc log iterator
  1282.  * \param p_buffer log buffer
  1283.  * \param p_e an initialized exception pointer
  1284.  * \return log message object
  1285.  */
  1286. VLC_PUBLIC_API libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
  1287.                                                                libvlc_log_message_t *p_buffer,
  1288.                                                                libvlc_exception_t *p_e );
  1289.  
  1290. /** @} */
  1291.  
  1292. # ifdef __cplusplus
  1293. }
  1294. # endif
  1295.  
  1296. #endif /* <vlc/libvlc.h> */
  1297.