Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2904C433DB for ; Thu, 28 Jan 2021 17:45:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C0EEB64DEB for ; Thu, 28 Jan 2021 17:45:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232135AbhA1Rpc (ORCPT ); Thu, 28 Jan 2021 12:45:32 -0500 Received: from smtp2.macqel.be ([109.135.2.61]:10387 "EHLO smtp2.macqel.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232605AbhA1RNw (ORCPT ); Thu, 28 Jan 2021 12:13:52 -0500 Received: from localhost (localhost [127.0.0.1]) by smtp2.macqel.be (Postfix) with ESMTP id BD103158AC3; Thu, 28 Jan 2021 18:13:00 +0100 (CET) X-Virus-Scanned: amavisd-new at macqel.be Received: from smtp2.macqel.be ([127.0.0.1]) by localhost (mail.macqel.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xBi04IdBHf0e; Thu, 28 Jan 2021 18:12:58 +0100 (CET) Received: from frolo.macqel.be (frolo.macqel [10.1.40.73]) by smtp2.macqel.be (Postfix) with ESMTP id 6E10B130D0E; Thu, 28 Jan 2021 18:12:58 +0100 (CET) Received: by frolo.macqel.be (Postfix, from userid 1000) id 4A858BEC0C8; Thu, 28 Jan 2021 18:12:57 +0100 (CET) Date: Thu, 28 Jan 2021 18:12:58 +0100 From: Philippe De Muyter To: linux-media@vger.kernel.org, gstreamer-devel@lists.freedesktop.org Subject: v4l2, v4l2src and GstReferenceTimestampMeta Message-ID: <20210128171257.GA19521@frolo.macqel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hello all, since gstreamer 1.14, there is a way to associate in a gstreamer pipeline reference timestamps to each frame. As expressed by Sebastian (slomo), [https://marc.info/?l=gstreamer-cvs&m=149458219511878&w=2] buffer: Add GstReferenceTimestampMeta This is a meta that generically allows to attach additional reference timestamps to a buffer, that don't have to relate to the pipeline clock in any way. Examples of this could be an NTP timestamp when the media was captured, a frame counter on the capture side or the (local) UNIX timestamp when the media was captured. Examples of valid references would be "timestamp/x-drivername-stream" for timestamps that are locally generated by some driver named "drivername" when generating the stream, e.g. based on a frame counter, or "timestamp/x-ntp, host=pool.ntp.org,port=123" for timestamps based on a specific NTP server. I would expect the v4l2src plugin to add such a timestamp to each frame using information coming from the v4l2 driver, especially if the driver provides UTC or TAI timestamps generated in the kernel. How far are we from that goal ? Best regards Philippe De Muyter -- Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles