diff options
author | Lionel Landwerlin <llandwerlin@gmail.com> | 2013-07-08 12:05:49 +0100 |
---|---|---|
committer | Lionel Landwerlin <llandwerlin@gmail.com> | 2013-07-08 12:11:21 +0100 |
commit | 8b12180346be221cf25216f884d3a8b9f069141f (patch) | |
tree | 3ed3aa71922e19907808e79807827cd2ae2072cd | |
parent | 54b5ee3eac0276048328e2d5e2130385a3bcac46 (diff) | |
download | clutter-gst-8b12180346be221cf25216f884d3a8b9f069141f.tar.gz |
examples: camera-player: use given size from the player
-rw-r--r-- | examples/camera-player.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/examples/camera-player.c b/examples/camera-player.c index e5e25a1..4bd50a6 100644 --- a/examples/camera-player.c +++ b/examples/camera-player.c @@ -322,17 +322,10 @@ size_change (ClutterGstPlayer *player, ClutterActor *stage = app->stage; gfloat new_x, new_y, new_width, new_height; gfloat stage_width, stage_height; - gfloat frame_width, frame_height; clutter_actor_get_size (stage, &stage_width, &stage_height); - /* base_width and base_height are the actual dimensions of the buffers before - * taking the pixel aspect ratio into account. We need to get the actual - * size of the texture to display */ - clutter_content_get_preferred_size (clutter_actor_get_content (app->camera_actor), - &frame_width, &frame_height); - - new_height = (frame_height * stage_width) / frame_width; + new_height = (base_height * stage_width) / base_width; if (new_height <= stage_height) { new_width = stage_width; @@ -342,7 +335,7 @@ size_change (ClutterGstPlayer *player, } else { - new_width = (frame_width * stage_height) / frame_height; + new_width = (base_width * stage_height) / base_height; new_height = stage_height; new_x = (stage_width - new_width) / 2; |