Windows 桌面动态壁纸 视频壁纸
DMSkin.Wallpaper 采用WIN32 接口实现视频嵌入桌面。
| 项目名称 | 描述 | 特性 | 缺点 |
|---|---|---|---|
| DMSkin.Wallpaper | 主程序 | - | - |
| DMSkin.Player | 迷你解码器 | MediaElement,HTTP支持,支持MP4 AVI MP3等 | 解码能力稍差 |
| DMSkin.Player.Xunlei | 迅雷解码器 | 开发时需要安装Aplayer环境,HTTP支持,更多格式(GIF,MP4.AVI.FLV.WEBM.RMVB) | 解码库体积(+33.2MB) |
-
主程序程序启动的时候,会根据PlayServer中的PlayerType检测系统进程中是否存在迷你解码器或者迅雷解码器。 -
如果存在对应
解码器进程,程序不会执行任何操作(如果不存在,主程序会启动解码器)。 -
主程序与解码器分离,减少内存消耗。主程序退出之后解码器依然会运行(主程序中可以关闭解码器进程)。
-
基于VS 2017 旗舰版开发,.NET 4.5.5开发环境(理论可修改至.NET 3.5),源码包括一些c# 6.0+语法,如果你在VS 2015甚至更低的VS版本上编译不通过的话,请自行修改中源码不兼容的部分。
-
截图是Windows 10 秋季创作者更新 中的亚克力玻璃 效果,其他系统请自行测试,相关内容请自行搜素Fluent Design System
你可以直接下载压缩包解压运行。
下载源码 点击 DMSkin.Wallpaper.sln 打开项目。
【迅雷解码器 开发环境】 迅雷Aplayer官网
编译DMSkin.Player.Xunlei需要安装SDK
安装SDK用于开发 下载开发SDK
将SDK下载解压到D盘根目录 D:\APlayerSDK
以管理员启动命令提示行 CMD.EXE
输入命令:
D: 执行
CD D:\APlayerSDK 执行
install.bat 执行
结果:
复制了8个文件 OK下载完整解码库用于播放 下载解码库CodeCS
将codecs下载解压到软件根目录(保留codecs文件夹)虽然目前只内置了2种解码器(MediaElement+Aplayer)
但是你可以通过编写代码实现自己的解码器(例如用VLC解码器)
/// <summary>
/// 放到解码器初始化的地方-解码器必须一直处于运行状态 Winform/WPF/Console 都支持
/// </summary>
NamedPipeListenServer server = new NamedPipeListenServer("Play.Server")
{
ProcessMessage = ProcessMessage
};
server.Run();
/// <summary>
/// 处理请求-例如处理客户端 Open URL的请求
/// </summary>
public void ProcessMessage(ServerMsg msg, NamedPipeServerStream pipeServer)
{
switch (msg.ServerMsgType)
{
case ServerMsgType.OpenUrl:
///让你的播放器执行播放视频操作
break;
}
pipeServer.Close();
}欢迎加入我们:
-
DMSkin QQ交流群: 194684812
-
WPF 课程学习群 (收费): 611509631
如果你觉得这个框架真的对你很有帮助,欢迎给我捐赠,这将鼓励我做的更好!
- 解码器初步完成。
- 操作软件初步完成。
Copyright © 2018
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

