ホーム › Media.DirectShow › DVD_PLAYBACK_LOCATION
DVD_PLAYBACK_LOCATION
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| TitleNum | DWORD | 4 | +0 | +0 | ディスク全体に対するタイトル番号。Video Title Set_Title Track Number (VTS_TTN) ではなく、Title Track Number (TTN) です。 |
| ChapterNum | DWORD | 4 | +4 | +4 | タイトル内のパート番号 (part-of-title number)。単純な線形ムービーでない場合は 0xffffffff です。 |
| TimeCode | DWORD | 4 | +8 | +8 | タイムコード。現在の再生時間には DVD_TIMECODE を使用してください。単純な線形ムービーでない場合は 0xFFFFFFFF です。 |
公式ドキュメント
[このページに関連する機能である DirectShow はレガシー機能です。この機能は MediaPlayer、IMFMediaEngine、および Audio/Video Capture in Media Foundation に置き換えられています。これらの機能は Windows 10 および Windows 11 向けに最適化されています。Microsoft は、可能な場合は新しいコードで DirectShow ではなく MediaPlayer、IMFMediaEngine、Audio/Video Capture in Media Foundation を使用することを強く推奨します。レガシー API を使用している既存のコードについても、可能であれば新しい API を使用するように書き直すことをお勧めします。]
DVD_PLAYBACK_LOCATION 構造体は DVD の再生位置を示します。
解説(Remarks)
単純な線形ムービーの場合、TitleNum と ChapterNum、または TitleNum と TimeCode があれば再生位置を保存するのに十分です。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// DVD_PLAYBACK_LOCATION (x64 12 / x86 12 バイト)
typedef struct DVD_PLAYBACK_LOCATION {
DWORD TitleNum;
DWORD ChapterNum;
DWORD TimeCode;
} DVD_PLAYBACK_LOCATION;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_PLAYBACK_LOCATION
{
public uint TitleNum;
public uint ChapterNum;
public uint TimeCode;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_PLAYBACK_LOCATION
Public TitleNum As UInteger
Public ChapterNum As UInteger
Public TimeCode As UInteger
End Structureimport ctypes
from ctypes import wintypes
class DVD_PLAYBACK_LOCATION(ctypes.Structure):
_fields_ = [
("TitleNum", wintypes.DWORD),
("ChapterNum", wintypes.DWORD),
("TimeCode", wintypes.DWORD),
]#[repr(C)]
pub struct DVD_PLAYBACK_LOCATION {
pub TitleNum: u32,
pub ChapterNum: u32,
pub TimeCode: u32,
}import "golang.org/x/sys/windows"
type DVD_PLAYBACK_LOCATION struct {
TitleNum uint32
ChapterNum uint32
TimeCode uint32
}type
DVD_PLAYBACK_LOCATION = record
TitleNum: DWORD;
ChapterNum: DWORD;
TimeCode: DWORD;
end;const DVD_PLAYBACK_LOCATION = extern struct {
TitleNum: u32,
ChapterNum: u32,
TimeCode: u32,
};type
DVD_PLAYBACK_LOCATION {.bycopy.} = object
TitleNum: uint32
ChapterNum: uint32
TimeCode: uint32struct DVD_PLAYBACK_LOCATION
{
uint TitleNum;
uint ChapterNum;
uint TimeCode;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DVD_PLAYBACK_LOCATION サイズ: 12 バイト(x64)
dim st, 3 ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; TitleNum : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ChapterNum : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; TimeCode : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DVD_PLAYBACK_LOCATION
#field int TitleNum
#field int ChapterNum
#field int TimeCode
#endstruct
stdim st, DVD_PLAYBACK_LOCATION ; NSTRUCT 変数を確保
st->TitleNum = 100
mes "TitleNum=" + st->TitleNum