GST_DEBUG_FUNCPTR (gst_avi_demux_chain));
gst_pad_set_event_function (avi->sinkpad,
GST_DEBUG_FUNCPTR (gst_avi_demux_handle_sink_event));
- gst_element_add_pad (GST_ELEMENT (avi), avi->sinkpad);
+ gst_element_add_pad (GST_ELEMENT_CAST (avi), avi->sinkpad);
avi->adapter = gst_adapter_new ();
if (stream->pad) {
if (stream->exposed) {
gst_pad_set_active (stream->pad, FALSE);
- gst_element_remove_pad (GST_ELEMENT (avi), stream->pad);
+ gst_element_remove_pad (GST_ELEMENT_CAST (avi), stream->pad);
} else
gst_object_unref (stream->pad);
}
tmp = gst_adapter_take_buffer (avi->adapter, 12);
GST_DEBUG ("Parsing avi header");
- if (!gst_avi_demux_parse_file_header (GST_ELEMENT (avi), tmp)) {
+ if (!gst_avi_demux_parse_file_header (GST_ELEMENT_CAST (avi), tmp)) {
return GST_FLOW_ERROR;
}
GST_DEBUG ("header ok");
#endif
if (avi->element_index)
- gst_index_get_writer_id (avi->element_index, GST_OBJECT (stream->pad),
+ gst_index_get_writer_id (avi->element_index, GST_OBJECT_CAST (stream->pad),
&stream->index_id);
stream->num = avi->num_streams;
GST_DEBUG ("'hdrl' LIST tag found. Parsing next chunk");
/* the hdrl starts with a 'avih' header */
- if (!gst_riff_parse_chunk (GST_ELEMENT (avi), buf, &offset, &tag, &sub))
+ if (!gst_riff_parse_chunk (GST_ELEMENT_CAST (avi), buf, &offset, &tag,
+ &sub))
goto header_no_avih;
if (tag != GST_RIFF_TAG_avih)
goto header_no_avih;
- if (!gst_avi_demux_parse_avih (GST_ELEMENT (avi), sub, &avi->avih))
+ if (!gst_avi_demux_parse_avih (GST_ELEMENT_CAST (avi), sub, &avi->avih))
goto header_wrong_avih;
GST_DEBUG_OBJECT (avi, "AVI header ok, reading elemnts from header");
/* now, read the elements from the header until the end */
- while (gst_riff_parse_chunk (GST_ELEMENT (avi), buf, &offset, &tag,
+ while (gst_riff_parse_chunk (GST_ELEMENT_CAST (avi), buf, &offset, &tag,
&sub)) {
/* sub can be NULL on empty tags */
if (!sub)
/* mind padding */
if (size & 1)
gst_adapter_flush (avi->adapter, 1);
- gst_riff_parse_info (GST_ELEMENT (avi), buf, &tags);
+ gst_riff_parse_info (GST_ELEMENT_CAST (avi), buf, &tags);
if (tags) {
if (avi->globaltags) {
gst_tag_list_insert (avi->globaltags, tags,
/* at this point we know all the streams and we can signal the no more
* pads signal */
GST_DEBUG_OBJECT (avi, "signaling no more pads");
- gst_element_no_more_pads (GST_ELEMENT (avi));
+ gst_element_no_more_pads (GST_ELEMENT_CAST (avi));
return GST_FLOW_OK;
/* post the SEGMENT_START message when we do segmented playback */
if (avi->segment.flags & GST_SEEK_FLAG_SEGMENT) {
- gst_element_post_message (GST_ELEMENT (avi),
- gst_message_new_segment_start (GST_OBJECT (avi),
+ gst_element_post_message (GST_ELEMENT_CAST (avi),
+ gst_message_new_segment_start (GST_OBJECT_CAST (avi),
avi->segment.format, avi->segment.last_stop));
}
GST_INFO_OBJECT (avi, "sending segment_done");
gst_element_post_message
- (GST_ELEMENT (avi),
- gst_message_new_segment_done (GST_OBJECT (avi), GST_FORMAT_TIME,
- stop));
+ (GST_ELEMENT_CAST (avi),
+ gst_message_new_segment_done (GST_OBJECT_CAST (avi),
+ GST_FORMAT_TIME, stop));
push_eos = FALSE;
}
} else {
}
GST_OBJECT_UNLOCK (avi);
/* object lock might be taken again */
- gst_index_get_writer_id (avi->element_index, GST_OBJECT (avi),
+ gst_index_get_writer_id (avi->element_index, GST_OBJECT_CAST (avi),
&avi->index_id);
#endif
} else {
GST_OBJECT_UNLOCK (avi);
/* object lock might be taken again */
if (index)
- gst_index_get_writer_id (index, GST_OBJECT (element), &avi->index_id);
+ gst_index_get_writer_id (index, GST_OBJECT_CAST (element), &avi->index_id);
GST_DEBUG_OBJECT (avi, "Set index %" GST_PTR_FORMAT, avi->element_index);
}