mirror of https://code.videolan.org/videolan/vlc
lib: remove libvlc_media_thumbnail_request_cancel
Use libvlc_media_thumbnail_request_destroy() to cancel *and* destroy the thumbnail request.
This commit is contained in:
parent
ca3b131594
commit
5418c4a026
|
@ -723,8 +723,8 @@ typedef enum libvlc_thumbnailer_seek_speed_t
|
|||
* \param timeout A timeout value in ms, or 0 to disable timeout
|
||||
*
|
||||
* \return A valid opaque request object, or NULL in case of failure.
|
||||
* It may be cancelled by libvlc_media_thumbnail_request_cancel().
|
||||
* It must be released by libvlc_media_thumbnail_request_destroy().
|
||||
* It must be released by libvlc_media_thumbnail_request_destroy() and
|
||||
* can be cancelled by calling it early.
|
||||
*
|
||||
* \version libvlc 4.0 or later
|
||||
*
|
||||
|
@ -761,7 +761,6 @@ libvlc_media_thumbnail_request_by_time( libvlc_instance_t *inst,
|
|||
* \param timeout A timeout value in ms, or 0 to disable timeout
|
||||
*
|
||||
* \return A valid opaque request object, or NULL in case of failure.
|
||||
* It may be cancelled by libvlc_media_thumbnail_request_cancel().
|
||||
* It must be released by libvlc_media_thumbnail_request_destroy().
|
||||
*
|
||||
* \version libvlc 4.0 or later
|
||||
|
@ -777,23 +776,12 @@ libvlc_media_thumbnail_request_by_pos( libvlc_instance_t *inst,
|
|||
bool crop, libvlc_picture_type_t picture_type,
|
||||
libvlc_time_t timeout );
|
||||
|
||||
/**
|
||||
* @brief libvlc_media_thumbnail_cancel cancels a thumbnailing request
|
||||
* @param p_req An opaque thumbnail request object.
|
||||
*
|
||||
* Cancelling the request will still cause libvlc_MediaThumbnailGenerated event
|
||||
* to be emitted, with a NULL libvlc_picture_t
|
||||
* If the request is cancelled after its completion, the behavior is undefined.
|
||||
*/
|
||||
LIBVLC_API void
|
||||
libvlc_media_thumbnail_request_cancel( libvlc_media_thumbnail_request_t *p_req );
|
||||
|
||||
/**
|
||||
* @brief libvlc_media_thumbnail_destroy destroys a thumbnail request
|
||||
* @param p_req An opaque thumbnail request object.
|
||||
*
|
||||
* If the request has not completed or hasn't been cancelled yet, the behavior
|
||||
* is undefined
|
||||
* This will also cancel the thumbnail request, no events will be emitted after
|
||||
* this call.
|
||||
*/
|
||||
LIBVLC_API void
|
||||
libvlc_media_thumbnail_request_destroy( libvlc_media_thumbnail_request_t *p_req );
|
||||
|
|
|
@ -83,7 +83,6 @@ libvlc_media_get_user_data
|
|||
libvlc_media_get_parsed_status
|
||||
libvlc_media_thumbnail_request_by_time
|
||||
libvlc_media_thumbnail_request_by_pos
|
||||
libvlc_media_thumbnail_request_cancel
|
||||
libvlc_media_thumbnail_request_destroy
|
||||
libvlc_media_track_hold
|
||||
libvlc_media_track_release
|
||||
|
|
10
lib/media.c
10
lib/media.c
|
@ -1073,18 +1073,12 @@ libvlc_media_thumbnail_request_by_pos( libvlc_instance_t *inst,
|
|||
return req;
|
||||
}
|
||||
|
||||
// Cancel a thumbnail request
|
||||
void libvlc_media_thumbnail_request_cancel( libvlc_media_thumbnail_request_t *req )
|
||||
// Destroy a thumbnail request
|
||||
void libvlc_media_thumbnail_request_destroy( libvlc_media_thumbnail_request_t *req )
|
||||
{
|
||||
libvlc_priv_t *p_priv = libvlc_priv(req->instance->p_libvlc_int);
|
||||
assert( p_priv->p_thumbnailer != NULL );
|
||||
vlc_thumbnailer_DestroyRequest( p_priv->p_thumbnailer, req->req );
|
||||
}
|
||||
|
||||
// Destroy a thumbnail request
|
||||
void libvlc_media_thumbnail_request_destroy( libvlc_media_thumbnail_request_t *req )
|
||||
{
|
||||
libvlc_media_thumbnail_request_cancel( req );
|
||||
libvlc_media_release( req->md );
|
||||
libvlc_release(req->instance);
|
||||
free( req );
|
||||
|
|
Loading…
Reference in New Issue