mbox series

[FFmpeg-devel,v2,0/5] libdc1394 enhancements

Message ID 20201015213039.1019624-1-cyrozap@gmail.com
Headers show
Series libdc1394 enhancements
Related show


Forest Crossman Oct. 15, 2020, 9:30 p.m. UTC
I was having trouble using libdc1394 the first time I tried it (e.g.,
setting unsupported video modes/framerates on cameras, trying to use
multiple cameras, tring to figure out how to set the arguments so the
command would actually work, etc.) so I thought I'd go ahead and add
some ease-of-use enhancements to the module and some examples to the
documentation to help others get started.

I also wound up finding a bug with some early PTS wrapping, and I guess
some encoders masked the issue because when I tried dumping the raw
video to an MKV file the matroska encoder complained _very loudly_ about
the non-monotonic PTS/DTS values.

I had some trouble determining the best way to write the mode/framerate
support checks and how to present the information to the user (errors
are obvious, but I didn't know when would be a good time to list the
supported modes and how best to print them), so if anyone has any
suggestions on how to make that more "elegant" I'd be happy to hear

I also had some trouble with the camera GUID:unit parsing--it works, but
if the input is slightly incorrect the parsing will fail in strange
ways. It will also successfully parse incorrect specifiers like
0xabcdef001122334455.0 (the period should be a colon) and
0x0xabcdef001122334455 (there's an extra "0x" prefix) and I'd really
prefer it if it would error out and alert the user instead of
fail-succeeding silently, but I'm not very well versed in C's string
parsing so I'm not sure how I can improve that without significantly
increasing the code complexity.

Changes from v1:
 - Made recommended changes to "doc/indevs: Add examples for libdc1394".
 - Reworded some commit messages for clarity.

Forest Crossman (5):
  libdc1394: Enable listing sources
  libdc1394: Verify the camera supports the selected mode and framerate
  libdc1394: Enable specifying a camera by GUID[:unit]
  doc/indevs: Add examples for libdc1394
  libdc1394: Fix PTS wrapping

 doc/indevs.texi         |  35 +++++++
 libavdevice/libdc1394.c | 217 ++++++++++++++++++++++++++++++++++------
 2 files changed, 221 insertions(+), 31 deletions(-)