(control.h) IBasicVideo 介面

[與此頁面 相關的功能 DirectShow 是舊版功能。 它已被 MediaPlayerIMFMediaEngineMedia Foundation 中的音訊/視訊擷取取代。 這些功能已針對 Windows 10 和 Windows 11 進行優化。 Microsoft 強烈建議新程式代碼盡可能使用 MediaPlayerIMFMediaEngine音訊/視訊擷取 ,而不是 DirectShow。 Microsoft 建議盡可能重寫使用舊版 API 的現有程式代碼,以使用新的 API。]

介面會 IBasicVideo 設定視訊屬性,例如目的地和來源矩形。 影片 轉譯器 篩選和視訊混合轉譯器篩選會實作此介面,但介面會透過篩選圖形管理員向應用程式公開。 應用程式應該一律從篩選圖形管理員擷取此介面。

IBasicVideo介面會操作與視訊影像相關聯的下列矩形:

  • 來源矩形是顯示的原始影像部分。
  • 目的矩形是接收來源矩形的視訊視窗部分。
  • 矩形是原始的視訊影像。
換句話說,影片轉譯器會將影像裁剪到來源矩形,然後將裁剪的影像延展或縮小到目的地矩形。 所有矩形尺寸都會以像素為單位來指定。

影片轉譯器上設定的屬性會在連續連接與中斷連線之間持續存在。

錯誤碼:如果視訊轉譯器篩選未連接到另一個篩選,所有方法都會傳回錯誤碼VFW_E_NOT_CONNECTED。 對於 Filter Graph Manager 的實作,如果圖表不包含視訊轉譯器篩選,則所有方法都會傳回E_NOINTERFACE。 請注意,即使圖形不包含視訊轉譯器,篩選圖形管理員也會公開介面,因此應用程式可以在建置圖形之前查詢介面。

繼承

IBasicVideo 介面繼承自 IDispatch 介面。 IBasicVideo 也有下列類型的成員:

方法

IBasicVideo 介面具有這些方法。

 
IBasicVideo::get_AvgTimePerFrame

get_AvgTimePerFrame方法會擷取連續畫面之間的平均時間。
IBasicVideo::get_BitErrorRate

get_BitErrorRate 方法會擷取視訊數據流的近似位錯誤率。
IBasicVideo::get_BitRate

get_BitRate 方法會擷取視訊串流的近似比特率。
IBasicVideo::get_DestinationHeight

get_DestinationHeight 方法會擷取目的矩形的高度。
IBasicVideo::get_DestinationLeft

get_DestinationLeft 方法會擷取目的矩形的 X 座標。
IBasicVideo::get_DestinationTop

get_DestinationTop 方法會擷取目的矩形的 Y 座標。
IBasicVideo::get_DestinationWidth

get_DestinationWidth 方法會擷取目的矩形的寬度。
IBasicVideo::get_SourceHeight

get_SourceHeight 方法會擷取來源矩形的高度。
IBasicVideo::get_SourceLeft

get_SourceLeft 方法會擷取來源矩形的 X 座標。
IBasicVideo::get_SourceTop

get_SourceTop 方法會擷取來源矩形的 Y 座標。
IBasicVideo::get_SourceWidth

get_SourceWidth 方法會擷取來源矩形的寬度。
IBasicVideo::get_VideoHeight

get_VideoHeight 方法會擷取影片的原生高度。
IBasicVideo::get_VideoWidth

get_VideoWidth 方法會擷取影片的原生寬度。
IBasicVideo::GetCurrentImage

GetCurrentImage 方法會擷取在轉譯器等候的目前影像。
IBasicVideo::GetDestinationPosition

GetDestinationPosition 方法會擷取目的矩形的位置。
IBasicVideo::GetSourcePosition

GetSourcePosition 方法會擷取來源矩形的位置。
IBasicVideo::GetVideoPaletteEntries

GetVideoPaletteEntries 方法會擷取影片的調色盤色彩。
IBasicVideo::GetVideoSize

GetVideoSize 方法會擷取原生視訊維度。
IBasicVideo::IsUsingDefaultDestination

IsUsingDefaultDestination 方法會查詢轉譯器是否使用預設目的地矩形。
IBasicVideo::IsUsingDefaultSource

IsUsingDefaultSource 方法會查詢轉譯器是否使用預設來源矩形。
IBasicVideo::p ut_DestinationHeight

put_DestinationHeight方法會設定目的矩形的高度。
IBasicVideo::p ut_DestinationLeft

put_DestinationLeft 方法會設定目的矩形的 X 座標。
IBasicVideo::p ut_DestinationTop

put_DestinationTop 方法會設定目的矩形的 Y 座標。
IBasicVideo::p ut_DestinationWidth

put_DestinationWidth 方法會設定目的矩形的寬度。
IBasicVideo::p ut_SourceHeight

put_SourceHeight 方法會設定來源矩形的高度。
IBasicVideo::p ut_SourceLeft

put_SourceLeft 方法會設定來源矩形的 X 座標。
IBasicVideo::p ut_SourceTop

put_SourceTop 方法會設定來源矩形的 Y 座標。
IBasicVideo::p ut_SourceWidth

put_SourceWidth 方法會設定來源矩形的寬度。
IBasicVideo::SetDefaultDestinationPosition

SetDefaultDestinationPosition 方法會還原為預設目的地矩形。 呼叫這個方法之後,視訊轉譯器會使用整個視窗播放。
IBasicVideo::SetDefaultSourcePosition

SetDefaultSourcePosition 方法會還原為預設來源矩形。 呼叫此方法之後,影片轉譯器會使用整個視訊影像,而不裁剪。
IBasicVideo::SetDestinationPosition

SetDestinationPosition 方法會設定目的矩形。
IBasicVideo::SetSourcePosition

SetSourcePosition 方法會設定來源矩形。

規格需求

需求
最低支援的用戶端 Windows 2000 Professional [僅限傳統型應用程式]
最低支援的伺服器 Windows 2000 Server [僅限桌面應用程式]
目標平台 Windows
標頭 control.h (包含 Dshow.h)

另請參閱

IDispatch