#Tut 1
` gst_init (&argc, &argv); -- Initializing GStreamer. Must be the first GStreamer command.
` pipeline = gst_parse_launch("[source]", NULL); -- set of all interconnected elements
` gst_parse_launch -- easy shortcut pipeline
#Tut 2
Elements
` source = gst_element_factory_make ("videotestsrc", "source");
` sink = gst_element_factory_make ("autovideosink", "sink");
Pipeline
** bin : element used to contain other elements
` pipeline = gst_pipeline_new ("test-pipeline"); -- create new pipeline
- A pipeline is a particular type of bin
Building pipeline
/* Build the pipeline */
gst_bin_add_many (GST_BIN (pipeline), source, sink, NULL);
if (gst_element_link (source, sink) != TRUE) {
g_printerr ("Elements could not be linked.\n");
gst_object_unref (pipeline);
return -1;
}
` gst_bin_add_many (); -- accepts a list of elements to be added, ending with NULL
`* gst_bin_add() -- add individual elements
` gst_element_link() -- first parameter is source, second is destination. Only elements residing in the same bin can be linked together. Add them them to pipeline first before trying to link them.
'컴퓨터 공학' 카테고리의 다른 글
GStreamer 학습 튜토리얼(GStreamer tutorials) - #1 Hello World! (0) | 2021.09.15 |
---|---|
VMS(Video Management System)/NVR 소프트웨어 환경 셋업 (0) | 2021.09.13 |
TCP/IP Protocol (0) | 2021.05.20 |