Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76738
b: refs/heads/master
c: dfd8c04
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jan 25, 2008
1 parent 39693d4 commit d4dd0e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: c8793b035df7b18997d1cf34254064dac166f009
refs/heads/master: dfd8c04ec14b88bc2849e62d6ff9e36f31352b60
15 changes: 8 additions & 7 deletions trunk/drivers/media/video/vivi.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ struct vivi_dev {
struct vivi_dmaqueue vidq;

/* Several counters */
int h, m, s, us, jiffies;
int h, m, s, ms;
unsigned long jiffies;
char timestr[13];

int mv_count; /* Controls bars movement */
Expand Down Expand Up @@ -348,10 +349,10 @@ static void vivi_fillbuff(struct vivi_dev *dev, struct vivi_buffer *buf)

/* Updates stream time */

dev->us += jiffies_to_usecs(jiffies-dev->jiffies);
dev->ms += jiffies_to_msecs(jiffies-dev->jiffies);
dev->jiffies = jiffies;
if (dev->us >= 1000000) {
dev->us -= 1000000;
if (dev->ms >= 1000) {
dev->ms -= 1000;
dev->s++;
if (dev->s >= 60) {
dev->s -= 60;
Expand All @@ -365,7 +366,7 @@ static void vivi_fillbuff(struct vivi_dev *dev, struct vivi_buffer *buf)
}
}
sprintf(dev->timestr, "%02d:%02d:%02d:%03d",
dev->h, dev->m, dev->s, (dev->us + 500) / 1000);
dev->h, dev->m, dev->s, dev->ms);

dprintk(dev, 2, "vivifill at %s: Buffer 0x%08lx size= %d\n",
dev->timestr, (unsigned long)tmpbuf, pos);
Expand Down Expand Up @@ -1073,11 +1074,11 @@ static int vivi_open(struct inode *inode, struct file *file)
dev->h = 0;
dev->m = 0;
dev->s = 0;
dev->us = 0;
dev->ms = 0;
dev->mv_count = 0;
dev->jiffies = jiffies;
sprintf(dev->timestr, "%02d:%02d:%02d:%03d",
dev->h, dev->m, dev->s, (dev->us + 500) / 1000);
dev->h, dev->m, dev->s, dev->ms);

videobuf_queue_vmalloc_init(&fh->vb_vidq, &vivi_video_qops,
NULL, &dev->slock, fh->type, V4L2_FIELD_INTERLACED,
Expand Down

0 comments on commit d4dd0e4

Please sign in to comment.