mirror of https://code.videolan.org/videolan/vlc
core: rename NTPtime64 to vlc_ntp_time
This function name did not follow any conventions used throughout the codebase, so take the chance that we break API/ABI in 4.x to rename it before we have to keep it around even longer if we don't do it now.
This commit is contained in:
parent
88229e1ee3
commit
416e3d12c8
|
@ -306,7 +306,9 @@ VLC_API vlc_tick_t date_Decrement(date_t *restrict date, uint32_t count);
|
|||
/** @} */
|
||||
|
||||
/**
|
||||
* @return NTP 64-bits timestamp in host byte order.
|
||||
* Gets the current wallclock time as 64-bit NTP timestamp.
|
||||
*
|
||||
* \return NTP 64-bits timestamp in host byte order
|
||||
*/
|
||||
VLC_API uint64_t NTPtime64( void );
|
||||
VLC_API uint64_t vlc_ntp_time( void );
|
||||
#endif /* !__VLC_MTIME_ */
|
||||
|
|
|
@ -141,7 +141,7 @@ rtcp_sender_t *OpenRTCP (vlc_object_t *obj, int rtp_fd, int proto,
|
|||
ptr[1] = 200; /* payload type: Sender Report */
|
||||
SetWBE (ptr + 2, 6); /* length = 6 (7 double words) */
|
||||
memset (ptr + 4, 0, 4); /* SSRC unknown yet */
|
||||
SetQWBE (ptr + 8, NTPtime64 ());
|
||||
SetQWBE (ptr + 8, vlc_ntp_time ());
|
||||
memset (ptr + 16, 0, 12); /* timestamp and counters */
|
||||
ptr += 28;
|
||||
|
||||
|
@ -180,7 +180,7 @@ void CloseRTCP (rtcp_sender_t *rtcp)
|
|||
return;
|
||||
|
||||
uint8_t *ptr = rtcp->payload;
|
||||
uint64_t now64 = NTPtime64 ();
|
||||
uint64_t now64 = vlc_ntp_time ();
|
||||
SetQWBE (ptr + 8, now64); /* Update the Sender Report timestamp */
|
||||
|
||||
/* Bye */
|
||||
|
@ -216,7 +216,7 @@ void SendRTCP (rtcp_sender_t *restrict rtcp, const block_t *rtp)
|
|||
|
||||
uint8_t *ptr = rtcp->payload;
|
||||
uint32_t last = GetDWBE (ptr + 8); // last RTCP SR send time
|
||||
uint64_t now64 = NTPtime64 ();
|
||||
uint64_t now64 = vlc_ntp_time ();
|
||||
if ((now64 >> 32) < (last + 5))
|
||||
return; // no more than one SR every 5 seconds
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ int vlc_sdp_Start(struct vlc_memstream *restrict stream,
|
|||
if (AddressToSDP(addr, addrlen, connection) == NULL)
|
||||
goto error;
|
||||
{
|
||||
const uint_fast64_t now = NTPtime64();
|
||||
const uint_fast64_t now = vlc_ntp_time();
|
||||
char hostname[256];
|
||||
|
||||
gethostname(hostname, sizeof (hostname));
|
||||
|
|
|
@ -23,7 +23,6 @@ cat libvlccore.sym | grep -v \
|
|||
-e '^date_' -e '^plane_' \
|
||||
-e '^utf8_' -e '^xml_' \
|
||||
-e '^[A-Z][a-z]*Charset$' \
|
||||
-e '^NTPtime64$' \
|
||||
&& exit 1
|
||||
|
||||
echo "None found."
|
||||
|
|
|
@ -287,6 +287,7 @@ vlc_memstream_putc
|
|||
vlc_memstream_puts
|
||||
vlc_memstream_vprintf
|
||||
vlc_memstream_printf
|
||||
vlc_ntp_time
|
||||
vlc_Log
|
||||
vlc_LogSet
|
||||
vlc_vaLog
|
||||
|
@ -311,7 +312,6 @@ net_OpenDgram
|
|||
net_Read
|
||||
net_SetCSCov
|
||||
net_Write
|
||||
NTPtime64
|
||||
picture_AttachAncillary
|
||||
picture_AttachNewAncillary
|
||||
picture_BlendSubpicture
|
||||
|
|
|
@ -128,7 +128,7 @@ vlc_tick_t date_Decrement( date_t *p_date, uint32_t i_nb_samples )
|
|||
return p_date->date;
|
||||
}
|
||||
|
||||
uint64_t NTPtime64(void)
|
||||
uint64_t vlc_ntp_time(void)
|
||||
{
|
||||
struct timespec ts;
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ void vlc_rand_bytes (void *buf, size_t len)
|
|||
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
static uint64_t counter = 0;
|
||||
|
||||
uint64_t stamp = NTPtime64 ();
|
||||
uint64_t stamp = vlc_ntp_time ();
|
||||
|
||||
while (len > 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue