+2005-07-01 Jan Schmidt <thaytan@mad.scientist.com>
+ * ext/libcaca/Makefile.am:
+ * ext/mad/Makefile.am:
+ * gst/effectv/Makefile.am:
+ * gst/udp/Makefile.am:
+ Replace GST_PLUGINS_LIBS_* with GST_PLUGINS_BASE_*
+
+ * ext/mad/gstid3tag.c: (gst_id3_tag_src_query),
+ (gst_id3_tag_src_event), (gst_id3_tag_sink_event),
+ (gst_id3_tag_chain), (plugin_init):
+ * ext/mad/gstmad.c: (gst_mad_src_query), (gst_mad_chain):
+ Signedness warning fix, use gst_pad_get_peer instead of GST_PAD_PEER
+ in querying and event handling, because we're not holding the pad
+ lock and the peer may disappear.
+ * gst/avi/gstavidemux.c: (gst_avi_demux_parse_subindex),
+ (gst_avi_demux_parse_index), (gst_avi_demux_massage_index):
+ Signedness warning fixes.
+
+ * gst/videofilter/gstvideotemplate.c: (plugin_init):
+ Remove gst_library_load
+
2005-06-30 Edward Hervey <edward@fluendo.com>
* gst/avi/Makefile.am: (libgstavi_la_LIBADD):
libgstmad_la_SOURCES = gstmad.c gstid3tag.c
-libgstmad_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_LIBS_CFLAGS) $(MAD_CFLAGS) $(ID3_CFLAGS)
+libgstmad_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(MAD_CFLAGS) $(ID3_CFLAGS)
libgstmad_la_LIBADD = $(MAD_LIBS) $(ID3_LIBS) $(GST_INTERFACES_LIBS)
-libgstmad_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(GST_PLUGINS_LIBS_LIBS) -lgsttagedit-0.9
+libgstmad_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(GST_PLUGINS_BASE_LIBS) -lgsttagedit-0.9
noinst_HEADERS = gstmad.h
gst_query_parse_position (query, &format, NULL, NULL);
switch (format) {
- case GST_FORMAT_BYTES:
- if (GST_PAD_PEER (tag->sinkpad) &&
- tag->state == GST_ID3_TAG_STATE_NORMAL &&
- gst_pad_query_position (GST_PAD_PEER (tag->sinkpad),
- &format, ¤t, &total)) {
+ case GST_FORMAT_BYTES:{
+ GstPad *peer;
+
+ if ((peer = gst_pad_get_peer (tag->sinkpad)) == NULL)
+ break;
+
+ if (tag->state == GST_ID3_TAG_STATE_NORMAL &&
+ gst_pad_query_position (peer, &format, ¤t, &total)) {
total -= tag->v2tag_size + tag->v1tag_size;
total += tag->v2tag_size_new + tag->v1tag_size_new;
if (tag->state == GST_ID3_TAG_STATE_NORMAL) {
res = TRUE;
}
+ gst_object_unref (peer);
break;
+ }
default:
break;
}
new = gst_event_new_seek (GST_EVENT_SEEK_TYPE (event),
GST_EVENT_SEEK_OFFSET (event) + diff);
gst_event_unref (event);
- return gst_pad_send_event (GST_PAD_PEER (tag->sinkpad), new);
+ return gst_pad_push_event (tag->sinkpad, new);
}
break;
default:
GstID3Tag *tag;
tag = GST_ID3_TAG (gst_pad_get_parent (pad));
+ GST_DEBUG_OBJECT (tag, "Chain, state = %d", tag->state);
switch (tag->state) {
case GST_ID3_TAG_STATE_SEEKING_TO_V1_TAG:
/* seek to beginning */
GST_LOG_OBJECT (tag, "seeking back to beginning");
gst_id3_tag_set_state (tag, GST_ID3_TAG_STATE_SEEKING_TO_NORMAL);
- if (!gst_pad_send_event (GST_PAD_PEER (tag->sinkpad),
+ if (!gst_pad_push_event (tag->sinkpad,
gst_event_new_seek (GST_FORMAT_BYTES | GST_SEEK_METHOD_SET |
GST_SEEK_FLAG_FLUSH, tag->v2tag_size))) {
GST_ELEMENT_ERROR (tag, CORE, SEEK, (NULL),
return GST_FLOW_OK;
/* seek to ID3v1 tag */
gst_id3_tag_set_state (tag, GST_ID3_TAG_STATE_SEEKING_TO_V1_TAG);
- if (gst_pad_send_event (GST_PAD_PEER (tag->sinkpad),
+ if (gst_pad_push_event (tag->sinkpad,
gst_event_new_seek (GST_FORMAT_BYTES | GST_SEEK_METHOD_END |
GST_SEEK_FLAG_FLUSH, -128))) {
gst_buffer_unref (buffer);
GstFormat format;
GstFormat rformat;
gint64 cur, total, total_bytes;
+ GstPad *peer;
/* save requested format */
gst_query_parse_position (query, &format, NULL, NULL);
/* query peer for total length in bytes */
gst_query_set_position (query, GST_FORMAT_BYTES, -1, -1);
- if (!gst_pad_query (GST_PAD_PEER (mad->sinkpad), query)) {
+
+ if ((peer = gst_pad_get_peer (mad->sinkpad)) == NULL)
+ goto error;
+
+ if (!gst_pad_query (peer, query)) {
GST_LOG_OBJECT (mad, "query on peer pad failed");
goto error;
}
+ gst_object_unref (peer);
+
/* get the returned format */
gst_query_parse_position (query, &rformat, NULL, &total_bytes);
if (rformat == GST_FORMAT_BYTES)
gst_mad_chain (GstPad * pad, GstBuffer * buffer)
{
GstMad *mad;
- guchar *data;
+ guint8 *data;
glong size;
gboolean new_pts = FALSE;
GstClockTime timestamp;