Remove real plugin which is no longer needed and has never been ported

Decoders for these formats exist in gst-libav, if anyone
still has a need for them.
This commit is contained in:
Tim-Philipp Müller 2015-01-18 17:25:35 +00:00
parent e694bddf56
commit b5bd2a8855
9 changed files with 1 additions and 1998 deletions

View file

@ -414,7 +414,7 @@ GST_PLUGINS_NONPORTED=" cdxaparse \
dccp faceoverlay \
hdvparse \
mve nuvdemux \
patchdetect real \
patchdetect \
sdi tta \
videomeasure \
linsys \
@ -476,7 +476,6 @@ AG_GST_CHECK_PLUGIN(patchdetect)
AG_GST_CHECK_PLUGIN(pcapparse)
AG_GST_CHECK_PLUGIN(pnm)
AG_GST_CHECK_PLUGIN(rawparse)
AG_GST_CHECK_PLUGIN(real)
AG_GST_CHECK_PLUGIN(removesilence)
AG_GST_CHECK_PLUGIN(rtp)
AG_GST_CHECK_PLUGIN(sdi)
@ -498,12 +497,6 @@ AG_GST_CHECK_PLUGIN(yadif)
dnl *** plug-ins to exclude ***
dnl real plugin only works on i386 and x86_64 for the time being.
if test "x$HAVE_CPU_I386" != "xyes" && test "x$HAVE_CPU_X86_64" != "xyes"; then
AC_MSG_WARN([Not building real plugin, only works on 32bit and 64bit x86 platforms])
AG_GST_DISABLE_PLUGIN(real)
fi
AC_CHECK_HEADER(AVFoundation/AVFoundation.h, HAVE_AVFOUNDATION="yes", HAVE_AVFOUNDATION="no", [-])
AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-])
AC_CHECK_HEADER(VideoToolbox/VideoToolbox.h, HAVE_VIDEOTOOLBOX="yes", HAVE_VIDEOTOOLBOX="no", [-])
@ -3206,7 +3199,6 @@ gst/patchdetect/Makefile
gst/pcapparse/Makefile
gst/pnm/Makefile
gst/rawparse/Makefile
gst/real/Makefile
gst/removesilence/Makefile
gst/rtp/Makefile
gst/sdi/Makefile

View file

@ -17378,206 +17378,6 @@
<DEFAULT>640</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealAudioDec::password</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Password</NICK>
<BLURB>Password.</BLURB>
<DEFAULT>"Ardubancel Quazanga"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealAudioDec::path-ra14-4</NAME>
<TYPE>gchararray</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Path to 14_4 driver</NICK>
<BLURB>Path to 14_4 driver.</BLURB>
<DEFAULT>"/usr/lib/win32/14_4.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealAudioDec::path-ra28-8</NAME>
<TYPE>gchararray</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Path to 28_8 driver</NICK>
<BLURB>Path to 28_8 driver.</BLURB>
<DEFAULT>"/usr/lib/win32/28_8.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealAudioDec::path-raatrk</NAME>
<TYPE>gchararray</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Path to atrk driver</NICK>
<BLURB>Path to atrk driver.</BLURB>
<DEFAULT>"/usr/lib/win32/atrk.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealAudioDec::path-racook</NAME>
<TYPE>gchararray</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Path to cook driver</NICK>
<BLURB>Path to cook driver.</BLURB>
<DEFAULT>"/usr/lib/win32/cook.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealAudioDec::path-rasipr</NAME>
<TYPE>gchararray</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Path to sipr driver</NICK>
<BLURB>Path to sipr driver.</BLURB>
<DEFAULT>"/usr/lib/win32/sipr.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealAudioDec::ra14-4-names</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Names of 14_4 driver</NICK>
<BLURB>Names of 14_4 driver.</BLURB>
<DEFAULT>"14_4.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealAudioDec::ra28-8-names</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Names of 28_8 driver</NICK>
<BLURB>Names of 28_8 driver.</BLURB>
<DEFAULT>"28_8.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealAudioDec::raatrk-names</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Names of atrk driver</NICK>
<BLURB>Names of atrk driver.</BLURB>
<DEFAULT>"atrc.so:atrc.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealAudioDec::racook-names</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Names of cook driver</NICK>
<BLURB>Names of cook driver.</BLURB>
<DEFAULT>"cook.so:cook.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealAudioDec::rasipr-names</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Names of sipr driver</NICK>
<BLURB>Names of sipr driver.</BLURB>
<DEFAULT>"sipr.so:sipr.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealAudioDec::real-codecs-path</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Path where to search for RealPlayer codecs</NICK>
<BLURB>Path where to search for RealPlayer codecs.</BLURB>
<DEFAULT>"/usr/lib64/win32:/usr/lib64/codecs:/usr/local/lib64/win32:/usr/local/lib64/codecs"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealVideoDec::path-rv20</NAME>
<TYPE>gchararray</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Path to rv20 driver</NICK>
<BLURB>Path to rv20 driver.</BLURB>
<DEFAULT>"/usr/lib/win32/drv2.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealVideoDec::path-rv30</NAME>
<TYPE>gchararray</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Path to rv30 driver</NICK>
<BLURB>Path to rv30 driver.</BLURB>
<DEFAULT>"/usr/lib/win32/drv3.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealVideoDec::path-rv40</NAME>
<TYPE>gchararray</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Path to rv40 driver</NICK>
<BLURB>Path to rv40 driver.</BLURB>
<DEFAULT>"/usr/lib/win32/drv4.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealVideoDec::real-codecs-path</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Path where to search for RealPlayer codecs</NICK>
<BLURB>Path where to search for RealPlayer codecs.</BLURB>
<DEFAULT>"/usr/lib64/win32:/usr/lib64/codecs:/usr/local/lib64/win32:/usr/local/lib64/codecs"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealVideoDec::rv20-names</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Names of rv20 driver</NICK>
<BLURB>Names of rv20 driver.</BLURB>
<DEFAULT>"drv2.so:drv2.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealVideoDec::rv30-names</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Names of rv30 driver</NICK>
<BLURB>Names of rv30 driver.</BLURB>
<DEFAULT>"drvc.so:drv3.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealVideoDec::rv40-names</NAME>
<TYPE>gchar*</TYPE>
<RANGE></RANGE>
<FLAGS>rw</FLAGS>
<NICK>Names of rv40 driver</NICK>
<BLURB>Names of rv40 driver.</BLURB>
<DEFAULT>"drvc.so:drv4.so.6.0"</DEFAULT>
</ARG>
<ARG>
<NAME>GstRealVideoDec::max-errors</NAME>
<TYPE>gint</TYPE>
<RANGE>>= 0</RANGE>
<FLAGS>rw</FLAGS>
<NICK>Max errors</NICK>
<BLURB>Maximum number of consecutive errors (0 = unlimited).</BLURB>
<DEFAULT>25</DEFAULT>
</ARG>
<ARG>
<NAME>GstOSXVideoSink::embed</NAME>
<TYPE>gboolean</TYPE>

View file

@ -1,21 +0,0 @@
plugin_LTLIBRARIES = libgstreal.la
libgstreal_la_SOURCES = \
gstrealvideodec.c \
gstrealaudiodec.c \
gstreal.c
libgstreal_la_CFLAGS = \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_CFLAGS)
libgstreal_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) -lgstaudio-@GST_API_VERSION@ \
$(GST_BASE_LIBS)
libgstreal_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstreal_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
noinst_HEADERS = \
gstreal.h \
gstrealvideodec.h \
gstrealaudiodec.h

View file

@ -1,47 +0,0 @@
/* Real wrapper plugin
*
* Copyright (C) Edward Hervey <bilboed@bilboed.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstreal.h"
#include "gstrealvideodec.h"
#include "gstrealaudiodec.h"
static gboolean
plugin_init (GstPlugin * p)
{
if (!gst_element_register (p, "realvideodec", GST_RANK_MARGINAL,
GST_TYPE_REAL_VIDEO_DEC))
return FALSE;
if (!gst_element_register (p, "realaudiodec", GST_RANK_MARGINAL,
GST_TYPE_REAL_AUDIO_DEC))
return FALSE;
gst_plugin_add_dependency_simple (p, NULL, DEFAULT_REAL_CODECS_PATH, NULL,
GST_PLUGIN_DEPENDENCY_FLAG_NONE);
return TRUE;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, real,
"Decode REAL streams",
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)

View file

@ -1,35 +0,0 @@
/* GStreamer
*
* Copyright (C) 2007 Hans de Goede <j.w.r.degoede@hhs.nl>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_REAL_H__
#define __GST_REAL_H__
#ifdef HAVE_CPU_I386
#define DEFAULT_REAL_CODECS_PATH \
"/usr/lib/win32:/usr/lib/codecs:/usr/local/RealPlayer/codecs:" \
"/usr/local/lib/win32:/usr/local/lib/codecs"
#endif
#ifdef HAVE_CPU_X86_64
#define DEFAULT_REAL_CODECS_PATH \
"/usr/lib64/win32:/usr/lib64/codecs:" \
"/usr/local/lib64/win32:/usr/local/lib64/codecs"
#endif
#endif /* __GST_REAL_H__ */

View file

@ -1,768 +0,0 @@
/* RealAudio wrapper plugin
*
* Copyright (C) 2006 Lutz Mueller <lutz@topfrose.de>
* Copyright (C) 2006 Edward Hervey <bilboed@bilboed.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstreal.h"
#include "gstrealaudiodec.h"
#include <string.h>
GST_DEBUG_CATEGORY_STATIC (real_audio_dec_debug);
#define GST_CAT_DEFAULT real_audio_dec_debug
static GstStaticPadTemplate snk_t =
GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-pn-realaudio, "
"raversion = { 3, 4, 5, 6, 8 }; " "audio/x-sipro "));
static GstStaticPadTemplate src_t =
GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, "
"width = (int) [ 1, MAX ], "
"depth = (int) [ 1, MAX ], "
"rate = (int) [ 1, MAX ], " "channels = (int) [ 1, MAX ]"));
#define DEFAULT_RACOOK_NAMES "cook.so:cook.so.6.0"
#define DEFAULT_RAATRK_NAMES "atrc.so:atrc.so.6.0"
#define DEFAULT_RA14_4_NAMES "14_4.so.6.0"
#define DEFAULT_RA28_8_NAMES "28_8.so.6.0"
#define DEFAULT_RASIPR_NAMES "sipr.so:sipr.so.6.0"
#define DEFAULT_PWD "Ardubancel Quazanga"
enum
{
PROP_0,
PROP_REAL_CODECS_PATH,
PROP_RACOOK_NAMES,
PROP_RAATRK_NAMES,
PROP_RA14_4_NAMES,
PROP_RA28_8_NAMES,
PROP_RASIPR_NAMES,
PROP_PASSWORD
};
typedef enum
{
GST_REAL_AUDIO_DEC_VERSION_ATRK = 3,
GST_REAL_AUDIO_DEC_VERSION_14_4 = 4,
GST_REAL_AUDIO_DEC_VERSION_28_8 = 5,
GST_REAL_AUDIO_DEC_VERSION_SIPR = 6,
GST_REAL_AUDIO_DEC_VERSION_COOK = 8
} GstRealAudioDecVersion;
typedef struct
{
/* Hooks */
GModule *module;
/* Used by the REAL library. */
gpointer context;
guint16 (*RADecode) (gpointer, guint8 *, guint32, guint8 *, guint32 *,
guint32);
guint16 (*RACloseCodec) (gpointer);
guint16 (*RAFreeDecoder) (gpointer);
guint16 (*RAInitDecoder) (gpointer, gpointer);
guint16 (*RAOpenCodec2) (gpointer, const gchar *);
guint16 (*RASetFlavor) (gpointer, guint16);
void (*SetDLLAccessPath) (gchar *);
void (*RASetPwd) (gpointer, const gchar *);
} GstRADecLibrary;
typedef struct
{
guint32 samplerate;
guint16 width;
guint16 channels;
guint16 quality;
guint32 leaf_size;
guint32 packet_size;
guint32 datalen;
gpointer data;
} RAInit;
struct _GstRealAudioDec
{
GstElement parent;
GstPad *src, *snk;
/* Caps */
guint width, height, leaf_size;
GstRADecLibrary lib;
/* Properties */
gboolean checked_modules;
gchar *real_codecs_path;
gchar *raatrk_names;
gboolean valid_atrk;
gchar *ra14_4_names;
gboolean valid_ra14_4;
gchar *ra28_8_names;
gboolean valid_ra28_8;
gchar *rasipr_names;
gboolean valid_sipr;
gchar *racook_names;
gboolean valid_cook;
gchar *pwd;
};
struct _GstRealAudioDecClass
{
GstElementClass parent_class;
};
GST_BOILERPLATE (GstRealAudioDec, gst_real_audio_dec, GstElement,
GST_TYPE_ELEMENT);
static GstFlowReturn
gst_real_audio_dec_chain (GstPad * pad, GstBuffer * in)
{
GstRealAudioDec *dec = GST_REAL_AUDIO_DEC (GST_PAD_PARENT (pad));
GstFlowReturn flow;
GstClockTime timestamp;
GstBuffer *out = NULL;
guint16 res = 0;
guint len;
if (G_UNLIKELY (dec->lib.RADecode == NULL || dec->lib.module == NULL))
goto not_negotiated;
timestamp = GST_BUFFER_TIMESTAMP (in);
flow = gst_pad_alloc_buffer (dec->src, GST_BUFFER_OFFSET_NONE,
dec->width * dec->leaf_size * dec->height * 16,
GST_PAD_CAPS (dec->src), &out);
if (flow != GST_FLOW_OK)
goto done;
res = dec->lib.RADecode (dec->lib.context, GST_BUFFER_DATA (in),
GST_BUFFER_SIZE (in), GST_BUFFER_DATA (out), &len, -1);
if (res != 0)
goto could_not_decode;
GST_BUFFER_SIZE (out) = len;
GST_BUFFER_TIMESTAMP (out) = timestamp;
flow = gst_pad_push (dec->src, out);
done:
gst_buffer_unref (in);
return flow;
/* Errors */
could_not_decode:
{
gst_buffer_unref (out);
GST_ELEMENT_ERROR (dec, STREAM, DECODE, (NULL),
("Could not decode buffer (%i).", res));
flow = GST_FLOW_ERROR;
goto done;
}
not_negotiated:
{
GST_WARNING_OBJECT (dec, "decoder not open, probably no input caps set "
"yet, caps on input buffer: %" GST_PTR_FORMAT, GST_BUFFER_CAPS (in));
flow = GST_FLOW_NOT_NEGOTIATED;
goto done;
}
}
static void
close_library (GstRealAudioDec * dec, GstRADecLibrary * lib)
{
if (lib->context) {
GST_LOG_OBJECT (dec, "closing library");
if (lib->RACloseCodec)
lib->RACloseCodec (lib->context);
/* lib->RAFreeDecoder (lib->context); */
}
if (lib->module) {
GST_LOG_OBJECT (dec, "closing library module");
g_module_close (lib->module);
}
memset (lib, 0, sizeof (GstRADecLibrary));
}
static gboolean
open_library (GstRealAudioDec * dec, gint version, GstRADecLibrary * lib)
{
const gchar *path, *names;
gchar **split_names, **split_path;
gint i, j;
gpointer ra_close_codec, ra_decode, ra_free_decoder;
gpointer ra_open_codec2, ra_init_decoder, ra_set_flavor;
gpointer set_dll_access_path = NULL, ra_set_pwd = NULL;
gchar *tmppath = NULL;
guint16 res = 0;
path = dec->real_codecs_path ? dec->real_codecs_path :
DEFAULT_REAL_CODECS_PATH;
switch (version) {
case GST_REAL_AUDIO_DEC_VERSION_COOK:
names = dec->racook_names ? dec->racook_names : DEFAULT_RACOOK_NAMES;
break;
case GST_REAL_AUDIO_DEC_VERSION_ATRK:
names = dec->raatrk_names ? dec->raatrk_names : DEFAULT_RAATRK_NAMES;
break;
case GST_REAL_AUDIO_DEC_VERSION_14_4:
names = dec->ra14_4_names ? dec->ra14_4_names : DEFAULT_RA14_4_NAMES;
break;
case GST_REAL_AUDIO_DEC_VERSION_28_8:
names = dec->ra28_8_names ? dec->ra28_8_names : DEFAULT_RA28_8_NAMES;
break;
case GST_REAL_AUDIO_DEC_VERSION_SIPR:
names = dec->rasipr_names ? dec->rasipr_names : DEFAULT_RASIPR_NAMES;
break;
default:
goto unknown_version;
}
GST_LOG_OBJECT (dec, "splitting paths %s, names %s", path, names);
split_path = g_strsplit (path, ":", 0);
split_names = g_strsplit (names, ":", 0);
for (i = 0; split_path[i]; i++) {
for (j = 0; split_names[j]; j++) {
gchar *codec = g_strconcat (split_path[i], "/", split_names[j], NULL);
GST_LOG_OBJECT (dec, "opening module %s", codec);
/* This is racy, but it doesn't matter here; would be nice if GModule
* gave us a GError instead of an error string, but it doesn't, so.. */
if (g_file_test (codec, G_FILE_TEST_EXISTS)) {
lib->module = g_module_open (codec, G_MODULE_BIND_LAZY);
if (lib->module == NULL) {
GST_ERROR_OBJECT (dec, "Could not open codec library '%s': %s",
codec, g_module_error ());
}
} else {
GST_DEBUG_OBJECT (dec, "%s does not exist", codec);
}
g_free (codec);
if (lib->module)
goto codec_search_done;
}
}
codec_search_done:
/* we keep the path for a while to set the dll access path */
g_strfreev (split_names);
if (lib->module == NULL)
goto could_not_open;
GST_LOG_OBJECT (dec, "finding symbols");
if (!g_module_symbol (lib->module, "RACloseCodec", &ra_close_codec) ||
!g_module_symbol (lib->module, "RADecode", &ra_decode) ||
!g_module_symbol (lib->module, "RAFreeDecoder", &ra_free_decoder) ||
!g_module_symbol (lib->module, "RAOpenCodec2", &ra_open_codec2) ||
!g_module_symbol (lib->module, "RAInitDecoder", &ra_init_decoder) ||
!g_module_symbol (lib->module, "RASetFlavor", &ra_set_flavor)) {
goto could_not_load;
}
g_module_symbol (lib->module, "RASetPwd", &ra_set_pwd);
g_module_symbol (lib->module, "SetDLLAccessPath", &set_dll_access_path);
lib->RACloseCodec = (guint16 (*)(gpointer)) ra_close_codec;
lib->RADecode =
(guint16 (*)(gpointer, guint8 *, guint32, guint8 *, guint32 *, guint32))
ra_decode;
lib->RAFreeDecoder = (guint16 (*)(gpointer)) ra_free_decoder;
lib->RAOpenCodec2 = (guint16 (*)(gpointer, const gchar *)) ra_open_codec2;
lib->RAInitDecoder = (guint16 (*)(gpointer, gpointer)) ra_init_decoder;
lib->RASetFlavor = (guint16 (*)(gpointer, guint16)) ra_set_flavor;
lib->RASetPwd = (void (*)(gpointer, const gchar *)) ra_set_pwd;
lib->SetDLLAccessPath = (void (*)(gchar *)) set_dll_access_path;
if (lib->SetDLLAccessPath)
lib->SetDLLAccessPath (split_path[i]);
tmppath = g_strdup_printf ("%s/", split_path[i]);
if ((res = lib->RAOpenCodec2 (&lib->context, tmppath))) {
g_free (tmppath);
goto could_not_initialize;
}
g_free (tmppath);
/* now we are done with the split paths, so free them */
g_strfreev (split_path);
return TRUE;
/* ERRORS */
unknown_version:
{
GST_DEBUG_OBJECT (dec, "Cannot handle version %i.", version);
return FALSE;
}
could_not_open:
{
g_strfreev (split_path);
GST_DEBUG_OBJECT (dec, "Could not find library '%s' in '%s'", names, path);
return FALSE;
}
could_not_load:
{
g_strfreev (split_path);
close_library (dec, lib);
GST_DEBUG_OBJECT (dec, "Could not load all symbols: %s", g_module_error ());
return FALSE;
}
could_not_initialize:
{
close_library (dec, lib);
GST_WARNING_OBJECT (dec, "Initialization of REAL driver failed (%i).", res);
return FALSE;
}
}
static void
gst_real_audio_dec_probe_modules (GstRealAudioDec * dec)
{
GstRADecLibrary dummy = { NULL };
if ((dec->valid_atrk =
open_library (dec, GST_REAL_AUDIO_DEC_VERSION_ATRK, &dummy)))
close_library (dec, &dummy);
if ((dec->valid_ra14_4 =
open_library (dec, GST_REAL_AUDIO_DEC_VERSION_14_4, &dummy)))
close_library (dec, &dummy);
if ((dec->valid_ra28_8 =
open_library (dec, GST_REAL_AUDIO_DEC_VERSION_28_8, &dummy)))
close_library (dec, &dummy);
#ifdef HAVE_CPU_X86_64
/* disabled because it does not seem to work on 64 bits */
dec->valid_sipr = FALSE;
#else
if ((dec->valid_sipr =
open_library (dec, GST_REAL_AUDIO_DEC_VERSION_SIPR, &dummy)))
close_library (dec, &dummy);
#endif
if ((dec->valid_cook =
open_library (dec, GST_REAL_AUDIO_DEC_VERSION_COOK, &dummy)))
close_library (dec, &dummy);
}
static GstCaps *
gst_real_audio_dec_getcaps (GstPad * pad)
{
GstRealAudioDec *dec = GST_REAL_AUDIO_DEC (GST_PAD_PARENT (pad));
GstCaps *res;
if (dec->checked_modules) {
GValue versions = { 0 };
GValue version = { 0 };
GST_LOG_OBJECT (dec, "constructing caps");
g_value_init (&versions, GST_TYPE_LIST);
g_value_init (&version, G_TYPE_INT);
if (dec->valid_atrk) {
g_value_set_int (&version, GST_REAL_AUDIO_DEC_VERSION_ATRK);
gst_value_list_append_value (&versions, &version);
}
if (dec->valid_ra14_4) {
g_value_set_int (&version, GST_REAL_AUDIO_DEC_VERSION_14_4);
gst_value_list_append_value (&versions, &version);
}
if (dec->valid_ra28_8) {
g_value_set_int (&version, GST_REAL_AUDIO_DEC_VERSION_28_8);
gst_value_list_append_value (&versions, &version);
}
if (dec->valid_sipr) {
g_value_set_int (&version, GST_REAL_AUDIO_DEC_VERSION_SIPR);
gst_value_list_append_value (&versions, &version);
}
if (dec->valid_cook) {
g_value_set_int (&version, GST_REAL_AUDIO_DEC_VERSION_COOK);
gst_value_list_append_value (&versions, &version);
}
if (gst_value_list_get_size (&versions) > 0) {
res = gst_caps_new_simple ("audio/x-pn-realaudio", NULL);
gst_structure_set_value (gst_caps_get_structure (res, 0),
"raversion", &versions);
} else {
res = gst_caps_new_empty ();
}
if (dec->valid_sipr) {
gst_caps_append (res, gst_caps_new_simple ("audio/x-sipro", NULL));
}
g_value_unset (&versions);
g_value_unset (&version);
} else {
GST_LOG_OBJECT (dec, "returning padtemplate caps");
res = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
}
GST_LOG_OBJECT (dec, "returning caps %" GST_PTR_FORMAT, res);
return res;
}
static gboolean
gst_real_audio_dec_setcaps (GstPad * pad, GstCaps * caps)
{
GstRealAudioDec *dec = GST_REAL_AUDIO_DEC (GST_PAD_PARENT (pad));
GstStructure *s = gst_caps_get_structure (caps, 0);
gint version, flavor, channels, rate, leaf_size, packet_size, width, height;
guint16 res = 0;
RAInit data;
gboolean bres;
const GValue *v;
GstBuffer *buf = NULL;
const gchar *name = gst_structure_get_name (s);
if (!strcmp (name, "audio/x-sipro")) {
version = GST_REAL_AUDIO_DEC_VERSION_SIPR;
} else {
if (!gst_structure_get_int (s, "raversion", &version))
goto missing_keys;
}
if (!gst_structure_get_int (s, "flavor", &flavor) ||
!gst_structure_get_int (s, "channels", &channels) ||
!gst_structure_get_int (s, "width", &width) ||
!gst_structure_get_int (s, "rate", &rate) ||
!gst_structure_get_int (s, "height", &height) ||
!gst_structure_get_int (s, "leaf_size", &leaf_size) ||
!gst_structure_get_int (s, "packet_size", &packet_size))
goto missing_keys;
if ((v = gst_structure_get_value (s, "codec_data")))
buf = g_value_peek_pointer (v);
GST_LOG_OBJECT (dec, "opening code for version %d", version);
/* first close existing decoder */
close_library (dec, &dec->lib);
if (!open_library (dec, version, &dec->lib))
goto could_not_open;
/* we have the module, no initialize with the caps data */
data.samplerate = rate;
data.width = width;
data.channels = channels;
data.quality = 100;
data.leaf_size = leaf_size;
data.packet_size = packet_size;
data.datalen = buf ? GST_BUFFER_SIZE (buf) : 0;
data.data = buf ? GST_BUFFER_DATA (buf) : NULL;
if ((res = dec->lib.RAInitDecoder (dec->lib.context, &data))) {
GST_WARNING_OBJECT (dec, "RAInitDecoder() failed");
goto could_not_initialize;
}
if (dec->lib.RASetPwd) {
dec->lib.RASetPwd (dec->lib.context, dec->pwd ? dec->pwd : DEFAULT_PWD);
}
if ((res = dec->lib.RASetFlavor (dec->lib.context, flavor))) {
GST_WARNING_OBJECT (dec, "RASetFlavor(%d) failed", flavor);
goto could_not_initialize;
}
caps = gst_caps_new_simple ("audio/x-raw-int",
"endianness", G_TYPE_INT, G_BYTE_ORDER,
"width", G_TYPE_INT, width,
"depth", G_TYPE_INT, width,
"rate", G_TYPE_INT, rate,
"channels", G_TYPE_INT, channels, "signed", G_TYPE_BOOLEAN, TRUE, NULL);
bres = gst_pad_set_caps (GST_PAD (dec->src), caps);
gst_caps_unref (caps);
if (!bres)
goto could_not_set_caps;
dec->width = width;
dec->height = height;
dec->leaf_size = leaf_size;
GST_LOG_OBJECT (dec, "opened module");
return TRUE;
missing_keys:
{
GST_DEBUG_OBJECT (dec, "Could not find all necessary keys in structure.");
return FALSE;
}
could_not_open:
{
GST_DEBUG_OBJECT (dec, "Could not find decoder");
return FALSE;
}
could_not_initialize:
{
close_library (dec, &dec->lib);
GST_WARNING_OBJECT (dec, "Initialization of REAL driver failed (%i).", res);
return FALSE;
}
could_not_set_caps:
{
/* should normally not fail */
close_library (dec, &dec->lib);
GST_DEBUG_OBJECT (dec, "Could not convince peer to accept caps.");
return FALSE;
}
}
static void
gst_real_audio_dec_init (GstRealAudioDec * dec, GstRealAudioDecClass * klass)
{
dec->snk = gst_pad_new_from_static_template (&snk_t, "sink");
gst_pad_set_setcaps_function (dec->snk,
GST_DEBUG_FUNCPTR (gst_real_audio_dec_setcaps));
gst_pad_set_getcaps_function (dec->snk,
GST_DEBUG_FUNCPTR (gst_real_audio_dec_getcaps));
gst_pad_set_chain_function (dec->snk,
GST_DEBUG_FUNCPTR (gst_real_audio_dec_chain));
gst_element_add_pad (GST_ELEMENT (dec), dec->snk);
dec->src = gst_pad_new_from_static_template (&src_t, "src");
gst_pad_use_fixed_caps (dec->src);
gst_element_add_pad (GST_ELEMENT (dec), dec->src);
}
static void
gst_real_audio_dec_base_init (gpointer g_class)
{
GstElementClass *ec = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (ec, gst_static_pad_template_get (&snk_t));
gst_element_class_add_pad_template (ec, gst_static_pad_template_get (&src_t));
gst_element_class_set_static_metadata (ec, "RealAudio decoder",
"Codec/Decoder/Audio", "Decoder for RealAudio streams",
"Lutz Mueller <lutz@topfrose.de>");
}
static GstStateChangeReturn
gst_real_audio_dec_change_state (GstElement * element,
GstStateChange transition)
{
GstStateChangeReturn ret;
GstRealAudioDec *dec = GST_REAL_AUDIO_DEC (element);
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
gst_real_audio_dec_probe_modules (dec);
dec->checked_modules = TRUE;
break;
default:
break;
}
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
close_library (dec, &dec->lib);
break;
case GST_STATE_CHANGE_READY_TO_NULL:
dec->checked_modules = FALSE;
break;
default:
break;
}
return ret;
}
static void
gst_real_audio_dec_finalize (GObject * object)
{
GstRealAudioDec *dec = GST_REAL_AUDIO_DEC (object);
close_library (dec, &dec->lib);
if (dec->real_codecs_path) {
g_free (dec->real_codecs_path);
dec->real_codecs_path = NULL;
}
if (dec->racook_names) {
g_free (dec->racook_names);
dec->racook_names = NULL;
}
if (dec->raatrk_names) {
g_free (dec->raatrk_names);
dec->raatrk_names = NULL;
}
if (dec->ra14_4_names) {
g_free (dec->ra14_4_names);
dec->ra14_4_names = NULL;
}
if (dec->ra28_8_names) {
g_free (dec->ra28_8_names);
dec->ra28_8_names = NULL;
}
if (dec->rasipr_names) {
g_free (dec->rasipr_names);
dec->rasipr_names = NULL;
}
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
gst_real_audio_dec_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstRealAudioDec *dec = GST_REAL_AUDIO_DEC (object);
switch (prop_id) {
case PROP_REAL_CODECS_PATH:
if (dec->real_codecs_path)
g_free (dec->real_codecs_path);
dec->real_codecs_path = g_value_dup_string (value);
break;
case PROP_RACOOK_NAMES:
if (dec->racook_names)
g_free (dec->racook_names);
dec->racook_names = g_value_dup_string (value);
break;
case PROP_RAATRK_NAMES:
if (dec->raatrk_names)
g_free (dec->raatrk_names);
dec->raatrk_names = g_value_dup_string (value);
break;
case PROP_RA14_4_NAMES:
if (dec->ra14_4_names)
g_free (dec->ra14_4_names);
dec->ra14_4_names = g_value_dup_string (value);
break;
case PROP_RA28_8_NAMES:
if (dec->ra28_8_names)
g_free (dec->ra28_8_names);
dec->ra28_8_names = g_value_dup_string (value);
break;
case PROP_RASIPR_NAMES:
if (dec->rasipr_names)
g_free (dec->rasipr_names);
dec->rasipr_names = g_value_dup_string (value);
break;
case PROP_PASSWORD:
if (dec->pwd)
g_free (dec->pwd);
dec->pwd = g_value_dup_string (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gst_real_audio_dec_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
{
GstRealAudioDec *dec = GST_REAL_AUDIO_DEC (object);
switch (prop_id) {
case PROP_REAL_CODECS_PATH:
g_value_set_string (value, dec->real_codecs_path ? dec->real_codecs_path
: DEFAULT_REAL_CODECS_PATH);
break;
case PROP_RACOOK_NAMES:
g_value_set_string (value, dec->racook_names ? dec->racook_names :
DEFAULT_RACOOK_NAMES);
break;
case PROP_RAATRK_NAMES:
g_value_set_string (value, dec->raatrk_names ? dec->raatrk_names :
DEFAULT_RAATRK_NAMES);
break;
case PROP_RA14_4_NAMES:
g_value_set_string (value, dec->ra14_4_names ? dec->ra14_4_names :
DEFAULT_RA14_4_NAMES);
break;
case PROP_RA28_8_NAMES:
g_value_set_string (value, dec->ra28_8_names ? dec->ra28_8_names :
DEFAULT_RA28_8_NAMES);
break;
case PROP_RASIPR_NAMES:
g_value_set_string (value, dec->rasipr_names ? dec->rasipr_names :
DEFAULT_RASIPR_NAMES);
break;
case PROP_PASSWORD:
g_value_set_string (value, dec->pwd ? dec->pwd : DEFAULT_PWD);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gst_real_audio_dec_class_init (GstRealAudioDecClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->set_property = gst_real_audio_dec_set_property;
object_class->get_property = gst_real_audio_dec_get_property;
object_class->finalize = gst_real_audio_dec_finalize;
element_class->change_state = gst_real_audio_dec_change_state;
g_object_class_install_property (object_class, PROP_REAL_CODECS_PATH,
g_param_spec_string ("real-codecs-path",
"Path where to search for RealPlayer codecs",
"Path where to search for RealPlayer codecs",
DEFAULT_REAL_CODECS_PATH,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_RACOOK_NAMES,
g_param_spec_string ("racook-names", "Names of cook driver",
"Names of cook driver", DEFAULT_RACOOK_NAMES,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_RAATRK_NAMES,
g_param_spec_string ("raatrk-names", "Names of atrk driver",
"Names of atrk driver", DEFAULT_RAATRK_NAMES,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_RA14_4_NAMES,
g_param_spec_string ("ra14-4-names", "Names of 14_4 driver",
"Names of 14_4 driver", DEFAULT_RA14_4_NAMES,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_RA28_8_NAMES,
g_param_spec_string ("ra28-8-names", "Names of 28_8 driver",
"Names of 28_8 driver", DEFAULT_RA28_8_NAMES,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_RASIPR_NAMES,
g_param_spec_string ("rasipr-names", "Names of sipr driver",
"Names of sipr driver", DEFAULT_RASIPR_NAMES,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_PASSWORD,
g_param_spec_string ("password", "Password", "Password",
DEFAULT_PWD, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
GST_DEBUG_CATEGORY_INIT (real_audio_dec_debug, "realaudiodec", 0,
"RealAudio decoder");
}

View file

@ -1,40 +0,0 @@
/* GStreamer
*
* Copyright (C) 2006 Lutz Mueller <lutz@topfrose.de>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_REAL_AUDIO_DEC_H__
#define __GST_REAL_AUDIO_DEC_H__
#include <gst/gst.h>
#include <gst/audio/audio.h>
G_BEGIN_DECLS
#define GST_TYPE_REAL_AUDIO_DEC (gst_real_audio_dec_get_type())
#define GST_REAL_AUDIO_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_REAL_AUDIO_DEC,GstRealAudioDec))
#define GST_REAL_AUDIO_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_REAL_AUDIO_DEC,GstRealAudioDecClass))
typedef struct _GstRealAudioDec GstRealAudioDec;
typedef struct _GstRealAudioDecClass GstRealAudioDecClass;
GType gst_real_audio_dec_get_type (void);
G_END_DECLS
#endif /* __GST_REAL_AUDIO_DEC_H__ */

View file

@ -1,774 +0,0 @@
/* RealVideo wrapper plugin
*
* Copyright (C) 2005 Lutz Mueller <lutz@topfrose.de>
* Copyright (C) 2006 Edward Hervey <bilboed@bilboed.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstreal.h"
#include "gstrealvideodec.h"
#include <string.h>
GST_DEBUG_CATEGORY_STATIC (realvideode_debug);
#define GST_CAT_DEFAULT realvideode_debug
static GstStaticPadTemplate snk_t =
GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-pn-realvideo, " "rmversion = (int) [ 2, 4 ]"));
static GstStaticPadTemplate src_t =
GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-raw-yuv, "
"format = (fourcc) I420, "
"framerate = (fraction) [0/1, MAX], "
"width = (int) [ 16, 4096 ], " "height = (int) [ 16, 4096 ] "));
#define DEFAULT_RV20_NAMES "drv2.so:drv2.so.6.0"
#define DEFAULT_RV30_NAMES "drvc.so:drv3.so.6.0"
#define DEFAULT_RV40_NAMES "drvc.so:drv4.so.6.0"
#define DEFAULT_MAX_ERRORS 25
enum
{
PROP_0,
PROP_REAL_CODECS_PATH,
PROP_RV20_NAMES,
PROP_RV30_NAMES,
PROP_RV40_NAMES,
PROP_MAX_ERRORS
};
GST_BOILERPLATE (GstRealVideoDec, gst_real_video_dec, GstElement,
GST_TYPE_ELEMENT);
static gboolean open_library (GstRealVideoDec * dec,
GstRealVideoDecVersion version, GstRVDecLibrary * lib);
static void close_library (GstRealVideoDec * dec, GstRVDecLibrary * lib);
typedef struct
{
guint32 datalen;
gint32 interpolate;
gint32 nfragments;
gpointer fragments;
guint32 flags;
guint32 timestamp;
} RVInData;
typedef struct
{
guint32 frames;
guint32 notes;
guint32 timestamp;
guint32 width;
guint32 height;
} RVOutData;
static GstFlowReturn
gst_real_video_dec_chain (GstPad * pad, GstBuffer * in)
{
GstRealVideoDec *dec;
guint8 *data;
guint size;
GstFlowReturn ret;
RVInData tin;
RVOutData tout;
GstClockTime timestamp, duration;
GstBuffer *out;
guint32 result;
guint frag_count, frag_size;
dec = GST_REAL_VIDEO_DEC (GST_PAD_PARENT (pad));
if (G_UNLIKELY (dec->lib.Transform == NULL || dec->lib.module == NULL))
goto not_negotiated;
data = GST_BUFFER_DATA (in);
size = GST_BUFFER_SIZE (in);
timestamp = GST_BUFFER_TIMESTAMP (in);
duration = GST_BUFFER_DURATION (in);
GST_DEBUG_OBJECT (dec, "got buffer of size %u, timestamp %" GST_TIME_FORMAT,
size, GST_TIME_ARGS (timestamp));
/* alloc output buffer */
ret = gst_pad_alloc_buffer (dec->src, GST_BUFFER_OFFSET_NONE,
dec->width * dec->height * 3 / 2, GST_PAD_CAPS (dec->src), &out);
if (ret != GST_FLOW_OK)
goto alloc_failed;
GST_BUFFER_TIMESTAMP (out) = timestamp;
GST_BUFFER_DURATION (out) = duration;
frag_count = *data++;
frag_size = (frag_count + 1) * 8;
size -= (frag_size + 1);
GST_DEBUG_OBJECT (dec, "frag_count %u, frag_size %u, data size %u",
frag_count, frag_size, size);
/* Decode.
*
* The Buffers contain
*
* 0 1 2 3
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | nfragments | fragment1 ... |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | .... |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | ... | fragment2 ... |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* ....
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | ... | fragment data |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
* nfragments: number of fragments
* fragmentN: 8 bytes of fragment data (nfragements + 1) of them
* fragment data: the data of the fragments.
*/
tin.datalen = size;
tin.interpolate = 0;
tin.nfragments = frag_count;
tin.fragments = data;
tin.flags = 0;
tin.timestamp = timestamp;
/* jump over the frag table to the fragments */
data += frag_size;
result = dec->lib.Transform (
(gchar *) data,
(gchar *) GST_BUFFER_DATA (out), &tin, &tout, dec->lib.context);
if (result)
goto could_not_transform;
/* When we decoded a frame, reset the error counter. We only fail after N
* consecutive decoding errors. */
dec->error_count = 0;
gst_buffer_unref (in);
/* Check for new dimensions */
if (tout.frames && ((dec->width != tout.width)
|| (dec->height != tout.height))) {
GstCaps *caps = gst_caps_copy (GST_PAD_CAPS (dec->src));
GstStructure *s = gst_caps_get_structure (caps, 0);
GST_DEBUG_OBJECT (dec, "New dimensions: %"
G_GUINT32_FORMAT " x %" G_GUINT32_FORMAT, tout.width, tout.height);
gst_structure_set (s, "width", G_TYPE_INT, (gint) tout.width,
"height", G_TYPE_INT, (gint) tout.height, NULL);
gst_pad_set_caps (dec->src, caps);
gst_buffer_set_caps (out, caps);
gst_caps_unref (caps);
dec->width = tout.width;
dec->height = tout.height;
GST_BUFFER_SIZE (out) = dec->width * dec->height * 3 / 2;
}
GST_DEBUG_OBJECT (dec,
"Pushing out buffer with timestamp %" GST_TIME_FORMAT,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (out)));
if ((ret = gst_pad_push (dec->src, out)) != GST_FLOW_OK)
goto could_not_push;
return ret;
/* Errors */
not_negotiated:
{
GST_WARNING_OBJECT (dec, "decoder not open, probably no input caps set "
"yet, caps on input buffer: %" GST_PTR_FORMAT, GST_BUFFER_CAPS (in));
gst_buffer_unref (in);
return GST_FLOW_NOT_NEGOTIATED;
}
alloc_failed:
{
GST_DEBUG_OBJECT (dec, "buffer alloc failed: %s", gst_flow_get_name (ret));
gst_buffer_unref (in);
return ret;
}
could_not_transform:
{
gst_buffer_unref (out);
gst_buffer_unref (in);
dec->error_count++;
if (dec->max_errors && dec->error_count >= dec->max_errors) {
GST_ELEMENT_ERROR (dec, STREAM, DECODE,
("Could not decode buffer: %" G_GUINT32_FORMAT, result), (NULL));
return GST_FLOW_ERROR;
} else {
GST_ELEMENT_WARNING (dec, STREAM, DECODE,
("Could not decode buffer: %" G_GUINT32_FORMAT, result), (NULL));
return GST_FLOW_OK;
}
}
could_not_push:
{
GST_DEBUG_OBJECT (dec, "Could not push buffer: %s",
gst_flow_get_name (ret));
return ret;
}
}
static GstCaps *
gst_real_video_dec_getcaps (GstPad * pad)
{
GstRealVideoDec *dec = GST_REAL_VIDEO_DEC (GST_PAD_PARENT (pad));
GstCaps *res;
if (dec->checked_modules) {
GValue versions = { 0 };
GValue version = { 0 };
GST_LOG_OBJECT (dec, "constructing caps");
g_value_init (&versions, GST_TYPE_LIST);
g_value_init (&version, G_TYPE_INT);
if (dec->valid_rv20) {
g_value_set_int (&version, GST_REAL_VIDEO_DEC_VERSION_2);
gst_value_list_append_value (&versions, &version);
}
if (dec->valid_rv30) {
g_value_set_int (&version, GST_REAL_VIDEO_DEC_VERSION_3);
gst_value_list_append_value (&versions, &version);
}
if (dec->valid_rv40) {
g_value_set_int (&version, GST_REAL_VIDEO_DEC_VERSION_4);
gst_value_list_append_value (&versions, &version);
}
if (gst_value_list_get_size (&versions) > 0) {
res = gst_caps_new_simple ("video/x-pn-realvideo", NULL);
gst_structure_set_value (gst_caps_get_structure (res, 0),
"rmversion", &versions);
} else {
res = gst_caps_new_empty ();
}
g_value_unset (&versions);
g_value_unset (&version);
} else {
GST_LOG_OBJECT (dec, "returning padtemplate caps");
res = gst_caps_copy (gst_pad_get_pad_template_caps (pad));
}
GST_LOG_OBJECT (dec, "returning caps %" GST_PTR_FORMAT, res);
return res;
}
static gboolean
gst_real_video_dec_setcaps (GstPad * pad, GstCaps * caps)
{
GstRealVideoDec *dec = GST_REAL_VIDEO_DEC (GST_PAD_PARENT (pad));
GstStructure *s = gst_caps_get_structure (caps, 0);
gint version, res, width, height, format, subformat;
gint framerate_num, framerate_denom;
gchar data[36];
gboolean bres;
const GValue *v;
if (!gst_structure_get_int (s, "rmversion", &version) ||
!gst_structure_get_int (s, "width", (gint *) & width) ||
!gst_structure_get_int (s, "height", (gint *) & height) ||
!gst_structure_get_int (s, "format", &format) ||
!gst_structure_get_int (s, "subformat", &subformat) ||
!gst_structure_get_fraction (s, "framerate", &framerate_num,
&framerate_denom))
goto missing_keys;
GST_LOG_OBJECT (dec, "Setting version to %d", version);
close_library (dec, &dec->lib);
if (!open_library (dec, version, &dec->lib))
goto open_failed;
/* Initialize REAL driver. */
GST_WRITE_UINT16_LE (data + 0, 11);
GST_WRITE_UINT16_LE (data + 2, width);
GST_WRITE_UINT16_LE (data + 4, height);
GST_WRITE_UINT16_LE (data + 6, 0);
GST_WRITE_UINT32_LE (data + 8, 0);
GST_WRITE_UINT32_LE (data + 12, subformat);
GST_WRITE_UINT32_LE (data + 16, 1);
GST_WRITE_UINT32_LE (data + 20, format);
if ((res = dec->lib.Init (&data, &dec->lib.context)))
goto could_not_initialize;
if ((v = gst_structure_get_value (s, "codec_data"))) {
GstBuffer *buf;
guint32 *msgdata;
guint i;
guint8 *bufdata;
guint bufsize;
struct
{
guint32 type;
guint32 msg;
gpointer data;
guint32 extra[6];
} msg;
buf = g_value_peek_pointer (v);
bufdata = GST_BUFFER_DATA (buf);
bufsize = GST_BUFFER_SIZE (buf);
/* skip format and subformat */
bufdata += 8;
bufsize -= 8;
GST_LOG_OBJECT (dec, "Creating custom message of length %d", bufsize);
msgdata = g_new0 (guint32, bufsize + 2);
if (!msgdata)
goto could_not_allocate;
msg.type = 0x24;
msg.msg = 1 + ((subformat >> 16) & 7);
msg.data = msgdata;
for (i = 0; i < 6; i++)
msg.extra[i] = 0;
msgdata[0] = width;
msgdata[1] = height;
for (i = 0; i < bufsize; i++)
msgdata[i + 2] = 4 * (guint32) bufdata[i];
res = dec->lib.Message (&msg, dec->lib.context);
g_free (msgdata);
if (res)
goto could_not_send_message;
}
caps = gst_caps_new_simple ("video/x-raw-yuv",
"format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I', '4', '2', '0'),
"framerate", GST_TYPE_FRACTION, framerate_num, framerate_denom,
"width", G_TYPE_INT, width, "height", G_TYPE_INT, height, NULL);
/* set PAR if one was specified in the sink caps */
if ((v = gst_structure_get_value (s, "pixel-aspect-ratio"))) {
gst_structure_set_value (gst_caps_get_structure (caps, 0),
"pixel-aspect-ratio", v);
}
bres = gst_pad_set_caps (GST_PAD (dec->src), caps);
gst_caps_unref (caps);
if (!bres)
goto could_not_set_caps;
dec->version = version;
dec->width = width;
dec->height = height;
dec->format = format;
dec->subformat = subformat;
dec->framerate_num = framerate_num;
dec->framerate_denom = framerate_denom;
return TRUE;
missing_keys:
{
GST_ERROR_OBJECT (dec, "Could not find all necessary keys in structure.");
return FALSE;
}
open_failed:
{
GST_ERROR_OBJECT (dec, "failed to open library");
return FALSE;
}
could_not_initialize:
{
GST_ERROR_OBJECT (dec, "Initialization of REAL driver failed (%i).", res);
close_library (dec, &dec->lib);
return FALSE;
}
could_not_allocate:
{
GST_ERROR_OBJECT (dec, "Could not allocate memory.");
close_library (dec, &dec->lib);
return FALSE;
}
could_not_send_message:
{
GST_ERROR_OBJECT (dec, "Failed to send custom message needed for "
"initialization (%i).", res);
close_library (dec, &dec->lib);
return FALSE;
}
could_not_set_caps:
{
GST_ERROR_OBJECT (dec, "Could not convince peer to accept dimensions "
"%i x %i.", dec->width, dec->height);
close_library (dec, &dec->lib);
return FALSE;
}
}
/* Attempts to open the correct library for the configured version */
static gboolean
open_library (GstRealVideoDec * dec, GstRealVideoDecVersion version,
GstRVDecLibrary * lib)
{
gpointer rv_custom_msg, rv_free, rv_init, rv_transform;
GModule *module = NULL;
const gchar *path, *names;
gchar **split_names, **split_path;
int i, j;
GST_DEBUG_OBJECT (dec,
"Attempting to open shared library for real video version %d", version);
path = dec->real_codecs_path ? dec->real_codecs_path :
DEFAULT_REAL_CODECS_PATH;
switch (version) {
case GST_REAL_VIDEO_DEC_VERSION_2:
names = dec->rv20_names ? dec->rv20_names : DEFAULT_RV20_NAMES;
break;
case GST_REAL_VIDEO_DEC_VERSION_3:
names = dec->rv30_names ? dec->rv30_names : DEFAULT_RV30_NAMES;
break;
case GST_REAL_VIDEO_DEC_VERSION_4:
names = dec->rv40_names ? dec->rv40_names : DEFAULT_RV40_NAMES;
break;
default:
goto unknown_version;
}
split_path = g_strsplit (path, ":", 0);
split_names = g_strsplit (names, ":", 0);
for (i = 0; split_path[i]; i++) {
for (j = 0; split_names[j]; j++) {
gchar *codec = g_strconcat (split_path[i], "/", split_names[j], NULL);
GST_DEBUG_OBJECT (dec, "trying %s", codec);
/* This is racy, but it doesn't matter here; would be nice if GModule
* gave us a GError instead of an error string, but it doesn't, so.. */
if (g_file_test (codec, G_FILE_TEST_EXISTS)) {
module = g_module_open (codec, G_MODULE_BIND_LAZY);
if (module == NULL) {
GST_ERROR_OBJECT (dec, "Could not open codec library '%s': %s",
codec, g_module_error ());
}
} else {
GST_LOG_OBJECT (dec, "%s does not exist", codec);
}
g_free (codec);
if (module)
goto codec_search_done;
}
}
codec_search_done:
g_strfreev (split_path);
g_strfreev (split_names);
if (module == NULL)
return FALSE;
GST_DEBUG_OBJECT (dec, "module opened, finding symbols");
/* First try opening legacy symbols, if that fails try loading new symbols */
if (g_module_symbol (module, "RV20toYUV420Init", &rv_init) &&
g_module_symbol (module, "RV20toYUV420Free", &rv_free) &&
g_module_symbol (module, "RV20toYUV420Transform", &rv_transform) &&
g_module_symbol (module, "RV20toYUV420CustomMessage", &rv_custom_msg)) {
GST_LOG_OBJECT (dec, "Loaded legacy symbols");
} else if (g_module_symbol (module, "RV40toYUV420Init", &rv_init) &&
g_module_symbol (module, "RV40toYUV420Free", &rv_free) &&
g_module_symbol (module, "RV40toYUV420Transform", &rv_transform) &&
g_module_symbol (module, "RV40toYUV420CustomMessage", &rv_custom_msg)) {
GST_LOG_OBJECT (dec, "Loaded new symbols");
} else {
goto could_not_load;
}
lib->Init = (guint32 (*)(gpointer, gpointer)) rv_init;
lib->Free = (guint32 (*)(gpointer)) rv_free;
lib->Transform = (guint32 (*)(gchar *, gchar *, gpointer, gpointer, gpointer))
rv_transform;
lib->Message = (guint32 (*)(gpointer, gpointer)) rv_custom_msg;
lib->module = module;
dec->error_count = 0;
return TRUE;
unknown_version:
{
GST_ERROR_OBJECT (dec, "Cannot handle version %i.", version);
return FALSE;
}
could_not_load:
{
close_library (dec, lib);
GST_ERROR_OBJECT (dec, "Could not load all symbols: %s", g_module_error ());
return FALSE;
}
}
static void
close_library (GstRealVideoDec * dec, GstRVDecLibrary * lib)
{
if (lib->context) {
GST_LOG_OBJECT (dec, "closing library");
if (lib->Free)
lib->Free (lib->context);
}
if (lib->module) {
GST_LOG_OBJECT (dec, "closing library module");
g_module_close (lib->module);
lib->module = NULL;
}
memset (lib, 0, sizeof (*lib));
}
static void
gst_real_video_dec_probe_modules (GstRealVideoDec * dec)
{
GstRVDecLibrary dummy = { NULL };
if ((dec->valid_rv20 =
open_library (dec, GST_REAL_VIDEO_DEC_VERSION_2, &dummy)))
close_library (dec, &dummy);
if ((dec->valid_rv30 =
open_library (dec, GST_REAL_VIDEO_DEC_VERSION_3, &dummy)))
close_library (dec, &dummy);
if ((dec->valid_rv40 =
open_library (dec, GST_REAL_VIDEO_DEC_VERSION_4, &dummy)))
close_library (dec, &dummy);
}
static GstStateChangeReturn
gst_real_video_dec_change_state (GstElement * element,
GstStateChange transition)
{
GstStateChangeReturn ret;
GstRealVideoDec *dec = GST_REAL_VIDEO_DEC (element);
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
gst_real_video_dec_probe_modules (dec);
dec->checked_modules = TRUE;
break;
default:
break;
}
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
close_library (dec, &dec->lib);
break;
case GST_STATE_CHANGE_READY_TO_NULL:
dec->checked_modules = FALSE;
break;
default:
break;
}
return ret;
}
static void
gst_real_video_dec_init (GstRealVideoDec * dec, GstRealVideoDecClass * klass)
{
dec->snk = gst_pad_new_from_static_template (&snk_t, "sink");
gst_pad_set_getcaps_function (dec->snk,
GST_DEBUG_FUNCPTR (gst_real_video_dec_getcaps));
gst_pad_set_setcaps_function (dec->snk,
GST_DEBUG_FUNCPTR (gst_real_video_dec_setcaps));
gst_pad_set_chain_function (dec->snk,
GST_DEBUG_FUNCPTR (gst_real_video_dec_chain));
gst_element_add_pad (GST_ELEMENT (dec), dec->snk);
dec->src = gst_pad_new_from_static_template (&src_t, "src");
gst_pad_use_fixed_caps (dec->src);
gst_element_add_pad (GST_ELEMENT (dec), dec->src);
dec->max_errors = DEFAULT_MAX_ERRORS;
dec->error_count = 0;
}
static void
gst_real_video_dec_base_init (gpointer g_class)
{
GstElementClass *ec = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (ec, gst_static_pad_template_get (&snk_t));
gst_element_class_add_pad_template (ec, gst_static_pad_template_get (&src_t));
gst_element_class_set_static_metadata (ec, "RealVideo decoder",
"Codec/Decoder/Video", "Decoder for RealVideo streams",
"Lutz Mueller <lutz@topfrose.de>");
}
static void
gst_real_video_dec_finalize (GObject * object)
{
GstRealVideoDec *dec = GST_REAL_VIDEO_DEC (object);
close_library (dec, &dec->lib);
if (dec->real_codecs_path) {
g_free (dec->real_codecs_path);
dec->real_codecs_path = NULL;
}
if (dec->rv20_names) {
g_free (dec->rv20_names);
dec->rv20_names = NULL;
}
if (dec->rv30_names) {
g_free (dec->rv30_names);
dec->rv30_names = NULL;
}
if (dec->rv40_names) {
g_free (dec->rv40_names);
dec->rv40_names = NULL;
}
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
gst_real_video_dec_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstRealVideoDec *dec = GST_REAL_VIDEO_DEC (object);
/* Changing the location of the .so supposes it's not being done
* in a state greater than READY !
*/
switch (prop_id) {
case PROP_REAL_CODECS_PATH:
if (dec->real_codecs_path)
g_free (dec->real_codecs_path);
dec->real_codecs_path = g_value_dup_string (value);
break;
case PROP_RV20_NAMES:
if (dec->rv20_names)
g_free (dec->rv20_names);
dec->rv20_names = g_value_dup_string (value);
break;
case PROP_RV30_NAMES:
if (dec->rv30_names)
g_free (dec->rv30_names);
dec->rv30_names = g_value_dup_string (value);
break;
case PROP_RV40_NAMES:
if (dec->rv40_names)
g_free (dec->rv40_names);
dec->rv40_names = g_value_dup_string (value);
break;
case PROP_MAX_ERRORS:
dec->max_errors = g_value_get_int (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gst_real_video_dec_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
{
GstRealVideoDec *dec = GST_REAL_VIDEO_DEC (object);
switch (prop_id) {
case PROP_REAL_CODECS_PATH:
g_value_set_string (value, dec->real_codecs_path ? dec->real_codecs_path
: DEFAULT_REAL_CODECS_PATH);
break;
case PROP_RV20_NAMES:
g_value_set_string (value, dec->rv20_names ? dec->rv20_names :
DEFAULT_RV20_NAMES);
break;
case PROP_RV30_NAMES:
g_value_set_string (value, dec->rv30_names ? dec->rv30_names :
DEFAULT_RV30_NAMES);
break;
case PROP_RV40_NAMES:
g_value_set_string (value, dec->rv40_names ? dec->rv40_names :
DEFAULT_RV40_NAMES);
break;
case PROP_MAX_ERRORS:
g_value_set_int (value, dec->max_errors);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gst_real_video_dec_class_init (GstRealVideoDecClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
object_class->set_property = gst_real_video_dec_set_property;
object_class->get_property = gst_real_video_dec_get_property;
object_class->finalize = gst_real_video_dec_finalize;
element_class->change_state = gst_real_video_dec_change_state;
g_object_class_install_property (object_class, PROP_REAL_CODECS_PATH,
g_param_spec_string ("real-codecs-path",
"Path where to search for RealPlayer codecs",
"Path where to search for RealPlayer codecs",
DEFAULT_REAL_CODECS_PATH,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_RV20_NAMES,
g_param_spec_string ("rv20-names", "Names of rv20 driver",
"Names of rv20 driver", DEFAULT_RV20_NAMES,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_RV30_NAMES,
g_param_spec_string ("rv30-names", "Names of rv30 driver",
"Names of rv30 driver", DEFAULT_RV30_NAMES,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_RV40_NAMES,
g_param_spec_string ("rv40-names", "Names of rv40 driver",
"Names of rv40 driver", DEFAULT_RV40_NAMES,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_MAX_ERRORS,
g_param_spec_int ("max-errors", "Max errors",
"Maximum number of consecutive errors (0 = unlimited)",
0, G_MAXINT, DEFAULT_MAX_ERRORS,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
GST_DEBUG_CATEGORY_INIT (realvideode_debug, "realvideodec", 0,
"RealVideo decoder");
}

View file

@ -1,104 +0,0 @@
/* GStreamer
*
* Copyright (C) 2006 Lutz Mueller <lutz@topfrose.de>
* Copyright (C) 2006 Edward Hervey <bilboed@bilbod.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_REAL_VIDEO_DEC_H__
#define __GST_REAL_VIDEO_DEC_H__
#include <gst/gst.h>
#include <gst/base/gstadapter.h>
G_BEGIN_DECLS
#define GST_TYPE_REAL_VIDEO_DEC (gst_real_video_dec_get_type())
#define GST_REAL_VIDEO_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_REAL_VIDEO_DEC,GstRealVideoDec))
#define GST_REAL_VIDEO_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_REAL_VIDEO_DEC,GstRealVideoDecClass))
typedef struct _GstRealVideoDec GstRealVideoDec;
typedef struct _GstRealVideoDecClass GstRealVideoDecClass;
typedef enum _GstRealVideoDecVersion GstRealVideoDecVersion;
enum _GstRealVideoDecVersion
{
GST_REAL_VIDEO_DEC_VERSION_2 = 2,
GST_REAL_VIDEO_DEC_VERSION_3 = 3,
GST_REAL_VIDEO_DEC_VERSION_4 = 4
};
typedef struct {
GModule *module;
gpointer context;
guint32 (*Init) (gpointer, gpointer);
guint32 (*Free) (gpointer);
guint32 (*Transform) (gchar *, gchar *, gpointer, gpointer, gpointer);
guint32 (*Message) (gpointer, gpointer);
/*
GstRealVideoDecMessageFunc custom_message;
GstRealVideoDecFreeFunc free;
GstRealVideoDecInitFunc init;
GstRealVideoDecTransformFunc transform;
*/
} GstRVDecLibrary;
struct _GstRealVideoDec
{
GstElement parent;
GstPad *src, *snk;
/* Caps */
GstRealVideoDecVersion version;
guint width, height;
gint format, subformat;
gint framerate_num, framerate_denom;
gint error_count;
/* Library functions */
GstRVDecLibrary lib;
/* Properties */
gchar *real_codecs_path;
gboolean checked_modules;
gchar *rv20_names;
gboolean valid_rv20;
gchar *rv30_names;
gboolean valid_rv30;
gchar *rv40_names;
gboolean valid_rv40;
gint max_errors;
};
struct _GstRealVideoDecClass
{
GstElementClass parent_class;
};
GType gst_real_video_dec_get_type (void);
G_END_DECLS
#endif /* __GST_REAL_VIDEO_DEC_H__ */