[vlc-commits] [Git][videolan/vlc][master] libvlc: media: rename get_stat to get_filestat
Rémi Denis-Courmont (@Courmisch)
gitlab at videolan.org
Sat Jan 15 17:36:10 UTC 2022
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC
Commits:
8d095dbf by Thomas Guillem at 2022-01-15T17:11:08+00:00
libvlc: media: rename get_stat to get_filestat
To avoid confusion with:
- libvlc_media_get_stats
- libvlc_media_get_state
Fixes #26475
- - - - -
4 changed files:
- include/vlc/libvlc_media.h
- lib/libvlc.sym
- lib/media.c
- test/libvlc/media.c
Changes:
=====================================
include/vlc/libvlc_media.h
=====================================
@@ -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.
=====================================
lib/libvlc.sym
=====================================
@@ -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
=====================================
lib/media.c
=====================================
@@ -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;
=====================================
test/libvlc/media.c
=====================================
@@ -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);
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8d095dbf96d8992e0da21d7912a5b61571af719e
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8d095dbf96d8992e0da21d7912a5b61571af719e
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list