summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/modules/gstreamer/emotion_sink.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2011-10-05 09:39:32 +0000
committerCedric BAIL <cedric.bail@free.fr>2011-10-05 09:39:32 +0000
commit69a70ef632d136e735ea1acc2a4dc23998e892f9 (patch)
treef1474ccf7664a50e010591b3a4fcdb15407ea09e /legacy/emotion/src/modules/gstreamer/emotion_sink.c
parentfb371c8aa636070598afd52cd0d8f74117bab744 (diff)
emotion: FPS tracking.
SVN revision: 63830
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_sink.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_sink.c b/legacy/emotion/src/modules/gstreamer/emotion_sink.c
index f2273b7980..cc0fe49fbe 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_sink.c
+++ b/legacy/emotion/src/modules/gstreamer/emotion_sink.c
@@ -649,6 +649,31 @@ evas_video_sink_render(GstBaseSink* bsink, GstBuffer* buffer)
649} 649}
650 650
651static void 651static void
652_update_emotion_fps(Emotion_Gstreamer_Video *ev)
653{
654 double tim;
655
656 if (!debug_fps) return ;
657
658 tim = ecore_time_get();
659 ev->frames++;
660
661 if (ev->rlapse == 0.0)
662 {
663 ev->rlapse = tim;
664 ev->flapse = ev->frames;
665 }
666 else if ((tim - ev->rlapse) >= 0.5)
667 {
668 printf("FRAME: %i, FPS: %3.1f\n",
669 ev->frames,
670 (ev->frames - ev->flapse) / (tim - ev->rlapse));
671 ev->rlapse = tim;
672 ev->flapse = ev->frames;
673 }
674}
675
676static void
652evas_video_sink_samsung_main_render(void *data) 677evas_video_sink_samsung_main_render(void *data)
653{ 678{
654 Emotion_Gstreamer_Buffer *send; 679 Emotion_Gstreamer_Buffer *send;
@@ -719,6 +744,8 @@ evas_video_sink_samsung_main_render(void *data)
719 evas_object_image_size_set(priv->o, stride, elevation); 744 evas_object_image_size_set(priv->o, stride, elevation);
720 evas_object_image_fill_set(priv->o, 0, 0, send->ev->fill.width, send->ev->fill.height); 745 evas_object_image_fill_set(priv->o, 0, 0, send->ev->fill.width, send->ev->fill.height);
721 746
747 _update_emotion_fps(send->ev);
748
722 evas_data = evas_object_image_data_get(priv->o, 1); 749 evas_data = evas_object_image_data_get(priv->o, 1);
723 750
724 if (priv->func) 751 if (priv->func)