mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-11 14:51:08 +02:00
inline -> ngx_inline
This commit is contained in:
parent
f94fcee9fb
commit
8553cf204b
10
ngx_rtmp.h
10
ngx_rtmp.h
|
@ -391,21 +391,21 @@ void * ngx_rtmp_rmemcpy(void *dst, const void* src, size_t n);
|
|||
(((u_char*)ngx_rtmp_rmemcpy(dst, src, n)) + (n))
|
||||
|
||||
|
||||
static inline uint16_t
|
||||
static ngx_inline uint16_t
|
||||
ngx_rtmp_r16(uint16_t n)
|
||||
{
|
||||
return (n << 8) | (n >> 8);
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t
|
||||
static ngx_inline uint32_t
|
||||
ngx_rtmp_r32(uint32_t n)
|
||||
{
|
||||
return (n << 24) | ((n << 8) & 0xff0000) | ((n >> 8) & 0xff00) | (n >> 24);
|
||||
}
|
||||
|
||||
|
||||
static inline uint64_t
|
||||
static ngx_inline uint64_t
|
||||
ngx_rtmp_r64(uint64_t n)
|
||||
{
|
||||
return (uint64_t) ngx_rtmp_r32(n) << 32 | ngx_rtmp_r32(n >> 32);
|
||||
|
@ -557,14 +557,14 @@ ngx_int_t ngx_rtmp_send_sample_access(ngx_rtmp_session_t *s);
|
|||
#define NGX_RTMP_VIDEO_DISPOSABLE_FRAME 3
|
||||
|
||||
|
||||
static inline ngx_int_t
|
||||
static ngx_inline ngx_int_t
|
||||
ngx_rtmp_get_video_frame_type(ngx_chain_t *in)
|
||||
{
|
||||
return (in->buf->pos[0] & 0xf0) >> 4;
|
||||
}
|
||||
|
||||
|
||||
static inline ngx_int_t
|
||||
static ngx_inline ngx_int_t
|
||||
ngx_rtmp_is_codec_header(ngx_chain_t *in)
|
||||
{
|
||||
return in->buf->pos + 1 < in->buf->last && in->buf->pos[1] == 0;
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
#include "ngx_rtmp.h"
|
||||
#include <string.h>
|
||||
|
||||
static inline void*
|
||||
|
||||
static ngx_inline void*
|
||||
ngx_rtmp_amf_reverse_copy(void *dst, void* src, size_t len)
|
||||
{
|
||||
size_t k;
|
||||
|
|
|
@ -187,14 +187,14 @@ typedef struct {
|
|||
((uint32_t)d << 24 | (uint32_t)c << 16 | (uint32_t)b << 8 | (uint32_t)a)
|
||||
|
||||
|
||||
static inline uint32_t
|
||||
static ngx_inline uint32_t
|
||||
ngx_rtmp_mp4_to_rtmp_timestamp(ngx_rtmp_mp4_track_t *t, uint32_t ts)
|
||||
{
|
||||
return (uint64_t) ts * 1000 / t->time_scale;
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t
|
||||
static ngx_inline uint32_t
|
||||
ngx_rtmp_mp4_from_rtmp_timestamp(ngx_rtmp_mp4_track_t *t, uint32_t ts)
|
||||
{
|
||||
return (uint64_t) ts * t->time_scale / 1000;
|
||||
|
|
Loading…
Reference in a new issue