本文整理汇总了C#中System.Windows.Media.Composition.DUCE.SendCommandMedia方法的典型用法代码示例。如果您正苦于以下问题:C# DUCE.SendCommandMedia方法的具体用法?C# DUCE.SendCommandMedia怎么用?C# DUCE.SendCommandMedia使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Media.Composition.DUCE
的用法示例。
在下文中一共展示了DUCE.SendCommandMedia方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendMediaPlayerCommand
SendMediaPlayerCommand(
DUCE.Channel channel,
DUCE.ResourceHandle handle,
bool notifyUceDirectly
)
{
//
// This is an interrop call, but, it does not set a last error being a COM call. So, suppress the
// presharp warning about losing last error.
//
#pragma warning disable 6523
//
// AddRef to ensure the media player stays alive during transport, even if the
// MediaPlayer goes away. The slave video resource takes ownership of this AddRef.
// Note there is still a gray danger zone here -- if the channel command is lost
// this reference won't be cleaned up.
//
//
UnsafeNativeMethods.MILUnknown.AddRef(_nativeMedia);
channel.SendCommandMedia(
handle,
_nativeMedia,
notifyUceDirectly
);
#pragma warning restore 6523
}