summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-19 23:50:29 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-20 13:24:49 +0300
commite70a3122a9994fa12a3ba1f347c9384933544764 (patch)
treedb22c53b3877984efc90b0145d5b0abdaa639046 /utils
parent9caee4c662e9721db2a06d1a0db24f1a677d479d (diff)
licamera: controls: Drop unnecessary template qualifiers in documentation
The doxygen document blocks of various ControlList function qualify functions with full template and return type specification. This isn't needed, and the extra verbosity makes the documentation blocks more difficult to read. Drop the template qualifiers and return types. The generated documentation is not affected. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Diffstat (limited to 'utils')
0 files changed, 0 insertions, 0 deletions
4' href='#n34'>34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (C) 2021, Vedant Paranjape
 *
 * gstreamer_single_stream_test.cpp - GStreamer single stream capture test
 */

#include <iostream>
#include <unistd.h>

#include <gst/gst.h>

#include "gstreamer_test.h"
#include "test.h"

using namespace std;

class GstreamerSingleStreamTest : public GstreamerTest, public Test
{
public:
	GstreamerSingleStreamTest()
		: GstreamerTest()
	{
	}

protected:
	int init() override
	{
		if (status_ != TestPass)
			return status_;

		const gchar *streamDescription = "videoconvert ! fakesink";
		g_autoptr(GError) error0 = NULL;
		stream0_ = gst_parse_bin_from_description_full(streamDescription, TRUE,
						NULL,
						GST_PARSE_FLAG_FATAL_ERRORS,
						&error0);

		if (!stream0_) {
			g_printerr("Bin could not be created (%s)\n", error0->message);
			return TestFail;
		}
		g_object_ref_sink(stream0_);

		if (createPipeline() != TestPass)
			return TestFail;

		return TestPass;
	}

	int run() override
	{
		/* Build the pipeline */
		gst_bin_add_many(GST_BIN(pipeline_), libcameraSrc_, stream0_, NULL);
		if (gst_element_link(libcameraSrc_, stream0_) != TRUE) {
			g_printerr("Elements could not be linked.\n");
			return TestFail;
		}

		if (startPipeline() != TestPass)
			return TestFail;

		if (processEvent() != TestPass)
			return TestFail;

		return TestPass;
	}

	void cleanup() override
	{
		g_clear_object(&stream0_);
	}

private:
	GstElement *stream0_;
};

TEST_REGISTER(GstreamerSingleStreamTest)