~ubuntu-branches/debian/sid/v4l-utils/sid

« back to all changes in this revision

Viewing changes to lib/libv4l1/libv4l1-priv.h

  • Committer: Bazaar Package Importer
  • Author(s): Gregor Jasny
  • Date: 2010-05-07 20:48:34 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100507204834-ga01cxhz3fekk47r
Tags: 0.8.0-1
* New upstream version
* Switch to 3.0 (quilt) source format
* Re-enable pristine-tar
* Split utils package into command line and the Qt based qv4l2
  (Closes: #576422)
* Update upstream URL

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
extern FILE *v4l1_log_file;
32
32
 
33
 
#define V4L1_LOG_ERR(...) \
34
 
  do { \
35
 
    if (v4l1_log_file) { \
36
 
      fprintf(v4l1_log_file, "libv4l1: error " __VA_ARGS__); \
37
 
      fflush(v4l1_log_file); \
38
 
    } else \
39
 
      fprintf(stderr, "libv4l1: error " __VA_ARGS__); \
40
 
  } while(0)
41
 
 
42
 
#define V4L1_LOG_WARN(...) \
43
 
  do { \
44
 
    if (v4l1_log_file) { \
45
 
      fprintf(v4l1_log_file, "libv4l1: warning " __VA_ARGS__); \
46
 
      fflush(v4l1_log_file); \
47
 
    } else \
48
 
      fprintf(stderr, "libv4l1: warning " __VA_ARGS__); \
49
 
  } while(0)
50
 
 
51
 
#define V4L1_LOG(...) \
52
 
  do { \
53
 
    if (v4l1_log_file) { \
54
 
      fprintf(v4l1_log_file, "libv4l1: " __VA_ARGS__); \
55
 
      fflush(v4l1_log_file); \
56
 
    } \
57
 
  } while(0)
 
33
#define V4L1_LOG_ERR(...)                       \
 
34
        do {                                    \
 
35
                if (v4l1_log_file) {            \
 
36
                        fprintf(v4l1_log_file, "libv4l1: error " __VA_ARGS__); \
 
37
                        fflush(v4l1_log_file);  \
 
38
                } else                          \
 
39
                fprintf(stderr, "libv4l1: error " __VA_ARGS__); \
 
40
        } while (0)
 
41
 
 
42
#define V4L1_LOG_WARN(...)                      \
 
43
        do {                                    \
 
44
                if (v4l1_log_file) {            \
 
45
                        fprintf(v4l1_log_file, "libv4l1: warning " __VA_ARGS__); \
 
46
                        fflush(v4l1_log_file);  \
 
47
                } else                          \
 
48
                fprintf(stderr, "libv4l1: warning " __VA_ARGS__); \
 
49
        } while (0)
 
50
 
 
51
#define V4L1_LOG(...)                           \
 
52
        do {                                    \
 
53
                if (v4l1_log_file) {            \
 
54
                        fprintf(v4l1_log_file, "libv4l1: " __VA_ARGS__); \
 
55
                        fflush(v4l1_log_file);  \
 
56
                }                               \
 
57
        } while (0)
58
58
 
59
59
struct v4l1_dev_info {
60
 
  int fd;
61
 
  int flags;
62
 
  int open_count;
63
 
  int v4l1_frame_buf_map_count;
64
 
  pthread_mutex_t stream_lock;
65
 
  unsigned int depth;
66
 
  unsigned int v4l1_pal;    /* VIDEO_PALETTE */
67
 
  unsigned int v4l2_pixfmt; /* V4L2_PIX_FMT */
68
 
  unsigned int min_width, min_height, max_width, max_height;
69
 
  unsigned int width, height;
70
 
  unsigned char *v4l1_frame_pointer;
 
60
        int fd;
 
61
        int flags;
 
62
        int open_count;
 
63
        int v4l1_frame_buf_map_count;
 
64
        pthread_mutex_t stream_lock;
 
65
        unsigned int depth;
 
66
        unsigned int v4l1_pal;    /* VIDEO_PALETTE */
 
67
        unsigned int v4l2_pixfmt; /* V4L2_PIX_FMT */
 
68
        unsigned int min_width, min_height, max_width, max_height;
 
69
        unsigned int width, height;
 
70
        unsigned char *v4l1_frame_pointer;
71
71
};
72
72
 
73
73
/* From log.c */