dshow

package
v0.0.0-...-8faa606 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AM_MEDIA_TYPE

type AM_MEDIA_TYPE struct {
	Majortype win.GUID
	Subtype   win.GUID

	LSampleSize uint32
	Formattype  win.GUID
	IUnknown    com.IUnknown
	CbFormat    uint32
	PbFormat    *byte
	// contains filtered or unexported fields
}

AM_MEDIA_TYPE struct.

func (*AM_MEDIA_TYPE) BFixedSizeSamples

func (mt *AM_MEDIA_TYPE) BFixedSizeSamples() bool

func (*AM_MEDIA_TYPE) BTemporalCompression

func (mt *AM_MEDIA_TYPE) BTemporalCompression() bool

func (*AM_MEDIA_TYPE) SetBFixedSizeSamples

func (mt *AM_MEDIA_TYPE) SetBFixedSizeSamples(val bool)

func (*AM_MEDIA_TYPE) SetBTemporalCompression

func (mt *AM_MEDIA_TYPE) SetBTemporalCompression(val bool)

type FILTER_INFO

type FILTER_INFO struct {
	PGraph IFilterGraph
	// contains filtered or unexported fields
}

FILTER_INFO struct.

func (*FILTER_INFO) AchName

func (fi *FILTER_INFO) AchName() string

func (*FILTER_INFO) SetAchName

func (fi *FILTER_INFO) SetAchName(val string)

type IBaseFilter

type IBaseFilter interface {
	IMediaFilter

	// [EnumPins] COM method.
	//
	// ⚠️ You must defer IEnumPins.Release() on the returned object.
	//
	// [EnumPins]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ibasefilter-enumpins
	EnumPins() IEnumPins

	// [FindPin] COM method.
	//
	// ⚠️ You must defer IPin.Release() on the returned object.
	//
	// [FindPin]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ibasefilter-findpin
	FindPin(id string) (IPin, bool)

	// [JoinFilterGraph] COM method.
	//
	// [JoinFilterGraph]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ibasefilter-joinfiltergraph
	JoinFilterGraph(graph IFilterGraph, name string) error

	// [QueryFilterInfo] COM method.
	//
	// ⚠️ You must defer IFilterGraph.Release() on PGraph field of the info
	// object.
	//
	// [QueryFilterInfo]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ibasefilter-queryfilterinfo
	QueryFilterInfo(info *FILTER_INFO)

	// [QueryVendorInfo] COM method.
	//
	// Returns false if the method is not supported.
	//
	// [QueryVendorInfo]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ibasefilter-queryvendorinfo
	QueryVendorInfo() (string, bool)
}

IBaseFilter COM interface.

func NewIBaseFilter

func NewIBaseFilter(base com.IUnknown) IBaseFilter

Constructs a COM object from the base IUnknown.

⚠️ You must defer IBaseFilter.Release().

Examples

Creating an Enhanced Video Renderer (EVR):

evh := dshow.NewIBaseFilter(
	com.CoCreateInstance(
		dshowco.CLSID_EnhancedVideoRenderer, nil,
		comco.CLSCTX_INPROC_SERVER,
		dshowco.IID_IBaseFilter),
)
defer evh.Release()

Creating a Video Media Renderer 9 (VMR9):

vmr9 := dshow.NewIBaseFilter(
	com.CoCreateInstance(
		dshowco.CLSID_VideoMixingRenderer9, nil,
		comco.CLSCTX_INPROC_SERVER,
		dshowco.IID_IBaseFilter),
)
defer vmr9.Release()

type IBasicAudio

type IBasicAudio interface {
	autom.IDispatch

	// [GetBalance] COM method.
	//
	// [GetBalance]: https://learn.microsoft.com/en-us/windows/win32/api/control/nf-control-ibasicaudio-get_balance
	GetBalance() int

	// [GetVolume] COM method.
	//
	// [GetVolume]: https://learn.microsoft.com/en-us/windows/win32/api/control/nf-control-ibasicaudio-get_volume
	GetVolume() int

	// [PutBalance] COM method.
	//
	// [PutBalance]: https://learn.microsoft.com/en-us/windows/win32/api/control/nf-control-ibasicaudio-put_balance
	PutBalance(balance int)

	// [PutVolume] COM method.
	//
	// [PutVolume]: https://learn.microsoft.com/en-us/windows/win32/api/control/nf-control-ibasicaudio-put_volume
	PutVolume(volume int)
}

IBasicAudio COM interface.

func NewIBasicAudio

func NewIBasicAudio(base com.IUnknown) IBasicAudio

Constructs a COM object from the base IUnknown.

⚠️ You must defer IBasicAudio.Release().

Example

var gb dshow.IGraphBuilder // initialized somewhere

ba := dshow.NewIBasicAudio(
	gb.QueryInterface(dshowco.IID_IBasicAudio),
)
defer ba.Release()

type IEnumFilters

type IEnumFilters interface {
	com.IUnknown

	// [Clone] COM method.
	//
	// ⚠️ You must defer IEnumFilters.Release() on the returned object.
	//
	// [Clone]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ienumfilters-clone
	Clone() IEnumFilters

	// This helper method calls IEnumFilters.Skip() until the end of the enum to
	// retrieve the actual number of filters, then calls IEnumFilters.Reset().
	Count() int

	// This helper method calls Next() to retrieve all filters, then calls
	// Reset().
	//
	// ⚠️ You must defer IBaseFilter.Release() on each returned object.
	GetAll() []IBaseFilter

	// [Next] COM method.
	//
	// ⚠️ You must defer IBaseFilter.Release() on the returned object.
	//
	// [Next]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ienumfilters-next
	Next() (IBaseFilter, bool)

	// [Reset] COM method.
	//
	// [Reset]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ienumfilters-reset
	Reset()

	// [Skip] COM method.
	//
	// [Skip]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ienumfilters-skip
	Skip(numFilters int) bool
}

IEnumFilters COM interface.

func NewIEnumFilters

func NewIEnumFilters(base com.IUnknown) IEnumFilters

Constructs a COM object from the base IUnknown.

⚠️ You must defer IEnumFilters.Release().

type IEnumMediaTypes

type IEnumMediaTypes interface {
	com.IUnknown

	// [Clone] COM method.
	//
	// ⚠️ You must defer IEnumMediaTypes.Release() on the returned object.
	//
	// [Clone]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ienummediatypes-clone
	Clone() IEnumMediaTypes

	// This helper method calls IEnumMediaTypes.Skip() until the end of the enum
	// to retrieve the actual number of media types, then calls
	// IEnumMediaTypes.Reset().
	Count() int

	// [Next] COM method.
	//
	// [Next]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ienummediatypes-next
	Next(mt *AM_MEDIA_TYPE) bool

	// [Reset] COM method.
	//
	// [Reset]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ienummediatypes-reset
	Reset()

	// [Skip] COM method.
	//
	// [Skip]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ienummediatypes-skip
	Skip(numMediaTypes int) bool
}

IEnumMediaTypes COM interface.

func NewIEnumMediaTypes

func NewIEnumMediaTypes(base com.IUnknown) IEnumMediaTypes

Constructs a COM object from the base IUnknown.

⚠️ You must defer IEnumMediaTypes.Release().

type IEnumPins

type IEnumPins interface {
	com.IUnknown

	// [Clone] COM method.
	//
	// ⚠️ You must defer IEnumPins.Release() on the returned object.
	//
	// [Clone]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ienumpins-clone
	Clone() IEnumPins

	// This helper method calls IEnumPins.Skip() until the end of the enum to
	// retrieve the actual number of pins, then calls IEnumPins.Reset().
	Count() int

	// This helper method calls Next() to retrieve all pins, then calls Reset().
	//
	// ⚠️ You must defer IPin.Release() on each returned object.
	GetAll() []IPin

	// [Next] COM method.
	//
	// ⚠️ You must defer IPin.Release() on the returned object.
	//
	// [Next]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ienumpins-next
	Next() (IPin, bool)

	// [Reset] COM method.
	//
	// [Reset]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ienumpins-reset
	Reset()

	// [Skip] COM method.
	//
	// [Skip]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ienumpins-skip
	Skip(numPins int) bool
}

IEnumPins COM interface.

func NewIEnumPins

func NewIEnumPins(base com.IUnknown) IEnumPins

Constructs a COM object from the base IUnknown.

⚠️ You must defer IEnumPins.Release().

type IFileSinkFilter

type IFileSinkFilter interface {
	com.IUnknown

	// [GetCurFile] COM method.
	//
	// Returns false if no file is opened.
	//
	// [GetCurFile]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ifilesinkfilter-getcurfile
	GetCurFile(mt *AM_MEDIA_TYPE) (string, bool)

	// [SetFileName] COM method.
	//
	// [SetFileName]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ifilesinkfilter-setfilename
	SetFileName(fileName string, mt *AM_MEDIA_TYPE)
}

IFileSinkFilter COM interface.

func NewIFileSinkFilter

func NewIFileSinkFilter(base com.IUnknown) IFileSinkFilter

Constructs a COM object from the base IUnknown.

⚠️ You must defer IFileSinkFilter.Release().

type IFileSinkFilter2

type IFileSinkFilter2 interface {
	IFileSinkFilter

	// [GetMode] COM method.
	//
	// [GetMode]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ifilesinkfilter2-getmode
	GetMode() dshowco.AM_FILE

	// [SetMode] COM method.
	//
	// [SetMode]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ifilesinkfilter2-setmode
	SetMode(flags dshowco.AM_FILE)
}

IFileSinkFilter2 COM interface.

func NewIFileSinkFilter2

func NewIFileSinkFilter2(base com.IUnknown) IFileSinkFilter2

Constructs a COM object from the base IUnknown.

⚠️ You must defer IFileSinkFilter2.Release().

type IFileSourceFilter

type IFileSourceFilter interface {
	com.IUnknown

	// [GetCurFile] COM method.
	//
	// Returns false if no file is opened.
	//
	// [GetCurFile]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ifilesourcefilter-getcurfile
	GetCurFile(mt *AM_MEDIA_TYPE) (string, bool)

	// [Load] COM method.
	//
	// [Load]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ifilesourcefilter-load
	Load(fileName string, mt *AM_MEDIA_TYPE)
}

IFileSourceFilter COM interface.

func NewIFileSourceFilter

func NewIFileSourceFilter(base com.IUnknown) IFileSourceFilter

Constructs a COM object from the base IUnknown.

⚠️ You must defer IFileSourceFilter.Release().

type IFilterGraph

type IFilterGraph interface {
	com.IUnknown

	// [AddFilter] COM method.
	//
	// [AddFilter]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ifiltergraph-addfilter
	AddFilter(filter IBaseFilter, name string) error

	// [ConnectDirect] COM method.
	//
	// [ConnectDirect]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ifiltergraph-connectdirect
	ConnectDirect(pinOut, pinIn IPin, mt *AM_MEDIA_TYPE)

	// [Disconnect] COM method.
	//
	// [Disconnect]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ifiltergraph-disconnect
	Disconnect(pin IPin)

	// [EnumFilters] COM method.
	//
	// ⚠️ You must defer IEnumFilters.Release() on the returned object.
	//
	// [EnumFilters]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ifiltergraph-enumfilters
	EnumFilters() IEnumFilters

	// [FindFilterByName] COM method.
	//
	// ⚠️ You must defer IBaseFilter.Release() on the returned object.
	//
	// [FindFilterByName]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ifiltergraph-findfilterbyname
	FindFilterByName(name string) (IBaseFilter, bool)

	// [Reconnect] COM method.
	//
	// [Reconnect]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ifiltergraph-reconnect
	Reconnect(pin IPin)

	// [RemoveFilter] COM method.
	//
	// [RemoveFilter]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ifiltergraph-removefilter
	RemoveFilter(filter IBaseFilter)

	// [SetDefaultSyncSource] COM method.
	//
	// [SetDefaultSyncSource]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ifiltergraph-setdefaultsyncsource
	SetDefaultSyncSource()
}

IFilterGraph COM interface.

func NewIFilterGraph

func NewIFilterGraph(base com.IUnknown) IFilterGraph

Constructs a COM object from the base IUnknown.

⚠️ You must defer IFilterGraph.Release().

Example

fg := dshow.NewIFilterGraph(
	com.CoCreateInstance(
		dshowco.CLSID_FilterGraph, nil,
		comco.CLSCTX_INPROC_SERVER,
		dshowco.IID_IFilterGraph),
)
defer fg.Release()

type IGraphBuilder

type IGraphBuilder interface {
	IFilterGraph

	// [Abort] COM interface.
	//
	// [Abort]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-igraphbuilder-abort
	Abort()

	// [AddSourceFilter] COM method.
	//
	// ⚠️ You must defer IBaseFilter.Release() on the returned object.
	//
	// [AddSourceFilter]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-igraphbuilder-addsourcefilter
	AddSourceFilter(fileName, filterName string) IBaseFilter

	// [Connect] COM method.
	//
	// [Connect]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-igraphbuilder-connect
	Connect(pinOut, pinIn IPin)

	// [Render] COM method.
	//
	// [Render]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-igraphbuilder-render
	Render(pinOut IPin)

	// [RenderFile] COM method.
	//
	// [RenderFile]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-igraphbuilder-renderfile
	RenderFile(file string) error

	// [SetLogFile] COM method.
	//
	// [SetLogFile]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-igraphbuilder-setlogfile
	SetLogFile(hFile win.HFILE)

	// [ShouldOperationContinue] COM method.
	//
	// [ShouldOperationContinue]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-igraphbuilder-shouldoperationcontinue
	ShouldOperationContinue() bool
}

IGraphBuilder COM interface.

func NewIGraphBuilder

func NewIGraphBuilder(base com.IUnknown) IGraphBuilder

Constructs a COM object from the base IUnknown.

⚠️ You must defer IGraphBuilder.Release().

Example

gb := dshow.NewIGraphBuilder(
	com.CoCreateInstance(
		dshowco.CLSID_FilterGraph, nil,
		comco.CLSCTX_INPROC_SERVER,
		dshowco.IID_IGraphBuilder),
)
defer gb.Release()

type IMFGetService

type IMFGetService interface {
	com.IUnknown

	// [GetService] COM method.
	//
	// ⚠️ You must defer IUnknown.Release() on the returned object.
	//
	// # Example
	//
	// Getting an IMFVideoDisplayControl:
	//
	//	var gs dshow.IMFGetService // initialized somewhere
	//
	//	vdc := dshow.NewIMFVideoDisplayControl(
	//		gs.GetService(
	//			win.NewGuidFromClsid(dshowco.CLSID_MR_VideoRenderService),
	//			win.NewGuidFromIid(dshowco.IID_IMFVideoDisplayControl),
	//		),
	//	)
	//	defer vdc.Release()
	//
	// [GetService]: https://learn.microsoft.com/en-us/windows/win32/api/mfidl/nf-mfidl-imfgetservice-getservice
	GetService(guidService, riid *win.GUID) com.IUnknown
}

IMFGetService COM interface.

func NewIMFGetService

func NewIMFGetService(base com.IUnknown) IMFGetService

Constructs a COM object from the base IUnknown.

⚠️ You must defer IMFGetService.Release().

Example

var vmr dshow.IBaseFilter // initialized somewhere

gs := dshow.NewIMFGetService(
	vmr.QueryInterface(dshowco.IID_IMFGetService),
)
defer gs.Release()

type IMFVideoDisplayControl

type IMFVideoDisplayControl interface {
	com.IUnknown

	// [GetAspectRatioMode] COM method.
	//
	// [GetAspectRatioMode]: https://learn.microsoft.com/en-us/windows/win32/api/evr/nf-evr-imfvideodisplaycontrol-getaspectratiomode
	GetAspectRatioMode() dshowco.MFVideoARMode

	// [GetIdealVideoSize] COM method.
	//
	// Returns the minimum and maximum ideal sizes.
	//
	// [GetIdealVideoSize]: https://learn.microsoft.com/en-us/windows/win32/api/evr/nf-evr-imfvideodisplaycontrol-getidealvideosize
	GetIdealVideoSize() (min, max win.SIZE)

	// [GetNativeVideoSize] COM method.
	//
	// Returns video rectangle and aspect ratio.
	//
	// [GetNativeVideoSize]: https://learn.microsoft.com/en-us/windows/win32/api/evr/nf-evr-imfvideodisplaycontrol-getnativevideosize
	GetNativeVideoSize() (size, aspectRatio win.SIZE)

	// [GetVideoPosition] COM method.
	//
	// [GetVideoPosition]: https://learn.microsoft.com/en-us/windows/win32/api/evr/nf-evr-imfvideodisplaycontrol-getvideoposition
	GetVideoPosition() (source MFVideoNormalizedRect, dest win.RECT)

	// [GetVideoWindow] COM method.
	//
	// [GetVideoWindow]: https://learn.microsoft.com/en-us/windows/win32/api/evr/nf-evr-imfvideodisplaycontrol-getvideowindow
	GetVideoWindow() win.HWND

	// [RepaintVideo] COM method.
	//
	// [RepaintVideo]: https://learn.microsoft.com/en-us/windows/win32/api/evr/nf-evr-imfvideodisplaycontrol-repaintvideo
	RepaintVideo()

	// [SetAspectRatioMode] COM method.
	//
	// [SetAspectRatioMode]: https://learn.microsoft.com/en-us/windows/win32/api/evr/nf-evr-imfvideodisplaycontrol-setaspectratiomode
	SetAspectRatioMode(mode dshowco.MFVideoARMode) error

	// [SetVideoPosition] COM method.
	//
	// [SetVideoPosition]: https://learn.microsoft.com/en-us/windows/win32/api/evr/nf-evr-imfvideodisplaycontrol-setvideoposition
	SetVideoPosition(nrcSource *MFVideoNormalizedRect, rcDest *win.RECT)

	// [SetVideoWindow] COM method.
	//
	// [SetVideoWindow]: https://learn.microsoft.com/en-us/windows/win32/api/evr/nf-evr-imfvideodisplaycontrol-setvideowindow
	SetVideoWindow(hwndVideo win.HWND) error
}

IMFVideoDisplayControl COM interface.

func NewIMFVideoDisplayControl

func NewIMFVideoDisplayControl(base com.IUnknown) IMFVideoDisplayControl

Constructs a COM object from the base IUnknown.

⚠️ You must defer IMFVideoDisplayControl.Release().

Example

var gs dshow.IMFGetService // initialized somewhere

vdc := dshow.NewIMFVideoDisplayControl(
	gs.GetService(
		win.NewGuidFromClsid(dshowco.CLSID_MR_VideoRenderService),
		win.NewGuidFromIid(dshowco.IID_IMFVideoDisplayControl),
	),
)
defer vdc.Release()

type IMediaControl

IMediaControl COM interface.

func NewIMediaControl

func NewIMediaControl(base com.IUnknown) IMediaControl

Constructs a COM object from the base IUnknown.

⚠️ You must defer IMediaControl.Release().

Example

var gb dshow.IGraphBuilder // initialized somewhere

mc := dshow.NewIMediaControl(
	gb.QueryInterface(dshowco.IID_IMediaControl),
)
defer mc.Release()

type IMediaFilter

IMediaFilter COM interface.

func NewIMediaFilter

func NewIMediaFilter(base com.IUnknown) IMediaFilter

Constructs a COM object from the base IUnknown.

⚠️ You must defer IMediaFilter.Release().

type IMediaSeeking

type IMediaSeeking interface {
	com.IUnknown

	// [CheckCapabilities] COM method.
	//
	// [CheckCapabilities]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-checkcapabilities
	CheckCapabilities(
		capabilities dshowco.SEEKING_CAPABILITIES) dshowco.SEEKING_CAPABILITIES

	// [ConvertTimeFormat] COM method.
	//
	// [ConvertTimeFormat]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-converttimeformat
	ConvertTimeFormat(targetFormat, sourceFormat *win.GUID, source int64) int64

	// [GetAvailable] COM method.
	//
	// [GetAvailable]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-getavailable
	GetAvailable() (earliest, latest time.Duration)

	// [GetCapabilities] COM method.
	//
	// [GetCapabilities]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-getcapabilities
	GetCapabilities() dshowco.SEEKING_CAPABILITIES

	// [GetCurrentPosition] COM method.
	//
	// [GetCurrentPosition]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-getcurrentposition
	GetCurrentPosition() time.Duration

	// [GetDuration] COM method.
	//
	// [GetDuration]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-getduration
	GetDuration() time.Duration

	// [GetPositions] COM method.
	//
	// Returns current and stop positions.
	//
	// [GetPositions]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-getpositions
	GetPositions() (current, stop time.Duration)

	// [GetPreroll] COM method.
	//
	// [GetPreroll]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-getpreroll
	GetPreroll() time.Duration

	// [GetRate] COM method.
	//
	// [GetRate]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-getrate
	GetRate() float64

	// [GetStopPosition] COM method.
	//
	// [GetStopPosition]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-getstopposition
	GetStopPosition() time.Duration

	// [GetTimeFormat] COM method.
	//
	// [GetTimeFormat]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-gettimeformat
	GetTimeFormat() *win.GUID

	// [IsFormatSupported] COM method.
	//
	// [IsFormatSupported]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-isformatsupported
	IsFormatSupported(format *win.GUID) bool

	// [IsUsingTimeFormat] COM method.
	//
	// [IsUsingTimeFormat]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-isusingtimeformat
	IsUsingTimeFormat(format *win.GUID) bool

	// [QueryPreferredFormat] COM method.
	//
	// [QueryPreferredFormat]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-querypreferredformat
	QueryPreferredFormat() *win.GUID

	// [SetPositions] COM method.
	//
	// [SetPositions]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-setpositions
	SetPositions(
		current time.Duration, currentFlags dshowco.SEEKING_FLAGS,
		stop time.Duration, stopFlags dshowco.SEEKING_FLAGS) error

	// [SetRate] COM method.
	//
	// [SetRate]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-setrate
	SetRate(rate float64) error

	// [SetTimeFormat] COM method.
	//
	// [SetTimeFormat]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-imediaseeking-settimeformat
	SetTimeFormat(format *win.GUID) error
}

IMediaSeeking COM interface.

func NewIMediaSeeking

func NewIMediaSeeking(base com.IUnknown) IMediaSeeking

Constructs a COM object from the base IUnknown.

⚠️ You must defer IMediaSeeking.Release().

Example

var gb dshow.IGraphBuilder // initialized somewhere

ms := dshow.NewIMediaSeeking(
	gb.QueryInterface(dshowco.IID_IMediaSeeking),
)
defer ms.Release()

type IPin

type IPin interface {
	com.IUnknown

	// [BeginFlush] COM method.
	//
	// [BeginFlush]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ipin-beginflush
	BeginFlush()

	// [Connect] COM method.
	//
	// ⚠️ You must defer IPin.Release() on the returned object.
	//
	// [Connect]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ipin-connect
	Connect(mt *AM_MEDIA_TYPE) (IPin, error)

	// [ConnectedTo] COM method.
	//
	// ⚠️ You must defer IPin.Release() on the returned object.
	//
	// [ConnectedTo]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ipin-connectedto
	ConnectedTo() (IPin, error)

	// [ConnectionMediaType] COM method.
	//
	// [ConnectionMediaType]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ipin-connectionmediatype
	ConnectionMediaType(mt *AM_MEDIA_TYPE) error

	// [Disconnect] COM method.
	//
	// [Disconnect]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ipin-disconnect
	Disconnect()

	// [EndFlush] COM method.
	//
	// [EndFlush]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ipin-endflush
	EndFlush()

	// [EndOfStream] COM method.
	//
	// [EndOfStream]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ipin-endofstream
	EndOfStream()

	// [EnumMediaTypes] COM method.
	//
	// ⚠️ You must defer IEnumMediaTypes.Release() on the returned object.
	//
	// [EnumMediaTypes]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ipin-enummediatypes
	EnumMediaTypes() (IEnumMediaTypes, error)

	// [NewSegment] COM method.
	//
	// [NewSegment]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ipin-newsegment
	NewSegment(start, stop time.Duration, rate float64)

	// [QueryAccept] COM method.
	//
	// [QueryAccept]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ipin-queryaccept
	QueryAccept(mt *AM_MEDIA_TYPE) (bool, error)

	// [QueryDirection] COM method.
	//
	// [QueryDirection]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ipin-querydirection
	QueryDirection() dshowco.PIN_DIRECTION

	// [QueryId] COM method.
	//
	// [QueryId]: https://learn.microsoft.com/en-us/windows/win32/api/strmif/nf-strmif-ipin-queryid
	QueryId() string
}

IPin COM interface.

func NewIPin

func NewIPin(base com.IUnknown) IPin

Constructs a COM object from the base IUnknown.

⚠️ You must defer IPin.Release().

type MFVideoNormalizedRect

type MFVideoNormalizedRect struct {
	Left, Top, Right, Bottom float32
}

MFVideoNormalizedRect struct.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL