diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-11-03 16:30:17 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-11 14:22:08 +0100 |
commit | 25738cbd72db53ca1c326bf94915d41086cb4297 (patch) | |
tree | dfff4075245deb1af2a13c6998771632a965313d /drivers/media/video/uvc/uvcvideo.h | |
parent | [media] uvcvideo: Extract video stream statistics (diff) | |
download | linux-25738cbd72db53ca1c326bf94915d41086cb4297.tar.xz linux-25738cbd72db53ca1c326bf94915d41086cb4297.zip |
[media] uvcvideo: Extract timestamp-related statistics
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc/uvcvideo.h')
-rw-r--r-- | drivers/media/video/uvc/uvcvideo.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h index f9ee62ed0150..e4d4b6d02024 100644 --- a/drivers/media/video/uvc/uvcvideo.h +++ b/drivers/media/video/uvc/uvcvideo.h @@ -364,6 +364,18 @@ struct uvc_stats_frame { unsigned int nb_empty; /* Number of empty packets */ unsigned int nb_invalid; /* Number of packets with an invalid header */ unsigned int nb_errors; /* Number of packets with the error bit set */ + + unsigned int nb_pts; /* Number of packets with a PTS timestamp */ + unsigned int nb_pts_diffs; /* Number of PTS differences inside a frame */ + unsigned int last_pts_diff; /* Index of the last PTS difference */ + bool has_initial_pts; /* Whether the first non-empty packet has a PTS */ + bool has_early_pts; /* Whether a PTS is present before the first non-empty packet */ + u32 pts; /* PTS of the last packet */ + + unsigned int nb_scr; /* Number of packets with a SCR timestamp */ + unsigned int nb_scr_diffs; /* Number of SCR.STC differences inside a frame */ + u16 scr_sof; /* SCR.SOF of the last packet */ + u32 scr_stc; /* SCR.STC of the last packet */ }; struct uvc_stats_stream { @@ -376,6 +388,17 @@ struct uvc_stats_stream { unsigned int nb_empty; /* Number of empty packets */ unsigned int nb_invalid; /* Number of packets with an invalid header */ unsigned int nb_errors; /* Number of packets with the error bit set */ + + unsigned int nb_pts_constant; /* Number of frames with constant PTS */ + unsigned int nb_pts_early; /* Number of frames with early PTS */ + unsigned int nb_pts_initial; /* Number of frames with initial PTS */ + + unsigned int nb_scr_count_ok; /* Number of frames with at least one SCR per non empty packet */ + unsigned int nb_scr_diffs_ok; /* Number of frames with varying SCR.STC */ + unsigned int scr_sof_count; /* STC.SOF counter accumulated since stream start */ + unsigned int scr_sof; /* STC.SOF of the last packet */ + unsigned int min_sof; /* Minimum STC.SOF value */ + unsigned int max_sof; /* Maximum STC.SOF value */ }; struct uvc_streaming { |