From patchwork Fri May 13 09:53:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aman Karmani X-Patchwork-Id: 34708 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:a885:b0:7f:4be2:bd17 with SMTP id ca5csp213379pzb; Fri, 13 May 2022 02:53:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkL6+VkGrLe0g4a0JZKU58CU7UhtWDyAPWoJUs2UGmKm69BGyTt3MUReqSpvLnhCgukefK X-Received: by 2002:a17:907:2da2:b0:6f4:7395:568b with SMTP id gt34-20020a1709072da200b006f47395568bmr3449164ejc.766.1652435608783; Fri, 13 May 2022 02:53:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652435608; cv=none; d=google.com; s=arc-20160816; b=P4U63pSHdl0SkLzzED7oPeZfL1xejDHW1RvSEDRNGZOfoBu4MF9WUM0hKyMiiO0IWL ZO8Xu/Gny6hmCIb/QDkR21Ej4gmKwYlKBphPk3M6EaNWJdj1NJbLYEL+VGlUGnOIQ7Ly aQrZgHrIgKH3QJy3B/zmizIcpQDPggI40umgtZv/xU2hPfwUAQBXkeyenk0o9UGMv+6m cUZxaHn4l/aTJLyx0bG0k94ftqryyHYg7P2OT2P2pRPmInxJvOyctQPIYoqi1QD6ZBWY GNNhHi4gquGLoYBxrKGQOxpjqSuGw/zRXqfpQpD0EU76Of9RUjsSZeM33rDZ8gjNGwnb Lu8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:to:mime-version:fcc:date:from:message-id :dkim-signature:delivered-to; bh=bPNlPFC7d550RQbpYeYwrYPiHzayRjZBSfy1TfkEbok=; b=XmZL8chuhBBqrhu7z6v4sEQSqqnuTDRcsptnZ0hJ6ryYo3Ll3ZBecvHeqJ5kaOp5Ri IvrT4OAW+epS8fzpg4NIfSRIXQKVvTQYLXCjesDc1boSaep3RWDActyArpkD3NppTlWL xrHIBUhp+BVD6u1VIgrh3oYSXGI2oFX4u8NKpY08n58z0nuvyIBZKUpySWtDC0MYghKa GXIYIs+PQ06skoHwmcY9qwrQMF7BraPCJsaijgc51h0rJGtAl0qErOPmLsAipwmqEk+A kfzPeA4urm8iW7Uoxzp3erhwDK5YSH3+0pTfcFtCjz4SiOxI26Mt0qWSb+j43SFSVpeM 80Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=DbsC2TD+; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id qa18-20020a170907869200b006f5106cb607si1641890ejc.451.2022.05.13.02.53.28; Fri, 13 May 2022 02:53:28 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=DbsC2TD+; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 756A368B49C; Fri, 13 May 2022 12:53:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7F4AA68AF87 for ; Fri, 13 May 2022 12:53:18 +0300 (EEST) Received: by mail-pf1-f176.google.com with SMTP id a11so7263057pff.1 for ; Fri, 13 May 2022 02:53:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:from:date:subject:fcc:content-transfer-encoding :mime-version:to:cc; bh=Sfb4tRoGJbR76i6VPntp719TAAM1IdvBzll5feiJjf4=; b=DbsC2TD+WhkrBpjrwge8lcmZIPNnt17lRF/ycLgzpGPRqazH+WG4bG6uLjR6WX04xA TvkJZDeFoFkkrBEXRxEjNTbemjuYB5r39Hg7wbJWHmAiuKl+mpnZxTxijNCT8pxE9JaN GQdu7/Uvf+GiYsJR81tOqz8RCxgU/YVPG+6n7W76WUT99CmHrx8cUVxNUEQOTjjX4nqy pBJyEDwEFwQxcYFGV9GzWHjKWvPV7y9X/ttMR8apf/qWQ0W6w0ygr2gQyVTaSaAbnbJA PKwsEYDEEqgnZtkD6jBieLOUQlQKgB8RckWiT6oS0lFHp2YYBHg31shvNBoegP0U+CaB 8t1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=Sfb4tRoGJbR76i6VPntp719TAAM1IdvBzll5feiJjf4=; b=k4TvuS4dONJcUuI+dms+YdaTgyxazQ5f5b9mSfjkF/oX1MEVsjRCNg4Nfn534nZ80o Fj8xtOweetfQKgmueYnvL8tCKMoOMDHJUwu4o1654FkpOIapcIbJffcT74IwydM7eiiR qU34Tr6DepA+JTOfH4rWDaQv1bUVzs1tH4ITUCMO2hvUM51nUfwn91UZBVrnbAVPKt2z EMFGrDTCyOymoAQWC+3yurY9NINtwUjdHER19Vq0tEKyQ6rrYEE37uioP1NxmEFnBUJs ws8NCvgz4ghlqbZnAm+KEPaE0yjwc6lnVorxvuz4KxNxBpc56Z92SnzsfiNS1LWmhsZj kxvQ== X-Gm-Message-State: AOAM531j8vCdfkj5NTu6fUlJ355jxRG4z5CrhgUOan+p0rHbfKk0S+Dl tF7R7e5kgYccleAnIATe/oi8STb0PR5IoQ== X-Received: by 2002:a63:1d4:0:b0:3c2:479d:39e0 with SMTP id 203-20020a6301d4000000b003c2479d39e0mr3294323pgb.427.1652435596817; Fri, 13 May 2022 02:53:16 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id m4-20020a17090ab78400b001d960eaed66sm1208119pjr.42.2022.05.13.02.53.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 May 2022 02:53:16 -0700 (PDT) Message-Id: From: ffmpegagent Date: Fri, 13 May 2022 09:53:13 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 0/2] Support long file names on Windows X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: softworkz Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Khduu8V80cEj This patchset adds support for long file and directory paths on Windows. The implementation follows the same logic that .NET is using internally, with the only exception that it doesn't expand short path components in 8.3 format. .NET does this as the same function is also used for other purposes, but in our case, that's not required. Short (8.3) paths are working as well with the extended path prefix, even when longer than 260. Successfully tested: * Regular paths wth drive letter * Regular UNC paths * Long paths wth drive letter * Long paths wth drive letter and forward slashes * Long UNC paths * Prefixed paths wth drive letter * Prefixed UNC paths I have kept the individual functions separate on purpose, to make it easy to compare with the .NET impl. (compilers should inlinie those anyway) softworkz (2): avutil/wchar_filename,file_open: Support long file names on Windows avformat/os_support: Support long file names on Windows libavformat/os_support.h | 8 +-- libavutil/file_open.c | 2 +- libavutil/wchar_filename.h | 123 +++++++++++++++++++++++++++++++++++++ 3 files changed, 128 insertions(+), 5 deletions(-) base-commit: d2d8b9b972ba2df6b2a2ebe29f5307cbb7a69c33 Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-28%2Fsoftworkz%2Fsubmit_long_filenames-v1 Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-28/softworkz/submit_long_filenames-v1 Pull-Request: https://github.com/ffstaging/FFmpeg/pull/28