Skip to content
Snippets Groups Projects
Commit 8d095dbf authored by Thomas Guillem's avatar Thomas Guillem Committed by Rémi Denis-Courmont
Browse files

libvlc: media: rename get_stat to get_filestat

To avoid confusion with:
 - libvlc_media_get_stats
 - libvlc_media_get_state

Fixes #26475
parent 88b409c3
No related branches found
No related tags found
1 merge request!1225libvlc: media: rename get_stat to get_filestat
Pipeline #180006 passed with stage
in 14 minutes and 41 seconds
......@@ -212,10 +212,10 @@ typedef struct libvlc_media_slave_t
} libvlc_media_slave_t;
/**
* Type of stat that can be requested from libvlc_media_get_stat()
* Type of stat that can be requested from libvlc_media_get_filestat()
*/
#define libvlc_media_stat_mtime 0
#define libvlc_media_stat_size 1
#define libvlc_media_filestat_mtime 0
#define libvlc_media_filestat_size 1
/**
* Callback prototype to open a custom bitstream input media.
......@@ -580,7 +580,7 @@ LIBVLC_API libvlc_time_t
* \return 1 on success, 0 if not found, -1 on error.
*/
LIBVLC_API int
libvlc_media_get_stat( libvlc_media_t *p_md, unsigned type, uint64_t *out );
libvlc_media_get_filestat( libvlc_media_t *p_md, unsigned type, uint64_t *out );
/**
* Parse the media asynchronously with options.
......
......@@ -73,7 +73,7 @@ libvlc_media_duplicate
libvlc_media_event_manager
libvlc_media_get_codec_description
libvlc_media_get_duration
libvlc_media_get_stat
libvlc_media_get_filestat
libvlc_media_get_meta
libvlc_media_get_mrl
libvlc_media_get_state
......
......@@ -839,7 +839,7 @@ libvlc_media_get_duration( libvlc_media_t * p_md )
}
int
libvlc_media_get_stat( libvlc_media_t *p_md, unsigned type, uint64_t *out )
libvlc_media_get_filestat( libvlc_media_t *p_md, unsigned type, uint64_t *out )
{
assert( p_md );
assert( out );
......@@ -853,8 +853,8 @@ libvlc_media_get_stat( libvlc_media_t *p_md, unsigned type, uint64_t *out )
const char *name;
switch (type)
{
case libvlc_media_stat_mtime: name = "mtime"; break;
case libvlc_media_stat_size: name = "size"; break;
case libvlc_media_filestat_mtime: name = "mtime"; break;
case libvlc_media_filestat_size: name = "size"; break;
default:
libvlc_printerr( "unknown libvlc_media_stat" );
return -1;
......
......@@ -242,13 +242,13 @@ static void subitem_added(const libvlc_event_t *event, void *user_data)
uint64_t value;
int ret;
ret = libvlc_media_get_stat(m, libvlc_media_stat_size, &value);
ret = libvlc_media_get_filestat(m, libvlc_media_filestat_size, &value);
assert(ret == 1);
/* All files size are 0, directory size depends on the FS. */
if (libvlc_media_get_type(m) != libvlc_media_type_directory)
assert(value == 0);
ret = libvlc_media_get_stat(m, libvlc_media_stat_mtime, &value);
ret = libvlc_media_get_filestat(m, libvlc_media_filestat_mtime, &value);
/* Epoch timestamp of the commit that added test/samples/subitems */
assert(ret == 1 && value >= 1446796477);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment