From patchwork Wed Jan 4 13:52:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Lhomme X-Patchwork-Id: 2050 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp4841786vsb; Wed, 4 Jan 2017 05:59:34 -0800 (PST) X-Received: by 10.194.47.203 with SMTP id f11mr59010895wjn.146.1483538374017; Wed, 04 Jan 2017 05:59:34 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id lk5si998872wjb.229.2017.01.04.05.59.33; Wed, 04 Jan 2017 05:59:33 -0800 (PST) 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; 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 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 343A068A02F; Wed, 4 Jan 2017 15:59:13 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wj0-f194.google.com (mail-wj0-f194.google.com [209.85.210.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 54A04689AFC for ; Wed, 4 Jan 2017 15:59:07 +0200 (EET) Received: by mail-wj0-f194.google.com with SMTP id hb5so42481760wjc.2 for ; Wed, 04 Jan 2017 05:59:12 -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; bh=phfd8an9lT6KBdm1Qn6eS9HMrVAt5isP5BGcu83Jp6s=; b=R+nt6cjZfO2AwUqzNvGyHioAL4TJDslvwMWuqUxElHdrDCU9CPcZlJU6nOaNqped+6 sn5UhMXI7njlIWRSGKsJ7wUwB6YCOTNe3ZKwg5c0NwUc1crdD4panKwGlDTQS74143l/ vDJMowIAbC3E01k09N/C4a15OI4aIHNORaCYwAixe0rqUqnoVMCKgjNQkIZA1NNAtBh0 HtxeJ0ypeOBSwYJ8L2YLGTfWHflCcUITXo10AydPwf3pCXSzV78NVsI15++OLwBaPHib 5o7rIctvLDfVEWdwnXIvO+9VCPI/fI9TJzIUFby2n3LEJruiFk0UAoYIewjfQ0ng4Xu9 mzyQ== 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; bh=phfd8an9lT6KBdm1Qn6eS9HMrVAt5isP5BGcu83Jp6s=; b=e7Xe4uB091+56SjMituzj34qg9yQOkVNZKg4tIJmDili3oiC3+CepIwNrerA459w25 sZwiruEVihgBxf9Bsa3RKV93nYwfHAX3C0AVb2HnUxl7jlFW72FCg1oSJ5TygDSKVHaC CbfdkyJtBMRHBbbc5ln/Gs2BVz0exw7NOCd/BfM0s3hAe0GnRl9uyI95zUl1NFaODrHV /xq7vLf8r+CyRE3vZXiaFmWs8iLtQ3KszwJ1pfGKeDWt9E13cRHHI34vs9aIvELmAQPi scGJhA6tS+I28x2sAxcD6fbfCzZRXQs6FfNquGjd1mcLIT+QuXaNwe68S/rikP9FdwRU MFbA== X-Gm-Message-State: AIkVDXL4GCG5HkwseQG4hRyD5rQ4GCI4kPQq98M4inAPpiDxWfKAsCzRd1sJChYLkfXgLQ== X-Received: by 10.194.0.70 with SMTP id 6mr46176203wjc.215.1483537990618; Wed, 04 Jan 2017 05:53:10 -0800 (PST) Received: from localhost.localdomain (2a01cb0c000ea9005c35e70f116a1c8d.ipv6.abo.wanadoo.fr. [2a01:cb0c:e:a900:5c35:e70f:116a:1c8d]) by smtp.gmail.com with ESMTPSA id w18sm95247785wme.9.2017.01.04.05.53.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Jan 2017 05:53:09 -0800 (PST) From: Steve Lhomme To: ffmpeg-devel@ffmpeg.org Date: Wed, 4 Jan 2017 14:52:40 +0100 Message-Id: <20170104135243.13512-4-robux4@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170104135243.13512-1-robux4@gmail.com> References: <20170104135243.13512-1-robux4@gmail.com> Subject: [FFmpeg-devel] [PATCH 3/6] ffmpeg: dxva2: move the DXVA GUID definitions outside of the template 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- Makefile | 2 +- ffmpeg_dxva2.c | 1 + ffmpeg_dxva_template.c | 7 ++++++- ffmpeg_guid.c | 20 ++++++++++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 ffmpeg_guid.c diff --git a/Makefile b/Makefile index 8aa72fd..25e1d54 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ ifndef CONFIG_VIDEOTOOLBOX OBJS-ffmpeg-$(CONFIG_VDA) += ffmpeg_videotoolbox.o endif OBJS-ffmpeg-$(CONFIG_CUVID) += ffmpeg_cuvid.o -OBJS-ffmpeg-$(HAVE_DXVA2_LIB) += ffmpeg_dxva2.o +OBJS-ffmpeg-$(HAVE_DXVA2_LIB) += ffmpeg_dxva2.o ffmpeg_guid.o OBJS-ffmpeg-$(HAVE_VDPAU_X11) += ffmpeg_vdpau.o OBJS-ffserver += ffserver_config.o diff --git a/ffmpeg_dxva2.c b/ffmpeg_dxva2.c index e07f2b8..dd19fec 100644 --- a/ffmpeg_dxva2.c +++ b/ffmpeg_dxva2.c @@ -63,6 +63,7 @@ typedef struct dxva_context DXVA_AV_CONTEXT; typedef IDirectXVideoDecoderService *DXVA_DECODER_SERVICE; #include "ffmpeg_dxva_template.c" +#include DEFINE_GUID(IID_IDirectXVideoDecoderService, 0xfc51a551,0xd5e7,0x11d9,0xaf,0x55,0x00,0x05,0x4e,0x43,0xff,0x02); static void dxva2_uninit(AVCodecContext *s) diff --git a/ffmpeg_dxva_template.c b/ffmpeg_dxva_template.c index 87d33f2..1a7d26e 100644 --- a/ffmpeg_dxva_template.c +++ b/ffmpeg_dxva_template.c @@ -16,9 +16,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef INITGUID +#include +#endif + /* define all the GUIDs used directly here, to avoid problems with inconsistent dxva2api.h versions in mingw-w64 and different MSVC version */ -#include DEFINE_GUID(DXVA2_ModeMPEG2_VLD, 0xee27417f, 0x5e28,0x4e65,0xbe,0xea,0x1d,0x26,0xb5,0x08,0xad,0xc9); DEFINE_GUID(DXVA2_ModeMPEG2and1_VLD, 0x86695f12, 0x340e,0x4f04,0x9f,0xd3,0x92,0x53,0xdd,0x32,0x74,0x60); DEFINE_GUID(DXVA2_ModeH264_E, 0x1b81be68, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); @@ -32,6 +35,7 @@ DEFINE_GUID(DXVA2_NoEncrypt, 0x1b81beD0, 0xa0c7,0x11d3,0xb9,0x84,0x00,0 DEFINE_GUID(DXVA2_ModeVP9_VLD_Profile0, 0x463707f8, 0xa1d0,0x4585,0x87,0x6d,0x83,0xaa,0x6d,0x60,0xb8,0x9e); DEFINE_GUID(GUID_NULL, 0x00000000, 0x0000,0x0000,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00); +#ifndef INITGUID typedef struct dxva_mode { const GUID *guid; enum AVCodecID codec; @@ -293,3 +297,4 @@ fail: dxva_uninit(s); return AVERROR(EINVAL); } +#endif /* INITGUID */ diff --git a/ffmpeg_guid.c b/ffmpeg_guid.c new file mode 100644 index 0000000..4a12227 --- /dev/null +++ b/ffmpeg_guid.c @@ -0,0 +1,20 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include "ffmpeg_dxva_template.c"