Commit 79179c9e authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

vlc/libvlc.h: Use libvlc_time_t.

parent 42720931
......@@ -230,7 +230,7 @@ VLC_PUBLIC_API libvlc_event_manager_t *
libvlc_media_descriptor_event_manager( libvlc_media_descriptor_t * p_md,
libvlc_exception_t * p_e );
VLC_PUBLIC_API vlc_int64_t
VLC_PUBLIC_API libvlc_time_t
libvlc_media_descriptor_get_duration( libvlc_media_descriptor_t * p_md,
libvlc_exception_t * p_e );
......@@ -445,9 +445,9 @@ VLC_PUBLIC_API void libvlc_media_instance_stop ( libvlc_media_instance_t *, libv
VLC_PUBLIC_API void libvlc_media_instance_set_drawable ( libvlc_media_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
/** \bug This might go away ... to be replaced by a broader system */
VLC_PUBLIC_API vlc_int64_t libvlc_media_instance_get_length ( libvlc_media_instance_t *, libvlc_exception_t *);
VLC_PUBLIC_API vlc_int64_t libvlc_media_instance_get_time ( libvlc_media_instance_t *, libvlc_exception_t *);
VLC_PUBLIC_API void libvlc_media_instance_set_time ( libvlc_media_instance_t *, vlc_int64_t, libvlc_exception_t *);
VLC_PUBLIC_API libvlc_time_t libvlc_media_instance_get_length ( libvlc_media_instance_t *, libvlc_exception_t *);
VLC_PUBLIC_API libvlc_time_t libvlc_media_instance_get_time ( libvlc_media_instance_t *, libvlc_exception_t *);
VLC_PUBLIC_API void libvlc_media_instance_set_time ( libvlc_media_instance_t *, libvlc_time_t, libvlc_exception_t *);
VLC_PUBLIC_API float libvlc_media_instance_get_position ( libvlc_media_instance_t *, libvlc_exception_t *);
VLC_PUBLIC_API void libvlc_media_instance_set_position ( libvlc_media_instance_t *, float, libvlc_exception_t *);
VLC_PUBLIC_API void libvlc_media_instance_set_chapter ( libvlc_media_instance_t *, int, libvlc_exception_t *);
......
......@@ -66,6 +66,19 @@ typedef char * libvlc_tag_t;
/**@} */
/*****************************************************************************
* Time
*****************************************************************************/
/** defgroup libvlc_time Time
* \ingroup libvlc
* LibVLC Time support in libvlc
* @{
*/
typedef vlc_int64_t libvlc_time_t;
/**@} */
/*****************************************************************************
* Media Descriptor
*****************************************************************************/
......@@ -373,7 +386,7 @@ typedef struct libvlc_event_t
} media_instance_position_changed;
struct
{
long int new_time;
libvlc_time_t new_time;
} media_instance_time_changed;
/* media list */
......
......@@ -221,7 +221,6 @@ input_time_changed( vlc_object_t * p_this, char const * psz_cmd,
libvlc_event_t event;
event.type = libvlc_MediaInstanceTimeChanged;
event.u.media_instance_time_changed.new_time = val.i_time;
libvlc_event_send( p_mi->p_event_manager, &event );
return VLC_SUCCESS;
}
......@@ -594,7 +593,7 @@ void libvlc_media_instance_set_drawable( libvlc_media_instance_t *p_mi,
/**************************************************************************
* Getters for stream information
**************************************************************************/
vlc_int64_t libvlc_media_instance_get_length(
libvlc_time_t libvlc_media_instance_get_length(
libvlc_media_instance_t *p_mi,
libvlc_exception_t *p_e )
{
......@@ -611,7 +610,7 @@ vlc_int64_t libvlc_media_instance_get_length(
return (val.i_time+500LL)/1000LL;
}
vlc_int64_t libvlc_media_instance_get_time(
libvlc_time_t libvlc_media_instance_get_time(
libvlc_media_instance_t *p_mi,
libvlc_exception_t *p_e )
{
......@@ -629,7 +628,7 @@ vlc_int64_t libvlc_media_instance_get_time(
void libvlc_media_instance_set_time(
libvlc_media_instance_t *p_mi,
vlc_int64_t time,
libvlc_time_t time,
libvlc_exception_t *p_e )
{
input_thread_t *p_input_thread;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment