Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92651
b: refs/heads/master
c: b4916f8
h: refs/heads/master
i:
  92649: 47d2b2d
  92647: eb5e4eb
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 23fabc0 commit c98d92e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dbecb44c11d9517d604240b53581951ac4e3b5e6
refs/heads/master: b4916f8ca1da71bb97fb6dcf1e8da3f9c64cf80e
31 changes: 16 additions & 15 deletions trunk/drivers/media/video/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,32 +365,33 @@ static inline int em28xx_isoc_copy(struct urb *urb)
/* FIXME: incomplete buffer checks where removed to make
logic simpler. Impacts of those changes should be evaluated
*/
if (p[0] == 0x33 && p[1] == 0x95 && p[2] == 0x00) {
em28xx_isocdbg("VBI HEADER!!!\n");
/* FIXME: Should add vbi copy */
continue;
}
if (p[0] == 0x22 && p[1] == 0x5a) {
em28xx_isocdbg("Video frame %d, length=%i, %s\n", p[2],
len, (p[2] & 1)? "odd" : "even");

if (p[2] & 1)
buf->top_field = 0;
else {
if (buf->receiving) {
buffer_filled(dev, dma_q, buf);
rc = get_next_buf(dma_q, &buf);
if (rc <= 0)
return rc;
outp = videobuf_to_vmalloc(&buf->vb);
}

else
buf->top_field = 1;

// if (dev->isoc_ctl.last_field && !buf->top_field) {
if (dev->isoc_ctl.last_field != buf->top_field) {
buffer_filled(dev, dma_q, buf);
rc = get_next_buf(dma_q, &buf);
if (rc <= 0)
return rc;
outp = videobuf_to_vmalloc(&buf->vb);
}
buf->receiving = 1;
dev->isoc_ctl.last_field = buf->top_field;

dma_q->pos = 0;
} else if (p[0] == 0x33 && p[1] == 0x95 && p[2] == 0x00) {
em28xx_isocdbg("VBI HEADER!!!\n");
}

em28xx_copy_video(dev, dma_q, buf, p, outp, len);

/* FIXME: Should add vbi copy */
}
return rc;
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/media/video/em28xx/em28xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ struct em28xx_usb_isoc_ctl {
/* Stores already requested buffers */
struct em28xx_buffer *buf;

/* Store last filled frame */
int last_field;

/* Stores the number of received fields */
int nfields;
};
Expand Down

0 comments on commit c98d92e

Please sign in to comment.