FCS编程之Video对象

Hbirdv2移植到Nexys4 DDR/Nexys Video/Genesys2 Hbirdv2移植到Nexys4 DDR/Nexys Video 本文介绍Hbirdv2(蜂鸟E203)移植到Nexys4 DDR(现已改名为Nexys A7-100T)和Nexys Video开发板,开发板链接:Nexys A7-100T, Nexys Video Hbirdv2对于不同开发板的移植步骤基本相同,可以直接新建Vivado工程,也可以在官方提供的ddr200t和mcu200t相应的脚本基础上修改,主要包括以下几步: 添加源文件 添加时钟 修改system.v,留下需要的顶层接口 修改约束文 阅读详情
视频对象用来显示实时的或者录制的视频流。视频对象显示的可以是通过Camera.get方法捕捉到的实时视频,也可以是通过NetStream.play方法播放的实时的或者录制的视频文件和MP3音频文件。
为了能够显示视频流,首先要放置视频对象到舞台,然后使用video.attachVideo方法附加视频流到视频对象即可。
1 : my_cam = Camera.get();
2 : my_video.attachVideo(myCam); // myVid 是放置到舞台的一个视频对象

视频对象的使用类似于MC,和其它可放置到舞台的对象一样,你可以设置不同的属性。视频对象的常用属性有:
width 视频对象的宽度
height 视频对象的高度
deblocking 是否使用deblocking过滤,默认为0自动适应,1为从不使用,2总是使用
smoothing 是否使用平滑过渡,默认为false不使用,true则使用平滑过渡(需要高品质播放模式)
下面的例子说明了如何发布、录制和回放视频
01 : // 实时播放的同时录制视频文件
02 : //录制的视频文件名为 'allAboutMe.flv'
03 : var my_nc:NetConnection = new NetConnection();
04 : my_nc.connect('rtmp://localhost/allAboutMe/mySpeech');
05 : var publish_ns:NetStream = new NetStream(my_nc);
06 : publish_ns.publish('allAboutMe', 'record');
07 : publish_ns.attachVideo(Camera.get());
08 :
09 : // 播放录制的视频文件
10 : // 注意:播放录制文件不需要再发布视频流
11 : var my_nc:NetConnection = new NetConnection();
12 : my_nc.connect('rtmp://localhost/allAboutMe/mySpeech');
13 : var subscribe_ns:NetStream = new NetStream(my_nc);
14 : subscribe_ns.play('allAboutMe');
15 : my_video.attachVideo(subscribe_ns); // my_video是一个视频对象实体


如果要清除当前的视频对象,可以使用clear方法
1 : my_video.clear();

需要注意的是,清除视频对象并不意味着中断连接,要中断数据流在视频对象中的播放,可以这样处理:
1 : my_video.attachVideo(null);
 
IPD流程中CBB管理的5个致命误区,第3个坑了80%的团队 本文深入剖析了IPD流程中CBB管理的五个致命误区,尤其指出缺乏有效的度量与激励机制是影响80%团队的核心陷阱。文章强调CBB的核心在于前瞻性设计,而非简单归档,并需平衡通用性与产品竞争力,同时建立持续运营机制,确保CBB与市场需求对齐,从而真正实现缩短开发周期、降低成本的目标。 阅读详情

相关推荐

CRC校验查表法详解

CRC校验的查表法理解算法原理基础计算查表法原理及计算查表法中的表CRC校验中数据逆序CRC校验中的其它参数 算法原理 CRC(Cyclic Redundance Check)循环冗余校验,是基于某个多项式计算出一组校验码,用于核对数据传输过程中是否被更改或传输错误 基础计算 假设需要检验的数据 g :10100111,这串二进制码可以表示为代数多项式g(x) = x^7 + x^5 + x^2 + x +1, 而作为除数的多项式 h(x) 可以自由选择或者按照国际标准选择,一般h(x)的阶数如果是m

boom的博客 1万+

FCS编程之Client对象

Client对象包含了每个联机用户的信息,例如:客户端的IP地址、Flash和操作系统的信息、分配用户的频宽以及呼叫客户端的函数。该对象必须在服务器端使用。Clinet对象经常用来呼叫客户端定义的方法,使用Client.call方法例如我们在客户端定义了一个获取随机数的方法1 : nc = new NetConnection();2 : nc.connect (rtmp://somese

冷枫@CSDN 2040

AD24-层次原理图的设计

4)在原理图关联对话框中双击需要放置方块图的子图,即激活方块图的放置,单击母图的空白处进行放置。3)设计-Create Sheet From Sheet,进入原理图关联对话框。4)放置-添加图纸入口,放置方块图的内部I/O端口并进行名称更改。2)放置-页面符,放置页面符,并执行Table完成属性设置。5)执行Ctrl+W,端口和内部I/O端口对应连接。1)创建一个工程并完成子图的每页原理图的设计。1)新建项目,创建Main原理图页。3)放置-的端口,放置方块图的端口。以上,就是层次原理图页的设计。

qq_52761962的博客 4951

调用可能未定义的方法 attachVideo (通过 static 类型 flash.media:Video 引用)解决办法

直接看示例://flv路径var url = 'http://f.youku.com/player/getFlvPath/sid/00_00/st/flv/fileid/03000203004ED2F747CBE30409DE560F5D7C17-5F26-1A23-7C7B-9

大事龙 4721

海思SD3403/SS928开发(二)环境搭建:从零到一构建高效开发环境的实战指南

本文详细介绍了海思SD3403/SS928开发板环境搭建的全流程,包括Ubuntu系统选择、基础配置、开发环境依赖安装、SDK工具链配置等关键步骤。通过实战经验分享,帮助开发者避免常见问题,快速构建高效开发环境,提升开发效率。

weixin_28717683的博客 289

VSCode玩转ESP-ADF音频开发:从环境搭建到成功播放MP3的避坑全流程

本文详细介绍了如何在VSCode环境下使用ESP-ADF框架进行ESP32音频开发,从环境搭建到成功播放MP3的全流程。重点解析了`IDF_PATH`和`ADF_PATH`的配置问题,以及如何解决`xTaskCreateRestrictedPinnedToCore`等常见编译错误,帮助开发者快速上手ESP-ADF音频开发。

weixin_42520909的博客 341

Attach函数的讲解

Attach函数在MFC中是比较常见的,在不少类中都有这个成员函数例如CWnd类,CDC类,CBitmap类等。通用一点来说, 它的作用是:关联windows的资源句柄和c++对象,窗口是资源,绘图设备也是资源,所以它们的类中会有这个函数关联windows的资源句柄和c++对象。这么说好像很抽象,下面以CWnd类中的Attach详细讲解,当你看完再回过头来看这段话时,就会明白了。 CW

Barry的博客 1万+

MTK平台TP驱动设备树与GPIO配置实战解析

本文详细解析了MTK平台TP驱动开发中的设备树与GPIO配置实战。通过DCT工具配置GPIO引脚,结合设备树节点定义触摸参数,并分享驱动移植、编译调试技巧及常见问题解决方案,帮助开发者快速掌握MTK触摸驱动开发核心。

ice55的博客 243

【转】数据流--FlashCom Develop阅读笔记 3

数据流--FlashCom Develop阅读笔记 3 第二章 Flash Communication Server结构概要Flash Communciation Server 包含了server端(由一些asc文件组成)和client端(swf文件)server端和client端的数据传输通过Real-Time Message Protocol (RTMP)进行实时交流,web server

Kane 's Blog [A.D.K] 1037

C#上位机实战:PLC与检测设备无缝对接,构建产品质量实时判定系统

本文分享了基于C#开发的汽车零部件质量检测系统实现经验。系统采用三层架构:设备层(PLC/视觉相机/三坐标)、通信层(OPC UA/SDK/串口)和应用层(数据采集/判定/存储)。重点解决了三大技术难点:1)通过OPC UA订阅模式将PLC通信延迟从500ms降至50ms;2)反编译厂商Demo破解视觉SDK对接难题;3)采用时间戳+产品ID实现多设备数据同步。系统上线后质检人员减少67%,误判率降至0.5%,数据追溯效率显著提升。文章强调工业场景下稳定性优先于技术复杂度,实用经验值得借鉴。

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 809

(十二)深入理解蓝牙BLE之“移植Bluez 5.18源码到嵌入式平台”

在某嵌入式平台进行蓝牙开发,发现上面居然没有btmon,hciattach,hcitool等蓝牙调试工具,无奈之下,只好移植bluez协议栈到目标嵌入式平台,建议移植5.18版本(最新的5.54版本居然hcitool等工具不是默认编译的,需要修改Makefile才可以)。 看到很多讲解移植过程的文章都是需要积分的,觉得写一篇免积分的文章还是有些意义的,欢迎同行来交流。 移植环境:Linux ubuntu 目标平台:sigmastar 星宸科技 配置交叉编译工具链:export PATH=$PATH:

2967

FCS编程之Application对象

     Application对象可以让你接受或拒绝用户端的连接请求,注册客户端相应事件的类和方法等。一般在服务器端的main.asc文件中定义相关事件。服务器端的程序由下列事件程序组成:1 : application.onAppStart = function(){ 2 : //应用程序初次启动时,要执行的程序3 : //并且只会被执行一次4 : }1 : applic

冷枫@CSDN 2074

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

FCS编程之开发建模规则

第一章  开始一、FlashCom开发所需安装的软件和硬件:1. FlashMX authoring2. FlashMX Communication Server3. ActionScript editor 4. Flash Player5. Camera and Micophone二、设置开发环境1. 确保FlashCom server已经启动2. 更改运行FlashCom Server的URL

冷枫@CSDN 2491

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

FCS编程之连接示例

一个简单的连接服务器示例首先确保服务器已经启动,在windows下面可以直接启动服务就可以了。在Linux下面需要运行 server start命令启动。在客户端写代码打开连接my_nc = new NetConnection();//创建连接对象my_nc.connect(targetURI);//连接服务器参数格式为:其中实例名可以省略rtmp://localhost:port/appName

冷枫@CSDN 1972

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

FCS编程之数据流

Flash Communciation Server 包含了server端(由一些asc文件组成)和client端(swf文件)server端和client端的数据传输通过Real-Time Message Protocol (RTMP)进行实时交流,web server通过http服务把内容提供给client端,实现模式如下图:450) {this.resized=true; this.widt

冷枫@CSDN 1769

FCS五色石 | 项目半月报(2020.5.16-2020.5.31)

为了让您更好的了解FCS项目动态 本文内容分别编写了英文版 和中文版 请查找适合您自己的语言进行阅读 English Technical Updates BTchat Focus on fixing audio and video problems caused by IOS13 upgrade. Android starts the new IM6.0 framework design. IMServer1.0 version: ClientSDK development..

BTchat的博客 583

FCS中ActionScript代码提示功能

在编写FlashCom代码的时候,如果经常使用合理的命名规范,可以很好的借用FlashMX 2004的代码提示功能。例如,在编写fcs代码的时候,对FlashCom中对象采用下面的命名方式,在编辑代码的时候在对象名称后面写完点号之后就会弹出代码提示,其中包含了该对象可以使用的属性和方法,很实用哦。各个对象的建议命名结尾字串1 : _cam Camera对象2 : _video Video对

冷枫@CSDN 1567

网络工程师必看:一次讲透BGP的next-hop-local在iBGP场景下的关键作用

本文深入解析了BGP协议中`next-hop-local`在iBGP场景下的关键作用,帮助网络工程师解决路由无法传递的常见问题。通过详细的工作原理、配置实践和故障排查步骤,结合华为设备示例,展示了如何确保路由可达性和路径最优性。

weixin_30887919的博客 422

FCS五色石 | 项目半月报(2020.5.1-2020.5.15)

为了让您更好的了解FCS项目动态 本文内容分别编写了英文版 和中文版 请查找适合您自己的语言进行阅读 English Technical Updates BTchat Optimize the display of assets and addhotsearch functions. Optimize the loading speed of conversation list and the layout ofpersonal center. Focus on fix...

BTchat的博客 379

FCS视频技术实例

以前在公司和刘工一起研究过flashCom今天写篇关于flashCom的例子工大家学习研究使用,是一个简单的FLASH播放FLV视频的例子..下面就打开您的Macromedia Flash Player 8(推荐)开始吧!  首先新建文档,设置背景色黑色,其他默认,然后建四个图层。 第一层用来放视频元件,方法如下: 1,在"库"面板("窗口">"库")中,从"库"弹出菜单中选择"新建视频"。 2,

软件开发资料汇总 449
上一篇: FCS编程之NetStream对象
下一篇: FCS编程之NetConnect对象
JavaProgramers
博客等级 码龄22年 660粉丝 304原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值