diff options
Diffstat (limited to 'ext/flac/gstflac.c')
-rw-r--r-- | ext/flac/gstflac.c | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/ext/flac/gstflac.c b/ext/flac/gstflac.c index 7393ef89..b4e9ccec 100644 --- a/ext/flac/gstflac.c +++ b/ext/flac/gstflac.c @@ -26,8 +26,6 @@ extern GstElementDetails flacenc_details; extern GstElementDetails flacdec_details; -static GstCaps* flac_type_find (GstByteStream *bs, gpointer private); - GstPadTemplate *gst_flacdec_src_template, *gst_flacdec_sink_template; GstPadTemplate *gst_flacenc_src_template, *gst_flacenc_sink_template; @@ -61,45 +59,15 @@ raw_caps_factory (void) NULL)); } -static GstTypeDefinition flacdefinition = { - "flac_audio/x-flac", - "audio/x-flac", - ".flac", - flac_type_find, -}; - - -static GstCaps* -flac_type_find (GstByteStream *bs, gpointer private) -{ - GstBuffer *buf = NULL; - GstCaps *new = NULL; - - if (gst_bytestream_peek (bs, &buf, 4) == 4) { - guint32 head = GUINT32_FROM_BE (*((guint32 *) GST_BUFFER_DATA (buf))); - - if (head == 0x664C6143) { - new = GST_CAPS_NEW ("flac_type_find", - "application/x-flac", - NULL); - } - } - - if (buf != NULL) { - gst_buffer_unref (buf); - } - - return new; -} - - static gboolean plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *enc, *dec; - GstTypeFactory *type; GstCaps *raw_caps, *flac_caps; + if (!gst_library_load ("gstbytestream")) + return FALSE; + gst_plugin_set_longname (plugin, "The FLAC Lossless compressor Codec"); /* create an elementfactory for the flacenc element */ @@ -144,9 +112,6 @@ plugin_init (GModule *module, GstPlugin *plugin) gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (dec)); - type = gst_type_factory_new (&flacdefinition); - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type)); - return TRUE; } |