From patchwork Fri Jul 5 05:25:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marth64 X-Patchwork-Id: 50359 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:cc64:0:b0:482:c625:d099 with SMTP id k4csp4089527vqv; Thu, 4 Jul 2024 22:34:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXgcTOCXZpL9OF3TijYZG/3BNMrH7SpaOFdu/7dCuyJaByNLFhUDF5bph+JEaaMWbpIbc6/BHXjJMfZJqz15AdU06mKMLFD79A49w== X-Google-Smtp-Source: AGHT+IGtBy7E3yM+PbNTdIaBGop1FANQ/tniw3XyX3UE+s9GpO2WcuPaAnirW914eLholAcKdOhL X-Received: by 2002:a05:6402:268b:b0:586:e6e3:ea18 with SMTP id 4fb4d7f45d1cf-58e59d3d166mr2398708a12.23.1720157651216; Thu, 04 Jul 2024 22:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720157651; cv=none; d=google.com; s=arc-20160816; b=XwqSRKzzIoE5G35nAguFpMU0Ze5frDlsc0A5yZlVLAq/nwemURDiuMBGuHjWWuDqbd 56Ybk5Z5ZsGsPQp/YlmO4a52LKn63iw0zAtDjPU4OXJfg8Zp2yYRoBVg/bKTDkwIcACE 990GCzRkVUKJoWW2+ZP4wE8l8zRnXytJNHmYD1aqiX9ESBm7xwFQZSKSZD/ZLZ1gOS1I gnp5ljqJsZ9mAen5lsuUBRmRdMmAS+tlwHKLXfH3Nfni/pBl/Z7Gpdp/4J7u+4p763N0 stIsD+KP5FO7CmRdzBHmmQcfZ6HLJvUI0kpEKH24UFrNSBeip9kBnSet0BbfWFW83ay6 mJPA== 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:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=1LcpnLfArNGT+A5bGimaCHMRlZWhUg67vdnDG2+S9mY=; fh=PlWMzmI9LD2qGS7ipLrQl8z0iaQTLQLHzoGuXcBzpCg=; b=nYKzlYSoJd7uLXYanZ8IeoLRa0m4UkyCtz74o2nOAKQlyE3Kk5d5C8vhnQfqMX6o7L gxJsGJDl/rKah1cA5DVY27G2D6kXwYS9+oW3n+Iwmt4+34h9v2y/5px7PElZJijsJjWI yEUxGqYXGE577J9LVmyTDIr1H05iEy2cCH2y+bFQ+bcuTR4kWQO81mRoefiqb7I83UXf 5BHymg01OVpeh1H2fsHRz19byEYzK4m4sHB1SqFGJhqy72ATR9VgXBTdRQbP2Wxk/8ZC TdnCVGnKmCdXNkM3mpyxpWXhSyCH3vHt+rKWACG/FmDmPhQXMOeWDaUrhMPW47wkUQLK V5dA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@proxyid.net header.s=google header.b=Cyth+q1I; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-58bf1c212ffsi3156981a12.101.2024.07.04.22.34.10; Thu, 04 Jul 2024 22:34:11 -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=@proxyid.net header.s=google header.b=Cyth+q1I; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8D5B768DAFB; Fri, 5 Jul 2024 08:26:10 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-oa1-f98.google.com (mail-oa1-f98.google.com [209.85.160.98]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0CC5C68D85B for ; Fri, 5 Jul 2024 08:26:01 +0300 (EEST) Received: by mail-oa1-f98.google.com with SMTP id 586e51a60fabf-25e0971ab06so599126fac.1 for ; Thu, 04 Jul 2024 22:26:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proxyid.net; s=google; t=1720157159; x=1720761959; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EhujUbSDFBL6L3MRAdNsIiI3Nf9mu1fDwcxIgwpkUaQ=; b=Cyth+q1I8h4JmkJMghLWLS1IWoTt4wvDi/XmIQpc9u+ZgwPV5taap3S6e9DjAySBHs as8Rf7c+gEpDUpw8RRIZ2Tivz6ekXroN+NpiR0VnfbpwdoFiMDyrMaHj6R7PYl8dUoO4 DHfr6HusINCFWuRbPKXpZDy1YLoyjPemM+Bpw/J4tFFteTqq10C5SRcnDwqbjV/IRLIc fnZNCLuPmQseXk41HPs7mp/4Fz+gufBxnqv74kS7UYvrTOq5B5Fkde8sBpK3iqIwg7sw 4M4pj3defFZfkLNf/58ADITOiGwfVMQy4eexPzHOX4pn4xSY7Jul2PBFvW4pzrZZ1AmP FPtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720157159; x=1720761959; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EhujUbSDFBL6L3MRAdNsIiI3Nf9mu1fDwcxIgwpkUaQ=; b=ukmonDIaVkQJwaFgXstzz2YYBieZC/CfwXI2vQ2HQmlUC1eGhV7UO5DIrkcwUQP9u6 FOOWW5CTnKvyng/qT/kZzhDKXP7i1KemaudIl2OWjw7RmLjVh1V23Rv5B/IWLD2lOSHj v4hZGMjlkVzrsA8sTSDEK6bUQ+kSQs0Rm8D+F3f4oCrW4Eq7QzwrgkIfoJI0GD48wNL3 4RPmq70zpIQXHL2f1IGrB4vLDpnQdM3kOPeBiyozYYayd35Oxu/y5PJ8oxCTkXfnD4NI pyE5kwkLnF5VEYp/U0no9i7GA4cF9sEPijSh+SsqM2W2zqZx84APgN6xO5TvvwuePAwx si5A== X-Gm-Message-State: AOJu0Yw7xh/A0icjGaUrtv1y6IPPA7QnW+augJJ0/5tO1k/FCUtFbo/X wBHM7gnYEtcGHCKIDT/gRY0ymLi44/KWx+SLpMJ4xZNaRgOPSFUZivENEOCpZnHnsiHV8bjkRxr gAqqeLbivsQMUDIdZTzciI5oEj/C0keEnZu9VH/vE X-Received: by 2002:a05:6870:e0ce:b0:25e:d32:83e2 with SMTP id 586e51a60fabf-25e2f671186mr1551913fac.23.1720157159675; Thu, 04 Jul 2024 22:25:59 -0700 (PDT) Received: from wsx-cc1-001.. (c-76-136-218-80.hsd1.il.comcast.net. [76.136.218.80]) by smtp-relay.gmail.com with ESMTPS id 586e51a60fabf-25e45059c6bsm33887fac.2.2024.07.04.22.25.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jul 2024 22:25:59 -0700 (PDT) X-Relaying-Domain: proxyid.net From: Marth64 To: ffmpeg-devel@ffmpeg.org Date: Fri, 5 Jul 2024 00:25:52 -0500 Message-Id: <20240705052555.402920-3-marth64@proxyid.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240705052555.402920-1-marth64@proxyid.net> References: <20240705052555.402920-1-marth64@proxyid.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/5] avformat/avformat: Add av_stream_get_codec_properties() to expose internal properties 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: Marth64 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: trDMX+OzX5BJ Signed-off-by: Marth64 --- libavformat/avformat.c | 5 +++++ libavformat/avformat.h | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/libavformat/avformat.c b/libavformat/avformat.c index 140fb5b6aa..35eb0f3b62 100644 --- a/libavformat/avformat.c +++ b/libavformat/avformat.c @@ -850,6 +850,11 @@ AVRational av_stream_get_codec_timebase(const AVStream *st) return cffstream(st)->avctx ? cffstream(st)->avctx->time_base : cffstream(st)->transferred_mux_tb; } +unsigned av_stream_get_codec_properties(const AVStream *st) +{ + return cffstream(st)->avctx ? cffstream(st)->avctx->properties : 0; +} + void avpriv_set_pts_info(AVStream *st, int pts_wrap_bits, unsigned int pts_num, unsigned int pts_den) { diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 8afdcd9fd0..f611f7a4a4 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -3072,6 +3072,13 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, */ AVRational av_stream_get_codec_timebase(const AVStream *st); +/** + * Get the internal codec properties from a stream. + * + * @param st input stream to extract the properties from + */ +unsigned av_stream_get_codec_properties(const AVStream *st); + /** * @} */