Logo Search packages:      
Sourcecode: zebra version File versions  Download package

void zebra_video_destroy ( zebra_video_t video  ) 

destructor.

Definition at line 91 of file video.c.

References zebra_video_destroy(), and zebra_video_open().

Referenced by zebra_processor_destroy(), zebra_processor_init(), zebra_video_create(), and zebra_video_destroy().

{
    if(vdo->fd >= 0)
        zebra_video_open(vdo, NULL);
    if(vdo->images) {
        int i;
        for(i = 0; i < ZEBRA_VIDEO_IMAGES_MAX; i++)
            if(vdo->images[i])
                free(vdo->images[i]);
        free(vdo->images);
    }
    while(vdo->shadow_image) {
        zebra_image_t *img = vdo->shadow_image;
        vdo->shadow_image = img->next;
        free((void*)img->data);
        img->data = NULL;
        free(img);
    }
    if(vdo->buf)
        free(vdo->buf);
    if(vdo->formats)
        free(vdo->formats);
    err_cleanup(&vdo->err);
#ifdef HAVE_LIBPTHREAD
    pthread_mutex_destroy(&vdo->qlock);
#endif
    free(vdo);
}


Generated by  Doxygen 1.6.0   Back to index