mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
Fix typefinding for BBB's new system
Original commit message from CVS: Fix typefinding for BBB's new system
This commit is contained in:
parent
01f9797a3b
commit
14d73ce3e7
1 changed files with 9 additions and 3 deletions
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <gst/gstbytestream.h>
|
||||||
|
|
||||||
#include "gstsiddec.h"
|
#include "gstsiddec.h"
|
||||||
|
|
||||||
/* elementfactory information */
|
/* elementfactory information */
|
||||||
|
@ -33,7 +35,7 @@ static GstElementDetails gst_siddec_details = {
|
||||||
"(C) 2001",
|
"(C) 2001",
|
||||||
};
|
};
|
||||||
|
|
||||||
static GstCaps* sid_typefind (GstBuffer *buf, gpointer priv);
|
static GstCaps* sid_typefind (GstByteStream *bs, gpointer priv);
|
||||||
|
|
||||||
/* typefactory for 'sid' */
|
/* typefactory for 'sid' */
|
||||||
static GstTypeDefinition siddefinition = {
|
static GstTypeDefinition siddefinition = {
|
||||||
|
@ -184,13 +186,17 @@ gst_siddec_get_type (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstCaps*
|
static GstCaps*
|
||||||
sid_typefind (GstBuffer *buf, gpointer priv)
|
sid_typefind (GstByteStream *bs, gpointer priv)
|
||||||
{
|
{
|
||||||
guchar *data = GST_BUFFER_DATA (buf);
|
guchar *data;
|
||||||
|
GstBuffer *buffer;
|
||||||
GstCaps *newcaps;
|
GstCaps *newcaps;
|
||||||
|
|
||||||
GST_DEBUG ("sid_demux: typefind");
|
GST_DEBUG ("sid_demux: typefind");
|
||||||
|
|
||||||
|
gst_bytestream_peek (bs, &buffer, 4);
|
||||||
|
data = GST_BUFFER_DATA (buffer);
|
||||||
|
|
||||||
if (strncmp ((const char *)data, "PSID", 4))
|
if (strncmp ((const char *)data, "PSID", 4))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue