summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3a506be)
raw | patch | inline | side by side (parent: 3a506be)
author | Vincent Stehlé <v-stehle@ti.com> | |
Wed, 6 Jun 2012 16:33:15 +0000 (18:33 +0200) | ||
committer | Vincent Stehlé <v-stehle@ti.com> | |
Tue, 26 Jun 2012 08:54:25 +0000 (10:54 +0200) |
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
dmabuftest.c | patch | blob | history | |
fliptest.c | patch | blob | history | |
util/display-x11.c | patch | blob | history | |
util/util.c | patch | blob | history | |
util/util.h | patch | blob | history | |
viddec3test.c | patch | blob | history |
diff --git a/dmabuftest.c b/dmabuftest.c
index a9f41e8a6afd73c65a52cf5ea5af3eb22694cd2a..016acdcd2da04457903df8f3b3959df821a5c6fd 100644 (file)
--- a/dmabuftest.c
+++ b/dmabuftest.c
v4l2_dqbuf(v4l2);
MSG("Ok!");
+ disp_close(disp);
return ret;
}
diff --git a/fliptest.c b/fliptest.c
index cedab45fd091f047952dc11c7ebb6d665f764d26..34e2ccde840bd0d05b8ecdb1aecef961b71c2c19 100644 (file)
--- a/fliptest.c
+++ b/fliptest.c
}
MSG("Ok!");
+ disp_close(disp);
return 0;
}
diff --git a/util/display-x11.c b/util/display-x11.c
index d63f5e8c179b1d7594631a26c01f86579b5b1bac..a2619dc0a83e5819738b3c07a3da4d30862d78e1 100644 (file)
--- a/util/display-x11.c
+++ b/util/display-x11.c
ERROR("unimplemented");
return NULL;
}
+
+void disp_x11_close(struct display *disp)
+{
+ struct display_x11 *disp_x11 = to_display_x11(disp);
+ XCloseDisplay(disp_x11->dpy);
+}
diff --git a/util/util.c b/util/util.c
index 69f8c45b0cc6350c59c78ee42cf1807be07d50e3..36c4ad90b57fa2628464117551ae82902d7400b1 100644 (file)
--- a/util/util.c
+++ b/util/util.c
#ifdef HAVE_X11
void disp_x11_usage(void);
struct display * disp_x11_open(int argc, char **argv);
+void disp_x11_close(struct display *disp);
#endif
void
return disp;
}
+void disp_close(struct display *disp)
+{
+#ifdef HAVE_X11
+ disp_x11_close(disp);
+#endif
+}
+
struct buffer **
disp_get_vid_buffers(struct display *disp, uint32_t n,
uint32_t fourcc, uint32_t w, uint32_t h)
diff --git a/util/util.h b/util/util.h
index bf3323472b5fa92bc9ddb1cba384dad5257db3a9..80300aa9a92f9631f90000cac0ae0a819b8c3c65 100644 (file)
--- a/util/util.h
+++ b/util/util.h
*/
struct display * disp_open(int argc, char **argv);
+/* Close display */
+void disp_close(struct display *disp);
+
/* Get normal RGB/UI buffers (ie. not scaled, not YUV) */
static inline struct buffer **
disp_get_buffers(struct display *disp, uint32_t n)
diff --git a/viddec3test.c b/viddec3test.c
index aa7a9da4249746537763f8b016e0c1bccc755639..c6bfbbdca206162ae0828ba315c2e795461e1b11 100644 (file)
--- a/viddec3test.c
+++ b/viddec3test.c
if (decoder->outArgs) dce_free(decoder->outArgs);
if (decoder->input_bo) omap_bo_del(decoder->input_bo);
if (decoder->demux) demux_deinit(decoder->demux);
+ if (decoder->disp) disp_close(decoder->disp);
free(decoder);
}