case GST_MESSAGE_ELEMENT:
s = gst_message_get_structure (msg); if (gst_structure_has_name(s, "GstMultiFileSink")) { g_print("########################GST_MESSAGE_ELEMENT START#################\n"); g_print("File written."); //gboolean fields=gst_structure_has_field(GstMultiFileSink,const gchar *filename); g_print(s->filename); g_print(s->index); g_print(s->post_messages); g_print(s->max_files); g_print(s->max_file_size); g_print(s->max_file_duration); g_print(s->aggregate_gops); g_print(s->gop_adapter); g_print(s->next_segmen); g_print("########################GST_MESSAGE_ELEMENT END#################\n"); } break; const GstStructure *s; Its showinig ‘GstStructure {aka const struct _GstStructure}’ has no member named ‘filename’ g_print(s->filename); ^ GVideo.c:623:19: error: ‘GstStructure {aka const struct _GstStructure}’ has no member named ‘index’ g_print(s->index); ^ GVideo.c:624:19: error: ‘GstStructure {aka const struct _GstStructure}’ has no member named ‘post_messages’ g_print(s->post_messages); ^ GVideo.c:625:19: error: ‘GstStructure {aka const struct _GstStructure}’ has no member named ‘max_files’ g_print(s->max_files); ^ GVideo.c:626:19: error: ‘GstStructure {aka const struct _GstStructure}’ has no member named ‘max_file_size’ g_print(s->max_file_size); ^ GVideo.c:627:19: error: ‘GstStructure {aka const struct _GstStructure}’ has no member named ‘max_file_duration’ g_print(s->max_file_duration); ^ GVideo.c:628:19: error: ‘GstStructure {aka const struct _GstStructure}’ has no member named ‘aggregate_gops’ g_print(s->aggregate_gops); ^ GVideo.c:629:19: error: ‘GstStructure {aka const struct _GstStructure}’ has no member named ‘gop_adapter’ g_print(s->gop_adapter); ^ GVideo.c:630:19: error: ‘GstStructure {aka const struct _GstStructure}’ has no member named ‘next_segmen’ g_print(s->next_segmen); ^ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Shubham,
Your understanding about GstStructure is wrong. GstStructure is not data data structure but is a GObject. A GstStructure is a collection of key/value pairs. The keys are expressed as GQuarks and the values can be of any GType. Use gst_structure_get_string, gst_structure_get_int, gst_structure_get_double and etc for respective data type. Refer for more information https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstStructure.html <https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstStructure.html> -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |