Replace GST_PLUGINS_LIBS_* with GST_PLUGINS_BASE_*

Original commit message from CVS:
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
This commit is contained in:
Jan Schmidt 2005-07-01 08:10:55 +00:00
parent f0011b68c8
commit 4fae157653
4 changed files with 46 additions and 12 deletions

View file

@ -1,3 +1,24 @@
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):

View file

@ -2,8 +2,8 @@ plugin_LTLIBRARIES = libgstmad.la
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

View file

@ -430,11 +430,14 @@ gst_id3_tag_src_query (GstPad * pad, GstQuery * query)
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, &current, &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, &current, &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) {
@ -446,7 +449,9 @@ gst_id3_tag_src_query (GstPad * pad, GstQuery * query)
res = TRUE;
}
gst_object_unref (peer);
break;
}
default:
break;
}
@ -491,7 +496,7 @@ gst_id3_tag_src_event (GstPad * pad, GstEvent * event)
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:
@ -1027,6 +1032,7 @@ gst_id3_tag_chain (GstPad * pad, GstBuffer * buffer)
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:
@ -1083,7 +1089,7 @@ gst_id3_tag_chain (GstPad * pad, GstBuffer * buffer)
/* 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),
@ -1159,7 +1165,7 @@ gst_id3_tag_chain (GstPad * pad, GstBuffer * buffer)
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);

View file

@ -554,16 +554,23 @@ gst_mad_src_query (GstPad * pad, GstQuery * query)
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)
@ -1267,7 +1274,7 @@ static GstFlowReturn
gst_mad_chain (GstPad * pad, GstBuffer * buffer)
{
GstMad *mad;
guchar *data;
guint8 *data;
glong size;
gboolean new_pts = FALSE;
GstClockTime timestamp;