mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-29 18:08:29 +00:00
st/gui: Remove old video test
This commit is contained in:
parent
57f407f02e
commit
b5354c4d83
1
doc/changes/state_trackers/mr.275.md
Normal file
1
doc/changes/state_trackers/mr.275.md
Normal file
|
@ -0,0 +1 @@
|
|||
gui: Remove old video test scene, never used and seemed to be broken.
|
|
@ -196,14 +196,6 @@ gui_scene_main_menu(struct gui_program *p);
|
|||
void
|
||||
gui_scene_select_video_calibrate(struct gui_program *p);
|
||||
|
||||
/*!
|
||||
* Shows a UI that lets you select a video device and mode for testing.
|
||||
*
|
||||
* @ingroup gui
|
||||
*/
|
||||
void
|
||||
gui_scene_select_video_test(struct gui_program *p);
|
||||
|
||||
/*!
|
||||
* Regular debug UI.
|
||||
*
|
||||
|
@ -212,18 +204,6 @@ gui_scene_select_video_test(struct gui_program *p);
|
|||
void
|
||||
gui_scene_debug(struct gui_program *p);
|
||||
|
||||
/*!
|
||||
* Given the frameserver runs some debug code on it.
|
||||
* Claims ownership of @p s.
|
||||
*
|
||||
* @ingroup gui
|
||||
*/
|
||||
void
|
||||
gui_scene_debug_video(struct gui_program *p,
|
||||
struct xrt_frame_context *xfctx,
|
||||
struct xrt_fs *xfs,
|
||||
struct xrt_settings_tracking *s);
|
||||
|
||||
/*!
|
||||
* Given the frameserver runs the calibration code on it.
|
||||
* Claims ownership of @p s.
|
||||
|
|
|
@ -369,47 +369,6 @@ on_root_exit_sink(const char *name, void *priv)
|
|||
*
|
||||
*/
|
||||
|
||||
void
|
||||
gui_scene_debug_video(struct gui_program *p,
|
||||
struct xrt_frame_context *xfctx,
|
||||
struct xrt_fs *xfs,
|
||||
struct xrt_settings_tracking *s)
|
||||
{
|
||||
struct debug_scene *ds = U_TYPED_CALLOC(struct debug_scene);
|
||||
uint32_t num_texs = 0;
|
||||
|
||||
ds->base.render = scene_render;
|
||||
ds->base.destroy = scene_destroy;
|
||||
ds->xfctx = xfctx;
|
||||
|
||||
gui_scene_push_front(p, &ds->base);
|
||||
|
||||
struct xrt_frame_sink *xsink = NULL;
|
||||
|
||||
p->texs[num_texs++] = gui_ogl_sink_create("Stream", xfctx, &xsink);
|
||||
u_sink_create_format_converter(xfctx, XRT_FORMAT_R8G8B8, xsink, &xsink);
|
||||
u_sink_queue_create(xfctx, xsink, &xsink);
|
||||
|
||||
#ifdef XRT_HAVE_OPENCV
|
||||
struct xrt_frame_sink *split = xsink;
|
||||
xsink = NULL;
|
||||
struct xrt_frame_sink *xsinks[4] = {NULL, NULL, NULL, NULL};
|
||||
|
||||
struct t_hsv_filter_params params = T_HSV_DEFAULT_PARAMS();
|
||||
t_hsv_filter_create(xfctx, ¶ms, xsinks, &xsink);
|
||||
u_sink_create_to_yuv_or_yuyv(xfctx, xsink, &xsink);
|
||||
u_sink_queue_create(xfctx, xsink, &xsink);
|
||||
|
||||
u_sink_split_create(xfctx, split, xsink, &xsink);
|
||||
#endif
|
||||
|
||||
// Create the sink interceptors.
|
||||
u_var_visit(on_root_enter_sink, on_root_exit_sink, on_elem_sink, p);
|
||||
|
||||
// Now that we have setup a node graph, start it.
|
||||
xrt_fs_stream_start(xfs, xsink, s->camera_mode);
|
||||
}
|
||||
|
||||
void
|
||||
gui_scene_debug(struct gui_program *p)
|
||||
{
|
||||
|
|
|
@ -41,11 +41,6 @@ scene_render(struct gui_scene *scene, struct gui_program *p)
|
|||
gui_scene_debug(p);
|
||||
}
|
||||
|
||||
if (igButton("Video (deprecated)", button_dims)) {
|
||||
gui_scene_delete_me(p, scene);
|
||||
gui_scene_select_video_test(p);
|
||||
}
|
||||
|
||||
igSeparator();
|
||||
|
||||
if (igButton("Exit", button_dims)) {
|
||||
|
|
|
@ -22,9 +22,6 @@ struct video_select
|
|||
{
|
||||
struct gui_scene base;
|
||||
|
||||
bool test;
|
||||
bool calibrate;
|
||||
|
||||
struct xrt_frame_context *xfctx;
|
||||
struct xrt_fs *xfs;
|
||||
|
||||
|
@ -104,14 +101,8 @@ scene_render(struct gui_scene *scene, struct gui_program *p)
|
|||
|
||||
vs->settings->camera_mode = i;
|
||||
|
||||
// User selected this mode, create the debug scene.
|
||||
if (vs->test) {
|
||||
gui_scene_debug_video(p, vs->xfctx, vs->xfs,
|
||||
vs->settings);
|
||||
} else if (vs->calibrate) {
|
||||
gui_scene_calibrate(p, vs->xfctx, vs->xfs,
|
||||
vs->settings);
|
||||
}
|
||||
// User selected this mode, create the next scene.
|
||||
gui_scene_calibrate(p, vs->xfctx, vs->xfs, vs->settings);
|
||||
|
||||
// We should not clean these up, zero them out.
|
||||
vs->settings = NULL;
|
||||
|
@ -174,20 +165,10 @@ create(void)
|
|||
*
|
||||
*/
|
||||
|
||||
void
|
||||
gui_scene_select_video_test(struct gui_program *p)
|
||||
{
|
||||
struct video_select *vs = create();
|
||||
vs->test = true;
|
||||
|
||||
gui_scene_push_front(p, &vs->base);
|
||||
}
|
||||
|
||||
void
|
||||
gui_scene_select_video_calibrate(struct gui_program *p)
|
||||
{
|
||||
struct video_select *vs = create();
|
||||
vs->calibrate = true;
|
||||
|
||||
gui_scene_push_front(p, &vs->base);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue