diff --git a/ngx_rtmp.h b/ngx_rtmp.h index 9ac520a..132a9f5 100644 --- a/ngx_rtmp.h +++ b/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; diff --git a/ngx_rtmp_amf.c b/ngx_rtmp_amf.c index fd40dc1..7e8f553 100644 --- a/ngx_rtmp_amf.c +++ b/ngx_rtmp_amf.c @@ -9,7 +9,8 @@ #include "ngx_rtmp.h" #include -static inline void* + +static ngx_inline void* ngx_rtmp_amf_reverse_copy(void *dst, void* src, size_t len) { size_t k; diff --git a/ngx_rtmp_mp4_module.c b/ngx_rtmp_mp4_module.c index 543f014..a5519f0 100644 --- a/ngx_rtmp_mp4_module.c +++ b/ngx_rtmp_mp4_module.c @@ -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;