Hello,<br><br>The functionality that this patch was intended to expose is the equivalent of the one-touch "Record" button in the vlc GUI. It simply would start/stop recording the current media.<br><br>So I'm afraid I don't think this is related to your question.<br>
<br>Regards,<br><br>-M.<br><br><div class="gmail_quote">On 29 July 2012 17:07, Tony Anecito <span dir="ltr"><<a href="mailto:adanecito@yahoo.com" target="_blank">adanecito@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td style="font:inherit" valign="top"><div>Hi Mark,</div>
<div> </div>
<div>Will we be able to get dowload status (of streaming video) already or will this help?</div>
<div> </div>
<div>Thanks,</div>
<div>Tony<br><br>--- On <b>Sun, 7/29/12, Mark Lee <i><<a href="mailto:mark.lee@capricasoftware.co.uk" target="_blank">mark.lee@capricasoftware.co.uk</a>></i></b> wrote:<br></div>
<blockquote style="BORDER-LEFT:rgb(16,16,255) 2px solid;PADDING-LEFT:5px;MARGIN-LEFT:5px"><br>From: Mark Lee <<a href="mailto:mark.lee@capricasoftware.co.uk" target="_blank">mark.lee@capricasoftware.co.uk</a>><br>Subject: [vlc-devel] [PATCH] Add methods to libvlc to enable and query recording of current media:<br>
To: <a href="mailto:vlc-devel@videolan.org" target="_blank">vlc-devel@videolan.org</a><br>Date: Sunday, July 29, 2012, 7:30 AM<br><br>
<div><div><div class="h5">* libvlc_media_player_can_record<br>* libvlc_media_player_get_record<br>* libvlc_media_player_set_record<br>---<br>include/vlc/libvlc_media_player.h | 44 +++++++++++++++++++++++++++++++++++++<br>
lib/libvlc.sym | 3 +++<br>lib/media_player.c | 44 +++++++++++++++++++++++++++++++++++++<br>3 files changed, 91 insertions(+)<br><br>diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h<br>
index 809ed5f..e6e52ad 100644<br>--- a/include/vlc/libvlc_media_player.h<br>+++ b/include/vlc/libvlc_media_player.h<br>@@ -1580,6 +1580,50 @@ LIBVLC_API int libvlc_audio_set_delay( libvlc_media_player_t *p_mi, int64_t i_de<br>
<br>/** @} audio */<br><br>+/**<br>+ * Can the media player record the current media?<br>+ *<br>+ * Media must be playing or buffering
before it can be recorded.<br>+ *<br>+ * \param p_mi media player<br>+ * \return non-zero if the media player can record, zero if it can not<br>+ * \version LibVLC 2.1.0 or later<br>+ */<br>+LIBVLC_API int libvlc_media_player_can_record( libvlc_media_player_t *p_mi );<br>
+<br>+/**<br>+ * Set whether or not recording is enabled.<br>+ *<br>+ * Media must be buffering or playing before it can be recorded.<br>+ *<br>+ * Media will be saved to the appropriate media directory, for example "~/Videos". The<br>
+ * file will not be immediately available in that directory until recording is finished.<br>+ *<br>+ * Recording can be started and stopped on-the-fly once the media has started playing,<br>+ * each time recording is stopped and restarted a new file will be created.<br>
+ *<br>+ * Recording will be stopped when the media stops playing, and must be explicitly enabled<br>+ * again to restart recording.<br>+ *<br>+ * Features such as next/previous chapter,
set time or position and so on are ineffective<br>+ * when recording is enabled.<br>+ *<br>+ * \param p_mi media player<br>+ * \param i_record start recording if non-zero, stop recording if zero<br>+ * \return zero on success, -1 on error<br>
+ * \version LibVLC 2.1.0 or later<br>+ */<br>+LIBVLC_API int libvlc_media_player_set_record( libvlc_media_player_t *p_mi, int i_record );<br>+<br>+/**<br>+ * Get whether or not the media is currently being recorded.<br>+ *<br>
+ * \param p_mi media player<br>+ * \return non-zero if recording, zero if not<br>+ * \version LibVLC 2.1.0 or later<br>+ */<br>+LIBVLC_API int libvlc_media_player_get_record( libvlc_media_player_t *p_mi );<br>+<br>/** @} media_player */<br>
<br># ifdef __cplusplus<br>diff --git a/lib/libvlc.sym b/lib/libvlc.sym<br>index 974e04f..059471c 100644<br>--- a/lib/libvlc.sym<br>+++ b/lib/libvlc.sym<br>@@ -116,6 +116,7 @@
libvlc_media_new_from_input_item<br>libvlc_media_parse<br>libvlc_media_parse_async<br>libvlc_media_player_can_pause<br>+libvlc_media_player_can_record<br>libvlc_media_player_next_frame<br>libvlc_media_player_event_manager<br>
libvlc_media_player_get_agl<br>@@ -129,6 +130,7 @@ libvlc_media_player_get_media<br>libvlc_media_player_get_nsobject<br>libvlc_media_player_get_position<br>libvlc_media_player_get_rate<br>+libvlc_media_player_get_record<br>
libvlc_media_player_get_state<br>libvlc_media_player_get_time<br>libvlc_media_player_get_title<br>@@ -153,6 +155,7 @@ libvlc_media_player_set_media<br>libvlc_media_player_set_nsobject<br>libvlc_media_player_set_position<br>
libvlc_media_player_set_rate<br>+libvlc_media_player_set_record<br>libvlc_media_player_set_time<br>libvlc_media_player_set_title<br>libvlc_media_player_set_xwindow<br>diff --git a/lib/media_player.c b/lib/media_player.c<br>
index f30f184..4d93e42 100644<br>--- a/lib/media_player.c<br>+++
b/lib/media_player.c<br>@@ -1408,3 +1408,47 @@ void libvlc_media_player_next_frame( libvlc_media_player_t *p_mi )<br> vlc_object_release( p_input_thread );<br> }<br>}<br>+<br>+int libvlc_media_player_can_record( libvlc_media_player_t *p_mi )<br>
+{<br>+ input_thread_t *p_input_thread;<br>+ bool b_can_record;<br>+<br>+ p_input_thread = libvlc_get_input_thread( p_mi );<br>+ if( !p_input_thread )<br>+ return 0;<br>+<br>+ b_can_record = var_GetBool( p_input_thread, "can-record" );<br>
+<br>+ vlc_object_release( p_input_thread );<br>+ return b_can_record;<br>+}<br>+<br>+int libvlc_media_player_set_record( libvlc_media_player_t *p_mi, int i_record )<br>+{<br>+ input_thread_t *p_input_thread;<br>
+<br>+ p_input_thread = libvlc_get_input_thread( p_mi
);<br>+ if( !p_input_thread )<br>+ return -1;<br>+<br>+ var_SetBool( p_input_thread, "record", i_record );<br>+<br>+ vlc_object_release( p_input_thread );<br>+ return 0;<br>+}<br>+<br>+int libvlc_media_player_get_record( libvlc_media_player_t *p_mi )<br>
+{<br>+ input_thread_t *p_input_thread;<br>+ bool b_record;<br>+<br>+ p_input_thread = libvlc_get_input_thread( p_mi );<br>+ if( !p_input_thread )<br>+ return 0;<br>+<br>+ b_record = var_GetBool( p_input_thread, "record" );<br>
+<br>+ vlc_object_release( p_input_thread );<br>+ return b_record;<br>+}<br>-- <br>1.7.9.5<br><br></div></div>_______________________________________________<br>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br></div></blockquote></td></tr></tbody></table><br>_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
<br></blockquote></div><br>