forked from enlightenment/efl
parent
fb371c8aa6
commit
69a70ef632
|
@ -8,6 +8,7 @@
|
||||||
#include "Emotion.h"
|
#include "Emotion.h"
|
||||||
|
|
||||||
int _emotion_gstreamer_log_domain = -1;
|
int _emotion_gstreamer_log_domain = -1;
|
||||||
|
Eina_Bool debug_fps = EINA_FALSE;
|
||||||
|
|
||||||
/* Callbacks to get the eos */
|
/* Callbacks to get the eos */
|
||||||
static void _for_each_tag (GstTagList const* list, gchar const* tag, void *data);
|
static void _for_each_tag (GstTagList const* list, gchar const* tag, void *data);
|
||||||
|
@ -1279,6 +1280,8 @@ module_open(Evas_Object *obj,
|
||||||
|
|
||||||
ecore_event_handler_add(ECORE_X_EVENT_WINDOW_DESTROY, _ecore_event_x_destroy, NULL);
|
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();
|
eina_threads_init();
|
||||||
|
|
||||||
*module = &em_module;
|
*module = &em_module;
|
||||||
|
|
|
@ -125,6 +125,11 @@ struct _Emotion_Gstreamer_Video
|
||||||
int in;
|
int in;
|
||||||
int out;
|
int out;
|
||||||
|
|
||||||
|
int frames;
|
||||||
|
int flapse;
|
||||||
|
double rtime;
|
||||||
|
double rlapse;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
int width;
|
int width;
|
||||||
|
@ -201,6 +206,7 @@ struct _Emotion_Gstreamer_Message
|
||||||
GstMessage *msg;
|
GstMessage *msg;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern Eina_Bool debug_fps;
|
||||||
extern int _emotion_gstreamer_log_domain;
|
extern int _emotion_gstreamer_log_domain;
|
||||||
#define DBG(...) EINA_LOG_DOM_DBG(_emotion_gstreamer_log_domain, __VA_ARGS__)
|
#define DBG(...) EINA_LOG_DOM_DBG(_emotion_gstreamer_log_domain, __VA_ARGS__)
|
||||||
#define INF(...) EINA_LOG_DOM_INFO(_emotion_gstreamer_log_domain, __VA_ARGS__)
|
#define INF(...) EINA_LOG_DOM_INFO(_emotion_gstreamer_log_domain, __VA_ARGS__)
|
||||||
|
|
|
@ -648,6 +648,31 @@ evas_video_sink_render(GstBaseSink* bsink, GstBuffer* buffer)
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
static void
|
||||||
evas_video_sink_samsung_main_render(void *data)
|
evas_video_sink_samsung_main_render(void *data)
|
||||||
{
|
{
|
||||||
|
@ -719,6 +744,8 @@ evas_video_sink_samsung_main_render(void *data)
|
||||||
evas_object_image_size_set(priv->o, stride, elevation);
|
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);
|
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);
|
evas_data = evas_object_image_data_get(priv->o, 1);
|
||||||
|
|
||||||
if (priv->func)
|
if (priv->func)
|
||||||
|
|
Loading…
Reference in New Issue