unicap_private.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 __UNICAP_PRIVATE_H__
  17. #define __UNICAP_PRIVATE_H__
  18. #include <unicap.h>
  19. #include <unicap_cpi.h>
  20. #include <sys/types.h>
  21. #include <sys/time.h>
  22. #include <time.h>
  23. #define SHM_REG_VERSION 1
  24. struct _unicap_callback_info
  25. {
  26. unicap_callback_t func;
  27. void *user_ptr;
  28. } unicap_callback_info;
  29. struct _unicap_shm_reg
  30. {
  31. int shm_reg_version;
  32. char device_identifier[128];
  33. int use_count;
  34. pid_t stream_owner;
  35. pid_t properties_owner;
  36. } unicap_shm_reg;
  37. struct _unicap_handle
  38. {
  39.       unicap_device_t device;      
  40.       struct _unicap_cpi cpi;
  41.       void *dlhandle;
  42.       void *cpi_data;
  43.       
  44.       unsigned int cpi_flags;
  45.       
  46.       key_t sem_key;
  47.       int   sem_id;
  48.       
  49.       int stream_sem_id;
  50.       int property_sem_id;
  51.       int * ref_count;
  52. /*  struct _unicap_shm_reg *shm_mmap;  */
  53. /*  int shm_fd; */
  54. /*  key_t shm_sem_key; */
  55. /*  int shm_sem_id; */
  56.       int have_stream_lock;
  57.       int temporary_stream_lock;
  58.       int have_ppty_lock;
  59.       int stream_lock_fd;
  60.       int ppty_lock_fd;
  61.       char device_uid[512];
  62.       struct _unicap_callback_info *cb_info;
  63. } unicap_handle;
  64. unicap_status_t unicap_real_enumerate_devices( int *count );
  65. #endif //__UNICAP_PRIVATE_H__