Revision 5e9e29e0 plugins/janus_voicemail.c

View differences:

plugins/janus_voicemail.c
32 32

  
33 33
#include "../config.h"
34 34
#include "../rtp.h"
35
#include "../utils.h"
35 36

  
36 37

  
37 38
/* Plugin information */
......
333 334
	if(session->destroy)
334 335
		return;
335 336
	/* Only start recording this peer when we get this event */
336
	session->start_time = g_get_monotonic_time();
337
	session->start_time = janus_get_monotonic_time();
337 338
	session->started = TRUE;
338 339
	/* Prepare JSON event */
339 340
	json_t *event = json_object();
......
351 352
	janus_voicemail_session *session = (janus_voicemail_session *)handle->plugin_handle;	
352 353
	if(!session || session->destroy || session->stopping || !session->started || session->start_time == 0)
353 354
		return;
354
	gint64 now = g_get_monotonic_time();
355
	gint64 now = janus_get_monotonic_time();
355 356
	/* Have 10 seconds passed? */
356 357
	if((now-session->start_time) >= 10*G_USEC_PER_SEC) {
357 358
		/* FIXME Simulate a "stop" coming from the browser */
......
546 547
			}
547 548
			JANUS_PRINT("Opus payload type is %d\n", opus_pt);
548 549
			g_sprintf(sdp, sdp_template,
549
				g_get_monotonic_time(),			/* We need current time here */
550
				g_get_monotonic_time(),			/* We need current time here */
550
				janus_get_monotonic_time(),		/* We need current time here */
551
				janus_get_monotonic_time(),		/* We need current time here */
551 552
				session->recording_id,			/* Recording ID */
552 553
				opus_pt,						/* Opus payload type */
553 554
				opus_pt							/* Opus payload type */);
......
557 558
				g_strlcat(sdp, "m=video 0 RTP/SAVPF 0\r\n", 1024);				
558 559
			}
559 560
			/* How long will the gateway take to push the event? */
560
			gint64 start = g_get_monotonic_time();
561
			gint64 start = janus_get_monotonic_time();
561 562
			int res = gateway->push_event(msg->handle, &janus_voicemail_plugin, msg->transaction, event_text, type, sdp);
562
			JANUS_PRINT("  >> Pushing event: %d (took %"SCNu64" ms)\n", res, g_get_monotonic_time()-start);
563
			JANUS_PRINT("  >> Pushing event: %d (took %"SCNu64" ms)\n", res, janus_get_monotonic_time()-start);
563 564
			if(res != JANUS_OK) {
564 565
				/* TODO Failed to negotiate? We should remove this participant */
565 566
			}

Also available in: Unified diff