[{"id":4708,"web_url":"https://patchwork.libcamera.org/comment/4708/","msgid":"<20200501170454.GB2569889@oden.dyn.berto.se>","date":"2020-05-01T17:04:54","subject":"Re: [libcamera-devel] [PATCH 1/2] libcamera: media_device: Expose\n\tmedia device API version number","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your work.\n\nOn 2020-05-01 19:43:31 +0300, Laurent Pinchart wrote:\n> Add a MediaDevice::version() function to expose the media device API\n> version number. This can be useful to support driver API changes in\n> pipeline handlers.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  src/libcamera/include/media_device.h | 1 +\n>  src/libcamera/media_device.cpp       | 9 +++++++++\n>  2 files changed, 10 insertions(+)\n> \n> diff --git a/src/libcamera/include/media_device.h b/src/libcamera/include/media_device.h\n> index 44a59e70139e..4d9f76618ec0 100644\n> --- a/src/libcamera/include/media_device.h\n> +++ b/src/libcamera/include/media_device.h\n> @@ -40,6 +40,7 @@ public:\n>  \tconst std::string driver() const { return driver_; }\n>  \tconst std::string deviceNode() const { return deviceNode_; }\n>  \tconst std::string model() const { return model_; }\n> +\tunsigned int version() const { return version_; }\n>  \n>  \tconst std::vector<MediaEntity *> &entities() const { return entities_; }\n>  \tMediaEntity *getEntityByName(const std::string &name) const;\n> diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp\n> index 0d6b5efd9e7a..d4e7e1002224 100644\n> --- a/src/libcamera/media_device.cpp\n> +++ b/src/libcamera/media_device.cpp\n> @@ -314,6 +314,15 @@ done:\n>   * \\return The MediaDevice model name\n>   */\n>  \n> +/**\n> + * \\fn MediaDevice::version()\n> + * \\brief Retrieve the media device API version\n> + *\n> + * The version is formatted with the KERNEL_VERSION() macro.\n> + *\n> + * \\return The MediaDevice API version\n> + */\n> +\n>  /**\n>   * \\fn MediaDevice::entities()\n>   * \\brief Retrieve the list of entities in the media graph\n> -- \n> Regards,\n> \n> Laurent Pinchart\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x142.google.com (mail-lf1-x142.google.com\n\t[IPv6:2a00:1450:4864:20::142])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F1857603F3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  1 May 2020 19:04:55 +0200 (CEST)","by mail-lf1-x142.google.com with SMTP id z22so4171408lfd.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 01 May 2020 10:04:55 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\th24sm2687567lji.99.2020.05.01.10.04.54\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 01 May 2020 10:04:54 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com header.b=\"qNUK+82Z\"; \n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=EB99zgHZk3+x5xg9V7a6Ms/IljJjd6ftU9kax0USX3s=;\n\tb=qNUK+82ZYUoJL74Eu81E5CKInobcWLfVBMr/+5rpif/jfLO/k2m+D+aFx4cGtzLpss\n\tTRqR1nxuGt9R3LvQ0MCkCwAfnDuAnlLo/Z/rbsUkYIVf0C8mWdO24rH2Av3UZcKNvAus\n\t3a5DzDnqvS128gKEZ0gNcp6D/l4ZMJOgMxeyRZYQnTQuxVpgfKGC9t3xwtIkKBgpd0w6\n\t3Gayg20W5r5EbzrOF741S2r2LcbkWxebCiYtaYMzBdfUmvqHunJzJQAHxh3DI03Q7kdJ\n\tO0H/RuacHberVP1RAe0doSZnc1/EsLAXRx8XQNUZmpfuJxhrVORwED+1YADwqZIeldID\n\t0idg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=EB99zgHZk3+x5xg9V7a6Ms/IljJjd6ftU9kax0USX3s=;\n\tb=MYcQUvuHA2ghJBuUC+jKL15h2z4os4Zq8uy+Ft7yEf4qTItw/unclqEJR7vd/90p7f\n\tOchlfSm+XZGHiN+Ga6wcdNQytVCQLuPG6B4m8fidZquzEaRqzeQi0XNBV11qb9WO/Z9v\n\t8yuMdqF+svHkwIGi0msC0vVCHIM4uTbOAyFxpNOBektTnu839YAS1JyDKYXOZgYgJVzH\n\tEgSg/yFbEYFA/QKSZt8A/e7Iu4eiY82W7nyAhgtu75oDXpSX4CUjOnMy6q6P7Wb1BOD3\n\tuUm8tN3mBdL4maH7VAsiiW74UR+fbWjlfwE/4wABCjaN6kQX0lYa1cY5pUolOpXi+LUe\n\tcN1A==","X-Gm-Message-State":"AGi0Pub9xnt9n3iUB1UcvKvc4PLbnGjNoHIzew0ZP4ojQZCUdq3Q2w/R\n\tJxwcbcqIfypRXCsWK7JuLImyIsX9Ky0=","X-Google-Smtp-Source":"APiQypLfZlWlf3hyb0pipCCsoKpVImtlNq3Ee3LGXa0VM1nJytrRJ79rbti0tPKVskElugcg2v0g6Q==","X-Received":"by 2002:ac2:46f9:: with SMTP id\n\tq25mr3130221lfo.149.1588352695342; \n\tFri, 01 May 2020 10:04:55 -0700 (PDT)","Date":"Fri, 1 May 2020 19:04:54 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200501170454.GB2569889@oden.dyn.berto.se>","References":"<20200501164332.24517-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20200501164332.24517-1-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 1/2] libcamera: media_device: Expose\n\tmedia device API version number","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Fri, 01 May 2020 17:04:56 -0000"}}]