equal
deleted
inserted
replaced
|
1 |
|
2 /*** block from ../../../docs/manual/basics-elements.xml ***/ |
|
3 |
|
4 #include <gst/gst_global.h> |
|
5 #include <gst/gst.h> |
|
6 #include <stdio.h> |
|
7 #define LOG_FILE "c:\\logs\\filesink_log1.txt" |
|
8 #include "std_log_result.h" |
|
9 #define LOG_FILENAME_LINE __FILE__, __LINE__ |
|
10 |
|
11 //char* xmlfile = "filesink"; |
|
12 |
|
13 |
|
14 void create_xml(int result) |
|
15 { |
|
16 if(result) |
|
17 assert_failed = 1; |
|
18 |
|
19 testResultXml(xmlfile); |
|
20 close_log_file(); |
|
21 } |
|
22 int main (int argc, |
|
23 char *argv[]) |
|
24 { |
|
25 GstElement *element; |
|
26 xmlfile = "test_elementcreate"; |
|
27 std_log(LOG_FILENAME_LINE, "Test Started element create"); |
|
28 /* init GStreamer */ |
|
29 gst_init (&argc, &argv); |
|
30 |
|
31 /* create element */ |
|
32 element = gst_element_factory_make ("filesrc", "source"); |
|
33 if (!element) { |
|
34 // g_print ("Failed to create element of type 'fakesrc'\n"); |
|
35 std_log(LOG_FILENAME_LINE, "Failed to create element of type 'fakesrc'"); |
|
36 getchar(); |
|
37 return -1; |
|
38 } |
|
39 |
|
40 gst_object_unref (GST_OBJECT (element)); |
|
41 //printf("Success"); |
|
42 //getchar(); |
|
43 std_log(LOG_FILENAME_LINE, "Test Successful"); |
|
44 create_xml(0); |
|
45 return 0; |
|
46 } |