From patchwork Fri Jan 22 11:20:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 25074 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 CC835448B38 for ; Fri, 22 Jan 2021 13:21:08 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AE36A689E01; Fri, 22 Jan 2021 13:21:08 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 369D4689E01 for ; Fri, 22 Jan 2021 13:21:02 +0200 (EET) Received: by mail-lj1-f173.google.com with SMTP id i17so6125445ljn.1 for ; Fri, 22 Jan 2021 03:21:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=SDrYwemSzbczNe0PTLeEqb07INTadldvOoh6SLaGOWQ=; b=UtSi1xYqyahTtNtYoz9g3ouNQpmUEN+d7GMaTunNY7oIWvo8e2n6RwxUjPQK7NHIKs yYkWSoyBZ/GNfAfjYVZAQCOyVejIf8yf8QHXsG4ZM7zaAyLkurP/zsv+8i1TUgPHmOJi ilZA95p0QX2NhC1HigXgbc1K3x5HWtfADsMZ1ZwwLIRKor6Yz9OkuuZwHecunOKGS1J3 k703xrBFHk+IAnRlB28dK01VV2EbFb+C3D+l01jjxgNezJjc8C9Q2EpBa3g8t+kkgDeO JzYNwFAAfFtXad8KwJwGiXd9Dhk3y/gbdckqU6Enor2HuDRkMrf6lL5O12TNvhQqAg1N FWaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SDrYwemSzbczNe0PTLeEqb07INTadldvOoh6SLaGOWQ=; b=bY477hCTGmDY1cgkHTQrF9EB39XmH2r2xjY+FmOJT2Jzx4RvBxkE28PhMzEva4SJxM n7WvxAeF0dDhBIXP5ev1VQ5zwLuVOEPWtTzvZdazbywMwVh863hxn88H6LS9EhOygmjt CvqFB2KZMFK73xCoWwxQJnI2b2q9ZZp2DBYMdt239jB/u8J79bFVeHQq/Gc4I4ovwKYL LCBtMDrlulCo/rBUggv16exdl8BRPxf2pT/N9FwZZLoxQc2ehE8HWdr7sB3p5oJXRLlN 1Sox+1zCWSxGlUZx9qFO3Y8r0fL1oLI376v83g8FRYzX6n1OuRHBBpyEbtKkR0BpzgcX 4pBw== X-Gm-Message-State: AOAM532UE0MOaHompCKIT0pEKJZpH7yiZMkdifWA9j1axteUSMolsC66 NrDuZ8g+9ZLiEyArDm5S+WDY9+ReOvw= X-Google-Smtp-Source: ABdhPJxHi+lTTxT9ccsL0ZpKJWbnp8IUNZs0wlJ5fi7Rmo2+a7W6X+YJuZCofr5yrlO6QDY7wnBulg== X-Received: by 2002:a2e:9d85:: with SMTP id c5mr2224491ljj.80.1611314461597; Fri, 22 Jan 2021 03:21:01 -0800 (PST) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id v24sm919451ljc.56.2021.01.22.03.21.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jan 2021 03:21:00 -0800 (PST) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 22 Jan 2021 13:20:54 +0200 Message-Id: <20210122112058.49068-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210122103725.24370-1-jeebjp@gmail.com> References: <20210122103725.24370-1-jeebjp@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4 0/4] Initial implementation of TTML encoding/muxing 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" I've intentionally kept this initial version simple (no styling etc) to focus on the basics. As this goes through review, additional features can be added (I had initial PoC for styling implemented some time around previous VDD), and there is another patch set in my queue which would then add support for muxing TTML into MP4. Changes from the third version: - Updated the result of the ffprobe XML output test, as I missed it when updating the exact escape mode utilized. Jan Jan Ekström (3): avutil/{avstring,bprint}: add XML attribute value escape modes ffprobe: switch to av_bprint_escape for XML escaping {avcodec,avformat}: add TTML encoder and muxer Stefano Sabatini (1): avutil/{avstring,bprint}: add XML escaping from ffprobe to avutil Changelog | 1 + doc/general_contents.texi | 1 + fftools/ffprobe.c | 32 +++---- libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/ttmlenc.c | 179 +++++++++++++++++++++++++++++++++++++ libavcodec/version.h | 4 +- libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/ttmlenc.c | 166 ++++++++++++++++++++++++++++++++++ libavformat/version.h | 4 +- libavutil/avstring.h | 9 +- libavutil/bprint.c | 41 +++++++++ tests/fate/subtitles.mak | 3 + tests/ref/fate/ffprobe_xml | 2 +- tests/ref/fate/sub-ttmlenc | 122 +++++++++++++++++++++++++ tools/ffescape.c | 9 +- 17 files changed, 545 insertions(+), 32 deletions(-) create mode 100644 libavcodec/ttmlenc.c create mode 100644 libavformat/ttmlenc.c create mode 100644 tests/ref/fate/sub-ttmlenc