diff options
author | Thiago Santos <thiago.sousa.santos@collabora.com> | 2013-03-19 14:31:58 -0300 |
---|---|---|
committer | Thiago Santos <thiago.sousa.santos@collabora.com> | 2013-04-16 16:08:50 -0300 |
commit | d51c713b892153fc3b62c2b6315e3f521d964e67 (patch) | |
tree | 3f256592f8bbaf6d92208086644b959dae95fa9c | |
parent | 45900156a93dde04b2b994e92ff42fa4df388a0e (diff) | |
download | gstreamer-plugins-bad-d51c713b892153fc3b62c2b6315e3f521d964e67.tar.gz |
egladaptation: remove EGL_DISPLAY_SCALING from common code
This constant is EGL specific and is not present on EAGL
-rw-r--r-- | ext/eglgles/gstegladaptation.h | 1 | ||||
-rw-r--r-- | ext/eglgles/gstegladaptation_eagl.m | 3 | ||||
-rw-r--r-- | ext/eglgles/gstegladaptation_egl.c | 3 | ||||
-rw-r--r-- | ext/eglgles/gsteglglessink.c | 2 |
4 files changed, 7 insertions, 2 deletions
diff --git a/ext/eglgles/gstegladaptation.h b/ext/eglgles/gstegladaptation.h index 46f2cce1c..95661f583 100644 --- a/ext/eglgles/gstegladaptation.h +++ b/ext/eglgles/gstegladaptation.h @@ -113,6 +113,7 @@ struct GstEglAdaptationContext gint surface_width; gint surface_height; gint pixel_aspect_ratio; + gint pixel_aspect_ratio_d; GLuint fragshader[3]; /* frame, border, frame-platform */ GLuint vertshader[3]; /* frame, border, frame-platform */ diff --git a/ext/eglgles/gstegladaptation_eagl.m b/ext/eglgles/gstegladaptation_eagl.m index 55c0a23fc..144a14102 100644 --- a/ext/eglgles/gstegladaptation_eagl.m +++ b/ext/eglgles/gstegladaptation_eagl.m @@ -215,7 +215,8 @@ void gst_egl_adaptation_query_par (GstEglAdaptationContext * ctx) { /* TODO how can we check this? */ - ctx->pixel_aspect_ratio = EGL_DISPLAY_SCALING; + ctx->pixel_aspect_ratio = 1; + ctx->pixel_aspect_ratio_d = 1; } gboolean diff --git a/ext/eglgles/gstegladaptation_egl.c b/ext/eglgles/gstegladaptation_egl.c index e4237c78a..4abfc9d26 100644 --- a/ext/eglgles/gstegladaptation_egl.c +++ b/ext/eglgles/gstegladaptation_egl.c @@ -284,6 +284,9 @@ gst_egl_adaptation_query_par (GstEglAdaptationContext * ctx) { EGLint display_par; + /* fixed value */ + ctx->pixel_aspect_ratio_d = EGL_DISPLAY_SCALING; + /* Save display's pixel aspect ratio * * DAR is reported as w/h * EGL_DISPLAY_SCALING wich is diff --git a/ext/eglgles/gsteglglessink.c b/ext/eglgles/gsteglglessink.c index 65635330b..3fe6baa1a 100644 --- a/ext/eglgles/gsteglglessink.c +++ b/ext/eglgles/gsteglglessink.c @@ -902,7 +902,7 @@ gst_eglglessink_render (GstEglGlesSink * eglglessink) eglglessink->par_n, eglglessink->par_d, eglglessink->egl_context->pixel_aspect_ratio, - EGL_DISPLAY_SCALING)) { + eglglessink->egl_context->pixel_aspect_ratio_d)) { GST_WARNING_OBJECT (eglglessink, "Could not compute resulting DAR"); frame.w = w; frame.h = h; |