Commit fdf4db8e authored by Ghislain MARY's avatar Ghislain MARY

Fix compilation for Windows Phone 8.

parent 999768a6
......@@ -26,9 +26,6 @@ extern MSFilterDesc ms_l16_enc_desc;
extern MSFilterDesc ms_l16_dec_desc;
extern MSFilterDesc ms_g722_enc_desc;
extern MSFilterDesc ms_g722_dec_desc;
#ifdef BUILD_WEBRTC_AECM
extern MSFilterDesc ms_webrtc_aec_desc;
#endif
#ifdef VIDEO_ENABLED
extern MSFilterDesc ms_v4w_desc;
extern MSFilterDesc ms_video_out_desc;
......@@ -84,9 +81,6 @@ MSFilterDesc * ms_voip_filter_descs[]={
&ms_l16_dec_desc,
&ms_g722_enc_desc,
&ms_g722_dec_desc,
#ifdef BUILD_WEBRTC_AECM
&ms_webrtc_aec_desc,
#endif
#ifdef VIDEO_ENABLED
&ms_size_conv_desc,
&ms_pix_conv_desc,
......
......@@ -75,13 +75,13 @@ struct _MSBitrateDriver{
int refcnt;
};
int ms_bitrate_driver_execute_action(MSBitrateDriver *obj, const MSRateControlAction *action);
MSBitrateDriver * ms_bitrate_driver_ref(MSBitrateDriver *obj);
void ms_bitrate_driver_unref(MSBitrateDriver *obj);
MS2_PUBLIC int ms_bitrate_driver_execute_action(MSBitrateDriver *obj, const MSRateControlAction *action);
MS2_PUBLIC MSBitrateDriver * ms_bitrate_driver_ref(MSBitrateDriver *obj);
MS2_PUBLIC void ms_bitrate_driver_unref(MSBitrateDriver *obj);
MSBitrateDriver *ms_audio_bitrate_driver_new(RtpSession *session, MSFilter *encoder);
MSBitrateDriver *ms_av_bitrate_driver_new(RtpSession *asession, MSFilter *aenc, RtpSession *vsession, MSFilter *venc);
MSBitrateDriver *ms_bandwidth_bitrate_driver_new(RtpSession *asession, MSFilter *aenc, RtpSession *vsession, MSFilter *venc);
MS2_PUBLIC MSBitrateDriver *ms_audio_bitrate_driver_new(RtpSession *session, MSFilter *encoder);
MS2_PUBLIC MSBitrateDriver *ms_av_bitrate_driver_new(RtpSession *asession, MSFilter *aenc, RtpSession *vsession, MSFilter *venc);
MS2_PUBLIC MSBitrateDriver *ms_bandwidth_bitrate_driver_new(RtpSession *asession, MSFilter *aenc, RtpSession *vsession, MSFilter *venc);
typedef struct _MSQosAnalyzer MSQosAnalyzer;
typedef struct _MSQosAnalyzerDesc MSQosAnalyzerDesc;
......@@ -110,22 +110,22 @@ struct _MSQosAnalyzer{
} type;
};
MSQosAnalyzer * ms_qos_analyzer_ref(MSQosAnalyzer *obj);
void ms_qos_analyzer_unref(MSQosAnalyzer *obj);
void ms_qos_analyser_set_label(MSQosAnalyzer *obj, const char *label);
void ms_qos_analyzer_suggest_action(MSQosAnalyzer *obj, MSRateControlAction *action);
bool_t ms_qos_analyzer_has_improved(MSQosAnalyzer *obj);
bool_t ms_qos_analyzer_process_rtcp(MSQosAnalyzer *obj, mblk_t *rtcp);
void ms_qos_analyzer_update(MSQosAnalyzer *obj);
const char* ms_qos_analyzer_get_name(MSQosAnalyzer *obj);
void ms_qos_analyzer_set_on_action_suggested(MSQosAnalyzer *obj, void (*on_action_suggested)(void*,int,const char**),void* u);
MS2_PUBLIC MSQosAnalyzer * ms_qos_analyzer_ref(MSQosAnalyzer *obj);
MS2_PUBLIC void ms_qos_analyzer_unref(MSQosAnalyzer *obj);
MS2_PUBLIC void ms_qos_analyser_set_label(MSQosAnalyzer *obj, const char *label);
MS2_PUBLIC void ms_qos_analyzer_suggest_action(MSQosAnalyzer *obj, MSRateControlAction *action);
MS2_PUBLIC bool_t ms_qos_analyzer_has_improved(MSQosAnalyzer *obj);
MS2_PUBLIC bool_t ms_qos_analyzer_process_rtcp(MSQosAnalyzer *obj, mblk_t *rtcp);
MS2_PUBLIC void ms_qos_analyzer_update(MSQosAnalyzer *obj);
MS2_PUBLIC const char* ms_qos_analyzer_get_name(MSQosAnalyzer *obj);
MS2_PUBLIC void ms_qos_analyzer_set_on_action_suggested(MSQosAnalyzer *obj, void (*on_action_suggested)(void*,int,const char**),void* u);
/**
* The simple qos analyzer is an implementation of MSQosAnalyzer that performs analysis for single stream.
**/
MSQosAnalyzer * ms_simple_qos_analyzer_new(RtpSession *session);
MS2_PUBLIC MSQosAnalyzer * ms_simple_qos_analyzer_new(RtpSession *session);
MSQosAnalyzer * ms_stateful_qos_analyzer_new(RtpSession *session);
MS2_PUBLIC MSQosAnalyzer * ms_stateful_qos_analyzer_new(RtpSession *session);
/**
* The audio/video qos analyzer is an implementation of MSQosAnalyzer that performs analysis of two audio and video streams.
**/
......@@ -144,7 +144,7 @@ typedef struct _MSBitrateController MSBitrateController;
* @param driver a bitrate driver object.
* The newly created bitrate controller owns references to the analyzer and the driver.
**/
MSBitrateController *ms_bitrate_controller_new(MSQosAnalyzer *qosanalyzer, MSBitrateDriver *driver);
MS2_PUBLIC MSBitrateController *ms_bitrate_controller_new(MSQosAnalyzer *qosanalyzer, MSBitrateDriver *driver);
/**
* Asks the bitrate controller to process a newly received RTCP packet.
......@@ -154,14 +154,14 @@ MSBitrateController *ms_bitrate_controller_new(MSQosAnalyzer *qosanalyzer, MSBit
* then the bitrate controller may take decision and execute actions on the local media streams to adapt the
* output bitrate.
**/
void ms_bitrate_controller_process_rtcp(MSBitrateController *obj, mblk_t *rtcp);
MS2_PUBLIC void ms_bitrate_controller_process_rtcp(MSBitrateController *obj, mblk_t *rtcp);
void ms_bitrate_controller_update(MSBitrateController *obj);
MS2_PUBLIC void ms_bitrate_controller_update(MSBitrateController *obj);
/**
* Return the QoS analyzer associated to the bitrate controller
**/
MSQosAnalyzer * ms_bitrate_controller_get_qos_analyzer(MSBitrateController *obj);
MS2_PUBLIC MSQosAnalyzer * ms_bitrate_controller_get_qos_analyzer(MSBitrateController *obj);
/**
* Destroys the bitrate controller
......@@ -169,7 +169,7 @@ MSQosAnalyzer * ms_bitrate_controller_get_qos_analyzer(MSBitrateController *obj)
* If no other entity holds references to the underlyings MSQosAnalyzer and MSBitrateDriver object,
* then they will be destroyed too.
**/
void ms_bitrate_controller_destroy(MSBitrateController *obj);
MS2_PUBLIC void ms_bitrate_controller_destroy(MSBitrateController *obj);
/**
* Convenience function to create a bitrate controller managing a single audio stream.
......@@ -182,7 +182,7 @@ void ms_bitrate_controller_destroy(MSBitrateController *obj);
* ms_bitrate_controller_new(ms_simple_qos_analyzer_new(session),ms_audio_bitrate_driver_new(encoder));
* \endcode
**/
MSBitrateController *ms_audio_bitrate_controller_new(RtpSession *session, MSFilter *encoder, unsigned int flags);
MS2_PUBLIC MSBitrateController *ms_audio_bitrate_controller_new(RtpSession *session, MSFilter *encoder, unsigned int flags);
/**
* Convenience fonction to create a bitrate controller managing a video and an audio stream.
......@@ -196,9 +196,9 @@ MSBitrateController *ms_audio_bitrate_controller_new(RtpSession *session, MSFilt
* ms_bitrate_controller_new(ms_av_qos_analyzer_new(asession,vsession),ms_av_bitrate_driver_new(aenc,venc));
* \endcode
**/
MSBitrateController *ms_av_bitrate_controller_new(RtpSession *asession, MSFilter *aenc, RtpSession *vsession, MSFilter *venc);
MS2_PUBLIC MSBitrateController *ms_av_bitrate_controller_new(RtpSession *asession, MSFilter *aenc, RtpSession *vsession, MSFilter *venc);
MSBitrateController *ms_bandwidth_bitrate_controller_new(RtpSession *asession, MSFilter *aenc, RtpSession *vsession, MSFilter *venc);
MS2_PUBLIC MSBitrateController *ms_bandwidth_bitrate_controller_new(RtpSession *asession, MSFilter *aenc, RtpSession *vsession, MSFilter *venc);
#ifdef __cplusplus
}
#endif
......
......@@ -349,7 +349,7 @@ MS2_PUBLIC int audio_stream_start_full(AudioStream *stream, RtpProfile *profile,
MS2_PUBLIC void audio_stream_play(AudioStream *st, const char *name);
MS2_PUBLIC void audio_stream_record(AudioStream *st, const char *name);
static inline void audio_stream_set_rtcp_information(AudioStream *st, const char *cname, const char *tool) {
static MS2_INLINE void audio_stream_set_rtcp_information(AudioStream *st, const char *cname, const char *tool) {
media_stream_set_rtcp_information(&st->ms, cname, tool);
}
......@@ -450,14 +450,14 @@ MS2_PUBLIC void audio_stream_set_echo_canceller_params(AudioStream *st, int tail
/**
* enable adaptive rate control
* */
static inline void audio_stream_enable_adaptive_bitrate_control(AudioStream *stream, bool_t enabled) {
static MS2_INLINE void audio_stream_enable_adaptive_bitrate_control(AudioStream *stream, bool_t enabled) {
media_stream_enable_adaptive_bitrate_control(&stream->ms, enabled);
}
/**
* Enable adaptive jitter compensation
* */
static inline void audio_stream_enable_adaptive_jittcomp(AudioStream *stream, bool_t enabled) {
static MS2_INLINE void audio_stream_enable_adaptive_jittcomp(AudioStream *stream, bool_t enabled) {
media_stream_enable_adaptive_jittcomp(&stream->ms, enabled);
}
......@@ -501,7 +501,7 @@ MS2_PUBLIC int audio_stream_mixed_record_stop(AudioStream *st);
MS2_PUBLIC void audio_stream_set_default_card(int cardindex);
/* retrieve RTP statistics*/
static inline void audio_stream_get_local_rtp_stats(AudioStream *stream, rtp_stats_t *stats) {
static MS2_INLINE void audio_stream_get_local_rtp_stats(AudioStream *stream, rtp_stats_t *stats) {
media_stream_get_local_rtp_stats(&stream->ms, stats);
}
......@@ -525,11 +525,11 @@ MS2_PUBLIC void audio_stream_enable_zrtp(AudioStream *stream, OrtpZrtpParams *pa
bool_t audio_stream_zrtp_enabled(const AudioStream *stream);
/* enable SRTP on the audio stream */
static inline bool_t audio_stream_enable_srtp(AudioStream* stream, MSCryptoSuite suite, const char* snd_key, const char* rcv_key) {
static MS2_INLINE bool_t audio_stream_enable_srtp(AudioStream* stream, MSCryptoSuite suite, const char* snd_key, const char* rcv_key) {
return media_stream_enable_srtp(&stream->ms, suite, snd_key, rcv_key);
}
static inline int audio_stream_set_dscp(AudioStream *stream, int dscp) {
static MS2_INLINE int audio_stream_set_dscp(AudioStream *stream, int dscp) {
return media_stream_set_dscp(&stream->ms, dscp);
}
......@@ -590,10 +590,10 @@ typedef struct _VideoStream VideoStream;
MS2_PUBLIC VideoStream *video_stream_new(int loc_rtp_port, int loc_rtcp_port, bool_t use_ipv6);
MS2_PUBLIC VideoStream *video_stream_new_with_sessions(const MSMediaStreamSessions *sessions);
MS2_PUBLIC void video_stream_set_direction(VideoStream *vs, VideoStreamDir dir);
static inline void video_stream_enable_adaptive_bitrate_control(VideoStream *stream, bool_t enabled) {
static MS2_INLINE void video_stream_enable_adaptive_bitrate_control(VideoStream *stream, bool_t enabled) {
media_stream_enable_adaptive_bitrate_control(&stream->ms, enabled);
}
static inline void video_stream_enable_adaptive_jittcomp(VideoStream *stream, bool_t enabled) {
static MS2_INLINE void video_stream_enable_adaptive_jittcomp(VideoStream *stream, bool_t enabled) {
media_stream_enable_adaptive_jittcomp(&stream->ms, enabled);
}
MS2_PUBLIC void video_stream_set_render_callback(VideoStream *s, VideoStreamRenderCallback cb, void *user_pointer);
......@@ -606,7 +606,7 @@ MS2_PUBLIC void video_stream_unprepare_video(VideoStream *stream);
MS2_PUBLIC void video_stream_set_relay_session_id(VideoStream *stream, const char *relay_session_id);
static inline void video_stream_set_rtcp_information(VideoStream *st, const char *cname, const char *tool) {
static MS2_INLINE void video_stream_set_rtcp_information(VideoStream *st, const char *cname, const char *tool) {
media_stream_set_rtcp_information(&st->ms, cname, tool);
}
MS2_PUBLIC void video_stream_change_camera(VideoStream *stream, MSWebCam *cam);
......@@ -683,7 +683,7 @@ MS2_PUBLIC void video_stream_send_only_stop(VideoStream *vs);
MS2_PUBLIC void video_stream_enable_zrtp(VideoStream *vstream, AudioStream *astream, OrtpZrtpParams *param);
/* enable SRTP on the video stream */
static inline bool_t video_stream_enable_strp(VideoStream* stream, MSCryptoSuite suite, const char* snd_key, const char* rcv_key) {
static MS2_INLINE bool_t video_stream_enable_strp(VideoStream* stream, MSCryptoSuite suite, const char* snd_key, const char* rcv_key) {
return media_stream_enable_srtp(&stream->ms, suite, snd_key, rcv_key);
}
......@@ -691,11 +691,11 @@ static inline bool_t video_stream_enable_strp(VideoStream* stream, MSCryptoSuite
MS2_PUBLIC void video_stream_enable_display_filter_auto_rotate(VideoStream* stream, bool_t enable);
/* retrieve RTP statistics*/
static inline void video_stream_get_local_rtp_stats(VideoStream *stream, rtp_stats_t *stats) {
static MS2_INLINE void video_stream_get_local_rtp_stats(VideoStream *stream, rtp_stats_t *stats) {
media_stream_get_local_rtp_stats(&stream->ms, stats);
}
static inline int video_stream_set_dscp(VideoStream *stream, int dscp) {
static MS2_INLINE int video_stream_set_dscp(VideoStream *stream, int dscp) {
return media_stream_set_dscp(&stream->ms, dscp);
}
......
......@@ -53,6 +53,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define ms_cond_broadcast ortp_cond_broadcast
#define ms_cond_destroy ortp_cond_destroy
#define MS2_INLINE ORTP_INLINE
#if defined(_MSC_VER)
#define MS2_PUBLIC __declspec(dllexport)
#else
......
......@@ -38,24 +38,24 @@ typedef struct _MSQueue
MS2_PUBLIC MSQueue * ms_queue_new(struct _MSFilter *f1, int pin1, struct _MSFilter *f2, int pin2 );
static inline mblk_t *ms_queue_get(MSQueue *q){
static MS2_INLINE mblk_t *ms_queue_get(MSQueue *q){
return getq(&q->q);
}
static inline void ms_queue_put(MSQueue *q, mblk_t *m){
static MS2_INLINE void ms_queue_put(MSQueue *q, mblk_t *m){
putq(&q->q,m);
return;
}
static inline mblk_t * ms_queue_peek_last(MSQueue *q){
static MS2_INLINE mblk_t * ms_queue_peek_last(MSQueue *q){
return qlast(&q->q);
}
static inline void ms_queue_remove(MSQueue *q, mblk_t *m){
static MS2_INLINE void ms_queue_remove(MSQueue *q, mblk_t *m){
remq(&q->q,m);
}
static inline bool_t ms_queue_empty(MSQueue *q){
static MS2_INLINE bool_t ms_queue_empty(MSQueue *q){
return qempty(&q->q);
}
......@@ -109,7 +109,7 @@ MS2_PUBLIC void ms_bufferizer_put_from_queue(MSBufferizer *obj, MSQueue *q);
MS2_PUBLIC int ms_bufferizer_read(MSBufferizer *obj, uint8_t *data, int datalen);
/* returns the number of bytes available in the bufferizer*/
static inline int ms_bufferizer_get_avail(MSBufferizer *obj){
static MS2_INLINE int ms_bufferizer_get_avail(MSBufferizer *obj){
return obj->size;
}
......
......@@ -272,41 +272,41 @@ void deinterlace_down_scale_neon(uint8_t* ysrc, uint8_t* cbcrsrc, uint8_t* ydst,
#endif
mblk_t *copy_ycbcrbiplanar_to_true_yuv_with_rotation_and_down_scale_by_2(uint8_t* y, uint8_t * cbcr, int rotation, int w, int h, int y_byte_per_row,int cbcr_byte_per_row, bool_t uFirstvSecond, bool_t down_scale);
static inline bool_t ms_video_size_greater_than(MSVideoSize vs1, MSVideoSize vs2){
static MS2_INLINE bool_t ms_video_size_greater_than(MSVideoSize vs1, MSVideoSize vs2){
return (vs1.width>=vs2.width) && (vs1.height>=vs2.height);
}
static inline bool_t ms_video_size_area_greater_than(MSVideoSize vs1, MSVideoSize vs2){
static MS2_INLINE bool_t ms_video_size_area_greater_than(MSVideoSize vs1, MSVideoSize vs2){
return (vs1.width*vs1.height >= vs2.width*vs2.height);
}
static inline MSVideoSize ms_video_size_max(MSVideoSize vs1, MSVideoSize vs2){
static MS2_INLINE MSVideoSize ms_video_size_max(MSVideoSize vs1, MSVideoSize vs2){
return ms_video_size_greater_than(vs1,vs2) ? vs1 : vs2;
}
static inline MSVideoSize ms_video_size_min(MSVideoSize vs1, MSVideoSize vs2){
static MS2_INLINE MSVideoSize ms_video_size_min(MSVideoSize vs1, MSVideoSize vs2){
return ms_video_size_greater_than(vs1,vs2) ? vs2 : vs1;
}
static inline MSVideoSize ms_video_size_area_max(MSVideoSize vs1, MSVideoSize vs2){
static MS2_INLINE MSVideoSize ms_video_size_area_max(MSVideoSize vs1, MSVideoSize vs2){
return ms_video_size_area_greater_than(vs1,vs2) ? vs1 : vs2;
}
static inline MSVideoSize ms_video_size_area_min(MSVideoSize vs1, MSVideoSize vs2){
static MS2_INLINE MSVideoSize ms_video_size_area_min(MSVideoSize vs1, MSVideoSize vs2){
return ms_video_size_area_greater_than(vs1,vs2) ? vs2 : vs1;
}
static inline bool_t ms_video_size_equal(MSVideoSize vs1, MSVideoSize vs2){
static MS2_INLINE bool_t ms_video_size_equal(MSVideoSize vs1, MSVideoSize vs2){
return vs1.width==vs2.width && vs1.height==vs2.height;
}
MS2_PUBLIC MSVideoSize ms_video_size_get_just_lower_than(MSVideoSize vs);
static inline MSVideoOrientation ms_video_size_get_orientation(MSVideoSize vs){
static MS2_INLINE MSVideoOrientation ms_video_size_get_orientation(MSVideoSize vs){
return vs.width>=vs.height ? MS_VIDEO_LANDSCAPE : MS_VIDEO_PORTRAIT;
}
static inline MSVideoSize ms_video_size_change_orientation(MSVideoSize vs, MSVideoOrientation o){
static MS2_INLINE MSVideoSize ms_video_size_change_orientation(MSVideoSize vs, MSVideoOrientation o){
MSVideoSize ret;
if (o!=ms_video_size_get_orientation(vs)){
ret.width=vs.height;
......
......@@ -36,7 +36,7 @@ static void accumulate(int32_t *sum, int16_t* contrib, int nwords){
}
}
static inline int16_t saturate(int32_t s){
static MS2_INLINE int16_t saturate(int32_t s){
if (s>32767) return 32767;
if (s<-32767) return -32767;
return (int16_t)s;
......
......@@ -483,7 +483,7 @@ static void conf_sum(MSFilter *f, ConfState *s){
return;
}
static inline int16_t saturate(int sample){
static MS2_INLINE int16_t saturate(int sample){
if (sample>32000)
sample=32000;
else if (sample<-32000)
......
......@@ -185,7 +185,7 @@ static void volume_uninit(MSFilter *f){
ms_free(f->data);
}
static inline float linear_to_db(float linear){
static MS2_INLINE float linear_to_db(float linear){
if (linear==0) return MS_VOLUME_DB_LOWEST;
return 10*ortp_log10f(linear);
}
......@@ -244,7 +244,7 @@ static float volume_agc_process(Volume *v, mblk_t *om) {
#endif
static inline float compute_gain(Volume *v, float energy, float weight) {
static MS2_INLINE float compute_gain(Volume *v, float energy, float weight) {
float ret = v->static_gain / (1 + (energy * weight));
return ret;
}
......@@ -439,7 +439,7 @@ static int volume_remove_dc(MSFilter *f, void *arg){
return 0;
}
static inline int16_t saturate(int val) {
static MS2_INLINE int16_t saturate(int val) {
return (val>32767) ? 32767 : ( (val<-32767) ? -32767 : val);
}
......
......@@ -59,7 +59,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef swap16
#else
/* all integer in wav header must be read in least endian order */
static inline uint16_t swap16(uint16_t a)
static MS2_INLINE uint16_t swap16(uint16_t a)
{
return ((a & 0xFF) << 8) | ((a & 0xFF00) >> 8);
}
......@@ -67,7 +67,7 @@ static inline uint16_t swap16(uint16_t a)
#ifdef swap32
#else
static inline uint32_t swap32(uint32_t a)
static MS2_INLINE uint32_t swap32(uint32_t a)
{
return ((a & 0xFF) << 24) | ((a & 0xFF00) << 8) |
((a & 0xFF0000) >> 8) | ((a & 0xFF000000) >> 24);
......
......@@ -268,7 +268,7 @@ int ms_filter_unlink(MSFilter *f1, int pin1, MSFilter *f2, int pin2){
return 0;
}
static inline bool_t is_interface_method(unsigned int magic){
static MS2_INLINE bool_t is_interface_method(unsigned int magic){
return magic==MS_FILTER_BASE_ID || magic>MSFilterInterfaceBegin;
}
......
......@@ -191,8 +191,8 @@ static void simple_analyzer_suggest_action(MSQosAnalyzer *objbase, MSRateControl
if (objbase->on_action_suggested!=NULL){
int i;
const int datac=4;
char *data[datac];
char *data[4];
int datac = sizeof(data) / sizeof(data[0]);
data[0]=ms_strdup("lost_percentage rt_prop_increased int_jitter_ms rt_prop_ms");
data[1]=ms_strdup_printf("%d %d %d %d"
, (int)cur->lost_percentage
......@@ -466,8 +466,8 @@ static float compute_available_bw(MSStatefulQosAnalyzer *obj){
#endif
if (size == 1){
ms_debug("MSQosStatefulAnalyzer[%p]: One single point", obj);
rtcpstatspoint_t *p = (rtcpstatspoint_t *)current->data;
ms_debug("MSQosStatefulAnalyzer[%p]: One single point", obj);
mean_bw = p->bandwidth * ((p->loss_percent>1e-5) ? (1-p->loss_percent):2);
}else{
while (current!=NULL && ((rtcpstatspoint_t*)current->data)->loss_percent<0.03+constant_network_loss){
......
......@@ -25,15 +25,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define TYPE_STAP_A 24 /*single time aggregation packet 0x18*/
static inline void nal_header_init(uint8_t *h, uint8_t nri, uint8_t type){
static MS2_INLINE void nal_header_init(uint8_t *h, uint8_t nri, uint8_t type){
*h=((nri&0x3)<<5) | (type & ((1<<5)-1));
}
static inline uint8_t nal_header_get_type(const uint8_t *h){
static MS2_INLINE uint8_t nal_header_get_type(const uint8_t *h){
return (*h) & ((1<<5)-1);
}
static inline uint8_t nal_header_get_nri(const uint8_t *h){
static MS2_INLINE uint8_t nal_header_get_nri(const uint8_t *h){
return ((*h) >> 5) & 0x3;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment