+ return pipeline;
+}
+
+int main(int argc, char* argv[])
+{
+ int ret = 0;
+ struct sigaction sa;
+ struct receiver_data receiver_data = {};
+ struct display* display;
+ struct window* window;
+ const char* app_id = "camera-gstreamer";
+
+ // for starting the application from the beginning, with a diffrent
+ // role we need to handle that creating the main window
+ if (argc >= 2 && strcmp(argv[1], "float") == 0) {
+ GrpcClient *client = new GrpcClient();
+ client->SetAppFloat(std::string(app_id), 30, 400);
+ }
+
+ sa.sa_sigaction = signal_int;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = SA_RESETHAND | SA_SIGINFO;
+ sigaction(SIGINT, &sa, NULL);
+
+ int gargc = 2;
+ char** gargv = static_cast<char**>(calloc(2, sizeof(char*)));
+
+ gargv[0] = strdup(argv[0]);
+ gargv[1] = strdup("--gst-debug-level=2");
+
+ setbuf(stdout, NULL);
+
+ gst_init(&gargc, &gargv);
+
+ receiver_data.pipeline = create_pipeline(&gargc, &gargv);
+
+ if (!receiver_data.pipeline)
+ return EXIT_FAILURE;