mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-28 01:05:07 +00:00
gst/avi/gstavidemux.*: Third attempt, use gst_pad_is_linked() this time.
Original commit message from CVS: * gst/avi/gstavidemux.c: (gst_avi_demux_parse_stream), (gst_avi_demux_all_source_pads_unlinked), (gst_avi_demux_process_next_entry): * gst/avi/gstavidemux.h: Third attempt, use gst_pad_is_linked() this time.
This commit is contained in:
parent
4836bfbcf7
commit
4b5490014f
|
@ -1,3 +1,11 @@
|
||||||
|
2006-02-04 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* gst/avi/gstavidemux.c: (gst_avi_demux_parse_stream),
|
||||||
|
(gst_avi_demux_all_source_pads_unlinked),
|
||||||
|
(gst_avi_demux_process_next_entry):
|
||||||
|
* gst/avi/gstavidemux.h:
|
||||||
|
Third attempt, use gst_pad_is_linked() this time.
|
||||||
|
|
||||||
2006-02-04 Jan Schmidt <thaytan@mad.scientist.com>
|
2006-02-04 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
* gst/id3demux/id3v2frames.c: (id3demux_id3v2_parse_frame),
|
* gst/id3demux/id3v2frames.c: (id3demux_id3v2_parse_frame),
|
||||||
|
|
|
@ -1052,6 +1052,7 @@ gst_avi_demux_parse_stream (GstElement * element, GstBuffer * buf)
|
||||||
if (stream->pad)
|
if (stream->pad)
|
||||||
gst_object_unref (stream->pad);
|
gst_object_unref (stream->pad);
|
||||||
pad = stream->pad = gst_pad_new_from_template (templ, padname);
|
pad = stream->pad = gst_pad_new_from_template (templ, padname);
|
||||||
|
stream->last_flow = GST_FLOW_OK;
|
||||||
g_free (padname);
|
g_free (padname);
|
||||||
|
|
||||||
gst_pad_use_fixed_caps (pad);
|
gst_pad_use_fixed_caps (pad);
|
||||||
|
@ -2243,20 +2244,17 @@ gst_avi_demux_invert (avi_stream_context * stream, GstBuffer * buf)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_avi_demux_all_source_pads_unlinked (GstAviDemux * avi)
|
gst_avi_demux_all_source_pads_unlinked (GstAviDemux * avi)
|
||||||
{
|
{
|
||||||
gint i, num_unlinked = 0;
|
gint i;
|
||||||
|
|
||||||
for (i = 0; i < avi->num_streams; ++i) {
|
for (i = 0; i < avi->num_streams; ++i) {
|
||||||
GstPad *peer;
|
if (gst_pad_is_linked (avi->stream[i].pad))
|
||||||
|
return FALSE;
|
||||||
peer = gst_pad_get_peer (avi->stream[i].pad);
|
/* ignore unlinked state if we haven't tried to push on this pad yet */
|
||||||
if (peer) {
|
if (avi->stream[i].last_flow == GST_FLOW_OK)
|
||||||
gst_object_unref (peer);
|
return FALSE;
|
||||||
} else if (avi->stream[i].current_frame > 0) {
|
|
||||||
++num_unlinked;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (num_unlinked == avi->num_streams);
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
|
@ -2314,6 +2312,7 @@ gst_avi_demux_process_next_entry (GstAviDemux * avi)
|
||||||
GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
|
GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
|
||||||
GST_PAD_NAME (stream->pad));
|
GST_PAD_NAME (stream->pad));
|
||||||
res = gst_pad_push (stream->pad, buf);
|
res = gst_pad_push (stream->pad, buf);
|
||||||
|
stream->last_flow = res;
|
||||||
if (res != GST_FLOW_OK && res != GST_FLOW_NOT_LINKED) {
|
if (res != GST_FLOW_OK && res != GST_FLOW_NOT_LINKED) {
|
||||||
GST_DEBUG_OBJECT (avi, "Flow on pad %s: %s",
|
GST_DEBUG_OBJECT (avi, "Flow on pad %s: %s",
|
||||||
GST_PAD_NAME (stream->pad), gst_flow_get_name (res));
|
GST_PAD_NAME (stream->pad), gst_flow_get_name (res));
|
||||||
|
|
|
@ -62,6 +62,7 @@ typedef struct {
|
||||||
|
|
||||||
/* pad, strh */
|
/* pad, strh */
|
||||||
GstPad *pad;
|
GstPad *pad;
|
||||||
|
GstFlowReturn last_flow;
|
||||||
gst_riff_strh *strh;
|
gst_riff_strh *strh;
|
||||||
union {
|
union {
|
||||||
gst_riff_strf_vids *vids;
|
gst_riff_strf_vids *vids;
|
||||||
|
|
Loading…
Reference in a new issue