Пример #1
0
static void
_resize_movie(struct _emotion_plugin *_plugin)
{
   Ethumb *e = _plugin->e;
   double ratio;
   int w, h;
   int fx, fy, fw, fh;

   ratio = emotion_object_ratio_get(_plugin->video);
   ethumb_calculate_aspect_from_ratio(e, ratio, &w, &h);
   ethumb_calculate_fill_from_ratio(e, ratio, &fx, &fy, &fw, &fh);
   DBG("size: w=%d, h=%d fill: x=%d, y=%d, w=%d, h=%d", w, h, fx, fy, fw, fh);

   _plugin->w = w;
   _plugin->h = h;

   ethumb_plugin_image_resize(e, _plugin->w, _plugin->h);

   if (_plugin->edje_frame)
     {
        evas_object_resize(_plugin->edje_frame, fw, fh);
        evas_object_move(_plugin->edje_frame, fx, fy);
     }
   else
     {
        evas_object_resize(_plugin->video, fw, fh);
        evas_object_move(_plugin->video, fx, fy);
     }
   emotion_object_audio_mute_set(_plugin->video, 1);
}
Пример #2
0
static void
_display_info(Evas_Object *o)
{
   int w, h;
   printf("playing: %d\n", emotion_object_play_get(o));
   printf("meta title: %s\n",
	  emotion_object_meta_info_get(o, EMOTION_META_INFO_TRACK_TITLE));
   printf("seek position: %0.3f\n",
	  emotion_object_position_get(o));
   printf("play length: %0.3f\n",
	  emotion_object_play_length_get(o));
   printf("is seekable: %d\n",
	  emotion_object_seekable_get(o));
   emotion_object_size_get(o, &w, &h);
   printf("video geometry: %dx%d\n", w, h);
   printf("video width / height ratio: %0.3f\n",
	  emotion_object_ratio_get(o));
   printf("\n");
}
Пример #3
0
Файл: dvb.c Проект: Limsik/e17
static void
dvb_resize(void)
{
   Evas_Coord w, h;
   int iw, ih;
   double ratio;

   emotion_object_size_get(o_dvb, &iw, &ih);
   if ((iw == 0) || (ih == 0)) return;
   ratio = emotion_object_ratio_get(o_dvb);
   if (ratio > 0.0) iw = (ih * ratio) + 0.5;
   else ratio = (double)iw / (double)ih;
   w = 10240 * ratio;
   h = 10240;
   // fit so there is no blank space
//   edje_extern_object_aspect_set(o_dvb, EDJE_ASPECT_CONTROL_NEITHER, w, h);
   // fit and pad with blank
   edje_extern_object_aspect_set(o_dvb, EDJE_ASPECT_CONTROL_BOTH, w, h);
   edje_object_part_swallow(o_dvb_bg, "video", o_dvb);
}