[BACK]Return to video.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / dev

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/dev/video.c between version 1.27 and 1.27.2.3

version 1.27, 2011/08/13 02:49:06 version 1.27.2.3, 2014/05/22 11:40:19
Line 205  dev_type_poll(videopoll);
Line 205  dev_type_poll(videopoll);
 dev_type_mmap(videommap);  dev_type_mmap(videommap);
   
 const struct cdevsw video_cdevsw = {  const struct cdevsw video_cdevsw = {
         videoopen, videoclose, videoread, videowrite, videoioctl,          .d_open = videoopen,
         nostop, notty, videopoll, videommap, nokqfilter, D_OTHER          .d_close = videoclose,
           .d_read = videoread,
           .d_write = videowrite,
           .d_ioctl = videoioctl,
           .d_stop = nostop,
           .d_tty = notty,
           .d_poll = videopoll,
           .d_mmap = videommap,
           .d_kqfilter = nokqfilter,
           .d_flag = D_OTHER
 };  };
   
 #define VIDEOUNIT(n)    (minor(n))  #define VIDEOUNIT(n)    (minor(n))
Line 315  static const char * video_ioctl_str(u_lo
Line 324  static const char * video_ioctl_str(u_lo
 static int  static int
 video_match(device_t parent, cfdata_t match, void *aux)  video_match(device_t parent, cfdata_t match, void *aux)
 {  {
   #ifdef VIDEO_DEBUG
         struct video_attach_args *args;          struct video_attach_args *args;
   
         args = aux;          args = aux;
         DPRINTF(("video_match: hw=%p\n", args->hw_if));          DPRINTF(("video_match: hw=%p\n", args->hw_if));
   #endif
         return 1;          return 1;
 }  }
   
Line 397  video_detach(device_t self, int flags)
Line 408  video_detach(device_t self, int flags)
 static int  static int
 video_print(void *aux, const char *pnp)  video_print(void *aux, const char *pnp)
 {  {
         struct video_attach_args *arg;  
   
         if (pnp != NULL) {          if (pnp != NULL) {
                 DPRINTF(("video_print: have pnp\n"));                  DPRINTF(("video_print: have pnp\n"));
                 arg = aux;  
                 aprint_normal("%s at %s\n", "video", pnp);                  aprint_normal("%s at %s\n", "video", pnp);
         } else {          } else {
                 DPRINTF(("video_print: pnp is NULL\n"));                  DPRINTF(("video_print: pnp is NULL\n"));
Line 1604  videoopen(dev_t dev, int flags, int ifmt
Line 1612  videoopen(dev_t dev, int flags, int ifmt
   
         sc = device_private(device_lookup(&video_cd, VIDEOUNIT(dev)));          sc = device_private(device_lookup(&video_cd, VIDEOUNIT(dev)));
         if (sc == NULL) {          if (sc == NULL) {
                 DPRINTF(("videoopen: failed to get softc\n"));                  DPRINTF(("videoopen: failed to get softc for unit %d\n",
                           VIDEOUNIT(dev)));
                 return ENXIO;                  return ENXIO;
         }          }
   
Line 2506  video_stream_dequeue(struct video_stream
Line 2515  video_stream_dequeue(struct video_stream
         }          }
 }  }
   
   static void
   v4l2buf_set_timestamp(struct v4l2_buffer *buf)
   {
   
           getmicrotime(&buf->timestamp);
   }
   
 /*  /*
  * write payload data to the appropriate video sample, possibly moving   * write payload data to the appropriate video sample, possibly moving
Line 2534  video_stream_write(struct video_stream *
Line 2549  video_stream_write(struct video_stream *
         } else if (payload->size > 0) {          } else if (payload->size > 0) {
                 vb = SIMPLEQ_FIRST(&vs->vs_ingress);                  vb = SIMPLEQ_FIRST(&vs->vs_ingress);
                 buf = vb->vb_buf;                  buf = vb->vb_buf;
                   if (!buf->bytesused)
                           v4l2buf_set_timestamp(buf);
                 if (payload->size > buf->length - buf->bytesused) {                  if (payload->size > buf->length - buf->bytesused) {
                         DPRINTF(("video_stream_write: "                          DPRINTF(("video_stream_write: "
                                  "payload would overflow\n"));                                   "payload would overflow\n"));

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.27.2.3

CVSweb <webmaster@jp.NetBSD.org>