+/** Get a statistics counter structure. This allows for low-level modifications
+ * \param p_this a parent object
+ * \param i_object_id the object from which to retrieve data
+ * \param psz_name the name
+ * \return the counter, or NULL if not found (or handler not created yet)
+ */
+counter_t *__stats_CounterGet( vlc_object_t *p_this, int i_object_id,
+ char *psz_name )
+{
+ counter_t *p_counter;
+
+ /* Get stats handler singleton */
+ stats_handler_t *p_handler = stats_HandlerGet( p_this );
+ if( !p_handler ) return NULL;
+
+ vlc_mutex_lock( &p_handler->object_lock );
+
+ /* Look for existing element */
+ p_counter = GetCounter( p_handler, p_this->i_object_id,
+ psz_name );
+ vlc_mutex_unlock( &p_handler->object_lock );
+ vlc_object_release( p_handler );
+
+ return p_counter;
+}
+
+