IServiceLocationDescriptor
COM公式ドキュメント
Advanced Television Systems Committee (ATSC) の Virtual Channel Table (VCT) 内にある Service Location Descriptor から情報を取得します。
メソッド 5
vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。
Advanced Television Systems Committee (ATSC) の Service Location Descriptor から、transport stream 内で Program Clock Reference (PCR) を含むパケットのプログラム ID (PID) を取得します。
| pwVal | WORD* | out | PID 値を受け取ります。 |
戻り値
このメソッドが成功した場合は S_OK を返します。それ以外の場合は HRESULT エラーコードを返します。
Advanced Television Systems Committee (ATSC) の service location descriptor における elementary stream の数を取得します。
| pbVal | BYTE* | out | elementary stream の数を受け取ります。 |
戻り値
このメソッドが成功した場合は S_OK を返します。それ以外の場合は HRESULT エラーコードを返します。
Advanced Television Systems Committee (ATSC) の Service Location Descriptor から、elementary stream の種類を識別するコードを取得します。
| bIndex | BYTE | in | elementary stream を指定します。インデックスは 0 から始まります。descriptor 内の elementary stream の数を取得するには、IServiceLocationDescriptor::GetNumberOfElements メソッドを呼び出します。 | ||||||||||||||||||
| pbVal | BYTE* | out | elementary stream の種類コードを受け取ります。次のいずれかの値になります。
|
戻り値
このメソッドが成功した場合は S_OK を返します。それ以外の場合は HRESULT エラーコードを返します。
Advanced Television Systems Committee (ATSC) の Service Location Descriptor から、elementary stream を識別するプログラム ID (PID) を取得します。
| bIndex | BYTE | in | elementary stream を指定します。インデックスは 0 から始まります。descriptor 内の elementary stream の数を取得するには、IServiceLocationDescriptor::GetNumberOfElements メソッドを呼び出します。 |
| pwVal | WORD* | out | elementary stream の PID 値を受け取ります。 |
戻り値
このメソッドが成功した場合は S_OK を返します。それ以外の場合は HRESULT エラーコードを返します。
Advanced Television Systems Committee (ATSC) の service location descriptor における 3 文字の ISO 639 言語コードを取得します。
| bIndex | BYTE | in | elementary stream を指定します。インデックスは 0 から始まります。descriptor 内の elementary stream の数を取得するには、IServiceLocationDescriptor::GetNumberOfElements メソッドを呼び出します。 |
| LangCode | BYTE* | out | 言語コードを受け取るバッファーへのポインター。言語コードの一覧については、ISO 639 Code Tables を参照してください。 |
戻り値
このメソッドが成功した場合は S_OK を返します。それ以外の場合は HRESULT エラーコードを返します。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
HSP用 COM定義
#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"。
#define global IID_IServiceLocationDescriptor "{58C3C827-9D91-4215-BFF3-820A49F0904C}" #usecom global IServiceLocationDescriptor IID_IServiceLocationDescriptor "{}" #comfunc global IServiceLocationDescriptor_GetPCR_PID 3 var #comfunc global IServiceLocationDescriptor_GetNumberOfElements 4 var #comfunc global IServiceLocationDescriptor_GetElementStreamType 5 int,var #comfunc global IServiceLocationDescriptor_GetElementPID 6 int,var #comfunc global IServiceLocationDescriptor_GetElementLanguageCode 7 int,var ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。#define global IID_IServiceLocationDescriptor "{58C3C827-9D91-4215-BFF3-820A49F0904C}" #usecom global IServiceLocationDescriptor IID_IServiceLocationDescriptor "{}" #comfunc global IServiceLocationDescriptor_GetPCR_PID 3 sptr #comfunc global IServiceLocationDescriptor_GetNumberOfElements 4 sptr #comfunc global IServiceLocationDescriptor_GetElementStreamType 5 int,sptr #comfunc global IServiceLocationDescriptor_GetElementPID 6 int,sptr #comfunc global IServiceLocationDescriptor_GetElementLanguageCode 7 int,sptr ; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。 ; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。