[vlc-commits] libvlc: add libvlc_media_get_parsed_status
Thomas Guillem
git at videolan.org
Sun Apr 17 07:22:31 CEST 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Apr 14 17:04:39 2016 +0200| [76f79cc436dc7f349970d8d47f4c085880f0082a] | committer: Thomas Guillem
libvlc: add libvlc_media_get_parsed_status
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=76f79cc436dc7f349970d8d47f4c085880f0082a
---
include/vlc/libvlc_media.h | 20 ++++++++++++++++++--
lib/libvlc.sym | 1 +
lib/media.c | 11 +++++++++++
3 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/include/vlc/libvlc_media.h b/include/vlc/libvlc_media.h
index 7f74228..2f10ec3 100644
--- a/include/vlc/libvlc_media.h
+++ b/include/vlc/libvlc_media.h
@@ -276,9 +276,11 @@ typedef enum libvlc_media_parse_flag_t
} libvlc_media_parse_flag_t;
/**
- * Parse status used sent by libvlc_media_parse_with_options()
+ * Parse status used sent by libvlc_media_parse_with_options() or returned by
+ * libvlc_media_get_parsed_status()
*
* \see libvlc_media_parse_with_options
+ * \see libvlc_media_get_parsed_status
*/
typedef enum libvlc_media_parsed_status_t
{
@@ -689,6 +691,7 @@ libvlc_media_parse_async( libvlc_media_t *p_md );
* \see libvlc_MediaParsedStatus
* \see libvlc_media_get_meta
* \see libvlc_media_tracks_get
+ * \see libvlc_media_get_parsed_status
* \see libvlc_media_parse_flag_t
*
* \param p_md media descriptor object
@@ -701,7 +704,7 @@ libvlc_media_parse_with_options( libvlc_media_t *p_md,
libvlc_media_parse_flag_t parse_flag );
/**
- * Get Parsed status for media descriptor object.
+ * Return true is the media descriptor object is parsed
*
* \see libvlc_MediaParsedChanged
*
@@ -714,6 +717,19 @@ LIBVLC_API int
libvlc_media_is_parsed( libvlc_media_t *p_md );
/**
+ * Get Parsed status for media descriptor object.
+ *
+ * \see libvlc_MediaParsedStatus
+ * \see libvlc_media_parsed_status_t
+ *
+ * \param p_md media descriptor object
+ * \return a value of the libvlc_media_parsed_status_t enum
+ * \version LibVLC 3.0.0 or later
+ */
+LIBVLC_API libvlc_media_parsed_status_t
+ libvlc_media_get_parsed_status( libvlc_media_t *p_md );
+
+/**
* Sets media descriptor's user_data. user_data is specialized data
* accessed by the host application, VLC.framework uses it as a pointer to
* an native object that references a libvlc_media_t pointer
diff --git a/lib/libvlc.sym b/lib/libvlc.sym
index 03e9a5e..c134fef 100644
--- a/lib/libvlc.sym
+++ b/lib/libvlc.sym
@@ -100,6 +100,7 @@ libvlc_media_get_type
libvlc_media_get_user_data
libvlc_media_get_tracks_info
libvlc_media_is_parsed
+libvlc_media_get_parsed_status
libvlc_media_library_load
libvlc_media_library_media_list
libvlc_media_library_new
diff --git a/lib/media.c b/lib/media.c
index c4e799f..32379a1 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -839,6 +839,17 @@ libvlc_media_is_parsed(libvlc_media_t *media)
return parsed;
}
+libvlc_media_parsed_status_t
+libvlc_media_get_parsed_status(libvlc_media_t *media)
+{
+ libvlc_media_parsed_status_t status;
+
+ vlc_mutex_lock(&media->parsed_lock);
+ status = media->parsed_status;
+ vlc_mutex_unlock(&media->parsed_lock);
+ return status;
+}
+
/**************************************************************************
* Sets media descriptor's user_data. user_data is specialized data
* accessed by the host application, VLC.framework uses it as a pointer to
More information about the vlc-commits
mailing list