brower plugin

1,文件player.h
#include "PluginWindowWin.h"
...
public:
HWND m_HWND;

2,文件player.cpp
bool player::onWindowAttached(FB::AttachedEvent *evt, FB::PluginWindow * win)

{

FB::PluginWindowWin *wnd = dynamic_cast<FB::PluginWindowWin*>(win);

HWND hWnd=wnd->getHWND();

m_HWND=hWnd;

return false;

}

bool player::onWindowDetached(FB::DetachedEvent *evt, FB::PluginWindow *)

{

HDC hDC=GetDC(m_HWND);

ReleaseDC(m_HWND,hDC);

return false;

}

3,文件playerAPI.cpp
FB::variant playerAPI::echo(const FB::variant& msg)

{

playerPtr player=getPlugin();

HWND hWnd=player->m_HWND;
/*
HDC hDC=::GetWindowDC(hWnd);//GetDC(hWnd);

HBITMAP m_hBitmap=
(HBITMAP)::LoadImage(NULL,_T("D:\\test.bmp"),IMAGE_BITMAP,0,0,LR_LOADFROMFILE);

HDC hdcMem=CreateCompatibleDC(hDC);
SelectObject(hdcMem, m_hBitmap);
BitBlt(hDC,0,0,640,352,hdcMem,0,0,SRCCOPY);

DeleteDC(hdcMem);
*/

CHANNEL_CLIENTINFO channelInfo;
memset(&channelInfo, 0, sizeof(CHANNEL_CLIENTINFO));

sprintf(channelInfo.host, "%s", "172.18.190.102");

channelInfo.port = 554;

channelInfo.protocol = PROTOCOL_RTSP_TCP;

channelInfo.channel=0;

channelInfo.model = 0x00;
channelInfo.tryRGBfirst = 1;
channelInfo.tryOverlay = 0;
strcpy(channelInfo.username, "admin");
strcpy(channelInfo.password, "admin");

NET_Startup();

HANDLE m_hLiveRTSP = NET_ClientStart(&channelInfo, NULL);
NET_ClientSetWnd(m_hLiveRTSP, hWnd);

static int n(0);

fire_echo("So far, you clicked this many times: ", n++);

// return "foobar";

return msg;

}

brower plugin,布布扣,bubuko.com

时间: 2024-08-10 00:06:32

brower plugin的相关文章

question --&gt; maven assembly plugin 修改文件默认权限

使用maven assembly plugin插件添加执行脚本时,发现默认权限为644,还需要手动添加执行权限.这很麻烦,于是查看文档 官方文档 http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html#class_fileSet fileMode String Similar to a UNIX permission, sets the file mode of the files included. THIS IS

android-studio的gradle plugin配置相关的一些记录

感觉就是越高的Gradle版本对应的plugin越高. 你妹的,是不是2.10版本低于2.2版本,我还以为是2.10版本高于2.8.2.9版本呢.每次用2.10版本构建,用1.2.2等都不行.提示最低要求vesion为2.2,擦. classpath 'com.android.tools.build:gradle:1.2.2'//提示会有警告要求最底的Gradle版本是2.2,以上gradle版本为2.3,4,5,6....应该都可以,不过建议plugin本版不要过低,有些会不支持. class

[All in one WP Migration plugin] 搬迁wordpress 站点

为了方便大家去轻松的migrate 一个wordpress站点, 有developer开发出了一款插件----------All in one WP Migration ;这样大家就可以不用像之前一样要去分别备份数据库和网站文件了; 1. 首先, 在需要搬迁的旧站点和新站点的后台都需要去安装这个 All in one WP Migration plugin; 2. 在旧站点, 右键plugin, 点击export, 这样的操作是为了导出整个网站的备份文件. 需要注意的细节如下; 2.1> 点击右

No plugin found for prefix &#39;jetty&#39; in the current project and in the plugin groups

现在Jetty的版本已经到9了,也早已经在Eclipse的门下了.所以有很多groupId,比如:org.eclipse.jetty.org.mortbay.jetty.这些都可以用的哦. 我在使用MyEclipse结合maven操作jetty作为开发的服务器,这开开发比较方便. 当我运行命令: jetty:run 出现: [ERROR] No plugin found for prefix 'jetty' in the current project and in the plugin gro

Tomcat Maven Plugin部署Maven Web应用

Tomcat官方提供了Maven插件用于部署基于Maven的Web应用,不同版本Tomcat使用的插件不同,不同版本插件的使用也有一定区别,详细信息可参考http://tomcat.apache.org/maven-plugin.html.下面记录的是我在Eclipse环境中使用Tomcat Maven Plugin-2.2在Tomcat7中部署Maven Web应用的配置过程: 第一步:配置Tomcat manager用户: 打开Tomcat根目录下conf目录中的tomcat_user.xm

override Ext.grid.plugin.RowExpander的方法不起作用

Ext版本4.2 覆盖方法: Ext.override(Ext.grid.plugin.RowExpander, {     setCmp: function (grid) {         var me = this,             rowBodyTpl,             features;         console.log('我是盖子..');         me.callParent(arguments);         me.recordsExpanded 

maven 的plugin 的使用

mvn [plugin-name]:[goal-name] mvn compiler:compile 这里写的十分详细: https://www.tutorialspoint.com/maven/maven_quick_guide.htm-------------------------------------------- What are Maven Plugins? Maven is actually a plugin execution framework where every tas

Webpack-源码三,从源码分析如何写一个plugin

经过上一篇博客分析webpack从命令行到打包完成的整体流程,我们知道了webpage的plugin是基于事件机制工作的,这样最大的好处是易于扩展.社区里很多webpack的plugin,但是具体到我们的项目并不一定适用,这篇博客告诉你如何入手写一个plugin,然后分析源码相关部分告诉你你的plugin是如何工作.知其然且知其所以然. 该系列博客的所有测试代码. 从黑盒角度学习写一个plugin 所谓黑盒,就是先不管webpack的plugin如何运作,只去看官网介绍. Compiler和Co

Android Gradle插件(plugin)版本(version)与Gradle、SDK Build Tools版本关系

具体关系如下图: 比如,Android Studio 2.0发布,其中有个新功能“Instant Run”,需要Android Gradle Plugin版本2.0.0以上,那么我们项目的.gradle文件就需要以下配置 buildscript { dependencies { classpath 'com.android.tools.build:gradle:2.0.0' } } Android Gradle Plugin 2.0.0对应所需的Gradle版本为“2.10 or higher”