[vlc-devel] [PATCH] Add new functions to libvlc to enable recording of the current media.

Rémi Denis-Courmont remi at remlab.net
Mon Jul 30 10:04:53 CEST 2012


Le lundi 30 juillet 2012 04:45:57 Alexey Sokolov, vous avez écrit :
> 30.07.2012 01:17, Mark Lee пишет:
> > diff --git a/include/vlc/libvlc_media_player.h
> > b/include/vlc/libvlc_media_player.h index 809ed5f..822f0cd 100644
> > --- a/include/vlc/libvlc_media_player.h
> > +++ b/include/vlc/libvlc_media_player.h
> > @@ -1580,6 +1580,64 @@ LIBVLC_API int libvlc_audio_set_delay(
> > libvlc_media_player_t *p_mi, int64_t i_de
> > 
> >  /** @} audio */
> > 
> > +/**
> > + * Can the media player record the current media?
> > + *
> > + * Media must be playing or buffering before it can be recorded.
> > + *
> > + * The media player event manager will emit a
> > libvlc_MediaPlayerRecordableChanged event + * when the recordable state
> > changes. The event data will describe the new recordable + * state, so
> > invocation of this API method is not strictly necessary. + *
> > + * A libvlc_MediaPlayerRecordableChanged event will not be emitted if
> > the media is + * stopped (notified by a libvlc_MediaPlayerStoppedEvent)
> > or finishes (notified by a + * libvlc_MediaPlayerFinished event).
> > + *
> > + * A calling application should therefore register a callback for those
> > events so that it + * may query the new recordable state and begin
> > recording at the appropriate time. + *
> > + * \param p_mi media player
> > + * \return true if the media player can record, false if it can not
> > + * \version LibVLC 2.1.0 or later
> > + */
> > +LIBVLC_API int libvlc_media_player_is_recordable( libvlc_media_player_t
> > *p_mi ); +
> 
> Perhaps bool here too?
> 
> > +/**
> > + * Get whether or not the media is currently being recorded.
> > + *
> > + * \param p_mi media player
> > + * \return true if recording, false if not
> > + * \version LibVLC 2.1.0 or later
> > + */
> > +LIBVLC_API int libvlc_media_player_get_record( libvlc_media_player_t
> > *p_mi ); +
> 
> And here?

No!!!!!!!!! VLC returns negative on error and 0 on success.
Please don't mix C- and C++-style error reporting.

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis



More information about the vlc-devel mailing list