Commit 205092d4 authored by Simon Morlat's avatar Simon Morlat

add better logs to VP8 decoder.

parent f3debaa3
......@@ -51,12 +51,12 @@
typedef struct _MSSrtpStreamContext {
srtp_t srtp;
RtpTransportModifier *modifier;
ms_mutex_t mutex;
bool_t secured;
bool_t mandatory_enabled;
bool_t is_rtp;
ms_mutex_t mutex;
} MSSrtpStreamContext;
struct _MSSrtpCtx {
MSSrtpStreamContext send_rtp_context;
MSSrtpStreamContext send_rtcp_context;
......@@ -112,7 +112,7 @@ static int _process_on_send(RtpSession* session,MSSrtpStreamContext *ctx, mblk_t
if (rtp_header && (slen>RTP_FIXED_HEADER_SIZE && rtp_header->version==2)) {
ms_mutex_lock(&ctx->mutex);
if (!ctx->secured) {
/*does not make sens to protec, because we don't have any key*/
/*does not make sense to protect, because we don't have any key*/
err=err_status_ok;
slen = 0; /*droping packets*/
} else {
......@@ -125,7 +125,7 @@ static int _process_on_send(RtpSession* session,MSSrtpStreamContext *ctx, mblk_t
ms_mutex_lock(&ctx->mutex);
if (!ctx->secured) {
err=err_status_ok;
/*does not make sens to protec, because we don't have any key*/
/*does not make sense to protect, because we don't have any key*/
slen = 0; /*droping packets*/
} else {
/* defragment incoming message and enlarge the buffer for srtp to write its data */
......
......@@ -974,6 +974,7 @@ static void dec_process(MSFilter *f) {
if (s->yuv_width != img->d_w || s->yuv_height != img->d_h) {
if (s->yuv_msg) freemsg(s->yuv_msg);
s->yuv_msg = ms_yuv_buf_alloc(&s->outbuf, img->d_w, img->d_h);
ms_message("MSVp8Dec: video is %ix%i", img->d_w, img->d_h);
s->yuv_width = img->d_w;
s->yuv_height = img->d_h;
ms_filter_notify_no_arg(f, MS_FILTER_OUTPUT_FMT_CHANGED);
......@@ -993,9 +994,7 @@ static void dec_process(MSFilter *f) {
}
ms_queue_put(f->outputs[0], dupmsg(s->yuv_msg));
if (ms_average_fps_update(&s->fps, (uint32_t)f->ticker->time)) {
ms_message("VP8 decoder: Frame size: %dx%d", s->yuv_width, s->yuv_height);
}
ms_average_fps_update(&s->fps, (uint32_t)f->ticker->time);
if (!s->first_image_decoded) {
s->first_image_decoded = TRUE;
ms_filter_notify_no_arg(f, MS_VIDEO_DECODER_FIRST_IMAGE_DECODED);
......
......@@ -854,7 +854,7 @@ bool_t ms_average_fps_update(MSAverageFPS* afps, uint32_t current_time) {
afps->last_frame_time=current_time;
if ((current_time - afps->last_print_time > 5000) && afps->mean_inter_frame!=0){
ms_debug(afps->context, 1/afps->mean_inter_frame);
ms_message(afps->context, 1/afps->mean_inter_frame);
afps->last_print_time = current_time;
return TRUE;
}
......
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