|
|
|
Re: [PATCH] gspca_ov534: Print only frame_rate actually used. | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
On Wed, 03 Dec 2008 20:17:20 +0100
Jean-Francois Moine <moinejf@xxxxxxx> wrote:
> On Wed, 2008-12-03 at 19:44 +0100, Antonio Ospite wrote:
> > Yes, the code takes this path in gspca.c, gspca_frame_add(), line 277:
> >
> > if (packet_type == FIRST_PACKET) {
> > if ((frame->v4l2_buf.flags & BUF_ALL_FLAGS)
> > != V4L2_BUF_FLAG_QUEUED) {
> > gspca_dev->last_packet_type = DISCARD_PACKET;
> > return frame;
> > }
> >
> > and then it keeps on adding only INTER_PACKETs because of the current
> > end of frame check. It is a timing issue, it happens only with high
> > frame_rates, maybe there is some code in gspca that needs to be
> > protected by locking?
> > Or would it be normal to loose some frames at high frame rates using
> > smaller bulk_size?
> >
>
> Hi Antonio,
>
> The problem comes from the availability of the application buffer. In
> the bulk_irq, there is:
>
> frame = gspca_get_i_frame(gspca_dev);
> if (!frame) {
> gspca_dev->last_packet_type = DISCARD_PACKET;
> } else {
> .. pkt_scan(..);
> }
>
> Then, you are not called and you cannot know how many bytes have been
> really received.
>
And this happens because we couldn't have two separate events for
LAST_PACKET and FIRST_PACKET, right?
> As the buffer check exists in frame_add, I may call you each time with a
> valid frame pointer (see patch). In this case, you cannot count the
> image bytes with the data_end. You should have a counter in the sd
> structure.
>
> An other solution is to start and stop the transfer for each image as it
> was in the original driver, but it asks for a kernel thread.
>
> Anyway, if Jim may add a mark between the images, if will be the best...
>
Ok, we'll go with Jim changes. Thanks anyway for the patch, but I don't
think it is needed anymore.
Regards,
Antonio
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
Web site: http://www.studenti.unina.it/~ospite
Public key: http://www.studenti.unina.it/~ospite/aopubkey.asc
Attachment:
pgpKZ6J3HTQWy.pgp
Description: PGP signature
-- video4linux-list mailing list Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/video4linux-list
[Linux Media] [Older V4L] [Linux DVB] [Video Disk Recorder] [Linux Kernel] [Asterisk] [Photo] [DCCP] [Netdev] [Xorg] [Util Linux NG] [Xfree86] [Free Photo Albums] [Fedora Users] [Fedora Women] [ALSA Users] [ALSA Devel] [SSH] [DVB Maintainers] [Linux USB] [Yosemite Information]
![]() |
![]() |