equal
deleted
inserted
replaced
|
1 |
|
2 /*** block a from ../../../docs/manual/basics-bins.xml ***/ |
|
3 |
|
4 #define LOG_FILE "c:\\logs\\bin_logs.txt" |
|
5 |
|
6 #include <gst/gst_global.h> |
|
7 #include "std_log_result.h" |
|
8 #define LOG_FILENAME_LINE __FILE__, __LINE__ |
|
9 |
|
10 void create_xml(int result) |
|
11 { |
|
12 if(result) |
|
13 assert_failed = 1; |
|
14 |
|
15 testResultXml(xmlfile); |
|
16 close_log_file(); |
|
17 } |
|
18 |
|
19 #include <gst/gst.h> |
|
20 |
|
21 int |
|
22 main (int argc, |
|
23 char *argv[]) |
|
24 { |
|
25 GstElement *bin, *pipeline, *source, *sink; |
|
26 |
|
27 xmlfile = "bin"; |
|
28 std_log(LOG_FILENAME_LINE, "Test Started bin"); |
|
29 |
|
30 /* init */ |
|
31 gst_init (&argc, &argv); |
|
32 |
|
33 /* create */ |
|
34 pipeline = gst_pipeline_new ("my_pipeline"); |
|
35 bin = gst_pipeline_new ("my_bin"); |
|
36 source = gst_element_factory_make ("fakesrc", "source"); |
|
37 sink = gst_element_factory_make ("fakesink", "sink"); |
|
38 |
|
39 /* set up pipeline */ |
|
40 gst_bin_add_many (GST_BIN (bin), source, sink, NULL); |
|
41 gst_bin_add (GST_BIN (pipeline), bin); |
|
42 gst_element_link (source, sink); |
|
43 getchar(); |
|
44 /*** block b from ../../../docs/manual/basics-bins.xml ***/ |
|
45 std_log(LOG_FILENAME_LINE, "Test Successful"); |
|
46 create_xml(0); |
|
47 |
|
48 return 0; |
|
49 |
|
50 |
|
51 |
|
52 /*** block c from ../../../docs/manual/basics-bins.xml ***/ |
|
53 } |