• Home
  • Raw
  • Download

Lines Matching refs:output

96 	struct weston_output *output;  member
97 void (*saved_destroy)(struct weston_output *output);
98 int (*saved_enable)(struct weston_output *output);
99 int (*saved_disable)(struct weston_output *output);
100 int (*saved_start_repaint_loop)(struct weston_output *output);
126 struct remoted_output *output; member
131 struct remoted_output *output; member
187 remoting_gst_pipeline_init(struct remoted_output *output) in remoting_gst_pipeline_init() argument
192 struct weston_mode *mode = output->output->current_mode; in remoting_gst_pipeline_init()
194 if (!output->gst_pipeline) { in remoting_gst_pipeline_init()
207 output->host, output->port, output->host, in remoting_gst_pipeline_init()
208 output->port + 1, output->port + 2); in remoting_gst_pipeline_init()
209 output->gst_pipeline = strdup(pipeline_str); in remoting_gst_pipeline_init()
211 weston_log("GST pipeline: %s\n", output->gst_pipeline); in remoting_gst_pipeline_init()
213 output->pipeline = gst_parse_launch(output->gst_pipeline, &err); in remoting_gst_pipeline_init()
214 if (!output->pipeline) { in remoting_gst_pipeline_init()
221 output->appsrc = (GstAppSrc*) in remoting_gst_pipeline_init()
222 gst_bin_get_by_name(GST_BIN(output->pipeline), "src"); in remoting_gst_pipeline_init()
223 if (!output->appsrc) { in remoting_gst_pipeline_init()
229 if (!gst_bin_get_by_name(GST_BIN(output->pipeline), "sink")) { in remoting_gst_pipeline_init()
236 output->format->gst_format_string, in remoting_gst_pipeline_init()
246 g_object_set(G_OBJECT(output->appsrc), in remoting_gst_pipeline_init()
254 output->bus = gst_pipeline_get_bus(GST_PIPELINE(output->pipeline)); in remoting_gst_pipeline_init()
255 if (!output->bus) { in remoting_gst_pipeline_init()
259 gst_bus_set_sync_handler(output->bus, remoting_gst_bus_sync_handler, in remoting_gst_pipeline_init()
260 &output->gstpipe, NULL); in remoting_gst_pipeline_init()
262 output->start_time = 0; in remoting_gst_pipeline_init()
263 ret = gst_element_set_state(output->pipeline, GST_STATE_PLAYING); in remoting_gst_pipeline_init()
272 gst_object_unref(GST_OBJECT(output->pipeline)); in remoting_gst_pipeline_init()
273 output->pipeline = NULL; in remoting_gst_pipeline_init()
278 remoting_gst_pipeline_deinit(struct remoted_output *output) in remoting_gst_pipeline_deinit() argument
280 if (!output->pipeline) in remoting_gst_pipeline_deinit()
283 gst_element_set_state(output->pipeline, GST_STATE_NULL); in remoting_gst_pipeline_deinit()
284 if (output->bus) in remoting_gst_pipeline_deinit()
285 gst_object_unref(GST_OBJECT(output->bus)); in remoting_gst_pipeline_deinit()
286 gst_object_unref(GST_OBJECT(output->pipeline)); in remoting_gst_pipeline_deinit()
287 output->pipeline = NULL; in remoting_gst_pipeline_deinit()
291 remoting_output_disable(struct weston_output *output);
296 struct remoted_output *output = data; in remoting_gst_restart() local
298 if (remoting_gst_pipeline_init(output) < 0) { in remoting_gst_restart()
300 remoting_output_disable(output->output); in remoting_gst_restart()
305 remoting_gst_schedule_restart(struct remoted_output *output) in remoting_gst_schedule_restart() argument
308 struct weston_compositor *c = output->remoting->compositor; in remoting_gst_schedule_restart()
311 wl_event_loop_add_idle(loop, remoting_gst_restart, output); in remoting_gst_schedule_restart()
315 remoting_gst_bus_message_handler(struct remoted_output *output) in remoting_gst_bus_message_handler() argument
322 message = gst_bus_pop(output->bus); in remoting_gst_bus_message_handler()
333 output->retry_count = 0; in remoting_gst_bus_message_handler()
345 if (output->retry_count < MAX_RETRY_COUNT) { in remoting_gst_bus_message_handler()
346 output->retry_count++; in remoting_gst_bus_message_handler()
347 remoting_gst_pipeline_deinit(output); in remoting_gst_bus_message_handler()
348 remoting_gst_schedule_restart(output); in remoting_gst_bus_message_handler()
350 remoting_output_disable(output->output); in remoting_gst_bus_message_handler()
359 remoting_output_buffer_release(struct remoted_output *output, void *buffer) in remoting_output_buffer_release() argument
362 = output->remoting->virtual_output_api; in remoting_output_buffer_release()
372 struct remoted_output *output = data; in remoting_gstpipe_handler() local
379 remoting_output_disable(output->output); in remoting_gstpipe_handler()
385 remoting_gst_bus_message_handler(output); in remoting_gstpipe_handler()
388 remoting_output_buffer_release(output, msg.data); in remoting_gstpipe_handler()
398 struct remoted_output *output) in remoting_gstpipe_init() argument
406 output->gstpipe.readfd = fd[0]; in remoting_gstpipe_init()
407 output->gstpipe.writefd = fd[1]; in remoting_gstpipe_init()
409 output->gstpipe.source = in remoting_gstpipe_init()
410 wl_event_loop_add_fd(loop, output->gstpipe.readfd, in remoting_gstpipe_init()
412 remoting_gstpipe_handler, output); in remoting_gstpipe_init()
413 if (!output->gstpipe.source) { in remoting_gstpipe_init()
431 remoting_output_destroy(struct weston_output *output);
438 struct remoted_output *output, *next; in weston_remoting_destroy() local
440 wl_list_for_each_safe(output, next, &remoting->output_list, link) in weston_remoting_destroy()
441 remoting_output_destroy(output->output); in weston_remoting_destroy()
468 struct remoted_output *output = data; in remoting_output_finish_frame_handler() local
470 = output->remoting->virtual_output_api; in remoting_output_finish_frame_handler()
474 if (output->submitted_frame) { in remoting_output_finish_frame_handler()
475 struct weston_compositor *c = output->remoting->compositor; in remoting_output_finish_frame_handler()
476 output->submitted_frame = false; in remoting_output_finish_frame_handler()
478 api->finish_frame(output->output, &now, 0); in remoting_output_finish_frame_handler()
481 if (output->dpms == WESTON_DPMS_ON) { in remoting_output_finish_frame_handler()
482 msec = millihz_to_nsec(output->output->current_mode->refresh) / 1000000; in remoting_output_finish_frame_handler()
483 wl_event_source_timer_update(output->finish_frame_timer, msec); in remoting_output_finish_frame_handler()
485 wl_event_source_timer_update(output->finish_frame_timer, 0); in remoting_output_finish_frame_handler()
493 struct remoted_output *output = cb_data->output; in remoting_gst_mem_free_cb() local
494 struct remoted_gstpipe *pipe = &output->gstpipe; in remoting_gst_mem_free_cb()
509 lookup_remoted_output(struct weston_output *output) in lookup_remoted_output() argument
511 struct weston_compositor *c = output->compositor; in lookup_remoted_output()
516 if (remoted_output->output == output) in lookup_remoted_output()
525 remoting_output_gst_push_buffer(struct remoted_output *output, in remoting_output_gst_push_buffer() argument
531 weston_compositor_read_presentation_clock(output->remoting->compositor, in remoting_output_gst_push_buffer()
534 if (output->start_time == 0) in remoting_output_gst_push_buffer()
535 output->start_time = current_frame_time; in remoting_output_gst_push_buffer()
536 ts = current_frame_time - output->start_time; in remoting_output_gst_push_buffer()
544 gst_app_src_push_buffer(output->appsrc, buffer); in remoting_output_gst_push_buffer()
545 output->submitted_frame = true; in remoting_output_gst_push_buffer()
552 struct remoted_output *output = frame_data->output; in remoting_output_fence_sync_handler() local
554 remoting_output_gst_push_buffer(output, frame_data->buffer); in remoting_output_fence_sync_handler()
556 wl_event_source_remove(output->fence_sync_event_source); in remoting_output_fence_sync_handler()
557 close(output->fence_sync_fd); in remoting_output_fence_sync_handler()
567 struct remoted_output *output = lookup_remoted_output(output_base); in remoting_output_frame() local
568 struct weston_remoting *remoting = output->remoting; in remoting_output_frame()
571 = output->remoting->virtual_output_api; in remoting_output_frame()
579 if (!output) in remoting_output_frame()
586 mode = output->output->current_mode; in remoting_output_frame()
593 output->format->gst_video_format, in remoting_output_frame()
600 cb_data->output = output; in remoting_output_frame()
606 output->fence_sync_fd = api->get_fence_sync_fd(output->output); in remoting_output_frame()
608 if (output->fence_sync_fd == -1) { in remoting_output_frame()
609 remoting_output_gst_push_buffer(output, buf); in remoting_output_frame()
615 close(output->fence_sync_fd); in remoting_output_frame()
616 remoting_output_gst_push_buffer(output, buf); in remoting_output_frame()
620 frame_data->output = output; in remoting_output_frame()
623 output->fence_sync_event_source = in remoting_output_frame()
624 wl_event_loop_add_fd(loop, output->fence_sync_fd, in remoting_output_frame()
633 remoting_output_destroy(struct weston_output *output) in remoting_output_destroy() argument
635 struct remoted_output *remoted_output = lookup_remoted_output(output); in remoting_output_destroy()
638 wl_list_for_each_safe(mode, next, &output->mode_list, link) { in remoting_output_destroy()
643 remoted_output->saved_destroy(output); in remoting_output_destroy()
660 remoting_output_start_repaint_loop(struct weston_output *output) in remoting_output_start_repaint_loop() argument
662 struct remoted_output *remoted_output = lookup_remoted_output(output); in remoting_output_start_repaint_loop()
665 remoted_output->saved_start_repaint_loop(output); in remoting_output_start_repaint_loop()
667 msec = millihz_to_nsec(remoted_output->output->current_mode->refresh) in remoting_output_start_repaint_loop()
677 struct remoted_output *output = lookup_remoted_output(base_output); in remoting_output_set_dpms() local
679 if (output->dpms == level) in remoting_output_set_dpms()
682 output->dpms = level; in remoting_output_set_dpms()
683 remoting_output_finish_frame_handler(output); in remoting_output_set_dpms()
687 remoting_output_enable(struct weston_output *output) in remoting_output_enable() argument
689 struct remoted_output *remoted_output = lookup_remoted_output(output); in remoting_output_enable()
690 struct weston_compositor *c = output->compositor; in remoting_output_enable()
696 api->set_submit_frame_cb(output, remoting_output_frame); in remoting_output_enable()
698 ret = remoted_output->saved_enable(output); in remoting_output_enable()
702 remoted_output->saved_start_repaint_loop = output->start_repaint_loop; in remoting_output_enable()
703 output->start_repaint_loop = remoting_output_start_repaint_loop; in remoting_output_enable()
704 output->set_dpms = remoting_output_set_dpms; in remoting_output_enable()
708 remoted_output->saved_disable(output); in remoting_output_enable()
723 remoting_output_disable(struct weston_output *output) in remoting_output_disable() argument
725 struct remoted_output *remoted_output = lookup_remoted_output(output); in remoting_output_disable()
730 return remoted_output->saved_disable(output); in remoting_output_disable()
737 struct remoted_output *output; in remoting_output_create() local
750 output = zalloc(sizeof *output); in remoting_output_create()
751 if (!output) in remoting_output_create()
758 if (remoting_gstpipe_init(c, output) < 0) { in remoting_output_create()
763 output->output = api->create_output(c, name); in remoting_output_create()
764 if (!output->output) { in remoting_output_create()
769 output->saved_destroy = output->output->destroy; in remoting_output_create()
770 output->output->destroy = remoting_output_destroy; in remoting_output_create()
771 output->saved_enable = output->output->enable; in remoting_output_create()
772 output->output->enable = remoting_output_enable; in remoting_output_create()
773 output->saved_disable = output->output->disable; in remoting_output_create()
774 output->output->disable = remoting_output_disable; in remoting_output_create()
775 output->remoting = remoting; in remoting_output_create()
776 wl_list_insert(remoting->output_list.prev, &output->link); in remoting_output_create()
783 weston_output_attach_head(output->output, head); in remoting_output_create()
784 output->head = head; in remoting_output_create()
787 output->format = &supported_formats[0]; in remoting_output_create()
789 return output->output; in remoting_output_create()
792 if (output->gstpipe.source) in remoting_output_create()
793 remoting_gstpipe_release(&output->gstpipe); in remoting_output_create()
796 free(output); in remoting_output_create()
801 remoting_output_is_remoted(struct weston_output *output) in remoting_output_is_remoted() argument
803 struct remoted_output *remoted_output = lookup_remoted_output(output); in remoting_output_is_remoted()
812 remoting_output_set_mode(struct weston_output *output, const char *modeline) in remoting_output_set_mode() argument
817 if (!remoting_output_is_remoted(output)) { in remoting_output_set_mode()
838 wl_list_insert(output->mode_list.prev, &mode->link); in remoting_output_set_mode()
840 output->current_mode = mode; in remoting_output_set_mode()
846 remoting_output_set_gbm_format(struct weston_output *output, in remoting_output_set_gbm_format() argument
849 struct remoted_output *remoted_output = lookup_remoted_output(output); in remoting_output_set_gbm_format()
857 format = api->set_gbm_format(output, gbm_format); in remoting_output_set_gbm_format()
868 remoting_output_set_seat(struct weston_output *output, const char *seat) in remoting_output_set_seat() argument
874 remoting_output_set_host(struct weston_output *output, char *host) in remoting_output_set_host() argument
876 struct remoted_output *remoted_output = lookup_remoted_output(output); in remoting_output_set_host()
887 remoting_output_set_port(struct weston_output *output, int port) in remoting_output_set_port() argument
889 struct remoted_output *remoted_output = lookup_remoted_output(output); in remoting_output_set_port()
896 remoting_output_set_gst_pipeline(struct weston_output *output, in remoting_output_set_gst_pipeline() argument
899 struct remoted_output *remoted_output = lookup_remoted_output(output); in remoting_output_set_gst_pipeline()