*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/**
#include "vlc_vod.h"
#include "vlc_tls.h"
#include "vlc_xml.h"
+#include "vlc_osd.h"
/*****************************************************************************
* Local prototypes
void * __vlc_object_create( vlc_object_t *p_this, int i_type )
{
vlc_object_t * p_new;
- char * psz_type;
+ const char * psz_type;
size_t i_size;
switch( i_type )
break;
case VLC_OBJECT_DIALOGS:
i_size = sizeof(intf_thread_t);
- psz_type = "dialogs provider";
+ psz_type = "dialogs";
break;
case VLC_OBJECT_PLAYLIST:
i_size = sizeof(playlist_t);
break;
case VLC_OBJECT_SPU:
i_size = sizeof(spu_t);
- psz_type = "subpicture unit";
+ psz_type = "subpicture";
break;
case VLC_OBJECT_AOUT:
i_size = sizeof(aout_instance_t);
break;
case VLC_OBJECT_HTTPD:
i_size = sizeof( httpd_t );
- psz_type = "http daemon";
+ psz_type = "http server";
+ break;
+ case VLC_OBJECT_HTTPD_HOST:
+ i_size = sizeof( httpd_host_t );
+ psz_type = "http server";
break;
case VLC_OBJECT_VLM:
i_size = sizeof( vlm_t );
break;
case VLC_OBJECT_OPENGL:
i_size = sizeof( vout_thread_t );
- psz_type = "opengl provider";
+ psz_type = "opengl";
break;
case VLC_OBJECT_ANNOUNCE:
i_size = sizeof( announce_handler_t );
- psz_type = "announce handler";
+ psz_type = "announce";
+ break;
+ case VLC_OBJECT_OSDMENU:
+ i_size = sizeof( osd_menu_t );
+ psz_type = "osd menu";
+ break;
+ case VLC_OBJECT_STATS:
+ i_size = sizeof( stats_handler_t );
+ psz_type = "statistics";
break;
default:
- i_size = i_type > 0
- ? i_type > (int)sizeof(vlc_object_t)
- ? i_type : (int)sizeof(vlc_object_t)
- : (int)sizeof(vlc_object_t);
+ i_size = i_type > (int)sizeof(vlc_object_t)
+ ? i_type : (int)sizeof(vlc_object_t);
i_type = VLC_OBJECT_GENERIC;
psz_type = "generic";
break;
p_new->b_attached = VLC_FALSE;
p_new->b_force = VLC_FALSE;
+ p_new->psz_header = NULL;
+
+ p_new->i_flags = 0;
+ if( p_this->i_flags & OBJECT_FLAGS_NODBG )
+ p_new->i_flags |= OBJECT_FLAGS_NODBG;
+ if( p_this->i_flags & OBJECT_FLAGS_QUIET )
+ p_new->i_flags |= OBJECT_FLAGS_QUIET;
+ if( p_this->i_flags & OBJECT_FLAGS_NOINTERACT )
+ p_new->i_flags |= OBJECT_FLAGS_NOINTERACT;
+
p_new->i_vars = 0;
p_new->p_vars = (variable_t *)malloc( 16 * sizeof( variable_t ) );
/* Don't warn immediately ... 100ms seems OK */
if( i_delay == 2 )
{
- msg_Warn( p_this, "refcount is %i, delaying before deletion",
- p_this->i_refcount );
+ msg_Warn( p_this,
+ "refcount is %i, delaying before deletion (id=%d,type=%d)",
+ p_this->i_refcount, p_this->i_object_id,
+ p_this->i_object_type );
}
- else if( i_delay == 12 )
+ else if( i_delay == 10 )
{
- msg_Err( p_this, "refcount is %i, I have a bad feeling about this",
- p_this->i_refcount );
+ msg_Err( p_this,
+ "refcount is %i, delaying again (id=%d,type=%d)",
+ p_this->i_refcount, p_this->i_object_id,
+ p_this->i_object_type );
}
- else if( i_delay == 42 )
+ else if( i_delay == 20 )
{
- msg_Err( p_this, "we waited too long, cancelling destruction" );
+ msg_Err( p_this,
+ "waited too long, cancelling destruction (id=%d,type=%d)",
+ p_this->i_object_id, p_this->i_object_type );
return;
}
free( p_this->p_vars );
vlc_mutex_destroy( &p_this->var_lock );
+ if( p_this->psz_header ) free( p_this->psz_header );
+
if( p_this->i_object_type == VLC_OBJECT_ROOT )
{
/* We are the root object ... no need to lock. */