summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <ystreet00@gmail.com>2013-10-24 22:30:45 +1100
committerMatthew Waters <ystreet00@gmail.com>2014-03-15 18:37:04 +0100
commit636d30771556a27eff5778c255643db0d3492e27 (patch)
treea16f9dd3155908d6dffc81c54f1994a8ae5dc9d2
parent79260ff8f9a7c6eb7e13616747845175e42eae70 (diff)
[853/906] display: remove _{set,get}_context
A GstGLDisplay doesn't need a GstGLContext and its use was cause a reference cycle
-rw-r--r--gst-libs/gst/gl/gstgldisplay.c40
-rw-r--r--gst-libs/gst/gl/gstgldisplay.h3
-rw-r--r--gst-libs/gst/gl/gstglmixer.c1
-rw-r--r--gst/gl/gstglimagesink.c2
-rw-r--r--gst/gl/gstgltestsrc.c1
-rw-r--r--tests/check/libs/gstglcontext.c1
-rw-r--r--tests/check/libs/gstglmemory.c1
7 files changed, 0 insertions, 49 deletions
diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
index 198e766f2..7a0b161a3 100644
--- a/gst-libs/gst/gl/gstgldisplay.c
+++ b/gst-libs/gst/gl/gstgldisplay.c
@@ -104,46 +104,6 @@ gst_gl_display_get_gl_api (GstGLDisplay * display)
}
void
-gst_gl_display_set_context (GstGLDisplay * display, GstGLContext * context)
-{
- g_return_if_fail (GST_IS_GL_DISPLAY (display));
- g_return_if_fail (GST_GL_IS_CONTEXT (context));
-
- gst_gl_display_lock (display);
-
- if (display->context)
- gst_object_unref (display->context);
-
- display->context = gst_object_ref (context);
-
- gst_gl_display_unlock (display);
-}
-
-GstGLContext *
-gst_gl_display_get_context (GstGLDisplay * display)
-{
- GstGLContext *context;
-
- g_return_val_if_fail (GST_IS_GL_DISPLAY (display), NULL);
-
- gst_gl_display_lock (display);
-
- context = display->context ? gst_object_ref (display->context) : NULL;
-
- gst_gl_display_unlock (display);
-
- return context;
-}
-
-GstGLContext *
-gst_gl_display_get_context_unlocked (GstGLDisplay * display)
-{
- g_return_val_if_fail (GST_IS_GL_DISPLAY (display), NULL);
-
- return display->context ? gst_object_ref (display->context) : NULL;
-}
-
-void
gst_context_set_gl_display (GstContext * context, GstGLDisplay * display)
{
GstStructure *s;
diff --git a/gst-libs/gst/gl/gstgldisplay.h b/gst-libs/gst/gl/gstgldisplay.h
index 46f222810..9fb22f54f 100644
--- a/gst-libs/gst/gl/gstgldisplay.h
+++ b/gst-libs/gst/gl/gstgldisplay.h
@@ -68,9 +68,6 @@ GstGLDisplay *gst_gl_display_new (void);
GstGLAPI gst_gl_display_get_gl_api (GstGLDisplay * display);
gpointer gst_gl_display_get_gl_vtable (GstGLDisplay * display);
-void gst_gl_display_set_context (GstGLDisplay * display, GstGLContext * context);
-GstGLContext * gst_gl_display_get_context (GstGLDisplay * display);
-GstGLContext * gst_gl_display_get_context_unlocked (GstGLDisplay * display);
#define GST_GL_DISPLAY_CONTEXT_TYPE "gst.gl.GLDisplay"
void gst_context_set_gl_display (GstContext * context, GstGLDisplay * display);
diff --git a/gst-libs/gst/gl/gstglmixer.c b/gst-libs/gst/gl/gstglmixer.c
index 92678fbdc..453f5a386 100644
--- a/gst-libs/gst/gl/gstglmixer.c
+++ b/gst-libs/gst/gl/gstglmixer.c
@@ -965,7 +965,6 @@ gst_gl_mixer_activate (GstGLMixer * mix, gboolean activate)
GST_INFO ("Creating GstGLDisplay");
mix->context = gst_gl_context_new (mix->display);
- gst_gl_display_set_context (mix->display, mix->context);
if (!gst_gl_context_create (mix->context, 0, &error)) {
GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND,
diff --git a/gst/gl/gstglimagesink.c b/gst/gl/gstglimagesink.c
index 909299631..2f305652c 100644
--- a/gst/gl/gstglimagesink.c
+++ b/gst/gl/gstglimagesink.c
@@ -459,8 +459,6 @@ gst_glimage_sink_change_state (GstElement * element, GstStateChange transition)
return GST_STATE_CHANGE_FAILURE;
glimage_sink->context = gst_gl_context_new (glimage_sink->display);
- gst_gl_display_set_context (glimage_sink->display,
- glimage_sink->context);
window = gst_gl_context_get_window (glimage_sink->context);
if (!glimage_sink->window_id && !glimage_sink->new_window_id)
diff --git a/gst/gl/gstgltestsrc.c b/gst/gl/gstgltestsrc.c
index 1707c93d8..59d956cca 100644
--- a/gst/gl/gstgltestsrc.c
+++ b/gst/gl/gstgltestsrc.c
@@ -585,7 +585,6 @@ gst_gl_test_src_start (GstBaseSrc * basesrc)
GST_INFO ("Creating GstGLDisplay");
src->context = gst_gl_context_new (src->display);
- gst_gl_display_set_context (src->display, src->context);
if (!gst_gl_context_create (src->context, 0, &error)) {
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,
diff --git a/tests/check/libs/gstglcontext.c b/tests/check/libs/gstglcontext.c
index bb2d2d246..aa58c69b8 100644
--- a/tests/check/libs/gstglcontext.c
+++ b/tests/check/libs/gstglcontext.c
@@ -233,7 +233,6 @@ GST_START_TEST (test_share)
display = gst_gl_display_new ();
context = gst_gl_context_new (display);
- gst_gl_display_set_context (display, context);
window = gst_gl_window_new (display);
gst_gl_context_set_window (context, window);
diff --git a/tests/check/libs/gstglmemory.c b/tests/check/libs/gstglmemory.c
index 985129a90..ae42ada5c 100644
--- a/tests/check/libs/gstglmemory.c
+++ b/tests/check/libs/gstglmemory.c
@@ -38,7 +38,6 @@ setup (void)
{
display = gst_gl_display_new ();
context = gst_gl_context_new (display);
- gst_gl_display_set_context (display, context);
gst_gl_context_create (context, 0, NULL);
gst_gl_memory_init ();
}