#include "Emotion.h"
int _emotion_gstreamer_log_domain = -1;
+Eina_Bool debug_fps = EINA_FALSE;
/* Callbacks to get the eos */
static void _for_each_tag (GstTagList const* list, gchar const* tag, void *data);
ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DESTROY, _ecore_event_x_destroy, NULL);
+ if (getenv("EMOTION_FPS_DEBUG")) debug_fps = EINA_TRUE;
+
eina_threads_init();
*module = &em_module;
int in;
int out;
+ int frames;
+ int flapse;
+ double rtime;
+ double rlapse;
+
struct
{
int width;
GstMessage *msg;
};
+extern Eina_Bool debug_fps;
extern int _emotion_gstreamer_log_domain;
#define DBG(...) EINA_LOG_DOM_DBG(_emotion_gstreamer_log_domain, __VA_ARGS__)
#define INF(...) EINA_LOG_DOM_INFO(_emotion_gstreamer_log_domain, __VA_ARGS__)
}
static void
+_update_emotion_fps(Emotion_Gstreamer_Video *ev)
+{
+ double tim;
+
+ if (!debug_fps) return ;
+
+ tim = ecore_time_get();
+ ev->frames++;
+
+ if (ev->rlapse == 0.0)
+ {
+ ev->rlapse = tim;
+ ev->flapse = ev->frames;
+ }
+ else if ((tim - ev->rlapse) >= 0.5)
+ {
+ printf("FRAME: %i, FPS: %3.1f\n",
+ ev->frames,
+ (ev->frames - ev->flapse) / (tim - ev->rlapse));
+ ev->rlapse = tim;
+ ev->flapse = ev->frames;
+ }
+}
+
+static void
evas_video_sink_samsung_main_render(void *data)
{
Emotion_Gstreamer_Buffer *send;
evas_object_image_size_set(priv->o, stride, elevation);
evas_object_image_fill_set(priv->o, 0, 0, send->ev->fill.width, send->ev->fill.height);
+ _update_emotion_fps(send->ev);
+
evas_data = evas_object_image_data_get(priv->o, 1);
if (priv->func)