gst/typefind/gsttypefindfunctions.c: Add typefinding for mpeg2 pes streams
Original commit message from CVS: 2004-12-14 Zaheer Abbas Merali <zaheerabbas at merali dot org> * gst/typefind/gsttypefindfunctions.c: (mpeg2_sys_type_find): Add typefinding for mpeg2 pes streams
This commit is contained in:
parent
13dfcfb88f
commit
f5ef30edd4
@ -1,3 +1,8 @@
|
|||||||
|
2004-12-14 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||||
|
|
||||||
|
* gst/typefind/gsttypefindfunctions.c: (mpeg2_sys_type_find):
|
||||||
|
Add typefinding for mpeg2 pes streams
|
||||||
|
|
||||||
2004-12-13 David Schleef <ds@schleef.org>
|
2004-12-13 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
* configure.ac: Applied patch from bug #143659, making default
|
* configure.ac: Applied patch from bug #143659, making default
|
||||||
|
2
common
2
common
@ -1 +1 @@
|
|||||||
Subproject commit 8404d8841f5fd58fe31de09090867115e97c5261
|
Subproject commit b2638c100721f67b280c3b43b21f1ce1c9b5e316
|
@ -544,6 +544,13 @@ static GstStaticCaps mpeg_sys_caps = GST_STATIC_CAPS ("video/mpeg, "
|
|||||||
(((guint8 *)data)[1] == 0x00) && \
|
(((guint8 *)data)[1] == 0x00) && \
|
||||||
(((guint8 *)data)[2] == 0x01) && \
|
(((guint8 *)data)[2] == 0x01) && \
|
||||||
((((guint8 *)data)[3] & 0x80) == 0x80))
|
((((guint8 *)data)[3] & 0x80) == 0x80))
|
||||||
|
#define IS_MPEG_PES_HEADER(data) ((((guint8 *)data)[0] == 0x00) && \
|
||||||
|
(((guint8 *)data)[1] == 0x00) && \
|
||||||
|
(((guint8 *)data)[2] == 0x01) && \
|
||||||
|
((((guint8 *)data)[3] == 0xE0) || \
|
||||||
|
(((guint8 *)data)[3] == 0xC0) || \
|
||||||
|
(((guint8 *)data)[3] == 0xBD)))
|
||||||
|
|
||||||
static void
|
static void
|
||||||
mpeg2_sys_type_find (GstTypeFind * tf, gpointer unused)
|
mpeg2_sys_type_find (GstTypeFind * tf, gpointer unused)
|
||||||
{
|
{
|
||||||
@ -565,7 +572,15 @@ mpeg2_sys_type_find (GstTypeFind * tf, gpointer unused)
|
|||||||
gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, caps);
|
gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, caps);
|
||||||
gst_caps_free (caps);
|
gst_caps_free (caps);
|
||||||
}
|
}
|
||||||
|
} else if (data && IS_MPEG_PES_HEADER (data)) {
|
||||||
|
/* PES stream */
|
||||||
|
GstCaps *caps = gst_caps_copy (MPEG_SYS_CAPS);
|
||||||
|
|
||||||
|
gst_structure_set (gst_caps_get_structure (caps, 0), "mpegversion",
|
||||||
|
G_TYPE_INT, 2, 0);
|
||||||
|
gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ATTANTION: ugly return value:
|
/* ATTANTION: ugly return value:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user