* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <vlc_filter.h>
#include <vlc_arrays.h>
+#include <libvlc.h>
struct filter_chain_t
{
const es_format_t *p_fmt_in,
const es_format_t *p_fmt_out )
{
+ static const char typename[] = "filter";
filter_t *p_filter =
- vlc_object_create( p_chain->p_this, VLC_OBJECT_FILTER );
+ vlc_custom_create( p_chain->p_this, sizeof(filter_t),
+ VLC_OBJECT_GENERIC, typename );
if( !p_filter ) return NULL;
vlc_object_attach( p_filter, p_chain->p_this );
vlc_array_append( &p_chain->filters, p_filter );
msg_Dbg( p_chain->p_this, "Filter '%s' (%p) appended to chain",
- psz_name, p_filter );
+ psz_name?:p_filter->psz_object_name, p_filter );
return p_filter;
error:
- msg_Err( p_chain->p_this, "Failed to create video filter '%s'",
- psz_name );
+ if( psz_name )
+ msg_Err( p_chain->p_this, "Failed to create video filter '%s'",
+ psz_name );
+ else
+ msg_Err( p_chain->p_this, "Failed to create video filter" );
if( p_filter->p_module ) module_Unneed( p_filter,
p_filter->p_module );
es_format_Clean( &p_filter->fmt_in );