queue.h
Upload User: shyika
Upload Date: 2017-11-25
Package Size: 1227k
Code Size: 2k
Category:

Video Capture

Development Platform:

Unix_Linux

  1. /*
  2.     unicap
  3.     Copyright (C) 2004  Arne Caspari
  4.     This program is free software; you can redistribute it and/or modify
  5.     it under the terms of the GNU General Public License as published by
  6.     the Free Software Foundation; either version 2 of the License, or
  7.     (at your option) any later version.
  8.     This program is distributed in the hope that it will be useful,
  9.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.     GNU General Public License for more details.
  12.     You should have received a copy of the GNU General Public License
  13.     along with this program; if not, write to the Free Software
  14.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  15. */
  16. #ifndef __QUEUE_H__
  17. #define __QUEUE_H__
  18. #include <sys/time.h>
  19. #include <semaphore.h>
  20. struct _unicap_queue
  21. {
  22.       sem_t sema;
  23.       sem_t *psema;
  24.       void * data;
  25.       struct _unicap_queue *next;
  26. } unicap_queue;
  27. typedef struct _unicap_queue unicap_queue_t;
  28. void __attribute__ ((visibility("hidden")))
  29.    _insert_back_queue( struct _unicap_queue *queue, struct _unicap_queue *entry );
  30. void __attribute__ ((visibility("hidden")))
  31.    _insert_front_queue( struct _unicap_queue *queue, struct _unicap_queue *entry );
  32. __attribute__ ((visibility("hidden"))) struct _unicap_queue * 
  33. _get_front_queue( struct _unicap_queue *queue );
  34. void __attribute__ ((visibility("hidden")))
  35. _move_to_queue( struct _unicap_queue *from_queue, struct _unicap_queue *to_queue );
  36. void __attribute__ ((visibility("hidden")))
  37. _init_queue( struct _unicap_queue *queue );
  38. int __attribute__ ((visibility("hidden")))
  39. _queue_get_size( struct _unicap_queue *queue );
  40. #endif//__QUEUE_H__