Playing pipeline

This commit is contained in:
Barzan Hayati 2025-07-01 12:34:36 +00:00
parent 79a350593c
commit 41719d609b
2 changed files with 20 additions and 0 deletions

View File

@ -48,6 +48,23 @@ char* createName(const char* str, int num) {
return result;
}
void PipelineManager::playing_pipeline(int num_sources,
char** url_camera){
/* Set the pipeline to "playing" state */
g_print ("Now playing... \n");
for (int i = 0; i < num_sources; i++)
{
g_print ("\033[1;35m %s,", url_camera[i + 1]);
}
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline),
GST_DEBUG_GRAPH_SHOW_ALL, sink_manager->output_sink.c_str());
gst_element_set_state (pipeline, GST_STATE_PLAYING);
}
bool PipelineManager::setup_pipeline() {
/* Set up the pipeline */
/* add all elements into the pipeline */
@ -150,5 +167,7 @@ bool PipelineManager::create_pipeline_elements(int num_sources,
message_handling->create_message_handler(pipeline, g_run_forever);
setup_pipeline();
playing_pipeline(num_sources, url_camera);
return true;
}

View File

@ -38,6 +38,7 @@ class PipelineManager {
int create_pipeline();
bool create_pipeline_elements(int, char **);
bool setup_pipeline();
void playing_pipeline(int , char** );
void set_cuda_device();
~PipelineManager();
};