From patchwork Thu Oct 15 21:30:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Forest Crossman X-Patchwork-Id: 22978 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 9D02644B9BF for ; Fri, 16 Oct 2020 00:38:45 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8623268B964; Fri, 16 Oct 2020 00:38:45 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yb1-f196.google.com (mail-yb1-f196.google.com [209.85.219.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8CAF968B95D for ; Fri, 16 Oct 2020 00:38:38 +0300 (EEST) Received: by mail-yb1-f196.google.com with SMTP id a4so174248ybq.13 for ; Thu, 15 Oct 2020 14:38:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AiKPaoChlU22exDKMOZCPQ6uceStNxIPaYqDvQIe468=; b=DLsL9P3iuOnu3wDW8x3/VqwRc8rQ8xUOinwl+v2E6mB8Rn4Q6tyZgnD6IqO1H40uHU iqW1+9GI4YtqnR8NQz43MJOU8R5Lb4LyQCGIHwON0oJZb3GZZe1h2WovE3gkFchNWqRP Ntod5oZuv+wI4jLAT6GebBdfGdESNRMfEelSahZeHzQTe3if693VHG+c4phk1Wd+uBp1 sx7Okf8WEyeiTOGtBDHlBESFAhGHdjULx1jYqfP4Bw/Y5GgzWIwoULeV7ybOYsIRnyhX f1V+oSEbOs+DsUqQSKyLg2bvIGY7BnaaRZJ09DuPDlr6l2dnwplnxFzRv3potmQn96+D NY5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AiKPaoChlU22exDKMOZCPQ6uceStNxIPaYqDvQIe468=; b=c5A2xqLn7MgCPn32tEAuhDs09/u/DgAMYslVaoSAXXD0kcFiB6CODwIpjLzethRMsq ozrkJkSauDqVKS4eCN5yRdHBK9CnE6d8rNxROJ05bybmIHcD58M4sGIOWjqD2otMWHWi B/OXFqCsPME0vBjvwcfZYdUkHDHf5TMDTySqTsVwbzEBvuOHrzy+e3FMUYc2NnYE1Q2p vXnyGlWUhfdzz2rKz/V6XFXlJt7ntv0tini25fsVliZJS+WsY7GPACxvrSXf+7Xp97nI wN2dmTTMn3+fcBUNoFDLD4mtEq+nFDi+8rzsh+4GY+HDR4d+GZxmk2i+xmWGbhOSRIVg juJg== X-Gm-Message-State: AOAM530WO1CkT7y9e/bMOh07RUNrgnFTYnIm3JUDfJVuoWltN7AYga31 R5MfPx1M6F6HVMxqytmx8+sCP3WX8Zo= X-Google-Smtp-Source: ABdhPJxiY8lYPfygAQloOQ8duE+OdcV7qD+PnzcgXbGSS3zzus4XkfXVtxiJRIrhFlaM8g7kKgBtuQ== X-Received: by 2002:a9d:7384:: with SMTP id j4mr339993otk.191.1602797450917; Thu, 15 Oct 2020 14:30:50 -0700 (PDT) Received: from localhost.localdomain ([170.130.31.90]) by smtp.gmail.com with ESMTPSA id 15sm233248ooy.36.2020.10.15.14.30.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Oct 2020 14:30:50 -0700 (PDT) From: Forest Crossman To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Oct 2020 16:30:34 -0500 Message-Id: <20201015213039.1019624-1-cyrozap@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20191020095533.15016-1-cyrozap@gmail.com> References: <20191020095533.15016-1-cyrozap@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 0/5] libdc1394 enhancements X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Forest Crossman Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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 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. 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(-)