ホーム › Media.DirectShow › DXVA_COPPSetProtectionLevelCmdData
DXVA_COPPSetProtectionLevelCmdData
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ProtType | DWORD | 4 | +0 | +0 | 設定する保護種別(HDCP・CGMS-A等)を示す値。 |
| ProtLevel | DWORD | 4 | +4 | +4 | 設定する保護レベルを示す値。 |
| ExtendedInfoChangeMask | DWORD | 4 | +8 | +8 | 拡張情報の変更対象を示すマスク。 |
| ExtendedInfoData | DWORD | 4 | +12 | +12 | 拡張情報のデータ値。 |
各言語での定義
#include <windows.h>
// DXVA_COPPSetProtectionLevelCmdData (x64 16 / x86 16 バイト)
typedef struct DXVA_COPPSetProtectionLevelCmdData {
DWORD ProtType;
DWORD ProtLevel;
DWORD ExtendedInfoChangeMask;
DWORD ExtendedInfoData;
} DXVA_COPPSetProtectionLevelCmdData;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVA_COPPSetProtectionLevelCmdData
{
public uint ProtType;
public uint ProtLevel;
public uint ExtendedInfoChangeMask;
public uint ExtendedInfoData;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVA_COPPSetProtectionLevelCmdData
Public ProtType As UInteger
Public ProtLevel As UInteger
Public ExtendedInfoChangeMask As UInteger
Public ExtendedInfoData As UInteger
End Structureimport ctypes
from ctypes import wintypes
class DXVA_COPPSetProtectionLevelCmdData(ctypes.Structure):
_fields_ = [
("ProtType", wintypes.DWORD),
("ProtLevel", wintypes.DWORD),
("ExtendedInfoChangeMask", wintypes.DWORD),
("ExtendedInfoData", wintypes.DWORD),
]#[repr(C)]
pub struct DXVA_COPPSetProtectionLevelCmdData {
pub ProtType: u32,
pub ProtLevel: u32,
pub ExtendedInfoChangeMask: u32,
pub ExtendedInfoData: u32,
}import "golang.org/x/sys/windows"
type DXVA_COPPSetProtectionLevelCmdData struct {
ProtType uint32
ProtLevel uint32
ExtendedInfoChangeMask uint32
ExtendedInfoData uint32
}type
DXVA_COPPSetProtectionLevelCmdData = record
ProtType: DWORD;
ProtLevel: DWORD;
ExtendedInfoChangeMask: DWORD;
ExtendedInfoData: DWORD;
end;const DXVA_COPPSetProtectionLevelCmdData = extern struct {
ProtType: u32,
ProtLevel: u32,
ExtendedInfoChangeMask: u32,
ExtendedInfoData: u32,
};type
DXVA_COPPSetProtectionLevelCmdData {.bycopy.} = object
ProtType: uint32
ProtLevel: uint32
ExtendedInfoChangeMask: uint32
ExtendedInfoData: uint32struct DXVA_COPPSetProtectionLevelCmdData
{
uint ProtType;
uint ProtLevel;
uint ExtendedInfoChangeMask;
uint ExtendedInfoData;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DXVA_COPPSetProtectionLevelCmdData サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; ProtType : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ProtLevel : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ExtendedInfoChangeMask : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ExtendedInfoData : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DXVA_COPPSetProtectionLevelCmdData
#field int ProtType
#field int ProtLevel
#field int ExtendedInfoChangeMask
#field int ExtendedInfoData
#endstruct
stdim st, DXVA_COPPSetProtectionLevelCmdData ; NSTRUCT 変数を確保
st->ProtType = 100
mes "ProtType=" + st->ProtType