equal
deleted
inserted
replaced
31 #include "libgstreamer_wsd_solution.h" |
31 #include "libgstreamer_wsd_solution.h" |
32 #if EMULATOR |
32 #if EMULATOR |
33 GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*) |
33 GET_GLOBAL_VAR_FROM_TLS(buffers,gstcheck,GList*) |
34 #define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)()) |
34 #define buffers (*GET_GSTREAMER_WSD_VAR_NAME(buffers,gstcheck,g)()) |
35 #else |
35 #else |
36 IMPORT_C extern GList *buffers; |
36 extern GList *buffers; |
37 #endif |
37 #endif |
38 |
38 |
39 void create_xml(int result) |
39 void create_xml(int result) |
40 { |
40 { |
41 |
|
42 if(result) |
41 if(result) |
43 { |
|
44 assert_failed = 1; |
42 assert_failed = 1; |
45 } |
43 |
46 |
|
47 testResultXml(xmlfile); |
44 testResultXml(xmlfile); |
48 close_log_file(); |
45 close_log_file(); |
49 |
|
50 if(result) |
|
51 { |
|
52 exit (-1); |
|
53 } |
|
54 |
|
55 } |
46 } |
56 |
47 |
57 |
48 |
58 //#include <gst/check/gstcheck.h> |
49 //#include <gst/check/gstcheck.h> |
59 #include <gst/netbuffer/gstnetbuffer.h> |
50 #include <gst/netbuffer/gstnetbuffer.h> |
85 GST_BUFFER_DATA (netbuf) = (guint8 *) DATA_STRING; |
76 GST_BUFFER_DATA (netbuf) = (guint8 *) DATA_STRING; |
86 GST_BUFFER_SIZE (netbuf) = strlen (DATA_STRING); |
77 GST_BUFFER_SIZE (netbuf) = strlen (DATA_STRING); |
87 GST_BUFFER_FLAG_SET (netbuf, GST_BUFFER_FLAG_DISCONT); |
78 GST_BUFFER_FLAG_SET (netbuf, GST_BUFFER_FLAG_DISCONT); |
88 GST_BUFFER_FLAG_SET (netbuf, GST_BUFFER_FLAG_READONLY); |
79 GST_BUFFER_FLAG_SET (netbuf, GST_BUFFER_FLAG_READONLY); |
89 |
80 |
90 copy = (GstNetBuffer *) gst_buffer_copy ( GST_BUFFER_CAST (netbuf)); |
81 copy = (GstNetBuffer *) gst_buffer_copy (netbuf); |
91 fail_unless (copy != NULL, "failed to copy net buffer"); |
82 fail_unless (copy != NULL, "failed to copy net buffer"); |
92 fail_unless (GST_IS_NETBUFFER (copy), "copied buffer is not a GstNetBuffer!"); |
83 fail_unless (GST_IS_NETBUFFER (copy), "copied buffer is not a GstNetBuffer!"); |
93 |
84 |
94 fail_unless_equals_int (GST_MINI_OBJECT_REFCOUNT_VALUE (copy), 1); |
85 fail_unless_equals_int (GST_MINI_OBJECT_REFCOUNT_VALUE (copy), 1); |
95 |
86 |
109 fail_unless (memcmp (ipv6_copy, ipv6_addr, 16) == 0, |
100 fail_unless (memcmp (ipv6_copy, ipv6_addr, 16) == 0, |
110 "Copied buffer has wrong IPv6 destination address"); |
101 "Copied buffer has wrong IPv6 destination address"); |
111 fail_unless (port == ipv6_port, |
102 fail_unless (port == ipv6_port, |
112 "Copied buffer has wrong IPv6 destination port"); |
103 "Copied buffer has wrong IPv6 destination port"); |
113 |
104 |
114 gst_buffer_unref ( GST_BUFFER_CAST (netbuf)); |
105 gst_buffer_unref (netbuf); |
115 gst_buffer_unref ( GST_BUFFER_CAST (copy)); |
106 gst_buffer_unref (copy); |
116 |
107 |
117 std_log(LOG_FILENAME_LINE, "Test Successful"); |
108 std_log(LOG_FILENAME_LINE, "Test Successful"); |
118 create_xml(0); |
109 create_xml(0); |
119 |
110 |
120 } |
111 } |