关于接口
IGraphBuilder接口à调用CoCreateInstance得到的IGraphBuilder接口包含了大部分创建filtergraph的方法。
IGraphBuilder::AddSourceFilter-àThismethodaddsasourcefiltertothefiltergraphforaspecificfil
IGraphBuilder::Connect-àThismethodconnectsthetwopins,usingintermediatesifnecessary.
IGraphBuilder::Render-àThismethodbuildsafiltergraphthatrendersthedatafromthisoutputpi
IGraphBuilder::RenderFile-àThismethodbuildsafiltergraphthatrendersthespecifiedfil此方法是创建一个能够播放指定文件的filtergraph。
IGraphBuilder::SetLogFile-àThismethodsetsthefileintowhichactionstakeninattemptingtoperformanoperationarelogge
IMediaControl接口à控制数据流,它包含开启和停止graph的函数。
IMediaControl::AddSourceFilter-àThismethodaddstothegraphthesourcefilterthatcanreadthegivenfilename,andreturnsanIDispatchinterfacepointerrepresentingthefilter.
IMediaControl::RenderFileàThismethodaddsandconnectsfiltersneededtoplaythespecifiedfil
IMediaControl::StopàThismethodswitchesallfiltersinthefiltergraphtoastoppedstat
IMediaControl::StopWhenReadyàThismethodwaitsforanoperationsuchasPausetocomplete,allowingfilterstoqueueupdata,thenstopsthefiltergrap
IMediaEvent接口à包含从FilterGraphManager获取事件的函数。
IMediaEvent::CancelDefaultHandling-àThismethodcancelsanydefaulthandlingbythefiltergraphofthespecifiedeventandensuresthatitispassedtotheapplicatio
IMediaEvent::FreeEventParams-àThismethodfreesresourcesassociatedwiththeparametersofanevent.
IMediaEvent::GetEventHandle-àThismethodretrievesahandletoamanual-reseteventthatwillbesignaledaslongasthereareeventnotificationstodeliver.
IMediaEvent::RestoreDefaultHandling-àThismethodreinstatesthenormaldefaulthandlingbyafiltergraphforthespecifiedevent,ifthereison
IMediaEvent::WaitForCompletion-àThismethodblocksexecutionoftheapplicationthreaduntilthegraph'soperationfinishes.
小知识点:
return0是正常退出,return非零是异常退出,这是返回给控制台的,不在你编的程序的控制范围内,是给操作系统识别的,对你的程序无影响
其它流媒体常用接口
IFilterGraph接口à滤波器表接口
IFilterGraph::AddFilter-àThismethodaddsafiltertothegraphandnamesitbyusingthepNameparameter.
IFilterGraph::ConnectDirect-àThismethodconnectsthetwopinsdirectly(withoutinterveningfilters).
IFilterGraph::EnumFilters-àThismethodprovidesanenumeratorforallfiltersinthegrap
IFilterGraph::FindFilterByName-àThismethodfindsafilterthatwasaddedtothefiltergraphwithaspecificnam
IFilterGraph::Reconnect-àThismethoddisconnectsthisandthepintowhichitconnectsandthenreconnectsittothesamepiThisallowsthedetailsoftheconnection,suchasmediatypeandallocator,toberenegotiate
IFilterGraph::SetDefaultSyncSource-àThismethodsetsthedefaultsourceofsynchronizatio
IFilterGraph2::ReconnectEx-àThismethodspecifiesapinandamediatypetoreconnectwit
ICaptureGraphBuilder2接口à构造增强型的视频捕获滤波器表管理器
ICaptureGraphBuilder2::ControlStream-àThismethodsetsthestartandstoptimesforoneormorestreamsofcaptureddat
ICaptureGraphBuilder2::FindInterface-àThismethodsearchesthegraphforaspecifiedinterface,startingfromaspecifiedfilter.Youcanrestrictthesearchtoasectionofthegraphupstreamordownstreamofthefilter,orrestrictittoaparticularpincategoryormediatyp
ICaptureGraphBuilder2::FindPin-àThismethodretrievesaparticularpinonafilter,ordetermineswhetheragivenpinmatchesthespecifiedcriteri
ICaptureGraphBuilder2::GetFiltergraph-àThismethodretrievesthefiltergraphthatthecapturegraphbuilderisusin
ICaptureGraphBuilder2::RenderStream-àThismethodconnectsanoutputpinonasourcefiltertoasinkfilter,optionallythroughanintermediatefilter.
ICaptureGraphBuilder2::SetFiltergraph-àThismethodspecifiesafiltergraphforthecapturegraphbuildertous
ICaptureGraphBuilder2::SetOutputFileName-àThismethodcreatesthefilewritingsectionofthefiltergrap
IMediaEventEX接口à播放事件接口扩展
IMediaEventEx::GetNotifyFlags-àThismethodretrieveswhethereventnotificationsareonorof
IMediaEventEx::SetNotifyWindow-àThismethodregistersawindowthatwillhandlemessagesinresponsetoalleventsfromanobject.
IMediaPosition接口à播放的位置和速度控制接口
IMediaPosition::CanSeekBackward-àThismethoddeterminesifthecurrentpositioncanbemovedbackwardinthemediastrea
IMediaPosition::CanSeekForward-àThismethoddeterminesifthecurrentpositioncanbemovedforwardinthemediastrea
IMediaPosition::get_CurrentPosition-àThismethodretrievesthecurrentpositionintermsofthetotallengthofthemediastrea
IMediaPosition::get_Duration-àThismethodretrievesthetotaldurationofthemediastrea
IMediaPosition::get_PrerollTime-àThismethodretrievesthetimepriortothestartpositionthatanynonrandomaccessdeviceshouldstartrollin
IMediaPosition::get_Rate-àThismethodretrievestherateofplaybackrelativetonormalplaybackspee
IMediaPosition::get_StopTime-àThismethodretrievesthetimeatwhichthemediastreamstops.
IMediaPosition::put_CurrentPosition-àThismethodsetsthetimethatthemediastreambegins.
IMediaPosition::put_PrerollTime-àThismethodsetsthetimepriortothestartpositionthatanynonrandomaccessdeviceshouldstartrollin
IMediaPosition::put_StopTime-àThismethodsetsthetimeatwhichthemediastreamwillstop.
IMediaSeeking接口à另一个播放的位置和播放速度控制接口,在位置选择方面功能较强,设置播放格式,多种控制播放方式,常用的有:TIME_FORMAT_MEDIA_TIME单位100纳秒和TIME_FORMAT_FRAME按帧播放。
IMediaSeeking::CheckCapabilities-àThismethoddetermineswhichcapabilitiesexistonamediastreambyapplyingseekingcapabilityflagsandcheckingthereturnedvalu
IMediaSeeking::ConvertTimeFormat-àThismethodconvertsatimefromoneformattoanother.
IMediaSeeking::GetAvailable-àThismethodreturnstherangeoftimesinwhichseekingisefficient.
IMediaSeeking::GetCapabilities-àThismethodreturnstheseekingcapabilitiesofthemediastrea
IMediaSeeking::GetCurrentPosition-àThismethodretrievesthecurrentpositionintermsofthetotallengthofthemediastrea
IMediaSeeking::GetDuration-àThismethodretrievesthelengthoftimethatthemediastreamwillplay.
IMediaSeeking::GetPositions-àThismethodreturnsthecurrentandstoppositionsettings.
IMediaSeeking::GetStopPosition-àThismethodretrievesthetimeatwhichthemediastreamstops.
IMediaSeeking::GetTimeFormat-àThismethodretrievesthecurrenttimeformat,whichdeterminestheformatofunitsusedduringseekin
IMediaSeeking::IsFormatSupported-àThismethoddeterminesifaspecifiedtimeformatissupporte
IMediaSeeking::IsUsingTimeFormat-àThismethoddeterminesifthetimeformatbeingusedinthecallisthesameastheonecurrentlyinusebytheinterfac
IMediaSeeking::QueryPreferredFormat-àThismethodretrievesthepreferredtimeformattobeusedbytheinterfac
IMediaSeeking::SetPositions-àThismethodsetscurrentandstoppositionsandappliesflagstobot
IMediaSeeking::SetTimeFormat-àThismethodsetsthetimeformat,whichdeterminestheformatofunitsusedduringseekin
IBasicAudio接口à声音控制接口
IBasicAudio method | Description |
Sets the volume (amplitude) of the audio signal. | |
Retrieves the volume (amplitude) of the audio signal. | |
Sets the balance for the audio signal. | |
Retrieves the balance for the audio signal. |
IBasicVideo接口à像控制接口
IBasicVideo method | Description |
Retrieves the average time between successive frames in 100-nanosecond units. | |
Retrieves an approximate bit rate for the matlab通达信接口,video stream. | |
Retrieves an approximate bit error rate for the matlab通达信接口,video stream. | |
Retrieves the current matlab通达信接口,video width. | |
Retrieves the current matlab通达信接口,video height. | |
Sets the x-axis coordinate for the source matlab通达信接口,video rectangle. | |
Retrieves the x-axis coordinate for the source matlab通达信接口,video rectangle. | |
Sets the width of the source matlab通达信接口,video rectangle. | |
Retrieves the width of the source matlab通达信接口,video rectangle. | |
Sets the y-axis coordinate for the source matlab通达信接口,video rectangle. | |
Retrieves the y-axis coordinate for the source matlab通达信接口,video rectangle. | |
Sets the height of the source matlab通达信接口,video rectangle. | |
Retrieves the height of the source matlab通达信接口,video rectangle. | |
Sets the x-axis coordinate for the destination matlab通达信接口,video rectangle. | |
Retrieves the x-axis coordinate for the destination matlab通达信接口,video rectangle. | |
Sets the width of the destination matlab通达信接口,video rectangle. | |
Retrieves the width of the destination matlab通达信接口,video rectangle. | |
Sets the y-axis coordinate for the destination matlab通达信接口,video rectangle. | |
Retrieves the y-axis coordinate for the destination matlab通达信接口,video rectangle. | |
Sets the height of the destination matlab通达信接口,video rectangle. | |
Retrieves the height of the destination matlab通达信接口,video rectangle. | |
Sets the source matlab通达信接口,video rectangle. | |
Retrieves the source matlab通达信接口,video rectangle. | |
Informs the renderer to use the default source rectangle. | |
Sets the destination rectangle for the window. | |
Retrieves the destination matlab通达信接口,video rectangle for the window. | |
Sets the default destination position for the window. | |
Retrieves the native matlab通达信接口,video dimensions. | |
Retrieves the color palette entries required by the matlab通达信接口,video. | |
Returns a copy of the current image that is waiting at the renderer. | |
Determines if the renderer is using the default source rectangle. | |
Determines if the renderer is using the default destination rectangle. |
IBasicFilter接口àDirectShow中的基本滤波器接口
IVideoWindow接口à显示窗口控制接口
IVideoWindow method | Description |
Sets the text caption on the playback window. | |
Retrieves the text caption on the playback window. | |
Sets the playback window style. | |
Retrieves the playback window style. | |
Sets the style of the control window. | |
Retrieves the playback window's extended style bits. | |
Specifies if the window will be automatically shown on the first state change. | |
Returns if the window will be automatically shown on the first state change. | |
Sets the current window state (such as visible or minimized). | |
Retrieves the current window state (such as visible or minimized). | |
Informs the renderer to realize its palette in the background. | |
Returns whenever the renderer realizes its palette in the background. | |
Sets the visibility of the window. | |
Retrieves the visibility of the window. | |
Sets the x-axis coordinate for the matlab通达信接口,video window. | |
Retrieves the x-axis coordinate for the matlab通达信接口,video window. | |
Sets the width of the matlab通达信接口,video window. | |
Retrieves the width of the matlab通达信接口,video window. | |
Sets the y-axis coordinates for the matlab通达信接口,video window. | |
Retrieves the y-axis coordinates for the matlab通达信接口,video window. | |
Sets the height of the matlab通达信接口,video window. | |
Retrieves the height of the matlab通达信接口,video window. | |
Sets the owning parent window for the matlab通达信接口,video playback window. | |
Retrieves the owning parent window for the matlab通达信接口,video playback window. | |
Specifies a window to which the matlab通达信接口,video window will post messages. | |
Retrieves the window set to receive messages from the matlab通达信接口,video window. | |
Retrieves the border color for the matlab通达信接口,video window. | |
Sets the border color for the matlab通达信接口,video window. | |
Returns the full-screen rendering mode of the matlab通达信接口,video renderer filter supporting this interface. | |
Sets the full-screen mode for the matlab通达信接口,video renderer filter supporting this interface. | |
Tells the renderer filter to become the foreground window. | |
Forwards messages that have been received by a parent window to a child window owned by a filter. | |
Sets the matlab通达信接口,video window position on the display. | |
Retrieves the matlab通达信接口,video window position. | |
Retrieves the ideal minimum image size for the matlab通达信接口,video image playback (client) area. | |
Retrieves the ideal maximum image size for the matlab通达信接口,video image playback (client) area. | |
Returns the normal restored window dimensions. | |
Hides the cursor. | |
Determines if the cursor is hidden or showing. |
ISampleGrabber接口à捕获像窗口
Method | Description |
Specifies whether the filter should stop the graph after receiving one sample. | |
Specifies the media type for the connection on the Sample Grabber's input pin. | |
Retrieves the media type for the connection on the Sample Grabber's input pin. | |
Specifies whether to copy sample data into a buffer as it goes through the filter. | |
Retrieves a copy of the sample that the filter received most recently. | |
Not currently implemented. | |
Specifies a callback method to call on incoming samples. |
IVideoFrameStep接口à控制单帧播放的接口
IVideoWindow method | Description |
Sets the text caption on the playback window. | |
Retrieves the text caption on the playback window. | |
Sets the playback window style. | |
Retrieves the playback window style. | |
Sets the style of the control window. | |
Retrieves the playback window's extended style bits. | |
Specifies if the window will be automatically shown on the first state change. | |
Returns if the window will be automatically shown on the first state change. | |
Sets the current window state (such as visible or minimized). | |
Retrieves the current window state (such as visible or minimized). | |
Informs the renderer to realize its palette in the background. | |
Returns whenever the renderer realizes its palette in the background. | |
Sets the visibility of the window. | |
Retrieves the visibility of the window. | |
Sets the x-axis coordinate for the matlab通达信接口,video window. | |
Retrieves the x-axis coordinate for the matlab通达信接口,video window. | |
Sets the width of the matlab通达信接口,video window. | |
Retrieves the width of the matlab通达信接口,video window. | |
Sets the y-axis coordinates for the matlab通达信接口,video window. | |
Retrieves the y-axis coordinates for the matlab通达信接口,video window. | |
Sets the height of the matlab通达信接口,video window. | |
Retrieves the height of the matlab通达信接口,video window. | |
Sets the owning parent window for the matlab通达信接口,video playback window. | |
Retrieves the owning parent window for the matlab通达信接口,video playback window. | |
Specifies a window to which the matlab通达信接口,video window will post messages. | |
Retrieves the window set to receive messages from the matlab通达信接口,video window. | |
Retrieves the border color for the matlab通达信接口,video window. | |
Sets the border color for the matlab通达信接口,video window. | |
Returns the full-screen rendering mode of the matlab通达信接口,video renderer filter supporting this interface. | |
Sets the full-screen mode for the matlab通达信接口,video renderer filter supporting this interface. | |
Tells the renderer filter to become the foreground window. | |
Forwards messages that have been received by a parent window to a child window owned by a filter. | |
Sets the matlab通达信接口,video window position on the display. | |
Retrieves the matlab通达信接口,video window position. | |
Retrieves the ideal minimum image size for the matlab通达信接口,video image playback (client) area. | |
Retrieves the ideal maximum image size for the matlab通达信接口,video image playback (client) area. | |
Returns the normal restored window dimensions. | |
Hides the cursor. | |
Determines if the cursor is hidden or showing. |
ICreateDevEnum接口à创建设置枚举接口
ICreateDevEnum::CreateClassEnumerator-àTheCreateClassEnumeratormethodcreatesanenumeratorforaspecifieddevicecategory.
IEnumMoniker接口à枚举监视器接口
IEnumMoniker::Clone-àThismethodcreatesanotherenumeratorthatcontainsthesameenumerationstateasthecurrenton
Usingthisfunction,aclientcanrecordaparticularpointintheenumerationsequenceandthenreturntothatpointatalatertimThenewenumeratorsupportsthesameinterfaceastheoriginalon
IEnumMoniker:IUnknown-àThisinterfaceisusedtoenumeratethecomponentsofamonikerortoenumeratethemonikersinatableofmonikers.
IEnumMonikerhasthesamemethodsasallenumeratorinterfaces:Next,Skip,Reset,andClon
IEnumMoniker::Next-àThismethodretrievesthenextceltitemsintheenumerationsequenc
Iftherearefewerthantherequestednumberofelementsleftinthesequence,itretrievestheremainingelements.
ThenumberofelementsretrievedisreturnedthroughpceltFetched(unlessthecallerpassedinNULLforthatparameter).
IEnumMoniker::Skip-àThismethodskipsoverthenextspecifiednumberofelementsintheenumerationsequenc
IMoniker接口à监视接口
IMoniker::CommonPrefixWith-àThismethodfindstheprefixthatthemonikerhasincommonwithanothermoniker.
IMoniker::IsSystemMoniker-àThismethodcheckswhethermonikerisoneofthesystem-suppliedtypes.
IMoniker::RelativePathTo-àThismethodconstructsarelativemonikerbetweenthespecifiedmonikerandanother.
IPropertyBag接口à属性页接口
IPropertyBag:IUnknown-àThisinterfaceprovidesanobjectwithapropertybaginwhichtheobjectcanpersistentlysaveitsproperties.
文章为作者独立观点,不代表 股票程序化软件自动交易接口观点