summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfukubayashi.akio <fukubayashi.akio@genetec.co.jp>2019-06-12 19:52:27 +0900
committerfukubayashi.akio <fukubayashi.akio@genetec.co.jp>2019-06-12 19:52:27 +0900
commitbc6f53eebee9b81c03f29f2aa0b436fc0dea12ac (patch)
tree4b1e7481ed527831de712319cc77c8adae520ef8
parentefe567cf2fc39e3c7ea87edf7bc54284252c6c83 (diff)
Fix load pipeline.cfg
Signed-off-by: fukubayashi.akio <fukubayashi.akio@genetec.co.jp>
-rw-r--r--waltham-transmitter/transmitter-plugin/output.c270
-rw-r--r--waltham-transmitter/waltham-renderer/waltham-renderer.c2
2 files changed, 136 insertions, 136 deletions
diff --git a/waltham-transmitter/transmitter-plugin/output.c b/waltham-transmitter/transmitter-plugin/output.c
index c7aa616..04bdfbb 100644
--- a/waltham-transmitter/transmitter-plugin/output.c
+++ b/waltham-transmitter/transmitter-plugin/output.c
@@ -193,173 +193,173 @@ transmitter_output_repaint(struct weston_output *base,
output->renderer->dmafd =
api->get_dma_fd_from_view(&output->base, view, &output->renderer->buf_stride);
- if(output->renderer->dmafd < 0) {
- weston_log("Failed to get dmafd\n");
- goto out;
- }
-
- /*
- * Updating the width x height
- * from surface to gst-recorder
- */
- output->renderer->surface_width
- = view->surface->width;
- output->renderer->surface_height
- = view->surface->height;
-
- output->renderer->repaint_output(output);
- output->renderer->dmafd = NULL;
- transmitter_api->surface_gather_state(txs);
- //weston_buffer_reference(&view->surface->buffer_ref, NULL);
- break;
- }
- }
- if (!found_surface)
- transmitter_api->surface_push_to_remote(view->surface,
- remote, NULL);
- }
- }
- if (!found_output)
- goto out;
+ if(output->renderer->dmafd < 0) {
+ weston_log("Failed to get dmafd\n");
+ goto out;
+ }
+
+ /*
+ * Updating the width x height
+ * from surface to gst-recorder
+ */
+ output->renderer->surface_width
+ = view->surface->width;
+ output->renderer->surface_height
+ = view->surface->height;
+
+ output->renderer->repaint_output(output);
+ output->renderer->dmafd = NULL;
+ transmitter_api->surface_gather_state(txs);
+ //weston_buffer_reference(&view->surface->buffer_ref, NULL);
+ break;
+ }
+ }
+ if (!found_surface)
+ transmitter_api->surface_push_to_remote(view->surface,
+ remote, NULL);
+ }
+}
+if (!found_output)
+ goto out;
-#if 0
- weston_compositor_read_presentation_clock(output->base.compositor, &ts);
+#if 1
+weston_compositor_read_presentation_clock(output->base.compositor, &ts);
#else
- clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
- ts.tv_nsec += 33000000;
- if(ts.tv_nsec >= 1000000000)
- {
- ts.tv_sec++;
- ts.tv_nsec -= 1000000000;
- }
+clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
+ts.tv_nsec += 33000000;
+if(ts.tv_nsec >= 1000000000)
+{
+ ts.tv_sec++;
+ ts.tv_nsec -= 1000000000;
+}
#endif
- weston_output_finish_frame(&output->base, &ts, 0);
+weston_output_finish_frame(&output->base, &ts, 0);
- return 0;
+return 0;
out:
- transmitter_start_repaint_loop(base);
+transmitter_start_repaint_loop(base);
- return 0;
+return 0;
}
static void
transmitter_assign_planes(struct weston_output *base) {
- /*
- * This function prevents compositor releasing buffer early.
- */
- struct weston_transmitter_output* output = wl_container_of(base, output, base);
- struct weston_transmitter_remote* remote = output->remote;
- struct weston_transmitter_surface* txs;
- struct weston_compositor *compositor = base->compositor;
- struct weston_view *view;
-
- wl_list_for_each_reverse(view, &compositor->view_list, link) {
- if (view->output == &output->base) {
- wl_list_for_each(txs, &remote->surface_list, link) {
- if (txs->surface == view->surface)
- view->surface->keep_buffer = true;
-
- }
- }
- }
+/*
+ * This function prevents compositor releasing buffer early.
+ */
+struct weston_transmitter_output* output = wl_container_of(base, output, base);
+struct weston_transmitter_remote* remote = output->remote;
+struct weston_transmitter_surface* txs;
+struct weston_compositor *compositor = base->compositor;
+struct weston_view *view;
+
+wl_list_for_each_reverse(view, &compositor->view_list, link) {
+ if (view->output == &output->base) {
+ wl_list_for_each(txs, &remote->surface_list, link) {
+ if (txs->surface == view->surface)
+ view->surface->keep_buffer = true;
+
+ }
+ }
+}
}
static int
transmitter_output_enable(struct weston_output *base)
{
- struct weston_transmitter_output *output = wl_container_of(base, output, base);
- if (!output) {
- weston_log("No weston output found\n");
- return -1;
- }
- output->base.assign_planes = transmitter_assign_planes;
- output->base.set_backlight = NULL;
- output->base.set_dpms = NULL;
- output->base.switch_mode = NULL;
+struct weston_transmitter_output *output = wl_container_of(base, output, base);
+if (!output) {
+ weston_log("No weston output found\n");
+ return -1;
+}
+output->base.assign_planes = transmitter_assign_planes;
+output->base.set_backlight = NULL;
+output->base.set_dpms = NULL;
+output->base.switch_mode = NULL;
- return 0;
+return 0;
}
int
transmitter_remote_create_output(struct weston_transmitter_remote *remote,
- const struct weston_transmitter_output_info *info)
+ const struct weston_transmitter_output_info *info)
{
- struct weston_transmitter_output *output;
- struct weston_transmitter *txr = remote->transmitter;
- struct weston_output *def_output;
+struct weston_transmitter_output *output;
+struct weston_transmitter *txr = remote->transmitter;
+struct weston_output *def_output;
- output = zalloc(sizeof *output);
- if (!output)
- return -1;
+output = zalloc(sizeof *output);
+if (!output)
+ return -1;
- output->parent.draw_initial_frame = true;
+output->parent.draw_initial_frame = true;
- output->base.subpixel = info->subpixel;
+output->base.subpixel = info->subpixel;
- output->base.name = make_model(remote, 1);
- output->base.make = strdup(WESTON_TRANSMITTER_OUTPUT_MAKE);
- output->base.model = make_model(remote, 1);
- output->base.serial_number = strdup("0");
- /* x and y is fake value */
- wl_list_init(&output->base.mode_list);
- if (make_mode_list(&output->base.mode_list, info) < 0)
- goto fail;
+output->base.name = make_model(remote, 1);
+output->base.make = strdup(WESTON_TRANSMITTER_OUTPUT_MAKE);
+output->base.model = make_model(remote, 1);
+output->base.serial_number = strdup("0");
+/* x and y is fake value */
+wl_list_init(&output->base.mode_list);
+if (make_mode_list(&output->base.mode_list, info) < 0)
+ goto fail;
- output->base.current_mode = get_current_mode(&output->base.mode_list);
- output->base.height = output->base.current_mode->height;
- output->base.width = output->base.current_mode->width;
- /* WL_OUTPUT_MODE_CURRENT already set */
- weston_output_init(&output->base, remote->transmitter->compositor);
+output->base.current_mode = get_current_mode(&output->base.mode_list);
+output->base.height = output->base.current_mode->height;
+output->base.width = output->base.current_mode->width;
+/* WL_OUTPUT_MODE_CURRENT already set */
+weston_output_init(&output->base, remote->transmitter->compositor);
- /*
- * renderer_output_create skipped:
- * no renderer awareness is needed for this output
- */
+/*
+ * renderer_output_create skipped:
+ * no renderer awareness is needed for this output
+ */
- /*
- * weston_compositor_add_output() skipped:
- * Most other code uses weston_compositor::output_list when traversing
- * all outputs, we do not want any of that.
- * Also weston_compositor::output_created_signal must not trigger
- * for this output, since we must not involve input device management
- * or color management or any kind of local management.
- */
- output->base.enable = transmitter_output_enable;
- output->base.start_repaint_loop = transmitter_start_repaint_loop;
- output->base.repaint = transmitter_output_repaint;
- output->base.destroy = transmitter_output_destroy_;
- output->base.assign_planes = NULL;
- output->base.set_dpms = NULL;
- output->base.switch_mode = NULL;
- output->base.gamma_size = 0;
- output->base.set_gamma = NULL;
-
- output->base.native_mode = output->base.current_mode;
- output->base.native_scale = output->base.current_scale;
- output->base.scale = 1;
- output->base.transform = WL_OUTPUT_TRANSFORM_NORMAL;
-
- output->remote = remote;
- wl_list_insert(&remote->output_list, &output->link);
-
- if (txr->waltham_renderer->display_create(output) < 0) {
- weston_log("Failed to create waltham renderer display \n");
- return -1;
- }
+/*
+ * weston_compositor_add_output() skipped:
+ * Most other code uses weston_compositor::output_list when traversing
+ * all outputs, we do not want any of that.
+ * Also weston_compositor::output_created_signal must not trigger
+ * for this output, since we must not involve input device management
+ * or color management or any kind of local management.
+ */
+output->base.enable = transmitter_output_enable;
+output->base.start_repaint_loop = transmitter_start_repaint_loop;
+output->base.repaint = transmitter_output_repaint;
+output->base.destroy = transmitter_output_destroy_;
+output->base.assign_planes = NULL;
+output->base.set_dpms = NULL;
+output->base.switch_mode = NULL;
+output->base.gamma_size = 0;
+output->base.set_gamma = NULL;
+
+output->base.native_mode = output->base.current_mode;
+output->base.native_scale = output->base.current_scale;
+output->base.scale = 1;
+output->base.transform = WL_OUTPUT_TRANSFORM_NORMAL;
+
+output->remote = remote;
+wl_list_insert(&remote->output_list, &output->link);
+
+if (txr->waltham_renderer->display_create(output) < 0) {
+ weston_log("Failed to create waltham renderer display \n");
+ return -1;
+}
- weston_output_enable(&output->base);
+weston_output_enable(&output->base);
- return 0;
+return 0;
fail:
- free_mode_list(&output->base.mode_list);
- free(output->base.serial_number);
- free(output->base.model);
- free(output->base.make);
- free(output->base.name);
- free(output);
-
- return -1;
+free_mode_list(&output->base.mode_list);
+free(output->base.serial_number);
+free(output->base.model);
+free(output->base.make);
+free(output->base.name);
+free(output);
+
+return -1;
}
diff --git a/waltham-transmitter/waltham-renderer/waltham-renderer.c b/waltham-transmitter/waltham-renderer/waltham-renderer.c
index 9125c17..8c9396f 100644
--- a/waltham-transmitter/waltham-renderer/waltham-renderer.c
+++ b/waltham-transmitter/waltham-renderer/waltham-renderer.c
@@ -109,7 +109,7 @@ gst_pipe_init(struct weston_transmitter_output *output, struct gst_settings *set
gstctx->loop = g_main_loop_new(NULL, FALSE);
/* read pipeline from file */
- pFile = fopen ( "/etc/xdg/weston/pipeline.cfg" , "rb" );
+ pFile = fopen ( "/etc/xdg/weston/sender-pipeline.cfg" , "rb" );
if (pFile==NULL)
{
weston_log("File open error\n");