GST_START_TEST (test_pb_utils_post_missing_messages)
{
+ const GstStructure *s;
GstElement *pipeline;
- GstStructure *s;
GstMessage *msg;
GstCaps *caps;
GstBus *bus;
msg = gst_missing_uri_source_message_new (pipeline, "http");
fail_unless (msg != NULL);
fail_unless_equals_int (GST_MESSAGE_TYPE (msg), GST_MESSAGE_ELEMENT);
- fail_unless (msg->structure != NULL);
- s = msg->structure;
+ fail_unless (gst_message_get_structure (msg) != NULL);
+ s = gst_message_get_structure (msg);
fail_unless (gst_structure_has_name (s, "missing-plugin"));
fail_unless (gst_structure_has_field_typed (s, "type", G_TYPE_STRING));
fail_unless_equals_string (gst_structure_get_string (s, "type"), "urisource");
msg = gst_missing_uri_sink_message_new (pipeline, "smb");
fail_unless (msg != NULL);
fail_unless_equals_int (GST_MESSAGE_TYPE (msg), GST_MESSAGE_ELEMENT);
- fail_unless (msg->structure != NULL);
- s = msg->structure;
+ fail_unless (gst_message_get_structure (msg) != NULL);
+ s = gst_message_get_structure (msg);
fail_unless (gst_structure_has_name (s, "missing-plugin"));
fail_unless (gst_structure_has_field_typed (s, "type", G_TYPE_STRING));
fail_unless_equals_string (gst_structure_get_string (s, "type"), "urisink");
msg = gst_missing_uri_source_message_new (pipeline, "chchck");
fail_unless (msg != NULL);
fail_unless_equals_int (GST_MESSAGE_TYPE (msg), GST_MESSAGE_ELEMENT);
- fail_unless (msg->structure != NULL);
- s = msg->structure;
+ fail_unless (gst_message_get_structure (msg) != NULL);
+ s = gst_message_get_structure (msg);
fail_unless (gst_structure_has_name (s, "missing-plugin"));
fail_unless (gst_structure_has_field_typed (s, "type", G_TYPE_STRING));
fail_unless_equals_string (gst_structure_get_string (s, "type"), "urisource");
msg = gst_missing_uri_sink_message_new (pipeline, "chchck");
fail_unless (msg != NULL);
fail_unless_equals_int (GST_MESSAGE_TYPE (msg), GST_MESSAGE_ELEMENT);
- fail_unless (msg->structure != NULL);
- s = msg->structure;
+ fail_unless (gst_message_get_structure (msg) != NULL);
+ s = gst_message_get_structure (msg);
fail_unless (gst_structure_has_name (s, "missing-plugin"));
fail_unless (gst_structure_has_field_typed (s, "type", G_TYPE_STRING));
fail_unless_equals_string (gst_structure_get_string (s, "type"), "urisink");
msg = gst_missing_element_message_new (pipeline, "foobar");
fail_unless (msg != NULL);
fail_unless_equals_int (GST_MESSAGE_TYPE (msg), GST_MESSAGE_ELEMENT);
- fail_unless (msg->structure != NULL);
- s = msg->structure;
+ fail_unless (gst_message_get_structure (msg) != NULL);
+ s = gst_message_get_structure (msg);
fail_unless (gst_structure_has_name (s, "missing-plugin"));
fail_unless (gst_structure_has_field_typed (s, "type", G_TYPE_STRING));
fail_unless_equals_string (gst_structure_get_string (s, "type"), "element");
msg = gst_missing_decoder_message_new (pipeline, caps);
fail_unless (msg != NULL);
fail_unless_equals_int (GST_MESSAGE_TYPE (msg), GST_MESSAGE_ELEMENT);
- fail_unless (msg->structure != NULL);
- s = msg->structure;
+ fail_unless (gst_message_get_structure (msg) != NULL);
+ s = gst_message_get_structure (msg);
fail_unless (gst_structure_has_name (s, "missing-plugin"));
fail_unless (gst_structure_has_field_typed (s, "type", G_TYPE_STRING));
fail_unless_equals_string (gst_structure_get_string (s, "type"), "decoder");
msg = gst_missing_encoder_message_new (pipeline, caps);
fail_unless (msg != NULL);
fail_unless_equals_int (GST_MESSAGE_TYPE (msg), GST_MESSAGE_ELEMENT);
- fail_unless (msg->structure != NULL);
- s = msg->structure;
+ fail_unless (gst_message_get_structure (msg) != NULL);
+ s = gst_message_get_structure (msg);
fail_unless (gst_structure_has_name (s, "missing-plugin"));
fail_unless (gst_structure_has_field_typed (s, "type", G_TYPE_STRING));
fail_unless_equals_string (gst_structure_get_string (s, "type"), "encoder");
msg = gst_missing_decoder_message_new (pipeline, caps);
fail_unless (msg != NULL);
fail_unless_equals_int (GST_MESSAGE_TYPE (msg), GST_MESSAGE_ELEMENT);
- fail_unless (msg->structure != NULL);
- s = msg->structure;
+ fail_unless (gst_message_get_structure (msg) != NULL);
+ s = gst_message_get_structure (msg);
fail_unless (gst_structure_has_name (s, "missing-plugin"));
fail_unless (gst_structure_has_field_typed (s, "type", G_TYPE_STRING));
fail_unless_equals_string (gst_structure_get_string (s, "type"), "decoder");
msg = gst_missing_encoder_message_new (pipeline, caps);
fail_unless (msg != NULL);
fail_unless_equals_int (GST_MESSAGE_TYPE (msg), GST_MESSAGE_ELEMENT);
- fail_unless (msg->structure != NULL);
- s = msg->structure;
+ fail_unless (gst_message_get_structure (msg) != NULL);
+ s = gst_message_get_structure (msg);
fail_unless (gst_structure_has_name (s, "missing-plugin"));
fail_unless (gst_structure_has_field_typed (s, "type", G_TYPE_STRING));
fail_unless_equals_string (gst_structure_get_string (s, "type"), "encoder");