Playing pipeline
This commit is contained in:
parent
79a350593c
commit
41719d609b
@ -48,6 +48,23 @@ char* createName(const char* str, int num) {
|
|||||||
return result;
|
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() {
|
bool PipelineManager::setup_pipeline() {
|
||||||
/* Set up the pipeline */
|
/* Set up the pipeline */
|
||||||
/* add all elements into 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);
|
message_handling->create_message_handler(pipeline, g_run_forever);
|
||||||
setup_pipeline();
|
setup_pipeline();
|
||||||
|
|
||||||
|
playing_pipeline(num_sources, url_camera);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -38,6 +38,7 @@ class PipelineManager {
|
|||||||
int create_pipeline();
|
int create_pipeline();
|
||||||
bool create_pipeline_elements(int, char **);
|
bool create_pipeline_elements(int, char **);
|
||||||
bool setup_pipeline();
|
bool setup_pipeline();
|
||||||
|
void playing_pipeline(int , char** );
|
||||||
void set_cuda_device();
|
void set_cuda_device();
|
||||||
~PipelineManager();
|
~PipelineManager();
|
||||||
};
|
};
|
||||||
Loading…
x
Reference in New Issue
Block a user