Ejemplo n.º 1
0
/** Deinitialize a producer
*/
int tdav_producer_audio_deinit(tdav_producer_audio_t* self)
{
	int ret;

	if(!self){
		TSK_DEBUG_ERROR("Invalid parameter");
		return -1;
	}

	/* base */
	if((ret = tmedia_producer_deinit(TMEDIA_PRODUCER(self)))){
		return ret;
	}

	return ret;
}
Ejemplo n.º 2
0
/* destructor */
static tsk_object_t* _tdav_producer_video_v4l2_dtor(tsk_object_t * self)
{
    tdav_producer_video_v4l2_t *p_v4l2 = (tdav_producer_video_v4l2_t *)self;
    if (p_v4l2) {
        /* stop */
        if (p_v4l2->b_started) {
            _tdav_producer_video_v4l2_stop((tmedia_producer_t*)p_v4l2);
        }

        /* deinit base */
        tmedia_producer_deinit(TMEDIA_PRODUCER(p_v4l2));
        /* deinit self */
        _v4l2_unprepare(p_v4l2);
        TSK_OBJECT_SAFE_FREE(p_v4l2->p_timer_mgr);
        tsk_safeobj_deinit(p_v4l2);

        V4L2_DEBUG_INFO("*** destroyed ***");
    }

    return self;
}