summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2b9048e)
raw | patch | inline | side by side (parent: 2b9048e)
author | Stefan Kost <ensonic@users.sf.net> | |
Mon, 21 Feb 2011 09:05:31 +0000 (11:05 +0200) | ||
committer | Stefan Kost <ensonic@users.sf.net> | |
Mon, 21 Feb 2011 09:05:31 +0000 (11:05 +0200) |
Index support cannot be disabled since commit
4bfb1fe70c6f0d5e29c17a8eeffb02f7fd083f11
in core, which removed the configure flags to disable index.
4bfb1fe70c6f0d5e29c17a8eeffb02f7fd083f11
in core, which removed the configure flags to disable index.
ext/mad/gstmad.c | patch | blob | history | |
ext/mad/gstmad.h | patch | blob | history | |
ext/mpeg2dec/gstmpeg2dec.c | patch | blob | history | |
ext/mpeg2dec/gstmpeg2dec.h | patch | blob | history |
diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c
index d6e4485d6a418a8a0739ea71eb974635e7d59691..35efbb5ad68a2eee7a7cce62558ccf3d95e488dd 100644 (file)
--- a/ext/mad/gstmad.c
+++ b/ext/mad/gstmad.c
static GstStateChangeReturn gst_mad_change_state (GstElement * element,
GstStateChange transition);
-#ifndef GST_DISABLE_INDEX
static void gst_mad_set_index (GstElement * element, GstIndex * index);
static GstIndex *gst_mad_get_index (GstElement * element);
-#endif
static GstTagList *gst_mad_id3_to_tag_list (const struct id3_tag *tag);
gobject_class->dispose = gst_mad_dispose;
gstelement_class->change_state = gst_mad_change_state;
-#ifndef GST_DISABLE_INDEX
gstelement_class->set_index = gst_mad_set_index;
gstelement_class->get_index = gst_mad_get_index;
-#endif
/* init properties */
/* currently, string representations are used, we might want to change that */
{
GstMad *mad = GST_MAD (object);
-#ifndef GST_DISABLE_INDEX
gst_mad_set_index (GST_ELEMENT (object), NULL);
-#endif
g_free (mad->tempbuffer);
mad->tempbuffer = NULL;
G_OBJECT_CLASS (parent_class)->dispose (object);
}
-#ifndef GST_DISABLE_INDEX
static void
gst_mad_set_index (GstElement * element, GstIndex * index)
{
return mad->index;
}
-#endif
static gboolean
gst_mad_convert_sink (GstPad * pad, GstFormat src_format, gint64 src_value,
return FALSE;
}
-#ifndef GST_DISABLE_INDEX
static gboolean
index_seek (GstMad * mad, GstPad * pad, GstEvent * event)
{
return FALSE;
}
-#endif
static gboolean
normal_seek (GstMad * mad, GstPad * pad, GstEvent * event)
/* the all-formats seek logic, ref the event, we need it later */
gst_event_ref (event);
if (!(res = gst_pad_push_event (mad->sinkpad, event))) {
-#ifndef GST_DISABLE_INDEX
if (mad->index)
res = index_seek (mad, pad, event);
else
-#endif
res = normal_seek (mad, pad, event);
}
gst_event_unref (event);
GST_SECOND, mad->rate) - time_offset;
}
-#ifndef GST_DISABLE_INDEX
if (mad->index) {
guint64 x_bytes = mad->base_byte_offset + mad->bytes_consumed;
GST_ASSOCIATION_FLAG_DELTA_UNIT,
GST_FORMAT_BYTES, x_bytes, GST_FORMAT_TIME, time_offset, NULL);
}
-#endif
if (mad->segment_start <= (time_offset ==
GST_CLOCK_TIME_NONE ? 0 : time_offset)) {
diff --git a/ext/mad/gstmad.h b/ext/mad/gstmad.h
index 63e1afa675133f7444b51f535cf0dcdcb0d5076a..3acc7e29d6602ec587eca3b0e6ecae9192267123 100644 (file)
--- a/ext/mad/gstmad.h
+++ b/ext/mad/gstmad.h
gint times_pending;
gboolean caps_set; /* used to keep track of whether to change/update caps */
-#ifndef GST_DISABLE_INDEX
GstIndex *index;
gint index_id;
-#endif
gboolean check_for_xing;
gboolean xing_found;
index a6efa14c6110f17a6724dad3057b303ee7d1389a..6766d92537882d5c8cfdcf8d89bb0253bbad9788 100644 (file)
static void gst_mpeg2dec_finalize (GObject * object);
static void gst_mpeg2dec_reset (GstMpeg2dec * mpeg2dec);
-#ifndef GST_DISABLE_INDEX
static void gst_mpeg2dec_set_index (GstElement * element, GstIndex * index);
static GstIndex *gst_mpeg2dec_get_index (GstElement * element);
-#endif
static gboolean gst_mpeg2dec_src_event (GstPad * pad, GstEvent * event);
static const GstQueryType *gst_mpeg2dec_get_src_query_types (GstPad * pad);
gobject_class->finalize = gst_mpeg2dec_finalize;
gstelement_class->change_state = gst_mpeg2dec_change_state;
-#ifndef GST_DISABLE_INDEX
gstelement_class->set_index = gst_mpeg2dec_set_index;
gstelement_class->get_index = gst_mpeg2dec_get_index;
-#endif
}
static void
GST_OBJECT_UNLOCK (mpeg2dec);
}
-#ifndef GST_DISABLE_INDEX
static void
gst_mpeg2dec_set_index (GstElement * element, GstIndex * index)
{
return (mpeg2dec->index) ? gst_object_ref (mpeg2dec->index) : NULL;
}
-#endif
static GstFlowReturn
gst_mpeg2dec_crop_buffer (GstMpeg2dec * dec, GstBuffer ** buf)
picture->nb_fields, GST_BUFFER_OFFSET (outbuf),
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)));
-#ifndef GST_DISABLE_INDEX
if (mpeg2dec->index) {
gst_index_add_association (mpeg2dec->index, mpeg2dec->index_id,
(key_frame ? GST_ASSOCIATION_FLAG_KEY_UNIT :
GST_FORMAT_BYTES, GST_BUFFER_OFFSET (outbuf),
GST_FORMAT_TIME, GST_BUFFER_TIMESTAMP (outbuf), 0);
}
-#endif
if (picture->flags & PIC_FLAG_SKIP)
goto skip;
break;
}
case GST_EVENT_EOS:
-#ifndef GST_DISABLE_INDEX
if (mpeg2dec->index && mpeg2dec->closed) {
gst_index_commit (mpeg2dec->index, mpeg2dec->index_id);
}
-#endif
ret = gst_pad_push_event (mpeg2dec->srcpad, event);
break;
default:
}
#endif
-#ifndef GST_DISABLE_INDEX
static gboolean
index_seek (GstPad * pad, GstEvent * event)
{
}
return FALSE;
}
-#endif
static gboolean
normal_seek (GstPad * pad, GstEvent * event)
case GST_EVENT_SEEK:{
gst_event_ref (event);
if (!(res = gst_pad_push_event (mpeg2dec->sinkpad, event))) {
-#ifndef GST_DISABLE_INDEX
if (mpeg2dec->index)
res = index_seek (pad, event);
else
-#endif
res = normal_seek (pad, event);
}
gst_event_unref (event);
index 19c22f6ba6180a9a92c31f7df8fca4ff28f72e2c..43ba42d669922edf5e6838ce55ea52cf854a2dc2 100644 (file)
typedef struct _GstMpeg2dec GstMpeg2dec;
typedef struct _GstMpeg2decClass GstMpeg2decClass;
-typedef enum
+typedef enum
{
MPEG2DEC_DISC_NONE = 0,
MPEG2DEC_DISC_NEW_PICTURE,
gint v_offs;
guint8 *dummybuf[4];
-
+
guint64 offset;
gint fps_n;
gint fps_d;
gboolean need_sequence;
-#ifndef GST_DISABLE_INDEX
GstIndex *index;
gint index_id;
-#endif
-
+
gint error_count;
gboolean can_allocate_aligned;