[vlc-commits] [Git][videolan/vlc][master] 3 commits: lib: picture: use from_mtime() to convert vlc_tick_t to libvlc_time_t
Hugo Beauzée-Luyssen (@chouquette)
gitlab at videolan.org
Fri Aug 12 14:32:24 UTC 2022
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits:
08cac94b by Steve Lhomme at 2022-08-12T13:43:35+00:00
lib: picture: use from_mtime() to convert vlc_tick_t to libvlc_time_t
- - - - -
46095bf6 by Steve Lhomme at 2022-08-12T13:43:35+00:00
lib: media: use proper functions to convert vlc_tick_t to/from libvlc_time_t
- - - - -
d0c11c81 by Steve Lhomme at 2022-08-12T13:43:35+00:00
lib: media: use the proper libvlc_media_get_duration return type
- - - - -
2 changed files:
- lib/media.c
- lib/picture.c
Changes:
=====================================
lib/media.c
=====================================
@@ -762,7 +762,7 @@ libvlc_media_event_manager( libvlc_media_t * p_md )
}
// Get duration of media object (in ms)
-int64_t
+libvlc_time_t
libvlc_media_get_duration( libvlc_media_t * p_md )
{
assert( p_md );
@@ -1013,11 +1013,11 @@ libvlc_media_thumbnail_request_by_time( libvlc_instance_t *inst,
req->crop = crop;
libvlc_media_retain( md );
req->req = vlc_thumbnailer_RequestByTime( p_priv->p_thumbnailer,
- VLC_TICK_FROM_MS( time ),
+ to_mtime( time ),
speed == libvlc_media_thumbnail_seek_fast ?
VLC_THUMBNAILER_SEEK_FAST : VLC_THUMBNAILER_SEEK_PRECISE,
md->p_input_item,
- timeout > 0 ? VLC_TICK_FROM_MS( timeout ) : VLC_TICK_INVALID,
+ timeout > 0 ? to_mtime( timeout ) : VLC_TICK_INVALID,
media_on_thumbnail_ready, req );
if ( req->req == NULL )
{
@@ -1059,7 +1059,7 @@ libvlc_media_thumbnail_request_by_pos( libvlc_instance_t *inst,
speed == libvlc_media_thumbnail_seek_fast ?
VLC_THUMBNAILER_SEEK_FAST : VLC_THUMBNAILER_SEEK_PRECISE,
md->p_input_item,
- timeout > 0 ? VLC_TICK_FROM_MS( timeout ) : VLC_TICK_INVALID,
+ timeout > 0 ? to_mtime( timeout ) : VLC_TICK_INVALID,
media_on_thumbnail_ready, req );
if ( req->req == NULL )
{
=====================================
lib/picture.c
=====================================
@@ -26,6 +26,7 @@
#include <vlc/libvlc.h>
#include <vlc/libvlc_picture.h>
+#include "libvlc_internal.h"
#include <vlc_atomic.h>
#include <vlc_picture.h>
@@ -62,7 +63,7 @@ libvlc_picture_t* libvlc_picture_new( vlc_object_t* p_obj, picture_t* input,
return NULL;
vlc_atomic_rc_init( &pic->rc );
pic->type = type;
- pic->time = MS_FROM_VLC_TICK( input->date );
+ pic->time = from_mtime( input->date );
pic->attachment = NULL;
vlc_fourcc_t format;
switch ( type )
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/95cbcf0e5972d21b8b2a6a9910ad90428dc132ed...d0c11c8154775b980fb7aff6caa8be0836343c94
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/95cbcf0e5972d21b8b2a6a9910ad90428dc132ed...d0c11c8154775b980fb7aff6caa8be0836343c94
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list