我正在尝试编写一个MMPPF(Microsoft Media Platform Player Framework)通用插件。我把它与银色灯光播放器联系起来。由于某些原因,插件永远不会加载(函数PluginLoadFailed总是被调用。)。我的代码附在下面。
using System;
using System.Windows;
using System.Windows.Controls;
using System.ComponentModel.Composition;
using Microsoft.SilverlightMediaFramework.Plugins.Metadata;
using Microsoft.SilverlightMediaFramework.Plugins;
using Microsoft.SilverlightMediaFramework.Core;
using Microsoft.SilverlightMediaFramework.Utilities;
namespace MyGenericPlugin
{
[ExportGenericPlugin(PluginName = "MyGenericPlugin",
PluginDescription = "This is a generic MMPPFPlugin.",
PluginVersion = "1.0")]
public class MyGenericPlugin : IGenericPlugin
{
public event Action<IPlugin,
Microsoft.SilverlightMediaFramework.Plugins.Primitives.LogEntry> LogReady;
public event Action<IPlugin, Exception> PluginLoadFailed;
public event Action<IPlugin> PluginLoaded;
public event Action<IPlugin, Exception> PluginUnloadFailed;
public event Action<IPlugin> PluginUnloaded;
public void SetPlayer(FrameworkElement Player)
{
throw new NotImplementedException();
}
bool IPlugin.IsLoaded
{
get { throw new NotImplementedException(); }
}
void IPlugin.Load()
{
throw new NotImplementedException();
}
event Action<IPlugin,
Microsoft.SilverlightMediaFramework.Plugins.Primitives.LogEntry> IPlugin.LogReady
{
add { throw new NotImplementedException(); }
remove { throw new NotImplementedException(); }
}
event Action<IPlugin, Exception> IPlugin.PluginLoadFailed
{
add { throw new NotImplementedException(); }
remove { throw new NotImplementedException(); }
}
event Action<IPlugin> IPlugin.PluginLoaded
{
add { throw new NotImplementedException(); }
remove { throw new NotImplementedException(); }
}
event Action<IPlugin, Exception> IPlugin.PluginUnloadFailed
{
add { throw new NotImplementedException(); }
remove { throw new NotImplementedException(); }
}
event Action<IPlugin> IPlugin.PluginUnloaded
{
add { throw new NotImplementedException(); }
remove { throw new NotImplementedException(); }
}
void IPlugin.Unload()
{
throw new NotImplementedException();
}
void IPlayerConsumer.SetPlayer(FrameworkElement Player)
{
throw new NotImplementedException();
}
}
}