[FFmpeg-devel] [PATCH 0/5] libdc1394 enhancements

Forest Crossman cyrozap at gmail.com
Sun Oct 20 12:55:28 EEST 2019


I was having trouble with libdc1394 the first time I used 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 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
them!

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.

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         |  54 ++++++++++
 libavdevice/libdc1394.c | 217 ++++++++++++++++++++++++++++++++++------
 2 files changed, 240 insertions(+), 31 deletions(-)

-- 
2.23.0



More information about the ffmpeg-devel mailing list