summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c758b2f)
raw | patch | inline | side by side (parent: c758b2f)
author | Nikhil Devshatwar <nikhil.nd@ti.com> | |
Wed, 3 Sep 2014 12:55:16 +0000 (18:25 +0530) | ||
committer | Nikhil Devshatwar <nikhil.nd@ti.com> | |
Wed, 1 Oct 2014 08:38:31 +0000 (14:08 +0530) |
With the kmscube display, multiple captures need not be switched
All of the videos(upto six) can be rendered on the cube.
Remove the display thread logic so that all the threads
post the captured buffer to display library.
Also remove the fullscreen / overlay mode of displaying
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
All of the videos(upto six) can be rendered on the cube.
Remove the display thread logic so that all the threads
post the captured buffer to display library.
Also remove the fullscreen / overlay mode of displaying
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
dmabuftest.c | patch | blob | history |
diff --git a/dmabuftest.c b/dmabuftest.c
index ff6b98fd061e4ff720b688cbe8a0e9f1404f6ad5..ab6e1d67098759ad030743a20094ddcccf742fa6 100644 (file)
--- a/dmabuftest.c
+++ b/dmabuftest.c
#define CNT 500000
#define MAX_CAP 6
-pthread_t active_thread;
-
-enum display_area {
- FULL,
- OVERLAY
-};
-
struct thr_data {
struct display *disp;
struct v4l2 *v4l2;
uint32_t fourcc, width, height;
- enum display_area area;
};
static void
uint32_t width = data->width, height = data->height;
struct buffer **buffers, *capt;
- pthread_t tid;
int ret, i;
- tid = pthread_self();
-
buffers = disp_get_vid_buffers(disp, NBUF, fourcc, width, height);
if (!buffers) {
return NULL;
return NULL;
}
- if(data->area == OVERLAY) {
- for (i = 0; i < NBUF; i++) {
- buffers[i]->noScale = true;
- get_overlay_plane(disp, buffers[i]);
- }
- }
-
for (i = 0; i < NBUF; i++) {
v4l2_qbuf(v4l2, buffers[i]);
}
for (i = 1; i < CNT; i++) {
capt = v4l2_dqbuf(v4l2);
- if(active_thread == tid) {
- switch(data->area) {
- case FULL:
- ret = disp_post_vid_buffer(disp, capt,
- 0, 0, width, height);
- break;
- case OVERLAY:
- ret = disp_post_vid_buffer(disp, capt,
- 0, 0, width, height);
- break;
- }
- if (ret) {
- MSG("Quitting");
- return NULL;
- }
+ ret = disp_post_vid_buffer(disp, capt,
+ 0, 0, width, height);
+ if (ret) {
+ ERROR("Post buffer failed");
+ return NULL;
}
v4l2_qbuf(v4l2, capt);
}
}
tdata[i].disp = disp;
tdata[i].v4l2 = v4l2;
- tdata[i].area = FULL;
}
if (check_args(argc, argv)) {
MSG("Failed creating thread");
}
}
- active_thread = threads[0];
-
- while(1) {
- c = getchar();
- if(c == 's') {
- idx = (idx + 1) % multi;
- active_thread = threads[idx];
- }
- }
for (i = 0; i < multi; i++) {
pthread_join(threads[i], &result);