diff options
Diffstat (limited to 'gst')
-rw-r--r-- | gst/Makefile.in | 4 | ||||
-rw-r--r-- | gst/asfdemux/Makefile.in | 4 | ||||
-rw-r--r-- | gst/asfdemux/asfpacket.c | 75 | ||||
-rw-r--r-- | gst/asfdemux/asfpacket.h | 8 | ||||
-rw-r--r-- | gst/asfdemux/gstasfdemux.c | 114 | ||||
-rw-r--r-- | gst/asfdemux/gstrtpasfdepay.c | 55 | ||||
-rw-r--r-- | gst/dvdlpcmdec/Makefile.in | 4 | ||||
-rw-r--r-- | gst/dvdlpcmdec/gstdvdlpcmdec.c | 3 | ||||
-rw-r--r-- | gst/dvdsub/Makefile.in | 4 | ||||
-rw-r--r-- | gst/realmedia/Makefile.in | 4 | ||||
-rw-r--r-- | gst/realmedia/gstrdtbuffer.c | 2 | ||||
-rw-r--r-- | gst/realmedia/rademux.c | 31 | ||||
-rw-r--r-- | gst/realmedia/rdtmanager.c | 25 | ||||
-rw-r--r-- | gst/realmedia/rdtmanager.h | 1 | ||||
-rw-r--r-- | gst/realmedia/rmdemux.c | 28 | ||||
-rw-r--r-- | gst/realmedia/rmutils.c | 2 | ||||
-rw-r--r-- | gst/synaesthesia/Makefile.am | 26 | ||||
-rw-r--r-- | gst/synaesthesia/Makefile.in | 786 | ||||
-rw-r--r-- | gst/synaesthesia/README | 151 | ||||
-rw-r--r-- | gst/synaesthesia/gstsynaesthesia.c | 547 | ||||
-rw-r--r-- | gst/synaesthesia/gstsynaesthesia.h | 82 | ||||
-rw-r--r-- | gst/synaesthesia/synaescope.c | 460 | ||||
-rw-r--r-- | gst/synaesthesia/synaescope.h | 42 | ||||
-rw-r--r-- | gst/xingmux/Makefile.in | 4 |
24 files changed, 245 insertions, 2217 deletions
diff --git a/gst/Makefile.in b/gst/Makefile.in index c33e0d7..297d347 100644 --- a/gst/Makefile.in +++ b/gst/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.5 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -212,7 +212,9 @@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GMSGFMT = @GMSGFMT@ diff --git a/gst/asfdemux/Makefile.in b/gst/asfdemux/Makefile.in index 954f670..9be8ff0 100644 --- a/gst/asfdemux/Makefile.in +++ b/gst/asfdemux/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.5 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -238,7 +238,9 @@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GMSGFMT = @GMSGFMT@ diff --git a/gst/asfdemux/asfpacket.c b/gst/asfdemux/asfpacket.c index ca6a6e1..f9b13fb 100644 --- a/gst/asfdemux/asfpacket.c +++ b/gst/asfdemux/asfpacket.c @@ -60,6 +60,7 @@ asf_packet_read_varlen_int (guint lentype_flags, guint lentype_bit_offset, val = GST_READ_UINT32_LE (*p_data); break; default: + val = 0; g_assert_not_reached (); } @@ -132,6 +133,12 @@ gst_asf_payload_queue_for_stream (GstASFDemux * demux, AsfPayload * payload, { GST_DEBUG_OBJECT (demux, "Got payload for stream %d ts:%" GST_TIME_FORMAT, stream->id, GST_TIME_ARGS (payload->ts)); + + /* Before preroll ts might be invalid and set to 0 */ + if (G_UNLIKELY (payload->ts == 0 && demux->preroll)) { + payload->ts = GST_CLOCK_TIME_NONE; + } + /* remember the first timestamp in the stream */ if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (demux->first_ts) && GST_CLOCK_TIME_IS_VALID (payload->ts))) { @@ -141,7 +148,9 @@ gst_asf_payload_queue_for_stream (GstASFDemux * demux, AsfPayload * payload, } /* make timestamps start from 0 */ - if (G_LIKELY (demux->first_ts < payload->ts)) + if (G_LIKELY (GST_CLOCK_TIME_IS_VALID (demux->first_ts) && + GST_CLOCK_TIME_IS_VALID (payload->ts) && + demux->first_ts < payload->ts)) payload->ts -= demux->first_ts; else payload->ts = 0; @@ -493,14 +502,14 @@ gst_asf_demux_parse_payload (GstASFDemux * demux, AsfPacket * packet, return TRUE; } -gboolean +GstAsfDemuxParsePacketError gst_asf_demux_parse_packet (GstASFDemux * demux, GstBuffer * buf) { AsfPacket packet = { 0, }; GstMapInfo map; const guint8 *data; gboolean has_multiple_payloads; - gboolean ret = TRUE; + GstAsfDemuxParsePacketError ret = GST_ASF_DEMUX_PARSE_PACKET_ERROR_NONE; guint8 ec_flags, flags1; guint size; @@ -510,8 +519,11 @@ gst_asf_demux_parse_packet (GstASFDemux * demux, GstBuffer * buf) GST_LOG_OBJECT (demux, "Buffer size: %u", size); /* need at least two payload flag bytes, send time, and duration */ - if (G_UNLIKELY (size < 2 + 4 + 2)) - goto short_packet; + if (G_UNLIKELY (size < 2 + 4 + 2)) { + GST_WARNING_OBJECT (demux, "Packet size is < 8"); + ret = GST_ASF_DEMUX_PARSE_PACKET_ERROR_RECOVERABLE; + goto done; + } packet.buf = buf; /* evidently transient */ @@ -534,8 +546,11 @@ gst_asf_demux_parse_packet (GstASFDemux * demux, GstBuffer * buf) GST_LOG_OBJECT (demux, "packet has error correction (%u bytes)", ec_len); /* still need at least two payload flag bytes, send time, and duration */ - if (size <= (1 + ec_len) + 2 + 4 + 2) - goto short_packet; + if (size <= (1 + ec_len) + 2 + 4 + 2) { + GST_WARNING_OBJECT (demux, "Packet size is < 8 with Error Correction"); + ret = GST_ASF_DEMUX_PARSE_PACKET_ERROR_FATAL; + goto done; + } data += 1 + ec_len; size -= 1 + ec_len; @@ -556,8 +571,11 @@ gst_asf_demux_parse_packet (GstASFDemux * demux, GstBuffer * buf) packet.padding = asf_packet_read_varlen_int (flags1, 3, &data, &size); - if (G_UNLIKELY (size < 6)) - goto short_packet; + if (G_UNLIKELY (size < 6)) { + GST_WARNING_OBJECT (demux, "Packet size is < 6"); + ret = GST_ASF_DEMUX_PARSE_PACKET_ERROR_FATAL; + goto done; + } packet.send_time = GST_READ_UINT32_LE (data) * GST_MSECOND; packet.duration = GST_READ_UINT16_LE (data + 4) * GST_MSECOND; @@ -575,8 +593,11 @@ gst_asf_demux_parse_packet (GstASFDemux * demux, GstBuffer * buf) GST_LOG_OBJECT (demux, "duration : %" GST_TIME_FORMAT, GST_TIME_ARGS (packet.duration)); - if (G_UNLIKELY (packet.padding == (guint) - 1 || size < packet.padding)) - goto short_packet; + if (G_UNLIKELY (packet.padding == (guint) - 1 || size < packet.padding)) { + GST_WARNING_OBJECT (demux, "No padding, or padding bigger than buffer"); + ret = GST_ASF_DEMUX_PARSE_PACKET_ERROR_RECOVERABLE; + goto done; + } size -= packet.padding; @@ -588,7 +609,9 @@ gst_asf_demux_parse_packet (GstASFDemux * demux, GstBuffer * buf) "adjusting available data size"); if (size < demux->packet_size - packet.length) { /* the buffer is smaller than the implicit padding */ - goto short_packet; + GST_WARNING_OBJECT (demux, "Buffer is smaller than the implicit padding"); + ret = GST_ASF_DEMUX_PARSE_PACKET_ERROR_RECOVERABLE; + goto done; } else { /* subtract the implicit padding */ size -= (demux->packet_size - packet.length); @@ -598,8 +621,11 @@ gst_asf_demux_parse_packet (GstASFDemux * demux, GstBuffer * buf) if (has_multiple_payloads) { guint i, num, lentype; - if (G_UNLIKELY (size < 1)) - goto short_packet; + if (G_UNLIKELY (size < 1)) { + GST_WARNING_OBJECT (demux, "No room more in buffer"); + ret = GST_ASF_DEMUX_PARSE_PACKET_ERROR_RECOVERABLE; + goto done; + } num = (GST_READ_UINT8 (data) & 0x3F) >> 0; lentype = (GST_READ_UINT8 (data) & 0xC0) >> 6; @@ -613,26 +639,23 @@ gst_asf_demux_parse_packet (GstASFDemux * demux, GstBuffer * buf) GST_LOG_OBJECT (demux, "Parsing payload %u/%u, size left: %u", i + 1, num, size); - ret = gst_asf_demux_parse_payload (demux, &packet, lentype, &data, &size); - - if (G_UNLIKELY (!ret)) { + if (G_UNLIKELY (!gst_asf_demux_parse_payload (demux, &packet, lentype, + &data, &size))) { GST_WARNING_OBJECT (demux, "Failed to parse payload %u/%u", i + 1, num); + ret = GST_ASF_DEMUX_PARSE_PACKET_ERROR_FATAL; break; } } } else { GST_LOG_OBJECT (demux, "Parsing single payload"); - ret = gst_asf_demux_parse_payload (demux, &packet, -1, &data, &size); + if (G_UNLIKELY (!gst_asf_demux_parse_payload (demux, &packet, -1, &data, + &size))) { + GST_WARNING_OBJECT (demux, "Failed to parse payload"); + ret = GST_ASF_DEMUX_PARSE_PACKET_ERROR_RECOVERABLE; + } } +done: gst_buffer_unmap (buf, &map); return ret; - -/* ERRORS */ -short_packet: - { - gst_buffer_unmap (buf, &map); - GST_WARNING_OBJECT (demux, "Short packet!"); - return FALSE; - } } diff --git a/gst/asfdemux/asfpacket.h b/gst/asfdemux/asfpacket.h index a1722c8..99655f7 100644 --- a/gst/asfdemux/asfpacket.h +++ b/gst/asfdemux/asfpacket.h @@ -57,7 +57,13 @@ typedef struct { guint8 prop_flags; /* payload length types */ } AsfPacket; -gboolean gst_asf_demux_parse_packet (GstASFDemux * demux, GstBuffer * buf); +typedef enum { + GST_ASF_DEMUX_PARSE_PACKET_ERROR_NONE, + GST_ASF_DEMUX_PARSE_PACKET_ERROR_RECOVERABLE, + GST_ASF_DEMUX_PARSE_PACKET_ERROR_FATAL +} GstAsfDemuxParsePacketError; + +GstAsfDemuxParsePacketError gst_asf_demux_parse_packet (GstASFDemux * demux, GstBuffer * buf); #define gst_asf_payload_is_complete(payload) \ ((payload)->buf_filled >= (payload)->mo_size) diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c index 51c421e..eb41a50 100644 --- a/gst/asfdemux/gstasfdemux.c +++ b/gst/asfdemux/gstasfdemux.c @@ -143,7 +143,7 @@ gst_asf_demux_free_stream (GstASFDemux * demux, AsfStream * stream) { gst_caps_replace (&stream->caps, NULL); if (stream->pending_tags) { - gst_tag_list_free (stream->pending_tags); + gst_tag_list_unref (stream->pending_tags); stream->pending_tags = NULL; } if (stream->pad) { @@ -186,7 +186,7 @@ gst_asf_demux_reset (GstASFDemux * demux, gboolean chain_reset) demux->adapter = NULL; } if (demux->taglist) { - gst_tag_list_free (demux->taglist); + gst_tag_list_unref (demux->taglist); demux->taglist = NULL; } if (demux->metadata) { @@ -337,7 +337,7 @@ gst_asf_demux_activate_mode (GstPad * sinkpad, GstObject * parent, demux->streaming = FALSE; res = gst_pad_start_task (sinkpad, (GstTaskFunction) gst_asf_demux_loop, - demux); + demux, NULL); } else { res = gst_pad_stop_task (sinkpad); } @@ -644,8 +644,9 @@ gst_asf_demux_handle_seek_event (GstASFDemux * demux, GstEvent * event) return FALSE; } /* we can (re)construct the start later on, but not the end */ - if (stop_type != GST_SEEK_TYPE_NONE) { - GST_LOG_OBJECT (demux, "streaming; end type must be NONE"); + if (stop_type != GST_SEEK_TYPE_NONE && + (stop_type != GST_SEEK_TYPE_SET || GST_CLOCK_TIME_IS_VALID (stop))) { + GST_LOG_OBJECT (demux, "streaming; end position must be NONE"); return FALSE; } gst_event_ref (event); @@ -763,7 +764,7 @@ gst_asf_demux_handle_seek_event (GstASFDemux * demux, GstEvent * event) skip: /* restart our task since it might have been stopped when we did the flush */ gst_pad_start_task (demux->sinkpad, (GstTaskFunction) gst_asf_demux_loop, - demux); + demux, NULL); /* streaming can continue now */ GST_PAD_STREAM_UNLOCK (demux->sinkpad); @@ -1431,15 +1432,17 @@ gst_asf_demux_push_complete_payloads (GstASFDemux * demux, gboolean force) gst_event_new_segment (&demux->segment)); /* now post any global tags we may have found */ - if (demux->taglist == NULL) + if (demux->taglist == NULL) { demux->taglist = gst_tag_list_new_empty (); + gst_tag_list_set_scope (demux->taglist, GST_TAG_SCOPE_GLOBAL); + } gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE, GST_TAG_CONTAINER_FORMAT, "ASF", NULL); GST_DEBUG_OBJECT (demux, "global tags: %" GST_PTR_FORMAT, demux->taglist); gst_asf_demux_send_event_unlocked (demux, - gst_event_new_tag ("GstDemuxer", demux->taglist)); + gst_event_new_tag (demux->taglist)); demux->taglist = NULL; demux->need_newsegment = FALSE; @@ -1450,7 +1453,7 @@ gst_asf_demux_push_complete_payloads (GstASFDemux * demux, gboolean force) if (G_UNLIKELY (stream->pending_tags)) { GST_LOG_OBJECT (stream->pad, "%" GST_PTR_FORMAT, stream->pending_tags); gst_pad_push_event (stream->pad, - gst_event_new_tag ("GstDemuxer", stream->pending_tags)); + gst_event_new_tag (stream->pending_tags)); stream->pending_tags = NULL; } @@ -1491,8 +1494,8 @@ gst_asf_demux_push_complete_payloads (GstASFDemux * demux, gboolean force) payload->interlaced); stream->interlaced = payload->interlaced; stream->caps = gst_caps_make_writable (stream->caps); - gst_caps_set_simple (stream->caps, "interlaced", G_TYPE_BOOLEAN, - stream->interlaced, NULL); + gst_caps_set_simple (stream->caps, "interlace-mode", G_TYPE_BOOLEAN, + (stream->interlaced ? "mixed" : "progressive"), NULL); gst_pad_set_caps (stream->pad, stream->caps); } @@ -1516,8 +1519,13 @@ gst_asf_demux_push_complete_payloads (GstASFDemux * demux, gboolean force) GST_TIME_ARGS (GST_BUFFER_DURATION (payload->buf)), gst_buffer_get_size (payload->buf)); - ret = gst_pad_push (stream->pad, payload->buf); - ret = gst_asf_demux_aggregate_flow_return (demux, stream, ret); + if (stream->active) { + ret = gst_pad_push (stream->pad, payload->buf); + ret = gst_asf_demux_aggregate_flow_return (demux, stream, ret); + } else { + gst_buffer_unref (payload->buf); + ret = GST_FLOW_OK; + } payload->buf = NULL; g_array_remove_index (stream->payloads, 0); @@ -1621,9 +1629,9 @@ gst_asf_demux_loop (GstASFDemux * demux) } if (G_LIKELY (demux->speed_packets == 1)) { - /* FIXME: maybe we should just skip broken packets and error out only - * after a few broken packets in a row? */ - if (G_UNLIKELY (!gst_asf_demux_parse_packet (demux, buf))) { + GstAsfDemuxParsePacketError err; + err = gst_asf_demux_parse_packet (demux, buf); + if (G_UNLIKELY (err != GST_ASF_DEMUX_PARSE_PACKET_ERROR_NONE)) { /* when we don't know when the data object ends, we should check * for a chained asf */ if (demux->num_packets == 0) { @@ -1635,7 +1643,13 @@ gst_asf_demux_loop (GstASFDemux * demux) return; } } - goto parse_error; + /* FIXME: We should tally up fatal errors and error out only + * after a few broken packets in a row? */ + + GST_INFO_OBJECT (demux, "Ignoring recoverable parse error"); + gst_buffer_unref (buf); + ++demux->packet; + return; } flow = gst_asf_demux_push_complete_payloads (demux, FALSE); @@ -1646,13 +1660,13 @@ gst_asf_demux_loop (GstASFDemux * demux) guint n; for (n = 0; n < demux->speed_packets; n++) { GstBuffer *sub; + GstAsfDemuxParsePacketError err; sub = - gst_buffer_copy_region (buf, GST_BUFFER_COPY_NONE, + gst_buffer_copy_region (buf, GST_BUFFER_COPY_ALL, n * demux->packet_size, demux->packet_size); - /* FIXME: maybe we should just skip broken packets and error out only - * after a few broken packets in a row? */ - if (G_UNLIKELY (!gst_asf_demux_parse_packet (demux, sub))) { + err = gst_asf_demux_parse_packet (demux, sub); + if (G_UNLIKELY (err != GST_ASF_DEMUX_PARSE_PACKET_ERROR_NONE)) { /* when we don't know when the data object ends, we should check * for a chained asf */ if (demux->num_packets == 0) { @@ -1665,12 +1679,17 @@ gst_asf_demux_loop (GstASFDemux * demux) return; } } - goto parse_error; + /* FIXME: We should tally up fatal errors and error out only + * after a few broken packets in a row? */ + + GST_INFO_OBJECT (demux, "Ignoring recoverable parse error"); + flow = GST_FLOW_OK; } gst_buffer_unref (sub); - flow = gst_asf_demux_push_complete_payloads (demux, FALSE); + if (err == GST_ASF_DEMUX_PARSE_PACKET_ERROR_NONE) + flow = gst_asf_demux_push_complete_payloads (demux, FALSE); ++demux->packet; @@ -1719,6 +1738,8 @@ eos: gst_element_post_message (GST_ELEMENT_CAST (demux), gst_message_new_segment_done (GST_OBJECT (demux), GST_FORMAT_TIME, stop)); + gst_asf_demux_send_event_unlocked (demux, + gst_event_new_segment_done (GST_FORMAT_TIME, stop)); } else if (flow != GST_FLOW_EOS) { /* check if we have a chained asf, in case, we don't eos yet */ if (gst_asf_demux_check_chained_asf (demux)) { @@ -1762,6 +1783,8 @@ read_failed: flow = GST_FLOW_EOS; goto pause; } +#if 0 + /* See FIXMEs above */ parse_error: { gst_buffer_unref (buf); @@ -1771,6 +1794,7 @@ parse_error: flow = GST_FLOW_ERROR; goto pause; } +#endif } #define GST_ASF_DEMUX_CHECK_HEADER_YES 0 @@ -1855,6 +1879,7 @@ gst_asf_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) while (gst_adapter_available (demux->adapter) >= data_size) { GstBuffer *buf; + GstAsfDemuxParsePacketError err; /* we don't know the length of the stream * check for a chained asf everytime */ @@ -1875,15 +1900,16 @@ gst_asf_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) buf = gst_adapter_take_buffer (demux->adapter, data_size); - /* FIXME: maybe we should just skip broken packets and error out only + /* FIXME: We should tally up fatal errors and error out only * after a few broken packets in a row? */ - if (G_UNLIKELY (!gst_asf_demux_parse_packet (demux, buf))) { - GST_WARNING_OBJECT (demux, "Parse error"); - } + err = gst_asf_demux_parse_packet (demux, buf); gst_buffer_unref (buf); - ret = gst_asf_demux_push_complete_payloads (demux, FALSE); + if (G_LIKELY (err == GST_ASF_DEMUX_PARSE_PACKET_ERROR_NONE)) + ret = gst_asf_demux_push_complete_payloads (demux, FALSE); + else + GST_WARNING_OBJECT (demux, "Parse error"); if (demux->packet >= 0) ++demux->packet; @@ -2261,6 +2287,7 @@ gst_asf_demux_add_video_stream (GstASFDemux * demux, GstBuffer *extradata = NULL; GstPad *src_pad; GstCaps *caps; + gchar *str; gchar *name = NULL; gchar *codec_name = NULL; gint size_left = video->size - 40; @@ -2315,7 +2342,9 @@ gst_asf_demux_add_video_stream (GstASFDemux * demux, } /* add fourcc format to caps, some proprietary decoders seem to need it */ - gst_caps_set_simple (caps, "format", G_TYPE_UINT, video->tag, NULL); + str = g_strdup_printf ("%" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (video->tag)); + gst_caps_set_simple (caps, "format", G_TYPE_STRING, str, NULL); + g_free (str); if (codec_name) { tags = gst_tag_list_new (GST_TAG_VIDEO_CODEC, codec_name, NULL); @@ -2338,10 +2367,19 @@ static void gst_asf_demux_activate_stream (GstASFDemux * demux, AsfStream * stream) { if (!stream->active) { + gchar *stream_id; + GST_INFO_OBJECT (demux, "Activating stream %2u, pad %s, caps %" GST_PTR_FORMAT, stream->id, GST_PAD_NAME (stream->pad), stream->caps); gst_pad_set_active (stream->pad, TRUE); + + stream_id = + gst_pad_create_stream_id_printf (stream->pad, GST_ELEMENT_CAST (demux), + "%u", stream->id); + gst_pad_push_event (stream->pad, gst_event_new_stream_start (stream_id)); + g_free (stream_id); gst_pad_set_caps (stream->pad, stream->caps); + gst_element_add_pad (GST_ELEMENT_CAST (demux), stream->pad); stream->active = TRUE; } @@ -2518,7 +2556,7 @@ gst_asf_demux_get_gst_tag_from_tag_name (const gchar * name_utf8) "WM/Picture", GST_TAG_IMAGE}, { "WM/Track", GST_TAG_TRACK_NUMBER}, { "WM/TrackNumber", GST_TAG_TRACK_NUMBER}, { - "WM/Year", GST_TAG_DATE} + "WM/Year", GST_TAG_DATE_TIME} /* { "WM/Composer", GST_TAG_COMPOSER } */ }; gsize out; @@ -2553,14 +2591,15 @@ gst_asf_demux_add_global_tags (GstASFDemux * demux, GstTagList * taglist) return; if (gst_tag_list_is_empty (taglist)) { - gst_tag_list_free (taglist); + gst_tag_list_unref (taglist); return; } t = gst_tag_list_merge (demux->taglist, taglist, GST_TAG_MERGE_APPEND); + gst_tag_list_set_scope (t, GST_TAG_SCOPE_GLOBAL); if (demux->taglist) - gst_tag_list_free (demux->taglist); - gst_tag_list_free (taglist); + gst_tag_list_unref (demux->taglist); + gst_tag_list_unref (taglist); demux->taglist = t; GST_LOG_OBJECT (demux, "global tags now: %" GST_PTR_FORMAT, demux->taglist); } @@ -2697,13 +2736,12 @@ gst_asf_demux_process_ext_content_desc (GstASFDemux * demux, guint8 * data, value_utf8[out] = '\0'; if (gst_tag_name != NULL) { - if (strcmp (gst_tag_name, GST_TAG_DATE) == 0) { + if (strcmp (gst_tag_name, GST_TAG_DATE_TIME) == 0) { guint year = atoi (value_utf8); if (year > 0) { - /* FIXME: really want a GDateTime with just the year field */ - g_value_init (&tag_value, G_TYPE_DATE); - g_value_take_boxed (&tag_value, g_date_new_dmy (1, 1, year)); + g_value_init (&tag_value, GST_TYPE_DATE_TIME); + g_value_take_boxed (&tag_value, gst_date_time_new_y (year)); } } else if (strcmp (gst_tag_name, GST_TAG_GENRE) == 0) { guint id3v1_genre_id; @@ -2819,7 +2857,7 @@ gst_asf_demux_process_ext_content_desc (GstASFDemux * demux, guint8 * data, not_enough_data: { GST_WARNING ("Unexpected end of data parsing ext content desc object"); - gst_tag_list_free (taglist); + gst_tag_list_unref (taglist); return GST_FLOW_OK; /* not really fatal */ } } diff --git a/gst/asfdemux/gstrtpasfdepay.c b/gst/asfdemux/gstrtpasfdepay.c index 52d57d3..4a6b5ab 100644 --- a/gst/asfdemux/gstrtpasfdepay.c +++ b/gst/asfdemux/gstrtpasfdepay.c @@ -241,14 +241,13 @@ field_size (guint8 field) } } -/* - * Set the padding field to te correct value as the spec +/* Set the padding field to te correct value as the spec * says it should be se to 0 in the rtp packets */ -static void -gst_rtp_asf_depay_set_padding (GstRtpAsfDepay * depayload, - GstBuffer * buf, guint32 padding) +static GstBuffer * +gst_rtp_asf_depay_update_padding (GstRtpAsfDepay * depayload, GstBuffer * buf) { + GstBuffer *result; GstMapInfo map; guint8 *data; gint offset = 0; @@ -256,9 +255,26 @@ gst_rtp_asf_depay_set_padding (GstRtpAsfDepay * depayload, guint8 seq_type; guint8 pad_type; guint8 pkt_type; + gsize plen, padding; + + plen = gst_buffer_get_size (buf); + if (plen == depayload->packet_size) + return buf; + + padding = depayload->packet_size - plen; + + GST_LOG_OBJECT (depayload, + "padding buffer size %" G_GSIZE_FORMAT " to packet size %d", plen, + depayload->packet_size); + + result = gst_buffer_new_and_alloc (depayload->packet_size); - gst_buffer_map (buf, &map, GST_MAP_READ); + gst_buffer_map (result, &map, GST_MAP_READ); data = map.data; + memset (data + plen, 0, padding); + + gst_buffer_extract (buf, 0, data, plen); + gst_buffer_unref (buf); aux = data[offset++]; if (aux & 0x80) { @@ -267,8 +283,8 @@ gst_rtp_asf_depay_set_padding (GstRtpAsfDepay * depayload, GST_WARNING_OBJECT (depayload, "Error correction length type should be " "set to 0"); /* this packet doesn't follow the spec */ - gst_buffer_unmap (buf, &map); - return; + gst_buffer_unmap (result, &map); + return result; } err_len = aux & 0x0F; offset += err_len; @@ -305,7 +321,9 @@ gst_rtp_asf_depay_set_padding (GstRtpAsfDepay * depayload, default: break; } - gst_buffer_unmap (buf, &map); + gst_buffer_unmap (result, &map); + + return result; } /* Docs: 'RTSP Protocol PDF' document from http://sdp.ppona.com/ (page 8) */ @@ -342,7 +360,6 @@ gst_rtp_asf_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) do { guint packet_len; - gsize plen; /* packet header is at least 4 bytes */ if (payload_len < 4) @@ -459,23 +476,7 @@ gst_rtp_asf_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf) if (!outbuf) return NULL; - /* we need to pad with zeroes to packet_size if it's smaller */ - plen = gst_buffer_get_size (outbuf); - if (plen < depay->packet_size) { - GstBuffer *tmp; - - GST_LOG_OBJECT (depay, - "padding buffer size %" G_GSIZE_FORMAT " to packet size %d", plen, - depay->packet_size); - - tmp = gst_buffer_new_and_alloc (depay->packet_size); - gst_buffer_copy_into (tmp, outbuf, GST_BUFFER_COPY_ALL, 0, plen); - gst_buffer_unref (outbuf); - outbuf = tmp; - - gst_buffer_memset (outbuf, plen, 0, depay->packet_size - plen); - gst_rtp_asf_depay_set_padding (depay, outbuf, depay->packet_size - plen); - } + outbuf = gst_rtp_asf_depay_update_padding (depay, outbuf); if (!S) GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT); diff --git a/gst/dvdlpcmdec/Makefile.in b/gst/dvdlpcmdec/Makefile.in index cbf32ca..3e84480 100644 --- a/gst/dvdlpcmdec/Makefile.in +++ b/gst/dvdlpcmdec/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.5 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -234,7 +234,9 @@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GMSGFMT = @GMSGFMT@ diff --git a/gst/dvdlpcmdec/gstdvdlpcmdec.c b/gst/dvdlpcmdec/gstdvdlpcmdec.c index f97a475..b46d512 100644 --- a/gst/dvdlpcmdec/gstdvdlpcmdec.c +++ b/gst/dvdlpcmdec/gstdvdlpcmdec.c @@ -209,8 +209,7 @@ gst_dvdlpcmdec_send_tags (GstDvdLpcmDec * dvdlpcmdec) taglist = gst_tag_list_new (GST_TAG_AUDIO_CODEC, "LPCM Audio", GST_TAG_BITRATE, bitrate, NULL); - gst_pad_push_event (dvdlpcmdec->srcpad, gst_event_new_tag ("GstDecoder", - taglist)); + gst_pad_push_event (dvdlpcmdec->srcpad, gst_event_new_tag (taglist)); } static gboolean diff --git a/gst/dvdsub/Makefile.in b/gst/dvdsub/Makefile.in index e3d6102..d6e7620 100644 --- a/gst/dvdsub/Makefile.in +++ b/gst/dvdsub/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.5 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -235,7 +235,9 @@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GMSGFMT = @GMSGFMT@ diff --git a/gst/realmedia/Makefile.in b/gst/realmedia/Makefile.in index 5c275cf..0c77a57 100644 --- a/gst/realmedia/Makefile.in +++ b/gst/realmedia/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.5 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -250,7 +250,9 @@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GMSGFMT = @GMSGFMT@ diff --git a/gst/realmedia/gstrdtbuffer.c b/gst/realmedia/gstrdtbuffer.c index 3adf978..4057045 100644 --- a/gst/realmedia/gstrdtbuffer.c +++ b/gst/realmedia/gstrdtbuffer.c @@ -16,6 +16,7 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +#include <string.h> #include "gstrdtbuffer.h" @@ -205,6 +206,7 @@ gst_rdt_buffer_get_first_packet (GstBuffer * buffer, GstRDTPacket * packet) packet->buffer = buffer; packet->offset = 0; packet->type = GST_RDT_TYPE_INVALID; + memset (&packet->map, 0, sizeof (GstMapInfo)); if (!read_packet_header (packet)) return FALSE; diff --git a/gst/realmedia/rademux.c b/gst/realmedia/rademux.c index 0260c58..91fbc08 100644 --- a/gst/realmedia/rademux.c +++ b/gst/realmedia/rademux.c @@ -127,7 +127,7 @@ gst_real_audio_demux_reset (GstRealAudioDemux * demux) } if (demux->pending_tags) { - gst_tag_list_free (demux->pending_tags); + gst_tag_list_unref (demux->pending_tags); demux->pending_tags = NULL; } @@ -224,7 +224,7 @@ gst_real_audio_demux_sink_activate_mode (GstPad * sinkpad, GstObject * parent, demux->seekable = TRUE; res = gst_pad_start_task (sinkpad, - (GstTaskFunction) gst_real_audio_demux_loop, demux); + (GstTaskFunction) gst_real_audio_demux_loop, demux, NULL); } else { demux->seekable = FALSE; res = gst_pad_stop_task (sinkpad); @@ -319,6 +319,7 @@ gst_real_audio_demux_parse_header (GstRealAudioDemux * demux) const guint8 *data; gchar *codec_name = NULL; GstCaps *caps = NULL; + gchar *stream_id; guint avail; g_assert (demux->ra_version == 4 || demux->ra_version == 3); @@ -364,6 +365,7 @@ gst_real_audio_demux_parse_header (GstRealAudioDemux * demux) demux->fourcc = GST_READ_UINT32_LE (data + 56); demux->pending_tags = gst_rm_utils_read_tags (data + 63, demux->data_offset - 63, gst_rm_utils_read_string8); + gst_tag_list_set_scope (demux->pending_tags, GST_TAG_SCOPE_GLOBAL); break; default: g_assert_not_reached (); @@ -436,15 +438,22 @@ gst_real_audio_demux_parse_header (GstRealAudioDemux * demux) GST_INFO_OBJECT (demux, "Adding source pad, caps %" GST_PTR_FORMAT, caps); demux->srcpad = gst_pad_new_from_static_template (&src_template, "src"); - gst_pad_use_fixed_caps (demux->srcpad); - gst_pad_set_caps (demux->srcpad, caps); - codec_name = gst_pb_utils_get_codec_description (caps); - gst_caps_unref (caps); gst_pad_set_event_function (demux->srcpad, GST_DEBUG_FUNCPTR (gst_real_audio_demux_src_event)); gst_pad_set_query_function (demux->srcpad, GST_DEBUG_FUNCPTR (gst_real_audio_demux_src_query)); gst_pad_set_active (demux->srcpad, TRUE); + gst_pad_use_fixed_caps (demux->srcpad); + + stream_id = + gst_pad_create_stream_id (demux->srcpad, GST_ELEMENT_CAST (demux), NULL); + gst_pad_push_event (demux->srcpad, gst_event_new_stream_start (stream_id)); + g_free (stream_id); + + gst_pad_set_caps (demux->srcpad, caps); + codec_name = gst_pb_utils_get_codec_description (caps); + gst_caps_unref (caps); + gst_element_add_pad (GST_ELEMENT (demux), demux->srcpad); if (demux->byterate_num > 0 && demux->byterate_denom > 0) { @@ -469,8 +478,10 @@ gst_real_audio_demux_parse_header (GstRealAudioDemux * demux) demux->need_newsegment = TRUE; if (codec_name) { - if (demux->pending_tags == NULL) + if (demux->pending_tags == NULL) { demux->pending_tags = gst_tag_list_new_empty (); + gst_tag_list_set_scope (demux->pending_tags, GST_TAG_SCOPE_GLOBAL); + } gst_tag_list_add (demux->pending_tags, GST_TAG_MERGE_REPLACE, GST_TAG_AUDIO_CODEC, codec_name, NULL); @@ -532,7 +543,7 @@ gst_real_audio_demux_parse_data (GstRealAudioDemux * demux) if (demux->pending_tags) { gst_pad_push_event (demux->srcpad, - gst_event_new_tag ("GstDemuxer", demux->pending_tags)); + gst_event_new_tag (demux->pending_tags)); demux->pending_tags = NULL; } @@ -697,6 +708,8 @@ eos: gst_element_post_message (GST_ELEMENT (demux), gst_message_new_segment_done (GST_OBJECT (demux), GST_FORMAT_TIME, stop)); + gst_pad_push_event (demux->srcpad, + gst_event_new_segment_done (GST_FORMAT_TIME, stop)); } else { /* normal playback, send EOS event downstream */ GST_DEBUG_OBJECT (demux, "sending EOS event, at end of stream"); @@ -808,7 +821,7 @@ gst_real_audio_demux_handle_seek (GstRealAudioDemux * demux, GstEvent * event) demux->segment_running = TRUE; /* restart our task since it might have been stopped when we did the flush */ gst_pad_start_task (demux->sinkpad, - (GstTaskFunction) gst_real_audio_demux_loop, demux); + (GstTaskFunction) gst_real_audio_demux_loop, demux, NULL); /* streaming can continue now */ GST_PAD_STREAM_UNLOCK (demux->sinkpad); diff --git a/gst/realmedia/rdtmanager.c b/gst/realmedia/rdtmanager.c index 244c0cb..3ee7bc1 100644 --- a/gst/realmedia/rdtmanager.c +++ b/gst/realmedia/rdtmanager.c @@ -77,6 +77,7 @@ enum SIGNAL_ON_BYE_SSRC, SIGNAL_ON_BYE_TIMEOUT, SIGNAL_ON_TIMEOUT, + SIGNAL_ON_NPT_STOP, LAST_SIGNAL }; @@ -298,15 +299,16 @@ activate_session (GstRDTManager * rdtmanager, GstRDTManagerSession * session, session->recv_rtp_src = gst_pad_new_from_template (templ, name); g_free (name); - gst_pad_set_caps (session->recv_rtp_src, caps); - gst_caps_unref (caps); - gst_pad_set_element_private (session->recv_rtp_src, session); gst_pad_set_query_function (session->recv_rtp_src, gst_rdt_manager_query_src); gst_pad_set_activatemode_function (session->recv_rtp_src, gst_rdt_manager_src_activate_mode); gst_pad_set_active (session->recv_rtp_src, TRUE); + + gst_pad_set_caps (session->recv_rtp_src, caps); + gst_caps_unref (caps); + gst_element_add_pad (GST_ELEMENT_CAST (rdtmanager), session->recv_rtp_src); return TRUE; @@ -479,6 +481,21 @@ gst_rdt_manager_class_init (GstRDTManagerClass * g_class) NULL, NULL, gst_rdt_manager_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); + /** + * GstRDTManager::on-npt-stop: + * @rtpbin: the object which received the signal + * @session: the session + * @ssrc: the SSRC + * + * Notify that SSRC sender has sent data up to the configured NPT stop time. + */ + gst_rdt_manager_signals[SIGNAL_ON_NPT_STOP] = + g_signal_new ("on-npt-stop", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRDTManagerClass, on_npt_stop), + NULL, NULL, gst_rdt_manager_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, + G_TYPE_UINT, G_TYPE_UINT); + + gstelement_class->provide_clock = GST_DEBUG_FUNCPTR (gst_rdt_manager_provide_clock); gstelement_class->change_state = @@ -588,7 +605,7 @@ gst_rdt_manager_src_activate_mode (GstPad * pad, GstObject * parent, GST_DEBUG_OBJECT (rdtmanager, "Starting task on srcpad"); result = gst_pad_start_task (pad, (GstTaskFunction) gst_rdt_manager_loop, - pad); + pad, NULL); } else { /* make sure all data processing stops ASAP */ JBUF_LOCK (session); diff --git a/gst/realmedia/rdtmanager.h b/gst/realmedia/rdtmanager.h index 2816817..948c298 100644 --- a/gst/realmedia/rdtmanager.h +++ b/gst/realmedia/rdtmanager.h @@ -81,6 +81,7 @@ struct _GstRDTManagerClass { void (*on_bye_ssrc) (GstRDTManager *rtpdec, guint session, guint32 ssrc); void (*on_bye_timeout) (GstRDTManager *rtpdec, guint session, guint32 ssrc); void (*on_timeout) (GstRDTManager *rtpdec, guint session, guint32 ssrc); + void (*on_npt_stop) (GstRDTManager *rtpdec, guint session, guint32 ssrc); }; GType gst_rdt_manager_get_type(void); diff --git a/gst/realmedia/rmdemux.c b/gst/realmedia/rmdemux.c index e2ed8ac..8624339 100644 --- a/gst/realmedia/rmdemux.c +++ b/gst/realmedia/rmdemux.c @@ -585,7 +585,7 @@ gst_rmdemux_perform_seek (GstRMDemux * rmdemux, GstEvent * event) /* restart our task since it might have been stopped when we did the * flush. */ gst_pad_start_task (rmdemux->sinkpad, (GstTaskFunction) gst_rmdemux_loop, - rmdemux->sinkpad); + rmdemux->sinkpad, NULL); } done: @@ -669,7 +669,7 @@ gst_rmdemux_reset (GstRMDemux * rmdemux) gst_rmdemux_stream_clear_cached_subpackets (rmdemux, stream); gst_element_remove_pad (GST_ELEMENT (rmdemux), stream->pad); if (stream->pending_tags) - gst_tag_list_free (stream->pending_tags); + gst_tag_list_unref (stream->pending_tags); if (stream->subpackets) g_ptr_array_free (stream->subpackets, TRUE); g_free (stream->index); @@ -681,7 +681,7 @@ gst_rmdemux_reset (GstRMDemux * rmdemux) rmdemux->n_video_streams = 0; if (rmdemux->pending_tags != NULL) { - gst_tag_list_free (rmdemux->pending_tags); + gst_tag_list_unref (rmdemux->pending_tags); rmdemux->pending_tags = NULL; } @@ -791,7 +791,7 @@ gst_rmdemux_sink_activate_mode (GstPad * sinkpad, GstObject * parent, demux->data_offset = G_MAXUINT; res = gst_pad_start_task (sinkpad, (GstTaskFunction) gst_rmdemux_loop, - sinkpad); + sinkpad, NULL); } else { res = gst_pad_stop_task (sinkpad); } @@ -922,6 +922,8 @@ need_pause: gst_element_post_message (GST_ELEMENT (rmdemux), gst_message_new_segment_done (GST_OBJECT (rmdemux), GST_FORMAT_TIME, stop)); + gst_rmdemux_send_event (rmdemux, + gst_event_new_segment_done (GST_FORMAT_TIME, stop)); } else { /* normal playback, send EOS to all linked pads */ GST_LOG_OBJECT (rmdemux, "Sending EOS, at end of stream"); @@ -1279,6 +1281,7 @@ gst_rmdemux_add_stream (GstRMDemux * rmdemux, GstRMDemuxStream * stream) GstCaps *stream_caps = NULL; const gchar *codec_tag = NULL; gchar *codec_name = NULL; + gchar *stream_id; int version = 0; if (stream->subtype == GST_RMDEMUX_STREAM_VIDEO) { @@ -1477,7 +1480,6 @@ gst_rmdemux_add_stream (GstRMDemux * rmdemux, GstRMDemuxStream * stream) gst_pad_use_fixed_caps (stream->pad); - gst_pad_set_caps (stream->pad, stream_caps); gst_pad_set_event_function (stream->pad, GST_DEBUG_FUNCPTR (gst_rmdemux_src_event)); gst_pad_set_query_function (stream->pad, @@ -1486,7 +1488,14 @@ gst_rmdemux_add_stream (GstRMDemux * rmdemux, GstRMDemuxStream * stream) GST_DEBUG_OBJECT (rmdemux, "adding pad %s with caps %" GST_PTR_FORMAT ", stream_id=%d", GST_PAD_NAME (stream->pad), stream_caps, stream->id); gst_pad_set_active (stream->pad, TRUE); - gst_element_add_pad (GST_ELEMENT_CAST (rmdemux), stream->pad); + + stream_id = + gst_pad_create_stream_id_printf (stream->pad, + GST_ELEMENT_CAST (rmdemux), "%u", stream->id); + gst_pad_push_event (stream->pad, gst_event_new_stream_start (stream_id)); + g_free (stream_id); + + gst_pad_set_caps (stream->pad, stream_caps); codec_name = gst_pb_utils_get_codec_description (stream_caps); @@ -1498,6 +1507,7 @@ gst_rmdemux_add_stream (GstRMDemux * rmdemux, GstRMDemuxStream * stream) codec_tag, codec_name, NULL); g_free (codec_name); } + gst_element_add_pad (GST_ELEMENT_CAST (rmdemux), stream->pad); } beach: @@ -2129,6 +2139,7 @@ gst_rmdemux_handle_scrambled_packet (GstRMDemux * rmdemux, ret = gst_rmdemux_descramble_sipr_audio (rmdemux, stream); break; default: + ret = GST_FLOW_ERROR; g_assert_not_reached (); } @@ -2619,15 +2630,14 @@ gst_rmdemux_parse_packet (GstRMDemux * rmdemux, GstBuffer * in, guint16 version) if (rmdemux->pending_tags != NULL) { gst_rmdemux_send_event (rmdemux, - gst_event_new_tag ("GstDemuxer", rmdemux->pending_tags)); + gst_event_new_tag (rmdemux->pending_tags)); rmdemux->pending_tags = NULL; } } if (stream->pending_tags != NULL) { GST_LOG_OBJECT (stream->pad, "tags %" GST_PTR_FORMAT, stream->pending_tags); - gst_pad_push_event (stream->pad, gst_event_new_tag ("GstDemuxer", - stream->pending_tags)); + gst_pad_push_event (stream->pad, gst_event_new_tag (stream->pending_tags)); stream->pending_tags = NULL; } diff --git a/gst/realmedia/rmutils.c b/gst/realmedia/rmutils.c index 3232ee8..34671ce 100644 --- a/gst/realmedia/rmutils.c +++ b/gst/realmedia/rmutils.c @@ -118,7 +118,7 @@ gst_rm_utils_read_tags (const guint8 * data, guint datalen, if (gst_tag_list_n_tags (tags) > 0) return tags; - gst_tag_list_free (tags); + gst_tag_list_unref (tags); return NULL; } diff --git a/gst/synaesthesia/Makefile.am b/gst/synaesthesia/Makefile.am deleted file mode 100644 index da4f986..0000000 --- a/gst/synaesthesia/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -plugin_LTLIBRARIES = libgstsynaesthesia.la - -libgstsynaesthesia_la_SOURCES = gstsynaesthesia.c synaescope.c - -noinst_HEADERS = synaescope.h gstsynaesthesia.h - -libgstsynaesthesia_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) -libgstsynaesthesia_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) -libgstsynaesthesia_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -libgstsynaesthesia_la_LIBTOOLFLAGS = --tag=disable-static - -EXTRA_DIST = README - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstsynaesthesia -:SHARED libgstsynaesthesia \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstsynaesthesia_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsynaesthesia_la_CFLAGS) \ - -:LDFLAGS $(libgstsynaesthesia_la_LDFLAGS) \ - $(libgstsynaesthesia_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ diff --git a/gst/synaesthesia/Makefile.in b/gst/synaesthesia/Makefile.in deleted file mode 100644 index e15f6b0..0000000 --- a/gst/synaesthesia/Makefile.in +++ /dev/null @@ -1,786 +0,0 @@ -# Makefile.in generated by automake 1.11.5 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ - esac; \ - test $$am__dry = yes; \ - } -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = gst/synaesthesia -DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/common/m4/as-ac-expand.m4 \ - $(top_srcdir)/common/m4/as-auto-alt.m4 \ - $(top_srcdir)/common/m4/as-compiler-flag.m4 \ - $(top_srcdir)/common/m4/as-libtool.m4 \ - $(top_srcdir)/common/m4/as-python.m4 \ - $(top_srcdir)/common/m4/as-scrub-include.m4 \ - $(top_srcdir)/common/m4/as-version.m4 \ - $(top_srcdir)/common/m4/ax_create_stdint_h.m4 \ - $(top_srcdir)/common/m4/gst-arch.m4 \ - $(top_srcdir)/common/m4/gst-args.m4 \ - $(top_srcdir)/common/m4/gst-check.m4 \ - $(top_srcdir)/common/m4/gst-default.m4 \ - $(top_srcdir)/common/m4/gst-dowhile.m4 \ - $(top_srcdir)/common/m4/gst-error.m4 \ - $(top_srcdir)/common/m4/gst-feature.m4 \ - $(top_srcdir)/common/m4/gst-function.m4 \ - $(top_srcdir)/common/m4/gst-gettext.m4 \ - $(top_srcdir)/common/m4/gst-glib2.m4 \ - $(top_srcdir)/common/m4/gst-package-release-datetime.m4 \ - $(top_srcdir)/common/m4/gst-plugin-docs.m4 \ - $(top_srcdir)/common/m4/gst-plugindir.m4 \ - $(top_srcdir)/common/m4/gst.m4 \ - $(top_srcdir)/common/m4/gtk-doc.m4 \ - $(top_srcdir)/common/m4/orc.m4 $(top_srcdir)/common/m4/pkg.m4 \ - $(top_srcdir)/m4/a52.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/gst-sid.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(plugindir)" -LTLIBRARIES = $(plugin_LTLIBRARIES) -am__DEPENDENCIES_1 = -libgstsynaesthesia_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_libgstsynaesthesia_la_OBJECTS = \ - libgstsynaesthesia_la-gstsynaesthesia.lo \ - libgstsynaesthesia_la-synaescope.lo -libgstsynaesthesia_la_OBJECTS = $(am_libgstsynaesthesia_la_OBJECTS) -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -libgstsynaesthesia_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ - $(libgstsynaesthesia_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(libgstsynaesthesia_la_CFLAGS) $(CFLAGS) \ - $(libgstsynaesthesia_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(libgstsynaesthesia_la_SOURCES) -DIST_SOURCES = $(libgstsynaesthesia_la_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -HEADERS = $(noinst_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -A52DEC_CFLAGS = @A52DEC_CFLAGS@ -A52DEC_LIBS = @A52DEC_LIBS@ -ACLOCAL = @ACLOCAL@ -ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ -AMRNB_CFLAGS = @AMRNB_CFLAGS@ -AMRNB_LIBS = @AMRNB_LIBS@ -AMRWB_CFLAGS = @AMRWB_CFLAGS@ -AMRWB_LIBS = @AMRWB_LIBS@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCASFLAGS = @CCASFLAGS@ -CCDEPMODE = @CCDEPMODE@ -CDIO_CFLAGS = @CDIO_CFLAGS@ -CDIO_LIBS = @CDIO_LIBS@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFAULT_AUDIOSINK = @DEFAULT_AUDIOSINK@ -DEFAULT_AUDIOSRC = @DEFAULT_AUDIOSRC@ -DEFAULT_VIDEOSINK = @DEFAULT_VIDEOSINK@ -DEFAULT_VIDEOSRC = @DEFAULT_VIDEOSRC@ -DEFAULT_VISUALIZER = @DEFAULT_VISUALIZER@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DEPRECATED_CFLAGS = @DEPRECATED_CFLAGS@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -DVDREAD_LIBS = @DVDREAD_LIBS@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ERROR_CFLAGS = @ERROR_CFLAGS@ -ERROR_CXXFLAGS = @ERROR_CXXFLAGS@ -EXEEXT = @EXEEXT@ -FFLAGS = @FFLAGS@ -FGREP = @FGREP@ -GCOV = @GCOV@ -GCOV_CFLAGS = @GCOV_CFLAGS@ -GCOV_LIBS = @GCOV_LIBS@ -GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GIO_CFLAGS = @GIO_CFLAGS@ -GIO_LDFLAGS = @GIO_LDFLAGS@ -GIO_LIBS = @GIO_LIBS@ -GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ -GLIB_LIBS = @GLIB_LIBS@ -GLIB_PREFIX = @GLIB_PREFIX@ -GLIB_REQ = @GLIB_REQ@ -GMSGFMT = @GMSGFMT@ -GMSGFMT_015 = @GMSGFMT_015@ -GREP = @GREP@ -GSTPB_PLUGINS_DIR = @GSTPB_PLUGINS_DIR@ -GSTPB_PREFIX = @GSTPB_PREFIX@ -GST_AGE = @GST_AGE@ -GST_ALL_LDFLAGS = @GST_ALL_LDFLAGS@ -GST_API_VERSION = @GST_API_VERSION@ -GST_BASE_CFLAGS = @GST_BASE_CFLAGS@ -GST_BASE_LIBS = @GST_BASE_LIBS@ -GST_CFLAGS = @GST_CFLAGS@ -GST_CHECK_CFLAGS = @GST_CHECK_CFLAGS@ -GST_CHECK_LIBS = @GST_CHECK_LIBS@ -GST_CURRENT = @GST_CURRENT@ -GST_CXXFLAGS = @GST_CXXFLAGS@ -GST_LEVEL_DEFAULT = @GST_LEVEL_DEFAULT@ -GST_LIBS = @GST_LIBS@ -GST_LIBVERSION = @GST_LIBVERSION@ -GST_LICENSE = @GST_LICENSE@ -GST_LT_LDFLAGS = @GST_LT_LDFLAGS@ -GST_OPTION_CFLAGS = @GST_OPTION_CFLAGS@ -GST_OPTION_CXXFLAGS = @GST_OPTION_CXXFLAGS@ -GST_PACKAGE_NAME = @GST_PACKAGE_NAME@ -GST_PACKAGE_ORIGIN = @GST_PACKAGE_ORIGIN@ -GST_PLUGINS_ALL = @GST_PLUGINS_ALL@ -GST_PLUGINS_BASE_CFLAGS = @GST_PLUGINS_BASE_CFLAGS@ -GST_PLUGINS_BASE_DIR = @GST_PLUGINS_BASE_DIR@ -GST_PLUGINS_BASE_LIBS = @GST_PLUGINS_BASE_LIBS@ -GST_PLUGINS_DIR = @GST_PLUGINS_DIR@ -GST_PLUGINS_NONPORTED = @GST_PLUGINS_NONPORTED@ -GST_PLUGINS_SELECTED = @GST_PLUGINS_SELECTED@ -GST_PLUGIN_LDFLAGS = @GST_PLUGIN_LDFLAGS@ -GST_PREFIX = @GST_PREFIX@ -GST_REVISION = @GST_REVISION@ -GST_TOOLS_DIR = @GST_TOOLS_DIR@ -GTKDOC_CHECK = @GTKDOC_CHECK@ -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ -GTKDOC_MKPDF = @GTKDOC_MKPDF@ -GTKDOC_REBASE = @GTKDOC_REBASE@ -HAVE_CXX = @HAVE_CXX@ -HAVE_DVDREAD = @HAVE_DVDREAD@ -HAVE_LAME = @HAVE_LAME@ -HTML_DIR = @HTML_DIR@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LAME_CFLAGS = @LAME_CFLAGS@ -LAME_LIBS = @LAME_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBM = @LIBM@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOCALEDIR = @LOCALEDIR@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBOBJS = @LTLIBOBJS@ -MAD_CFLAGS = @MAD_CFLAGS@ -MAD_LIBS = @MAD_LIBS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MPEG2DEC_CFLAGS = @MPEG2DEC_CFLAGS@ -MPEG2DEC_LIBS = @MPEG2DEC_LIBS@ -MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ -MSGMERGE = @MSGMERGE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -ORCC = @ORCC@ -ORCC_FLAGS = @ORCC_FLAGS@ -ORC_CFLAGS = @ORC_CFLAGS@ -ORC_LIBS = @ORC_LIBS@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@ -PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@ -PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@ -PACKAGE_VERSION_NANO = @PACKAGE_VERSION_NANO@ -PACKAGE_VERSION_RELEASE = @PACKAGE_VERSION_RELEASE@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -PLUGINDIR = @PLUGINDIR@ -POSUB = @POSUB@ -PROFILE_CFLAGS = @PROFILE_CFLAGS@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIDPLAY_CFLAGS = @SIDPLAY_CFLAGS@ -SIDPLAY_LIBS = @SIDPLAY_LIBS@ -STRIP = @STRIP@ -TWOLAME_CFLAGS = @TWOLAME_CFLAGS@ -TWOLAME_LIBS = @TWOLAME_LIBS@ -USE_NLS = @USE_NLS@ -VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ -VALGRIND_LIBS = @VALGRIND_LIBS@ -VALGRIND_PATH = @VALGRIND_PATH@ -VERSION = @VERSION@ -WARNING_CFLAGS = @WARNING_CFLAGS@ -WARNING_CXXFLAGS = @WARNING_CXXFLAGS@ -WIN32_LIBS = @WIN32_LIBS@ -X264_CFLAGS = @X264_CFLAGS@ -X264_LIBS = @X264_LIBS@ -XGETTEXT = @XGETTEXT@ -XGETTEXT_015 = @XGETTEXT_015@ -XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -plugindir = @plugindir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pyexecdir = @pyexecdir@ -pythondir = @pythondir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -plugin_LTLIBRARIES = libgstsynaesthesia.la -libgstsynaesthesia_la_SOURCES = gstsynaesthesia.c synaescope.c -noinst_HEADERS = synaescope.h gstsynaesthesia.h -libgstsynaesthesia_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) -libgstsynaesthesia_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) -libgstsynaesthesia_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -libgstsynaesthesia_la_LIBTOOLFLAGS = --tag=disable-static -EXTRA_DIST = README -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gst/synaesthesia/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu gst/synaesthesia/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(plugindir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(plugindir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \ - } - -uninstall-pluginLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$f"; \ - done - -clean-pluginLTLIBRARIES: - -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libgstsynaesthesia.la: $(libgstsynaesthesia_la_OBJECTS) $(libgstsynaesthesia_la_DEPENDENCIES) $(EXTRA_libgstsynaesthesia_la_DEPENDENCIES) - $(AM_V_CCLD)$(libgstsynaesthesia_la_LINK) -rpath $(plugindir) $(libgstsynaesthesia_la_OBJECTS) $(libgstsynaesthesia_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstsynaesthesia_la-gstsynaesthesia.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstsynaesthesia_la-synaescope.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -libgstsynaesthesia_la-gstsynaesthesia.lo: gstsynaesthesia.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstsynaesthesia_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstsynaesthesia_la_CFLAGS) $(CFLAGS) -MT libgstsynaesthesia_la-gstsynaesthesia.lo -MD -MP -MF $(DEPDIR)/libgstsynaesthesia_la-gstsynaesthesia.Tpo -c -o libgstsynaesthesia_la-gstsynaesthesia.lo `test -f 'gstsynaesthesia.c' || echo '$(srcdir)/'`gstsynaesthesia.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstsynaesthesia_la-gstsynaesthesia.Tpo $(DEPDIR)/libgstsynaesthesia_la-gstsynaesthesia.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstsynaesthesia.c' object='libgstsynaesthesia_la-gstsynaesthesia.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstsynaesthesia_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstsynaesthesia_la_CFLAGS) $(CFLAGS) -c -o libgstsynaesthesia_la-gstsynaesthesia.lo `test -f 'gstsynaesthesia.c' || echo '$(srcdir)/'`gstsynaesthesia.c - -libgstsynaesthesia_la-synaescope.lo: synaescope.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstsynaesthesia_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstsynaesthesia_la_CFLAGS) $(CFLAGS) -MT libgstsynaesthesia_la-synaescope.lo -MD -MP -MF $(DEPDIR)/libgstsynaesthesia_la-synaescope.Tpo -c -o libgstsynaesthesia_la-synaescope.lo `test -f 'synaescope.c' || echo '$(srcdir)/'`synaescope.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstsynaesthesia_la-synaescope.Tpo $(DEPDIR)/libgstsynaesthesia_la-synaescope.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='synaescope.c' object='libgstsynaesthesia_la-synaescope.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstsynaesthesia_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstsynaesthesia_la_CFLAGS) $(CFLAGS) -c -o libgstsynaesthesia_la-synaescope.lo `test -f 'synaescope.c' || echo '$(srcdir)/'`synaescope.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(plugindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-pluginLTLIBRARIES - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pluginLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pluginLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pluginLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pluginLTLIBRARIES - - -Android.mk: Makefile.am $(BUILT_SOURCES) - androgenizer \ - -:PROJECT libgstsynaesthesia -:SHARED libgstsynaesthesia \ - -:TAGS eng debug \ - -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ - -:SOURCES $(libgstsynaesthesia_la_SOURCES) \ - -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstsynaesthesia_la_CFLAGS) \ - -:LDFLAGS $(libgstsynaesthesia_la_LDFLAGS) \ - $(libgstsynaesthesia_la_LIBADD) \ - -ldl \ - -:PASSTHROUGH LOCAL_ARM_MODE:=arm \ - LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ - > $@ - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/gst/synaesthesia/README b/gst/synaesthesia/README deleted file mode 100644 index 3932682..0000000 --- a/gst/synaesthesia/README +++ /dev/null @@ -1,151 +0,0 @@ -This is a visualization based on on synaesthesia. (see the synaesthesia -README below) - -This implementation is taken from alsaplayer: http://www.alsaplayer.org/ It -is based on synaesthesia version 1.3 (or maybe 1.4, I'm not entirely -certain), with some modifications by Richard Boulton to try and ensure that -something interesting is displayed for both very quiet and very loud music. - -Note: only one instance of this plugin may be created at a time: it has a -lot of static data. This should be fixed (and it shouldn't be hard to do -so, either). - ----------------------------------------------------------------------------- - -SYNAESTHESIA v2.0 - -Introduction -============ - -This is a program for representing sounds visually from a CD or line -input or piped from another program. It goes beyond the usual oscilliscope -style program by combining an FFT and stereo positioning information to -give a two dimensional display. Some of the shapes I have observed are: - * Drums: clouds of color, fairly high - * Clean guitar: several horizontal lines, low down - * Rough guitar: a cloud, low down - * Trumpet: Lots of horizontal lines everywhere - * Flute: A single horizontal line, low down - * Voice: A vertical line with some internal structure - * Synthesizer: All kinds of weird shapes! - -Synaesthesia can run in a window in X or full screen using SVGAlib. - -The display represents frequency as vertical position on screen, -left-right position as left-right position on screen. It can also -understand surround sound encoded music, and shows ambient noise -in orange. - -X-Windows support was added in version 1.3, as well as a major redesign -of the interface. You can use Synaesthesia as a fully functional -CD player, suitable for use while working. - -There is command line support for play lists and piping from another -program (such as an mp3 player). - -Usage -===== - -Synaesthesia should work on Linux and BSD systems. (Note: I don't -have access to a BSD system myself, I have to rely on patches -- if it -doesn't work, please tell me!) LinuxPPC users may have to use the pipe -mode rather than taking sound input from the CD player, as I believe -sound recording is not yet implemented. - -Compile Synaesthesia by typing - - make - -then install it by typing - - make install - -This will create three versions of Synaesthesia: - - synaesthesia - full screen SVGAlib version (Linux only) - xsynaesthesia - Version that runs as a window in X - sdlsynaesthesia - Version that uses the SDL graphics library - -If you want to use the SDL version, you need to get SDL from -http://www.devolution.com/~slouken/SDL. - -You will need to run Synaesthesia as root to run it full screen -with SVGAlib. Other varieties can be run by any user providing you -provide permissions on /dev/dsp, /dev/cdrom, and /dev/mixer. - -Synaesthesia creates a configuration file, named ~/.synaesthesia, -to store settings such as brightness, color, and window size, as -well as which devices to use to control sound input. - -BSD users will have to edit this file to set the CD-ROM device name -before using Synaesthesia in order to control the CD. - -Run Synaesthesia with no parameters for further information on how to -use it. - -Notes for code rippers -====================== - -This program contains code that you may wish to use in your own projects. -If you want to, please do. (For example, you might want to add some -snazzy visual effects to your favourite MP3 or CD player) - -The actual code to do the mapping from sound to visual display is -all in core.cpp, it should be fairly easy to disentangle from other -parts of the program. It does make reference to some globals defined -in syna.h, namely the #defines m (log2 of the sample size for each -frame) and brightness, data (which stores the sound input), outputBmp, -lastOutputBmp and lastLastOutputBmp (which hold the output), outWidth -and outHeight (size of the bitmaps), and fadeMode, brightnessTwiddler, -starSize and pointsAreDiamonds (various parameters affecting the display). - -The normal way to use it would be: - - Call coreInit() to set up some look-up tables - Call setStarSize(starSize) to set up some more look-up tables - Loop - Put data into the data array - Call fade() to apply the fade/wave/heat effect to the output - Call coreGo() to add the next fragment of sound input to the output - Display contents of outputBmp to screen - -There is a simple anti-aliased polygon drawing engine in the file -polygon.h. sound.cpp contains code for driving the CD. xlib.c and -xlibwrap.cpp contain code for setting up a window under X (originally -ripped from the Xaos fractal viewer program :-) ). - -Authors -======= - -This program is free. If you like it, or have any suggestions, please -send me (Paul Harrison) an email (pfh@yoyo.cc.monash.edu.au). - -Thanks to Asger Alstrup Nielsen for many great suggestions, and for -writing optimized 32 bit loops for fading and drawing to screen. - -Thanks to Roger Knobbe for porting Synaesthesia to FreeBSD. - -Thanks to Ben Gertzfield and Martin Mitchell for some small fixes to the -CD controlling code. - -Thanks to Simon Budig for an improvement to the X code. - -Changes -======= - -1.1 - Added surround sound decoding. -1.2 - Fixed a bug in the ioctl calls to /dev/dsp. -1.3 - Asger Alstrup Nielsen's optimizations added. - Added X-Windows support. - More options, redesigned interface. -1.4 - Bug fixes, including a great reduction in - "Sound: Recording overrun" warnings. - New command line options: play lists and piping. - Support for SDL. -2.0 - Bug fixes: Fixed problem in xlib.c that caused occasional segfaults, - several endianness problems fixed. - New effects: Wave, heat, diamond shaped points. - Piping sound now longer requires the twiddle factor. - Yet another interface redesign. - Partial support for LinuxPPC (pipe mode only) - diff --git a/gst/synaesthesia/gstsynaesthesia.c b/gst/synaesthesia/gstsynaesthesia.c deleted file mode 100644 index d31847f..0000000 --- a/gst/synaesthesia/gstsynaesthesia.c +++ /dev/null @@ -1,547 +0,0 @@ -/* GStreamer - * Copyright (C) <2001> Richard Boulton <richard@tartarus.org> - * - * gstsynaesthesia.c: implementation of synaesthesia drawing element - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ -/** - * SECTION:element-synaesthesia - * @see_also: goom - * - * Synaesthesia is an audio visualisation element. It creates glitter and - * pulsating fog based on the incomming audio signal. - * - * <refsect2> - * <title>Example launch line</title> - * |[ - * gst-launch -v audiotestsrc ! audioconvert ! synaesthesia ! ximagesink - * gst-launch -v audiotestsrc ! audioconvert ! synaesthesia ! ffmpegcolorspace ! xvimagesink - * ]| - * </refsect2> - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "gstsynaesthesia.h" - -static GstStaticPadTemplate gst_synaesthesia_src_template = -GST_STATIC_PAD_TEMPLATE ("src", - GST_PAD_SRC, - GST_PAD_ALWAYS, -#if G_BYTE_ORDER == G_BIG_ENDIAN - GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("xRGB")) -#else - GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("BGRx")) -#endif - ); - -static GstStaticPadTemplate gst_synaesthesia_sink_template = -GST_STATIC_PAD_TEMPLATE ("sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/x-raw, " - "format = (string) " GST_AUDIO_NE (S16) ", " - "rate = (int) [ 8000, 96000 ], " - "channels = (int) 2, " - "channel-mask = (bitmask) 0x3, " "layout = (string) interleaved") - ); - -static void gst_synaesthesia_finalize (GObject * object); -static void gst_synaesthesia_dispose (GObject * object); - -static GstFlowReturn gst_synaesthesia_chain (GstPad * pad, GstObject * parent, - GstBuffer * buffer); -static gboolean gst_synaesthesia_sink_event (GstPad * pad, GstObject * parent, - GstEvent * event); - -static GstStateChangeReturn -gst_synaesthesia_change_state (GstElement * element, GstStateChange transition); - -static gboolean gst_synaesthesia_src_negotiate (GstSynaesthesia * synaesthesia); -static gboolean gst_synaesthesia_src_setcaps (GstSynaesthesia * synaesthesia, - GstCaps * caps); -static gboolean gst_synaesthesia_sink_setcaps (GstSynaesthesia * synaesthesia, - GstCaps * caps); - -#define gst_synaesthesia_parent_class parent_class -G_DEFINE_TYPE (GstSynaesthesia, gst_synaesthesia, GST_TYPE_ELEMENT); - -static void -gst_synaesthesia_class_init (GstSynaesthesiaClass * klass) -{ - GObjectClass *gobject_class; - GstElementClass *gstelement_class; - - gobject_class = (GObjectClass *) klass; - gstelement_class = (GstElementClass *) klass; - - parent_class = g_type_class_peek_parent (klass); - - gobject_class->dispose = gst_synaesthesia_dispose; - gobject_class->finalize = gst_synaesthesia_finalize; - - gstelement_class->change_state = - GST_DEBUG_FUNCPTR (gst_synaesthesia_change_state); - - gst_element_class_set_static_metadata (gstelement_class, "Synaesthesia", - "Visualization", - "Creates video visualizations of audio input, using stereo and pitch information", - "Richard Boulton <richard@tartarus.org>"); - - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_synaesthesia_src_template)); - gst_element_class_add_pad_template (gstelement_class, - gst_static_pad_template_get (&gst_synaesthesia_sink_template)); - - synaesthesia_init (); -} - -static void -gst_synaesthesia_init (GstSynaesthesia * synaesthesia) -{ - /* create the sink and src pads */ - synaesthesia->sinkpad = - gst_pad_new_from_static_template (&gst_synaesthesia_sink_template, - "sink"); - gst_pad_set_chain_function (synaesthesia->sinkpad, - GST_DEBUG_FUNCPTR (gst_synaesthesia_chain)); - gst_pad_set_event_function (synaesthesia->sinkpad, - GST_DEBUG_FUNCPTR (gst_synaesthesia_sink_event)); - gst_element_add_pad (GST_ELEMENT (synaesthesia), synaesthesia->sinkpad); - - synaesthesia->srcpad = - gst_pad_new_from_static_template (&gst_synaesthesia_src_template, "src"); - gst_element_add_pad (GST_ELEMENT (synaesthesia), synaesthesia->srcpad); - - synaesthesia->adapter = gst_adapter_new (); - - /* reset the initial video state */ - synaesthesia->width = 320; - synaesthesia->height = 200; - synaesthesia->fps_n = 25; /* desired frame rate */ - synaesthesia->fps_d = 1; - synaesthesia->frame_duration = -1; - - /* reset the initial audio state */ - synaesthesia->rate = GST_AUDIO_DEF_RATE; - synaesthesia->channels = 2; - - synaesthesia->next_ts = GST_CLOCK_TIME_NONE; - - synaesthesia->si = - synaesthesia_new (synaesthesia->width, synaesthesia->height); -} - -static void -gst_synaesthesia_dispose (GObject * object) -{ - GstSynaesthesia *synaesthesia; - - synaesthesia = GST_SYNAESTHESIA (object); - - if (synaesthesia->adapter) { - g_object_unref (synaesthesia->adapter); - synaesthesia->adapter = NULL; - } - - G_OBJECT_CLASS (parent_class)->dispose (object); -} - -static void -gst_synaesthesia_finalize (GObject * object) -{ - GstSynaesthesia *synaesthesia; - - synaesthesia = GST_SYNAESTHESIA (object); - - synaesthesia_close (synaesthesia->si); - - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -static gboolean -gst_synaesthesia_sink_setcaps (GstSynaesthesia * synaesthesia, GstCaps * caps) -{ - GstStructure *structure; - gint channels; - gint rate; - gboolean res = TRUE; - - structure = gst_caps_get_structure (caps, 0); - - if (!gst_structure_get_int (structure, "channels", &channels) || - !gst_structure_get_int (structure, "rate", &rate)) - goto missing_caps_details; - - if (channels != 2) - goto wrong_channels; - - if (rate <= 0) - goto wrong_rate; - - synaesthesia->channels = channels; - synaesthesia->rate = rate; - -done: - return res; - - /* Errors */ -missing_caps_details: - { - GST_WARNING_OBJECT (synaesthesia, "missing channels or rate in the caps"); - res = FALSE; - goto done; - } -wrong_channels: - { - GST_WARNING_OBJECT (synaesthesia, "number of channels must be 2, but is %d", - channels); - res = FALSE; - goto done; - } -wrong_rate: - { - GST_WARNING_OBJECT (synaesthesia, "sample rate must be >0, but is %d", - rate); - res = FALSE; - goto done; - } -} - -static gboolean -gst_synaesthesia_src_negotiate (GstSynaesthesia * synaesthesia) -{ - GstCaps *othercaps, *target, *intersect; - GstStructure *structure; - GstCaps *templ; - GstQuery *query; - GstBufferPool *pool = NULL; - guint size, min, max; - - templ = gst_pad_get_pad_template_caps (synaesthesia->srcpad); - - GST_DEBUG_OBJECT (synaesthesia, "performing negotiation"); - - /* see what the peer can do */ - othercaps = gst_pad_peer_query_caps (synaesthesia->srcpad, NULL); - if (othercaps) { - intersect = gst_caps_intersect (othercaps, templ); - gst_caps_unref (othercaps); - gst_caps_unref (templ); - - if (gst_caps_is_empty (intersect)) - goto no_format; - - target = gst_caps_copy_nth (intersect, 0); - gst_caps_unref (intersect); - } else { - target = templ; - } - - structure = gst_caps_get_structure (target, 0); - gst_structure_fixate_field_nearest_int (structure, "width", - synaesthesia->width); - gst_structure_fixate_field_nearest_int (structure, "height", - synaesthesia->height); - gst_structure_fixate_field_nearest_fraction (structure, "framerate", - synaesthesia->fps_n, synaesthesia->fps_d); - - GST_DEBUG_OBJECT (synaesthesia, "final caps are %" GST_PTR_FORMAT, target); - - gst_synaesthesia_src_setcaps (synaesthesia, target); - - /* try to get a bufferpool now */ - /* find a pool for the negotiated caps now */ - query = gst_query_new_allocation (target, TRUE); - - if (gst_pad_peer_query (synaesthesia->srcpad, query) && - gst_query_get_n_allocation_pools (query) > 0) { - /* we got configuration from our peer, parse them */ - gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max); - } else { - size = synaesthesia->outsize; - min = max = 0; - } - - if (pool == NULL) { - GstStructure *config; - - /* we did not get a pool, make one ourselves then */ - pool = gst_buffer_pool_new (); - - config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set_params (config, target, size, min, max); - gst_buffer_pool_set_config (pool, config); - } - - if (synaesthesia->pool) - gst_object_unref (synaesthesia->pool); - synaesthesia->pool = pool; - - /* and activate */ - gst_buffer_pool_set_active (pool, TRUE); - - gst_caps_unref (target); - - return TRUE; - -no_format: - { - gst_caps_unref (intersect); - return FALSE; - } -} - -static gboolean -gst_synaesthesia_src_setcaps (GstSynaesthesia * synaesthesia, GstCaps * caps) -{ - GstStructure *structure; - gint w, h; - gint num, denom; - gboolean res = TRUE; - - structure = gst_caps_get_structure (caps, 0); - - if (!gst_structure_get_int (structure, "width", &w) || - !gst_structure_get_int (structure, "height", &h) || - !gst_structure_get_fraction (structure, "framerate", &num, &denom)) { - goto missing_caps_details; - } - - synaesthesia->width = w; - synaesthesia->height = h; - synaesthesia->fps_n = num; - synaesthesia->fps_d = denom; - - synaesthesia_resize (synaesthesia->si, synaesthesia->width, - synaesthesia->height); - - /* size of the output buffer in bytes, depth is always 4 bytes */ - synaesthesia->outsize = synaesthesia->width * synaesthesia->height * 4; - synaesthesia->frame_duration = gst_util_uint64_scale_int (GST_SECOND, - synaesthesia->fps_d, synaesthesia->fps_n); - synaesthesia->spf = gst_util_uint64_scale_int (synaesthesia->rate, - synaesthesia->fps_d, synaesthesia->fps_n); - - GST_DEBUG_OBJECT (synaesthesia, "dimension %dx%d, framerate %d/%d, spf %d", - synaesthesia->width, synaesthesia->height, - synaesthesia->fps_n, synaesthesia->fps_d, synaesthesia->spf); - - res = gst_pad_push_event (synaesthesia->srcpad, gst_event_new_caps (caps)); - -done: - return res; - - /* Errors */ -missing_caps_details: - { - GST_WARNING_OBJECT (synaesthesia, - "missing width, height or framerate in the caps"); - res = FALSE; - goto done; - } -} - -/* make sure we are negotiated */ -static GstFlowReturn -ensure_negotiated (GstSynaesthesia * synaesthesia) -{ - gboolean reconfigure; - - reconfigure = gst_pad_check_reconfigure (synaesthesia->srcpad); - - /* we don't know an output format yet, pick one */ - if (reconfigure || !gst_pad_has_current_caps (synaesthesia->srcpad)) { - if (!gst_synaesthesia_src_negotiate (synaesthesia)) - return GST_FLOW_NOT_NEGOTIATED; - } - return GST_FLOW_OK; -} - -static GstFlowReturn -gst_synaesthesia_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) -{ - GstFlowReturn ret = GST_FLOW_OK; - GstSynaesthesia *synaesthesia; - guint32 avail, bytesperread; - - synaesthesia = GST_SYNAESTHESIA (parent); - - GST_LOG_OBJECT (synaesthesia, "chainfunc called"); - - if (synaesthesia->rate == 0) { - gst_buffer_unref (buffer); - ret = GST_FLOW_NOT_NEGOTIATED; - goto exit; - } - - /* Make sure have an output format */ - ret = ensure_negotiated (synaesthesia); - if (ret != GST_FLOW_OK) { - gst_buffer_unref (buffer); - goto exit; - } - - /* resync on DISCONT */ - if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT)) { - synaesthesia->next_ts = GST_CLOCK_TIME_NONE; - gst_adapter_clear (synaesthesia->adapter); - } - - /* Match timestamps from the incoming audio */ - if (GST_BUFFER_TIMESTAMP (buffer) != GST_CLOCK_TIME_NONE) - synaesthesia->next_ts = GST_BUFFER_TIMESTAMP (buffer); - - gst_adapter_push (synaesthesia->adapter, buffer); - - /* this is what we want */ - bytesperread = - MAX (FFT_BUFFER_SIZE, - synaesthesia->spf) * synaesthesia->channels * sizeof (gint16); - - /* this is what we have */ - avail = gst_adapter_available (synaesthesia->adapter); - while (avail > bytesperread) { - const guint16 *data = - (const guint16 *) gst_adapter_map (synaesthesia->adapter, - bytesperread); - GstBuffer *outbuf = NULL; - guchar *out_frame; - guint i; - - /* deinterleave */ - for (i = 0; i < FFT_BUFFER_SIZE; i++) { - synaesthesia->datain[0][i] = *data++; - synaesthesia->datain[1][i] = *data++; - } - - /* alloc a buffer */ - GST_DEBUG_OBJECT (synaesthesia, "allocating output buffer"); - ret = gst_buffer_pool_acquire_buffer (synaesthesia->pool, &outbuf, NULL); - if (ret != GST_FLOW_OK) { - gst_adapter_unmap (synaesthesia->adapter); - goto exit; - } - - GST_BUFFER_TIMESTAMP (outbuf) = synaesthesia->next_ts; - GST_BUFFER_DURATION (outbuf) = synaesthesia->frame_duration; - - out_frame = (guchar *) - synaesthesia_update (synaesthesia->si, synaesthesia->datain); - gst_buffer_fill (outbuf, 0, out_frame, synaesthesia->outsize); - - gst_adapter_unmap (synaesthesia->adapter); - - ret = gst_pad_push (synaesthesia->srcpad, outbuf); - outbuf = NULL; - - if (ret != GST_FLOW_OK) - break; - - if (synaesthesia->next_ts != GST_CLOCK_TIME_NONE) - synaesthesia->next_ts += synaesthesia->frame_duration; - - /* flush sampled for one frame */ - gst_adapter_flush (synaesthesia->adapter, synaesthesia->spf * - synaesthesia->channels * sizeof (gint16)); - - avail = gst_adapter_available (synaesthesia->adapter); - } - -exit: - return ret; -} - -static gboolean -gst_synaesthesia_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) -{ - gboolean res; - GstSynaesthesia *synaesthesia; - - synaesthesia = GST_SYNAESTHESIA (parent); - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_CAPS: - { - GstCaps *caps; - - gst_event_parse_caps (event, &caps); - res = gst_synaesthesia_sink_setcaps (synaesthesia, caps); - gst_event_unref (event); - break; - } - default: - res = gst_pad_push_event (synaesthesia->srcpad, event); - break; - } - - return res; -} - -static GstStateChangeReturn -gst_synaesthesia_change_state (GstElement * element, GstStateChange transition) -{ - GstSynaesthesia *synaesthesia; - GstStateChangeReturn ret; - - synaesthesia = GST_SYNAESTHESIA (element); - - switch (transition) { - case GST_STATE_CHANGE_READY_TO_PAUSED: - synaesthesia->next_ts = GST_CLOCK_TIME_NONE; - gst_adapter_clear (synaesthesia->adapter); - synaesthesia->channels = synaesthesia->rate = 0; - break; - default: - break; - } - - ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); - - switch (transition) { - case GST_STATE_CHANGE_PAUSED_TO_READY: - if (synaesthesia->pool) { - gst_buffer_pool_set_active (synaesthesia->pool, FALSE); - gst_object_replace ((GstObject **) & synaesthesia->pool, NULL); - } - break; - case GST_STATE_CHANGE_READY_TO_NULL: - break; - default: - break; - } - - return ret; -} - - -static gboolean -plugin_init (GstPlugin * plugin) -{ - GST_DEBUG_CATEGORY_INIT (synaesthesia_debug, "synaesthesia", 0, - "synaesthesia audio visualisations"); - - return gst_element_register (plugin, "synaesthesia", GST_RANK_NONE, - GST_TYPE_SYNAESTHESIA); -} - -GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, - GST_VERSION_MINOR, - synaesthesia, - "Creates video visualizations of audio input, using stereo and pitch information", - plugin_init, VERSION, "GPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) diff --git a/gst/synaesthesia/gstsynaesthesia.h b/gst/synaesthesia/gstsynaesthesia.h deleted file mode 100644 index 598ebb3..0000000 --- a/gst/synaesthesia/gstsynaesthesia.h +++ /dev/null @@ -1,82 +0,0 @@ -/* GStreamer - * Copyright (C) <2001> Richard Boulton <richard@tartarus.org> - * - * gstsynaesthesia.c: implementation of synaesthesia drawing element - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifndef __GST_SYNAESTHESIA_H__ -#define __GST_SYNAESTHESIA_H__ - -#include <string.h> -#include <gst/gst.h> -#include <gst/video/video.h> -#include <gst/audio/audio.h> -#include <gst/base/gstadapter.h> -#include "synaescope.h" - -G_BEGIN_DECLS -#define GST_TYPE_SYNAESTHESIA (gst_synaesthesia_get_type()) -#define GST_SYNAESTHESIA(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SYNAESTHESIA,GstSynaesthesia)) -#define GST_SYNAESTHESIA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SYNAESTHESIA,GstSynaesthesiaClass)) -#define GST_IS_SYNAESTHESIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SYNAESTHESIA)) -#define GST_IS_SYNAESTHESIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SYNAESTHESIA)) -typedef struct _GstSynaesthesia GstSynaesthesia; -typedef struct _GstSynaesthesiaClass GstSynaesthesiaClass; - -GST_DEBUG_CATEGORY_STATIC (synaesthesia_debug); -#define GST_CAT_DEFAULT (synaesthesia_debug) - -struct _GstSynaesthesia -{ - GstElement element; - - /* pads */ - GstPad *sinkpad, *srcpad; - GstAdapter *adapter; - - guint64 next_ts; /* the timestamp of the next frame */ - guint64 frame_duration; - guint bps; /* bytes per sample */ - guint spf; /* samples per video frame */ - - gint16 datain[2][FFT_BUFFER_SIZE]; - - /* video state */ - gint fps_n, fps_d; - gint width; - gint height; - guint outsize; - GstBufferPool *pool; - - /* Audio state */ - gint sample_rate; - gint rate; - gint channels; - - /* Synaesthesia instance */ - syn_instance *si; -}; - -struct _GstSynaesthesiaClass -{ - GstElementClass parent_class; -}; - -GType gst_synaesthesia_get_type (void); - -G_END_DECLS -#endif /* __GST_SYNAESTHESIA_H__ */ diff --git a/gst/synaesthesia/synaescope.c b/gst/synaesthesia/synaescope.c deleted file mode 100644 index 92abd39..0000000 --- a/gst/synaesthesia/synaescope.c +++ /dev/null @@ -1,460 +0,0 @@ -/* synaescope.cpp - * Copyright (C) 1999,2002 Richard Boulton <richard@tartarus.org> - * - * Much code copied from Synaesthesia - a program to display sound - * graphically, by Paul Francis Harrison <pfh@yoyo.cc.monash.edu.au> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "synaescope.h" - -#include <pthread.h> -#include <dirent.h> -#include <sys/stat.h> -#ifndef _MSC_VER -#include <sys/time.h> -#include <time.h> -#endif -#include <math.h> -#include <stdio.h> -#include <stdlib.h> -#ifndef _MSC_VER -#include <unistd.h> -#endif -#include <string.h> -#include <assert.h> - -#ifdef G_OS_WIN32 -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif -#endif - -#define SCOPE_BG_RED 0 -#define SCOPE_BG_GREEN 0 -#define SCOPE_BG_BLUE 0 - -#define brightMin 200 -#define brightMax 2000 -#define brightDec 10 -#define brightInc 6 -#define brTotTargetLow 5000 -#define brTotTargetHigh 15000 - -#define BOUND(x) ((x) > 255 ? 255 : (x)) -#define PEAKIFY(x) BOUND((x) - (x)*(255-(x))/255/2) - -/* Instance data */ -struct syn_instance -{ - /* options */ - unsigned int resx, resy; - int autobrightness; /* Whether to use automatic brightness adjust */ - unsigned int brightFactor; - - /* data */ - unsigned char *output; - guint32 *display; - gint16 pcmt_l[FFT_BUFFER_SIZE]; - gint16 pcmt_r[FFT_BUFFER_SIZE]; - gint16 pcm_l[FFT_BUFFER_SIZE]; - gint16 pcm_r[FFT_BUFFER_SIZE]; - double fftout_l[FFT_BUFFER_SIZE]; - double fftout_r[FFT_BUFFER_SIZE]; - double corr_l[FFT_BUFFER_SIZE]; - double corr_r[FFT_BUFFER_SIZE]; - int clarity[FFT_BUFFER_SIZE]; /* Surround sound */ - - /* pre calculated values */ - int heightFactor; - int heightAdd; - double brightFactor2; -}; - -/* Shared lookup tables for the FFT */ -static double fftmult[FFT_BUFFER_SIZE / 2 + 1]; -static double cosTable[FFT_BUFFER_SIZE]; -static double negSinTable[FFT_BUFFER_SIZE]; -static int bitReverse[FFT_BUFFER_SIZE]; -/* Shared lookup tables for colors */ -static int scaleDown[256]; -static guint32 colEq[256]; - -static void synaes_fft (double *x, double *y); -static void synaescope_coreGo (syn_instance * si); - -static inline void -addPixel (syn_instance * si, int x, int y, int br1, int br2) -{ - unsigned char *p; - - if (G_UNLIKELY (x < 0 || x >= si->resx || y < 0 || y >= si->resy)) - return; - - p = si->output + x * 2 + y * si->resx * 2; - if (p[0] < 255 - br1) - p[0] += br1; - else - p[0] = 255; - if (p[1] < 255 - br2) - p[1] += br2; - else - p[1] = 255; -} - -static inline void -addPixelFast (unsigned char *p, int br1, int br2) -{ - if (p[0] < 255 - br1) - p[0] += br1; - else - p[0] = 255; - if (p[1] < 255 - br2) - p[1] += br2; - else - p[1] = 255; -} - -static void -synaescope_coreGo (syn_instance * si) -{ - int i, j; - register guint32 *ptr; - register guint32 *end; - long int brtot = 0; - - memcpy (si->pcm_l, si->pcmt_l, sizeof (si->pcm_l)); - memcpy (si->pcm_r, si->pcmt_r, sizeof (si->pcm_r)); - - for (i = 0; i < FFT_BUFFER_SIZE; i++) { - si->fftout_l[i] = si->pcm_l[i]; - si->fftout_r[i] = si->pcm_r[i]; - } - - synaes_fft (si->fftout_l, si->fftout_r); - - for (i = 0 + 1; i < FFT_BUFFER_SIZE; i++) { - double x1 = si->fftout_l[bitReverse[i]]; - double y1 = si->fftout_r[bitReverse[i]]; - double x2 = si->fftout_l[bitReverse[FFT_BUFFER_SIZE - i]]; - double y2 = si->fftout_r[bitReverse[FFT_BUFFER_SIZE - i]]; - double aa, bb; - - si->corr_l[i] = sqrt (aa = (x1 + x2) * (x1 + x2) + (y1 - y2) * (y1 - y2)); - si->corr_r[i] = sqrt (bb = (x1 - x2) * (x1 - x2) + (y1 + y2) * (y1 + y2)); - si->clarity[i] = (int) ( - ((x1 + x2) * (x1 - x2) + (y1 + y2) * (y1 - y2)) / (aa + bb) * 256); - } - - /* Asger Alstrupt's optimized 32 bit fade */ - /* (alstrup@diku.dk) */ - ptr = (guint32 *) si->output; - end = (guint32 *) (si->output + si->resx * si->resy * 2); - do { - /*Bytewize version was: *(ptr++) -= *ptr+(*ptr>>1)>>4; */ - if (*ptr) { - if (*ptr & 0xf0f0f0f0) { - *ptr = *ptr - ((*ptr & 0xf0f0f0f0) >> 4) - ((*ptr & 0xe0e0e0e0) >> 5); - } else { - *ptr = (*ptr * 14 >> 4) & 0x0f0f0f0f; - /*Should be 29/32 to be consistent. Who cares. This is totally */ - /* hacked anyway. */ - /*unsigned char *subptr = (unsigned char*)(ptr++); */ - /*subptr[0] = (int)subptr[0] * 29 / 32; */ - /*subptr[1] = (int)subptr[0] * 29 / 32; */ - /*subptr[2] = (int)subptr[0] * 29 / 32; */ - /*subptr[3] = (int)subptr[0] * 29 / 32; */ - } - } - ptr++; - } while (ptr < end); - - for (i = 1; i < FFT_BUFFER_SIZE / 2; i++) { - if (si->corr_l[i] > 0 || si->corr_r[i] > 0) { - int br1, br2; - double fc = si->corr_l[i] + si->corr_r[i]; - int br = (int) (fc * i * si->brightFactor2); - int px = (int) (si->corr_r[i] * si->resx / fc); - int py = si->heightAdd - i / si->heightFactor; - - brtot += br; - br1 = br * (si->clarity[i] + 128) >> 8; - br2 = br * (128 - si->clarity[i]) >> 8; - br1 = CLAMP (br1, 0, 255); - br2 = CLAMP (br2, 0, 255); - - /* if we are close to a border */ - if (px < 30 || py < 30 || px > si->resx - 30 || py > si->resy - 30) { - /* draw a spark */ - addPixel (si, px, py, br1, br2); - for (j = 1; br1 > 0 || br2 > 0; - j++, br1 = scaleDown[br1], br2 = scaleDown[br2]) { - addPixel (si, px + j, py, br1, br2); - addPixel (si, px, py + j, br1, br2); - addPixel (si, px - j, py, br1, br2); - addPixel (si, px, py - j, br1, br2); - } - } else { - unsigned char *p = si->output + px * 2 + py * si->resx * 2; - unsigned char *p1 = p, *p2 = p, *p3 = p, *p4 = p; - /* draw a spark */ - addPixelFast (p, br1, br2); - for (; br1 > 0 || br2 > 0; br1 = scaleDown[br1], br2 = scaleDown[br2]) { - p1 += 2; - addPixelFast (p1, br1, br2); - p2 -= 2; - addPixelFast (p2, br1, br2); - p3 += si->resx * 2; - addPixelFast (p3, br1, br2); - p4 -= si->resx * 2; - addPixelFast (p4, br1, br2); - } - } - } - } - - /* Apply autoscaling: makes quiet bits brighter, and loud bits - * darker, but still keeps loud bits brighter than quiet bits. */ - if (brtot != 0 && si->autobrightness) { - long int brTotTarget = brTotTargetHigh; - - if (brightMax != brightMin) { - brTotTarget -= ((brTotTargetHigh - brTotTargetLow) * - (si->brightFactor - brightMin)) / (brightMax - brightMin); - } - if (brtot < brTotTarget) { - si->brightFactor += brightInc; - if (si->brightFactor > brightMax) - si->brightFactor = brightMax; - } else { - si->brightFactor -= brightDec; - if (si->brightFactor < brightMin) - si->brightFactor = brightMin; - } - /* printf("brtot: %ld\tbrightFactor: %d\tbrTotTarget: %d\n", - brtot, brightFactor, brTotTarget); */ - } -} - - -static void -synaescope32 (syn_instance * si) -{ - unsigned char *outptr; - int i; - - synaescope_coreGo (si); - - outptr = si->output; - for (i = 0; i < si->resx * si->resy; i++) { - si->display[i] = colEq[(outptr[0] >> 4) + (outptr[1] & 0xf0)]; - outptr += 2; - } -} - - -static int -bitReverser (int i) -{ - int sum = 0; - int j; - - for (j = 0; j < FFT_BUFFER_SIZE_LOG; j++) { - sum = (i & 1) + sum * 2; - i >>= 1; - } - - return sum; -} - -static void -synaes_fft (double *x, double *y) -{ - int n2 = FFT_BUFFER_SIZE; - int n1; - int twoToTheK; - int j; - - for (twoToTheK = 1; twoToTheK < FFT_BUFFER_SIZE; twoToTheK *= 2) { - n1 = n2; - n2 /= 2; - for (j = 0; j < n2; j++) { - double c = cosTable[j * twoToTheK & (FFT_BUFFER_SIZE - 1)]; - double s = negSinTable[j * twoToTheK & (FFT_BUFFER_SIZE - 1)]; - int i; - - for (i = j; i < FFT_BUFFER_SIZE; i += n1) { - int l = i + n2; - double xt = x[i] - x[l]; - double yt = y[i] - y[l]; - - x[i] = (x[i] + x[l]); - y[i] = (y[i] + y[l]); - x[l] = xt * c - yt * s; - y[l] = xt * s + yt * c; - } - } - } -} - -static void -synaescope_set_data (syn_instance * si, gint16 data[2][FFT_BUFFER_SIZE]) -{ - int i; - gint16 *newset_l = si->pcmt_l; - gint16 *newset_r = si->pcmt_r; - - for (i = 0; i < FFT_BUFFER_SIZE; i++) { - newset_l[i] = data[0][i]; - newset_r[i] = data[1][i]; - } -} - - -guint32 * -synaesthesia_update (syn_instance * si, gint16 data[2][FFT_BUFFER_SIZE]) -{ - synaescope_set_data (si, data); - synaescope32 (si); - return si->display; -} - -void -synaesthesia_init (void) -{ - static int inited = 0; - int i; - - if (inited) - return; - - for (i = 0; i <= FFT_BUFFER_SIZE / 2 + 1; i++) { - double mult = (double) 128 / ((FFT_BUFFER_SIZE * 16384) ^ 2); - - /* Result now guaranteed (well, almost) to be in range 0..128 */ - - /* Low values represent more frequencies, and thus get more */ - /* intensity - this helps correct for that. */ - mult *= log (i + 1) / log (2); - - mult *= 3; /* Adhoc parameter, looks about right for me. */ - - fftmult[i] = mult; - } - - for (i = 0; i < FFT_BUFFER_SIZE; i++) { - negSinTable[i] = -sin (M_PI * 2 / FFT_BUFFER_SIZE * i); - cosTable[i] = cos (M_PI * 2 / FFT_BUFFER_SIZE * i); - bitReverse[i] = bitReverser (i); - } - - for (i = 0; i < 256; i++) - scaleDown[i] = i * 200 >> 8; - - for (i = 0; i < 256; i++) { - int red = PEAKIFY ((i & 15 * 16)); - int green = PEAKIFY ((i & 15) * 16 + (i & 15 * 16) / 4); - int blue = PEAKIFY ((i & 15) * 16); - - colEq[i] = (red << 16) + (green << 8) + blue; - } - - inited = 1; -} - -gboolean -synaesthesia_resize (syn_instance * si, guint resx, guint resy) -{ - unsigned char *output = NULL; - guint32 *display = NULL; - double actualHeight; - - /* FIXME: FFT_BUFFER_SIZE is reated to resy, right now we get black borders on - * top and below - */ - - output = g_try_new (unsigned char, 2 * resx * resy); - display = g_try_new (guint32, resx * resy); - if (!output || !display) - goto Error; - - g_free (si->output); - g_free (si->display); - - si->resx = resx; - si->resy = resy; - si->output = output; - si->display = display; - - /* factors for height scaling - * the bigger FFT_BUFFER_SIZE, the more finegrained steps we have - * should we report the real hight, so that xvimagesink can scale? - */ - // 512 values , resy=256 -> highFc=2 - si->heightFactor = FFT_BUFFER_SIZE / 2 / si->resy + 1; - actualHeight = FFT_BUFFER_SIZE / 2 / si->heightFactor; - si->heightAdd = (si->resy + actualHeight) / 2; - - /*printf ("resy=%u, heightFactor=%d, heightAdd=%d, actualHeight=%d\n", - si->resy, si->heightFactor, si->heightAdd, actualHeight); - */ - - /* Correct for window size */ - si->brightFactor2 = (si->brightFactor / 65536.0 / FFT_BUFFER_SIZE) * - sqrt (actualHeight * si->resx / (320.0 * 200.0)); - - return TRUE; - -Error: - g_free (output); - g_free (display); - return FALSE; -} - -syn_instance * -synaesthesia_new (guint resx, guint resy) -{ - syn_instance *si; - - si = g_try_new0 (syn_instance, 1); - if (si == NULL) - return NULL; - - if (!synaesthesia_resize (si, resx, resy)) { - g_free (si); - return NULL; - } - - si->autobrightness = 1; /* Whether to use automatic brightness adjust */ - si->brightFactor = 400; - - return si; -} - -void -synaesthesia_close (syn_instance * si) -{ - g_return_if_fail (si != NULL); - - g_free (si->output); - g_free (si->display); - - g_free (si); -} diff --git a/gst/synaesthesia/synaescope.h b/gst/synaesthesia/synaescope.h deleted file mode 100644 index fe41a9a..0000000 --- a/gst/synaesthesia/synaescope.h +++ /dev/null @@ -1,42 +0,0 @@ -/* synaescope.h - * Copyright (C) 1999,2002 Richard Boulton <richard@tartarus.org> - * - * Much code copied from Synaesthesia - a program to display sound - * graphically, by Paul Francis Harrison <pfh@yoyo.cc.monash.edu.au> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ -#ifndef _SYNAESCOPE_H -#define _SYNAESCOPE_H - -#include <glib.h> - -/* FIXME: we should set this automatically based on resy - * see synaescope.c::synaesthesia_resize() - */ -#define FFT_BUFFER_SIZE_LOG 10 -#define FFT_BUFFER_SIZE (1 << FFT_BUFFER_SIZE_LOG) - -typedef struct syn_instance syn_instance; - -void synaesthesia_init (void); -syn_instance *synaesthesia_new (guint resx, guint resy); -void synaesthesia_close (syn_instance * si); - -gboolean synaesthesia_resize (syn_instance * si, guint resx, guint resy); -guint32 *synaesthesia_update (syn_instance * si, - gint16 data[2][FFT_BUFFER_SIZE]); - -#endif diff --git a/gst/xingmux/Makefile.in b/gst/xingmux/Makefile.in index c19e171..d6bd8e6 100644 --- a/gst/xingmux/Makefile.in +++ b/gst/xingmux/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11.5 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -235,7 +235,9 @@ GIO_LDFLAGS = @GIO_LDFLAGS@ GIO_LIBS = @GIO_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GLIB_PREFIX = @GLIB_PREFIX@ GLIB_REQ = @GLIB_REQ@ GMSGFMT = @GMSGFMT@ |