ホーム › Media.MediaFoundation › DXVA_DeinterlaceQueryModeCaps
DXVA_DeinterlaceQueryModeCaps
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Size | DWORD | 4 | +0 | +0 | 本構造体のバイトサイズを示す。バージョン判定に用いる。 |
| Guid | GUID | 16 | +4 | +4 | 能力を問い合わせる対象のデインターレースモードGUIDである。 |
| VideoDesc | DXVA_VideoDesc | 36 | +20 | +20 | 問い合わせ対象のビデオ記述情報である。 |
各言語での定義
#include <windows.h>
// DXVA_Frequency (x64 8 / x86 8 バイト)
typedef struct DXVA_Frequency {
DWORD Numerator;
DWORD Denominator;
} DXVA_Frequency;
// DXVA_VideoDesc (x64 36 / x86 36 バイト)
typedef struct DXVA_VideoDesc {
DWORD Size;
DWORD SampleWidth;
DWORD SampleHeight;
DWORD SampleFormat;
D3DFORMAT d3dFormat;
DXVA_Frequency InputSampleFreq;
DXVA_Frequency OutputFrameFreq;
} DXVA_VideoDesc;
// DXVA_DeinterlaceQueryModeCaps (x64 56 / x86 56 バイト)
typedef struct DXVA_DeinterlaceQueryModeCaps {
DWORD Size;
GUID Guid;
DXVA_VideoDesc VideoDesc;
} DXVA_DeinterlaceQueryModeCaps;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVA_Frequency
{
public uint Numerator;
public uint Denominator;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVA_VideoDesc
{
public uint Size;
public uint SampleWidth;
public uint SampleHeight;
public uint SampleFormat;
public uint d3dFormat;
public DXVA_Frequency InputSampleFreq;
public DXVA_Frequency OutputFrameFreq;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVA_DeinterlaceQueryModeCaps
{
public uint Size;
public Guid Guid;
public DXVA_VideoDesc VideoDesc;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVA_Frequency
Public Numerator As UInteger
Public Denominator As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVA_VideoDesc
Public Size As UInteger
Public SampleWidth As UInteger
Public SampleHeight As UInteger
Public SampleFormat As UInteger
Public d3dFormat As UInteger
Public InputSampleFreq As DXVA_Frequency
Public OutputFrameFreq As DXVA_Frequency
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVA_DeinterlaceQueryModeCaps
Public Size As UInteger
Public Guid As Guid
Public VideoDesc As DXVA_VideoDesc
End Structureimport ctypes
from ctypes import wintypes
class DXVA_Frequency(ctypes.Structure):
_fields_ = [
("Numerator", wintypes.DWORD),
("Denominator", wintypes.DWORD),
]
class DXVA_VideoDesc(ctypes.Structure):
_fields_ = [
("Size", wintypes.DWORD),
("SampleWidth", wintypes.DWORD),
("SampleHeight", wintypes.DWORD),
("SampleFormat", wintypes.DWORD),
("d3dFormat", wintypes.DWORD),
("InputSampleFreq", DXVA_Frequency),
("OutputFrameFreq", DXVA_Frequency),
]
class DXVA_DeinterlaceQueryModeCaps(ctypes.Structure):
_fields_ = [
("Size", wintypes.DWORD),
("Guid", GUID),
("VideoDesc", DXVA_VideoDesc),
]#[repr(C)]
pub struct DXVA_Frequency {
pub Numerator: u32,
pub Denominator: u32,
}
#[repr(C)]
pub struct DXVA_VideoDesc {
pub Size: u32,
pub SampleWidth: u32,
pub SampleHeight: u32,
pub SampleFormat: u32,
pub d3dFormat: u32,
pub InputSampleFreq: DXVA_Frequency,
pub OutputFrameFreq: DXVA_Frequency,
}
#[repr(C)]
pub struct DXVA_DeinterlaceQueryModeCaps {
pub Size: u32,
pub Guid: GUID,
pub VideoDesc: DXVA_VideoDesc,
}import "golang.org/x/sys/windows"
type DXVA_Frequency struct {
Numerator uint32
Denominator uint32
}
type DXVA_VideoDesc struct {
Size uint32
SampleWidth uint32
SampleHeight uint32
SampleFormat uint32
d3dFormat uint32
InputSampleFreq DXVA_Frequency
OutputFrameFreq DXVA_Frequency
}
type DXVA_DeinterlaceQueryModeCaps struct {
Size uint32
Guid windows.GUID
VideoDesc DXVA_VideoDesc
}type
DXVA_Frequency = record
Numerator: DWORD;
Denominator: DWORD;
end;
DXVA_VideoDesc = record
Size: DWORD;
SampleWidth: DWORD;
SampleHeight: DWORD;
SampleFormat: DWORD;
d3dFormat: DWORD;
InputSampleFreq: DXVA_Frequency;
OutputFrameFreq: DXVA_Frequency;
end;
DXVA_DeinterlaceQueryModeCaps = record
Size: DWORD;
Guid: TGUID;
VideoDesc: DXVA_VideoDesc;
end;const DXVA_Frequency = extern struct {
Numerator: u32,
Denominator: u32,
};
const DXVA_VideoDesc = extern struct {
Size: u32,
SampleWidth: u32,
SampleHeight: u32,
SampleFormat: u32,
d3dFormat: u32,
InputSampleFreq: DXVA_Frequency,
OutputFrameFreq: DXVA_Frequency,
};
const DXVA_DeinterlaceQueryModeCaps = extern struct {
Size: u32,
Guid: GUID,
VideoDesc: DXVA_VideoDesc,
};type
DXVA_Frequency {.bycopy.} = object
Numerator: uint32
Denominator: uint32
DXVA_VideoDesc {.bycopy.} = object
Size: uint32
SampleWidth: uint32
SampleHeight: uint32
SampleFormat: uint32
d3dFormat: uint32
InputSampleFreq: DXVA_Frequency
OutputFrameFreq: DXVA_Frequency
DXVA_DeinterlaceQueryModeCaps {.bycopy.} = object
Size: uint32
Guid: GUID
VideoDesc: DXVA_VideoDescstruct DXVA_Frequency
{
uint Numerator;
uint Denominator;
}
struct DXVA_VideoDesc
{
uint Size;
uint SampleWidth;
uint SampleHeight;
uint SampleFormat;
uint d3dFormat;
DXVA_Frequency InputSampleFreq;
DXVA_Frequency OutputFrameFreq;
}
struct DXVA_DeinterlaceQueryModeCaps
{
uint Size;
GUID Guid;
DXVA_VideoDesc VideoDesc;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DXVA_DeinterlaceQueryModeCaps サイズ: 56 バイト(x64)
dim st, 14 ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; Size : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Guid : GUID (+4, 16byte) varptr(st)+4 を基点に操作(16byte:入れ子/配列)
; VideoDesc : DXVA_VideoDesc (+20, 36byte) varptr(st)+20 を基点に操作(36byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global DXVA_Frequency
#field int Numerator
#field int Denominator
#endstruct
#defstruct global DXVA_VideoDesc
#field int Size
#field int SampleWidth
#field int SampleHeight
#field int SampleFormat
#field int d3dFormat
#field DXVA_Frequency InputSampleFreq
#field DXVA_Frequency OutputFrameFreq
#endstruct
#defstruct global DXVA_DeinterlaceQueryModeCaps
#field int Size
#field GUID Guid
#field DXVA_VideoDesc VideoDesc
#endstruct
stdim st, DXVA_DeinterlaceQueryModeCaps ; NSTRUCT 変数を確保
st->Size = 100
mes "Size=" + st->Size