本文整理汇总了C++中create_xml函数的典型用法代码示例。如果您正苦于以下问题:C++ create_xml函数的具体用法?C++ create_xml怎么用?C++ create_xml使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了create_xml函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: main
int main()
{
DBusError error;
DBusConnection* connection;
dbus_int32_t data_slot = -1;
dbus_error_init(&error);
connection = dbus_bus_get_private(DBUS_BUS_SESSION, &error);
if(!CheckConnection(connection, &error))
{
create_xml(1);
return 1;
}
if(!dbus_connection_allocate_data_slot(&data_slot))
{
std_log(LOG_FILENAME_LINE, "Out of Memory");
create_xml(1);
return 1;
}
dbus_connection_free_data_slot(&data_slot);
dbus_connection_close(connection);
dbus_connection_unref(connection);
dbus_shutdown();
std_log(LOG_FILENAME_LINE, "Test Successful");
create_xml(0);
return 0;
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:32,代码来源:dbus_connection_data_slot0.c
示例2: main
int main()
{
DBusMessage* msg;
char* path = "/";
msg = dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL);
if(!msg)
{
std_log(LOG_FILENAME_LINE,"Fail to create Message");
create_xml(1);
return 1;
}
if(!dbus_message_set_path(msg, path))
{
std_log(LOG_FILENAME_LINE,"Not enough Memory.");
create_xml(1);
return 1;
}
if(strcmp(path, dbus_message_get_path(msg)))
{
std_log(LOG_FILENAME_LINE,"Path is not correct");
create_xml(1);
return 1;
}
std_log(LOG_FILENAME_LINE,"Test Successful");
create_xml(0);
return 0;
}
开发者ID:kuailexs,项目名称:symbiandump-os2,代码行数:33,代码来源:dbus_message_path3.c
示例3: main
int main()
{
DBusMessage* msg;
msg = dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL);
if(!msg)
{
std_log(LOG_FILENAME_LINE,"Fail to create Message");
create_xml(1);
return 1;
}
if(DBUS_MESSAGE_TYPE_METHOD_CALL != dbus_message_get_type(msg))
{
std_log(LOG_FILENAME_LINE,"Mismatch in Message type.");
create_xml(1);
return 1;
}
std_log(LOG_FILENAME_LINE,"Test Successful");
create_xml(0);
return 0;
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:25,代码来源:dbus_message_type0.c
示例4: main
int main()
{
DBusError src;
DBusError dest;
char err[] = "Sample Error0";
dbus_error_init(&src);
dbus_error_init(&dest);
dbus_set_error(&src, err, NULL);
dbus_move_error(&src, &dest);
if(!CheckMovedError(&src, &dest, err))
{
std_log(LOG_FILENAME_LINE, "Test Fail");
dbus_error_free(&src);
dbus_error_free(&dest);
create_xml(1);
return 1;
}
else
{
std_log(LOG_FILENAME_LINE, "Test Successful");
dbus_error_free(&dest);
create_xml(0);
return 0;
}
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:29,代码来源:dbus_move_error0.c
示例5: main
int main()
{
DBusGConnection* connection;
DBusGProxy* proxy;
GError* error = NULL;
char* path = "/Test/Proxy/Path";
g_type_init();
connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
if (connection == NULL)
{
std_log(LOG_FILENAME_LINE, "Failed to open connection to bus: %s\n",
error->message);
g_error_free (error);
create_xml(1);
return 1;
}
proxy = dbus_g_proxy_new_for_name(connection, "Test.Glib.Proxy.Path", path, "Test.Proxy.Interface");
if(strcmp(path, dbus_g_proxy_get_path(proxy)))
{
std_log(LOG_FILENAME_LINE, "Fail to check interface %s", path);
create_xml(1);
return 1;
}
std_log(LOG_FILENAME_LINE, "Test Successful");
create_xml(0);
return 0;
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:33,代码来源:g_proxy_path.c
示例6: main
int main()
{
DBusError error;
char* err = "Sample Error0";
dbus_error_init(&error);
dbus_set_error(&error, err, NULL);
if(strcmp(err, error.name))
{
std_log(LOG_FILENAME_LINE, "Mismatch in Error Name");
create_xml(1);
return 1;
}
if(strcmp(err, error.message))
{
std_log(LOG_FILENAME_LINE, "Message set to :: %s", error.message);
std_log(LOG_FILENAME_LINE, "Message is not set to NULL");
create_xml(1);
return 1;
}
dbus_error_free(&error);
std_log(LOG_FILENAME_LINE, "Test Successful");
create_xml(0);
return 0;
}
开发者ID:kuailexs,项目名称:symbiandump-os2,代码行数:28,代码来源:dbus_set_error0.c
示例7: main
int
main (int argc, char *argv[])
{
GstElement *filesrc, *audiosink, *decode, *queue;
GstElement *pipeline;
xmlfile = "queue_logs";
std_log(LOG_FILENAME_LINE, "Test Started queue");
gst_init (&argc, &argv);
if (argc != 2) {
g_print ("usage: %s <filename>\n", argv[0]);
std_log(LOG_FILENAME_LINE, "Test Failed mp3 file need to be passed as an argument");
create_xml(1);
exit (-1);
}
/* create a new pipeline to hold the elements */
pipeline = gst_pipeline_new ("pipeline");
g_assert (pipeline != NULL);
/* create a disk reader */
filesrc = gst_element_factory_make ("filesrc", "disk_source");
g_assert (filesrc != NULL);
g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
decode = gst_element_factory_make ("mad", "decode");
g_assert (decode != NULL);
queue = gst_element_factory_make ("queue", "queue");
g_assert (queue != NULL);
/* and an audio sink */
audiosink = gst_element_factory_make ("devsoundsink", "play_audio");
g_assert (audiosink != NULL);
/* add objects to the main pipeline */
gst_bin_add_many (GST_BIN (pipeline), filesrc, decode, queue, audiosink,
NULL);
gst_element_link_many (filesrc, decode, queue, audiosink, NULL);
/* start playing */
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
/* Listen for EOS */
event_loop (pipeline);
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
std_log(LOG_FILENAME_LINE, "Test Successful");
create_xml(0);
exit (0);
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:55,代码来源:queue.c
示例8: main
int main()
{
DBusGConnection* connection;
DBusGProxy* proxy;
DBusGProxy* proxy1 ;//=NULL;
GError* error = NULL;
pthread_t thr_id;
void* thrPtr;
char* iface = "Test.Proxy.Interface";
char* iface1 = "Test.Proxy.Interface1";
g_type_init();
connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
if (connection == NULL)
{
std_log(LOG_FILENAME_LINE, "Failed to open connection to bus: %s\n",
error->message);
g_error_free (error);
create_xml(1);
return 1;
}
proxy = dbus_g_proxy_new_for_name(connection, "Test.Glib.Proxy.Interface", "/Test/Proxy/Interface", iface);
proxy1 = dbus_g_proxy_new_for_name(connection, "Test.Glib.Proxy.Interface", "/Test/Proxy/Interface", iface1);
if(strcmp(iface, dbus_g_proxy_get_interface(proxy)))
{
std_log(LOG_FILENAME_LINE, "Fail to check interface %s", iface);
create_xml(1);
return 1;
}
pthread_create(&thr_id, NULL, &set_iface, proxy);
pthread_join(thr_id, &thrPtr);
if(strcmp(iface1, dbus_g_proxy_get_interface(proxy)))
{
std_log(LOG_FILENAME_LINE, "Fail to check interface %s", iface1);
create_xml(1);
return 1;
}
if(!iface_flag)
{
std_log(LOG_FILENAME_LINE, "Something wrong happens in thread.");
create_xml(1);
return 1;
}
std_log(LOG_FILENAME_LINE, "Test Successful");
create_xml(0);
return 0;
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:55,代码来源:g_proxy_iface.c
示例9: main
int main()
{
char error_name[40];
char error_msg[40];
long outgoing_size = 0 ;
DBusConnection* connection;
DBusError error;
DBusMessage* msg;
DBusMessage* reply = NULL;
dbus_error_init(&error);
connection = dbus_bus_get_private(DBUS_BUS_SESSION, &error);
if(!connection)
{
std_log(LOG_FILENAME_LINE, "ERROR_name:%s",error.name);
std_log(LOG_FILENAME_LINE, "Error_msg:%s",error.message);
create_xml(1);
return 1;
}
msg = dbus_message_new_method_call("Test.Method.Call1", "/Test/Method/Object", "test.Method.Call", "dbus_connection_get_outgoing_size0");
if(msg == NULL)
{
std_log(LOG_FILENAME_LINE, "Message error");
create_xml(1);
return 1;
}
outgoing_size = dbus_connection_get_outgoing_size( connection ) ;
std_log(LOG_FILENAME_LINE, "outgoing message size before sent %d",outgoing_size);
dbus_connection_send(connection, msg, NULL);
std_log(LOG_FILENAME_LINE, "Message sent");
outgoing_size = dbus_connection_get_outgoing_size( connection ) ;
std_log(LOG_FILENAME_LINE, "outgoing message size %d",outgoing_size);
create_xml(0);
dbus_message_unref(msg);
dbus_connection_close(connection);
dbus_connection_unref(connection);
dbus_shutdown();
std_log(LOG_FILENAME_LINE, "success");
return 0;
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:53,代码来源:dbus_connection_get_outgoing_size0.c
示例10: main
int main()
{
DBusConnection* connection;
DBusError error;
int cnt;
int data_slot = -1;
threadData1 thrData;
pthread_t thread[MAX_THREAD];
int thrVal[MAX_THREAD]={0};
void* thrValPtr[MAX_THREAD];
for(cnt=0; cnt<MAX_THREAD; cnt++)
thrValPtr[cnt] = (void*)&thrVal[cnt];
dbus_error_init(&error);
connection = dbus_bus_get(DBUS_BUS_SESSION, &error);
if(!connection || dbus_error_is_set(&error))
return handle_error(&error);
pthread_mutex_init(&thrData.mutex, NULL);
pthread_cond_init(&thrData.cond, NULL);
thrData.ret = 0;
dbus_connection_allocate_data_slot(&data_slot);
dbus_connection_set_data(connection, data_slot, &thrData, NULL);
dbus_threads_init_default();
for(cnt=0; cnt<MAX_THREAD; cnt++)
pthread_create(&thread[cnt], NULL, &send_msg1, &data_slot);
sleep(1);
pthread_cond_broadcast(&thrData.cond);
for(cnt=0; cnt<MAX_THREAD; cnt++)
pthread_join(thread[cnt], &thrValPtr[cnt]);
if(thrData.ret != MAX_THREAD)
{
std_log(LOG_FILENAME_LINE, "No. of threads crashed %d", (MAX_THREAD - thrData.ret));
create_xml(1);
return 1;
}
dbus_connection_unref(connection);
std_log(LOG_FILENAME_LINE, "Test Successful");
create_xml(0);
return 0;
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:53,代码来源:dbus_N_messages1.c
示例11: send_msg1
static void* send_msg1(void* data)
{
GError *error = NULL;
static int cnt = 1;
gint in_num = 5;
gint out_num = 0;
DBusGConnection *connection;
DBusGProxy *proxy;
threadData1* thrData = (threadData1*)data;
if(!thrData)
return;
pthread_mutex_lock(&thrData->mutex);
connection = dbus_g_bus_get (DBUS_BUS_SESSION,
&error);
if (connection == NULL)
{
std_log(LOG_FILENAME_LINE, "Failed to open connection to bus: %s\n",
error->message);
g_error_free (error);
create_xml(1);
exit (1);
}
proxy = dbus_g_proxy_new_for_name (connection,
"com.example.DBusGlibObject1",
"/com/example/DBusGlibObject1",
"com.example.DBusGlibObject1");
count++; //vasanth
pthread_cond_wait(&thrData->cond, &thrData->mutex);
// send message and get a handle for a reply
if(!com_example_DBusGlibObject1_simple_method(proxy, in_num, &out_num, &error))
{
create_xml(1);
exit(1);
}
std_log(LOG_FILENAME_LINE, "%d\n", out_num);
if(out_num == 9090)
{
thrData->ret++;
}
dbus_g_connection_unref(connection);
pthread_mutex_unlock(&thrData->mutex);
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:53,代码来源:g_N_messages1.c
示例12: main
int
main ()
{
DBusError error;
DBusConnection *connection;
//_dbus_setenv("DBUS_VERBOSE","1");
dbus_error_init (&error);
connection = dbus_bus_get (DBUS_BUS_SESSION, &error);
if (connection == NULL)
{
fprintf (stderr, "*** Failed to open connection to system bus: %s\n",
error.message);
std_log(LOG_FILENAME_LINE, "*** Failed to open connection to system bus: %s\n",
error.message);
dbus_error_free (&error);
create_xml(1);
return 1;
}
/*con2 = dbus_bus_get_private (DBUS_BUS_SESSION, &error);
if (con2 == NULL)
{
fprintf (stderr, "*** Failed to open connection to system bus: %s\n",
error.message);
dbus_error_free (&error);
return 1;
}
*/
/*
loop = _dbus_loop_new ();
if (loop == NULL)
die ("No memory\n");
if (!test_connection_setup (loop, connection))
die ("No memory\n");
*/
TestName(connection, "org.freedesktop.DBus.Test", TRUE);
TestName(connection, "org.freedesktop.DBus.Test-2", TRUE);
TestName(connection, "org.freedesktop.DBus.Test_2", TRUE);
#if 0
TestName(connection, "Test_2", TRUE);
#endif
//ch=getchar();
_dbus_verbose ("*** Test service name exiting\n");
create_xml(0);
return 0;
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:50,代码来源:test-names.c
示例13: main
int main()
{
DBusError src;
DBusError dest;
char str[] = "Sample Error No.";
int no = 1;
char err[] = "Sample Error0";
dbus_error_init(&src);
dbus_error_init(&dest);
dbus_set_error(&src, err, "This is %s :: %d", str, no);
dbus_move_error(&src, &dest);
if(!CheckMovedError(&src, &dest, err))
{
std_log(LOG_FILENAME_LINE, "Test Fail");
dbus_error_free(&src);
dbus_error_free(&dest);
create_xml(1);
return 1;
}
else
{
if(strcmp("This is Sample Error No. :: 1", dest.message))
{
std_log(LOG_FILENAME_LINE, "Destination Message is not set Properly.");
dbus_error_free(&src);
dbus_error_free(&dest);
create_xml(1);
return 1;
}
if(src.message)
{
std_log(LOG_FILENAME_LINE, "Source Message is not NULL.");
dbus_error_free(&src);
dbus_error_free(&dest);
create_xml(1);
return 1;
}
dbus_error_free(&dest);
std_log(LOG_FILENAME_LINE, "Test Successful");
create_xml(0);
return 0;
}
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:50,代码来源:dbus_move_error1.c
示例14: TestName
static void
TestName(DBusConnection *connection, const char *name, int expectedSuccess)
{
DBusError error;
dbus_error_init (&error);
(void) dbus_bus_request_name (connection, name, 0, &error);
if (dbus_error_is_set (&error))
{
if (expectedSuccess)
{
fprintf (stderr, "Error acquiring name '%s': %s\n", name, error.message);
std_log(LOG_FILENAME_LINE, "Error acquiring name '%s': %s\n", name, error.message);
}
else
{
fprintf (stdout, "Expected Error acquiring name '%s': %s\n", name, error.message);
std_log(LOG_FILENAME_LINE, "Expected Error acquiring name '%s': %s\n", name, error.message);
}
_dbus_verbose ("*** Failed to acquire name '%s': %s\n", name,
error.message);
dbus_error_free (&error);
if (expectedSuccess)
{
create_xml(1);
exit (1);
}
}
else
{
if (!expectedSuccess)
{
fprintf (stderr, "Unexpected Success acquiring name '%s'\n", name);
std_log(LOG_FILENAME_LINE, "Unexpected Success acquiring name '%s'\n", name);
}
else
{
fprintf (stdout, "Successfully acquired name '%s'\n", name);
std_log(LOG_FILENAME_LINE, "Successfully acquired name '%s'\n", name);
}
_dbus_verbose ("*** Managed to acquire name '%s'\n", name);
if (!expectedSuccess)
{
create_xml(1);
exit (1);
}
}
}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:48,代码来源:test-names.c
示例15: test_gdouble_to_guint64
void test_gdouble_to_guint64()
{
gdouble from[] = { 0., 1., 100., 10000., 9223372036854775808.,
9223372036854775809., 13835058055282163712.
};
guint64 to[] = { 0, 1, 100, 10000, (guint64) (1) << 63,
((guint64) (1) << 63) + 1,
((guint64) (1) << 63) + (G_GINT64_CONSTANT (1) << 62)
};
guint64 tolerance[] = { 0, 0, 0, 0, 0, 1, 1 };
gint i;
gdouble result;
guint64 delta;
xmlfile = "gstutils_test_gdouble_to_guint64";
std_log(LOG_FILENAME_LINE, "Test Started gstutils_test_gdouble_to_guint64");
for (i = 0; i < G_N_ELEMENTS (from); ++i) {
result = gst_util_gdouble_to_guint64 (from[i]);
delta = ABS (to[i] - result);
fail_unless (delta <= tolerance[i],
"Could not convert %f: %" G_GUINT64_FORMAT
" -> %d, got %d instead, delta of %e with tolerance of %e",
i, from[i], to[i], result, delta, tolerance[i]);
}
std_log(LOG_FILENAME_LINE, "Test Successful");
create_xml(0);
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:29,代码来源:gstutils.c
示例16: main
int
main (int argc,
char *argv[])
{
GstElement *pipeline;
GstElement *source, *filter, *sink;
xmlfile = "test_elementlink";
std_log(LOG_FILENAME_LINE, "Test Started element link");
/* init */
gst_init (&argc, &argv);
/* create pipeline */
pipeline = gst_pipeline_new ("my-pipeline");
/* create elements */
source = gst_element_factory_make ("fakesrc", "source");
filter = gst_element_factory_make ("identity", "filter");
sink = gst_element_factory_make ("fakesink", "sink");
/* must add elements to pipeline before linking them */
gst_bin_add_many (GST_BIN (pipeline), source, filter, sink, NULL);
/* link */
if (!gst_element_link_many (source, filter, sink, NULL)) {
g_warning ("Failed to link elements!");
}
std_log(LOG_FILENAME_LINE, "Test Successful");
create_xml(0);
/*** block b from ../../../docs/manual/basics-elements.xml ***/
return 0;
/*** block c from ../../../docs/manual/basics-elements.xml ***/
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:34,代码来源:elementlink.c
示例17: test_no_clients
void test_no_clients()
{
GstElement *sink;
GstBuffer *buffer;
GstCaps *caps;
std_log(LOG_FILENAME_LINE, "Test Started test_no_clients");
sink = setup_multifdsink ();
ASSERT_SET_STATE (sink, GST_STATE_PLAYING, GST_STATE_CHANGE_ASYNC);
caps = gst_caps_from_string ("application/x-gst-check");
buffer = gst_buffer_new_and_alloc (4);
gst_buffer_set_caps (buffer, caps);
gst_caps_unref (caps);
fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK);
GST_DEBUG ("cleaning up multifdsink");
ASSERT_SET_STATE (sink, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS); //commented bz..select() blocks indefinitly
cleanup_multifdsink (sink);
std_log(LOG_FILENAME_LINE, "Test Successful");
create_xml(0);
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:26,代码来源:multifdsink.c
示例18: test_flags
void test_flags()
{
GstElement *element;
GError *err = NULL;
xmlfile = "test_flags";
std_log(LOG_FILENAME_LINE, "Test Started test_flags");
/* avoid misleading 'no such element' error debug messages when using cvs */
if (!g_getenv ("GST_DEBUG"))
gst_debug_set_default_threshold (GST_LEVEL_NONE);
/* default behaviour is to return any already constructed bins/elements */
element = gst_parse_launch_full ("fakesrc ! coffeesink", NULL, 0, &err);
fail_unless (err != NULL, "expected error");
fail_unless_equals_int (err->code, GST_PARSE_ERROR_NO_SUCH_ELEMENT);
fail_unless (element != NULL, "expected partial pipeline/element");
g_error_free (err);
err = NULL;
gst_object_unref (element);
/* test GST_PARSE_FLAG_FATAL_ERRORS */
element = gst_parse_launch_full ("fakesrc ! coffeesink", NULL,
GST_PARSE_FLAG_FATAL_ERRORS, &err);
fail_unless (err != NULL, "expected error");
fail_unless_equals_int (err->code, GST_PARSE_ERROR_NO_SUCH_ELEMENT);
fail_unless (element == NULL, "expected NULL return with FATAL_ERRORS");
g_error_free (err);
err = NULL;
std_log(LOG_FILENAME_LINE, "Test Successful");
create_xml(0);
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:33,代码来源:parse-launch.c
示例19: test_without_implements_interface
void test_without_implements_interface()
{
GstElement *element;
std_log(LOG_FILENAME_LINE, "Test Started test_without_implements_interface");
/* we shouldn't crash if someone tries to use
* gst_element_implements_interface() on an element which doesn't implement
* the GstImplementsInterface (neither if the element does implement the
* requested interface, nor if it doesn't) */
element = gst_element_factory_make ("filesrc", "filesrc");
fail_unless (element != NULL, "Could not create filesrc element");
/* does not implement GstImplementsInterface, but does implement the
* GstUriHandler interface, so should just return TRUE */
fail_if (!gst_element_implements_interface (element, GST_TYPE_URI_HANDLER));
fail_if (gst_element_implements_interface (element,
GST_TYPE_IMPLEMENTS_INTERFACE));
gst_object_unref (element);
element = gst_element_factory_make ("identity", "identity");
fail_unless (element != NULL, "Could not create identity element");
fail_if (gst_element_implements_interface (element, GST_TYPE_URI_HANDLER));
fail_if (gst_element_implements_interface (element,
GST_TYPE_IMPLEMENTS_INTERFACE));
gst_object_unref (element);
std_log(LOG_FILENAME_LINE, "Test Successful");
create_xml(0);
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:30,代码来源:gstinterface.c
示例20: test_parse_launch_errors
void test_parse_launch_errors()
{
GstElement *pipe;
GError *err;
const gchar *arr[] = { "fakesrc", "fakesink", NULL };
std_log(LOG_FILENAME_LINE, "Test started test_parse_launch_errors");
err = NULL;
pipe = gst_parse_launch ("fakesrc ! fakesink", &err);
fail_unless (err != NULL, "expected an error, but did not get one");
fail_unless (pipe == NULL, "got pipeline, but expected NULL");
fail_unless (err->domain == GST_CORE_ERROR);
fail_unless (err->code == GST_CORE_ERROR_DISABLED);
g_error_free (err);
err = NULL;
pipe = gst_parse_bin_from_description ("fakesrc ! fakesink", TRUE, &err);
fail_unless (err != NULL, "expected an error, but did not get one");
fail_unless (pipe == NULL, "got pipeline, but expected NULL");
fail_unless (err->domain == GST_CORE_ERROR);
fail_unless (err->code == GST_CORE_ERROR_DISABLED);
g_error_free (err);
err = NULL;
pipe = gst_parse_launchv (arr, &err);
fail_unless (err != NULL, "expected an error, but did not get one");
fail_unless (pipe == NULL, "got pipeline, but expected NULL");
fail_unless (err->domain == GST_CORE_ERROR);
fail_unless (err->code == GST_CORE_ERROR_DISABLED);
g_error_free (err);
std_log(LOG_FILENAME_LINE, "Test Successful");
create_xml(0);
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:35,代码来源:parse-disabled.c
注:本文中的create_xml函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论