- if (GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT) {
- GST_DEBUG_OBJECT (this, "received new_segment event");
- if (this->new_segment_buf) {
- gst_buffer_unref (this->new_segment_buf);
- }
- GST_DEBUG_OBJECT (this, "Storing buffer %p as new_segment_buf", outbuffer);
- this->new_segment_buf = outbuffer;
- gst_gdp_pay_reset_streamheader (this);
- } else {
- flowret = gst_gdp_queue_buffer (this, outbuffer);
- if (flowret != GST_FLOW_OK) {
- GST_WARNING_OBJECT (this, "queueing GDP caps buffer returned %d",
- flowret);
- ret = FALSE;
- goto done;
- }
+ switch (GST_EVENT_TYPE (event)) {
+ case GST_EVENT_NEWSEGMENT:
+ GST_DEBUG_OBJECT (this, "received new_segment event");
+ if (this->new_segment_buf) {
+ gst_buffer_unref (this->new_segment_buf);
+ }
+ GST_DEBUG_OBJECT (this, "Storing buffer %p as new_segment_buf",
+ outbuffer);
+ this->new_segment_buf = outbuffer;
+ gst_gdp_pay_reset_streamheader (this);
+ break;
+ case GST_EVENT_TAG:
+ GST_DEBUG_OBJECT (this, "received tag event");
+ if (this->tag_buf) {
+ gst_buffer_unref (this->tag_buf);
+ }
+ GST_DEBUG_OBJECT (this, "Storing buffer %p as tag_buf", outbuffer);
+ this->tag_buf = outbuffer;
+ gst_gdp_pay_reset_streamheader (this);
+ break;
+ default:
+ GST_DEBUG_OBJECT (this, "queuing GDP buffer %p of event %p", outbuffer,
+ event);
+ flowret = gst_gdp_queue_buffer (this, outbuffer);
+ if (flowret != GST_FLOW_OK) {
+ GST_WARNING_OBJECT (this, "queueing GDP event buffer returned %d",
+ flowret);
+ ret = FALSE;
+ goto done;
+ }
+ break;