From: Wim Taymans Date: Wed, 27 Jul 2005 18:33:03 +0000 (+0000) Subject: gdp: Some docs updates X-Git-Tag: 1.19.3~507^2~15040 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a0a543148d7e596b021b2e919c9185956ce7d96;p=platform%2Fupstream%2Fgstreamer.git gdp: Some docs updates Original commit message from CVS: * CHANGES-0.9: * docs/design/part-TODO.txt: * docs/design/part-events.txt: Some docs updates * gst/base/gstbasesink.c: (gst_base_sink_handle_object), (gst_base_sink_event), (gst_base_sink_do_sync), (gst_base_sink_activate_push), (gst_base_sink_activate_pull): * gst/base/gstbasesrc.c: (gst_base_src_send_discont), (gst_base_src_do_seek), (gst_base_src_event_handler), (gst_base_src_loop): * gst/base/gstbasetransform.c: (gst_base_transform_transform_caps), (gst_base_transform_configure_caps), (gst_base_transform_setcaps), (gst_base_transform_get_size), (gst_base_transform_buffer_alloc), (gst_base_transform_event), (gst_base_transform_handle_buffer), (gst_base_transform_set_passthrough), (gst_base_transform_is_passthrough): * gst/elements/gstfakesink.c: (gst_fake_sink_event): * gst/elements/gstfilesink.c: (gst_file_sink_event): Event updates. * gst/gstbuffer.h: Use faster casts. * gst/gstelement.c: (gst_element_seek): * gst/gstelement.h: Update gst_element_seek. * gst/gstevent.c: (gst_event_finalize), (_gst_event_copy), (gst_event_new), (gst_event_new_custom), (gst_event_get_structure), (gst_event_new_flush_start), (gst_event_new_flush_stop), (gst_event_new_eos), (gst_event_new_newsegment), (gst_event_parse_newsegment), (gst_event_new_tag), (gst_event_parse_tag), (gst_event_new_filler), (gst_event_new_qos), (gst_event_parse_qos), (gst_event_new_seek), (gst_event_parse_seek), (gst_event_new_navigation): * gst/gstevent.h: Make GstEvent use GstStructure. Add parsing code, make sure the API is sufficiently generic. Mark possible directions of events and serialization. * gst/gstmessage.c: (gst_message_init), (gst_message_finalize), (_gst_message_copy), (gst_message_new_segment_start), (gst_message_new_segment_done), (gst_message_new_custom), (gst_message_parse_segment_start), (gst_message_parse_segment_done): Small cleanups. * gst/gstpad.c: (gst_pad_get_caps_unlocked), (gst_pad_accept_caps), (gst_pad_set_caps), (gst_pad_send_event): Update for new events. Catch events sent in wrong directions. * gst/gstqueue.c: (gst_queue_link_src), (gst_queue_handle_sink_event), (gst_queue_chain), (gst_queue_loop), (gst_queue_handle_src_query): Event updates. * gst/gsttag.c: * gst/gsttag.h: Remove event code from this file. * libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event), (gst_dp_event_from_packet): Event updates. --- diff --git a/gst/gdp/dataprotocol.c b/gst/gdp/dataprotocol.c index d83e649f8d..babefbd3c4 100644 --- a/gst/gdp/dataprotocol.c +++ b/gst/gdp/dataprotocol.c @@ -321,8 +321,9 @@ gst_dp_packet_from_event (const GstEvent * event, GstDPHeaderFlag flags, g_free (h); return FALSE; case GST_EVENT_EOS: - case GST_EVENT_FLUSH: - case GST_EVENT_DISCONTINUOUS: + case GST_EVENT_FLUSH_START: + case GST_EVENT_FLUSH_STOP: + case GST_EVENT_NEWSEGMENT: GST_WRITE_UINT64_BE (h + 8, GST_EVENT_TIMESTAMP (event)); pl_length = 0; *payload = NULL; @@ -330,17 +331,17 @@ gst_dp_packet_from_event (const GstEvent * event, GstDPHeaderFlag flags, case GST_EVENT_SEEK: pl_length = 4 + 8 + 8 + 4; *payload = g_malloc0 (pl_length); - GST_WRITE_UINT32_BE (*payload, (guint32) GST_EVENT_SEEK_TYPE (event)); - GST_WRITE_UINT64_BE (*payload + 4, - (guint64) GST_EVENT_SEEK_OFFSET (event)); - GST_WRITE_UINT64_BE (*payload + 12, - (guint64) GST_EVENT_SEEK_ENDOFFSET (event)); - GST_WRITE_UINT32_BE (*payload + 20, - (guint32) GST_EVENT_SEEK_ACCURACY (event)); + /* + GST_WRITE_UINT32_BE (*payload, (guint32) GST_EVENT_SEEK_TYPE (event)); + GST_WRITE_UINT64_BE (*payload + 4, + (guint64) GST_EVENT_SEEK_OFFSET (event)); + GST_WRITE_UINT64_BE (*payload + 12, + (guint64) GST_EVENT_SEEK_ENDOFFSET (event)); + GST_WRITE_UINT32_BE (*payload + 20, + (guint32) GST_EVENT_SEEK_ACCURACY (event)); + */ break; case GST_EVENT_QOS: - case GST_EVENT_SIZE: - case GST_EVENT_RATE: case GST_EVENT_NAVIGATION: case GST_EVENT_TAG: g_warning ("Unhandled event type %d, ignoring", GST_EVENT_TYPE (event)); @@ -472,29 +473,30 @@ gst_dp_event_from_packet (guint header_length, const guint8 * header, g_warning ("Unknown event, ignoring"); return FALSE; case GST_EVENT_EOS: - case GST_EVENT_FLUSH: - case GST_EVENT_DISCONTINUOUS: - event = gst_event_new (type); + case GST_EVENT_FLUSH_START: + case GST_EVENT_FLUSH_STOP: + case GST_EVENT_NEWSEGMENT: + event = gst_event_new_custom (type, NULL); GST_EVENT_TIMESTAMP (event) = GST_DP_HEADER_TIMESTAMP (header); break; case GST_EVENT_SEEK: { - GstSeekType type; - gint64 offset, endoffset; - GstSeekAccuracy accuracy; - - type = (GstSeekType) GST_READ_UINT32_BE (payload); - offset = (gint64) GST_READ_UINT64_BE (payload + 4); - endoffset = (gint64) GST_READ_UINT64_BE (payload + 12); - accuracy = (GstSeekAccuracy) GST_READ_UINT32_BE (payload + 20); - event = gst_event_new_segment_seek (type, offset, endoffset); - GST_EVENT_TIMESTAMP (event) = GST_DP_HEADER_TIMESTAMP (header); - GST_EVENT_SEEK_ACCURACY (event) = accuracy; + /* + GstSeekType type; + gint64 offset, endoffset; + GstSeekAccuracy accuracy; + + type = (GstSeekType) GST_READ_UINT32_BE (payload); + offset = (gint64) GST_READ_UINT64_BE (payload + 4); + endoffset = (gint64) GST_READ_UINT64_BE (payload + 12); + accuracy = (GstSeekAccuracy) GST_READ_UINT32_BE (payload + 20); + event = gst_event_new_segment_seek (type, offset, endoffset); + GST_EVENT_TIMESTAMP (event) = GST_DP_HEADER_TIMESTAMP (header); + GST_EVENT_SEEK_ACCURACY (event) = accuracy; + */ break; } case GST_EVENT_QOS: - case GST_EVENT_SIZE: - case GST_EVENT_RATE: case GST_EVENT_NAVIGATION: case GST_EVENT_TAG: g_warning ("Unhandled event type %d, ignoring", GST_EVENT_TYPE (event));