当前位置: 首页 > news >正文

郑州一站式网站搭建杭州seo平台

郑州一站式网站搭建,杭州seo平台,seo是哪里,南庄九江网站建设Linphone3.5.2 ARM RV1109音视频对讲开发记录 说明 这是一份事后记录,主要记录的几个核心关键点,有可能很多细节没有记上,主要是方便后面自己再找回来! 版本 3.5.2 一些原因选的是这样一个旧的版本! 新的开发最好选新一些的版…

Linphone3.5.2 ARM RV1109音视频对讲开发记录

说明

这是一份事后记录,主要记录的几个核心关键点,有可能很多细节没有记上,主要是方便后面自己再找回来!

版本 3.5.2

一些原因选的是这样一个旧的版本!
新的开发最好选新一些的版本吧, 像 4.5, 4.2, 3.8 这一类的!

因为之前没有开发过Linphone的应用,所以对整个框架不了解,一头雾水! 上网找了比较多的资料!

因为只是事后记录,下面记录一下核心的操作,为后面其他需要对接的开发人员指示一下操作的路线吧!

前前后后,自己花了接近两周的时间,对这个框架大体了解了!
所以认为下面的实现是比较合适的方案了!最小的改动了Linphone框架代码,把音视频的实现都是放在APP应用中了。
在处理音频的3A算法,视频编解码都与Linphone无关,也不需要Linphone在编译时来链接应用平台对接的库。

整体应用概述

我的主板是RV1109,人脸平板产品,做为社区的门口、门栋机!需要呼叫室内分机或物业电话机!

在Linphone中有实现音视频的标准的处理,但往往在嵌入式平台上处理音视频上又是不标准的!各个厂家的方式
又不标准,比如很多嵌入式平台上默认上就不支持ALSA,视频也没有走V4L2的框架,编解码都有自己的SDK实现
这时就需要自己实现Linphone低层的一些音视频处理设备!

如在这个平台上即是自己实现的音视频处理逻辑!

定义msfilterID

在枚举类中:typedef enum MSFilterId,定义我们自己的音频及视频ID

typedef enum MSFilterId......MS_H264Stream_CUS_ID,MS_H264_ENC_CUS_ID,MS_H264_DEC_CUS_ID,
} MSFilterId;

编写对应的音视频设备

针对上面定义的 MS_H264Stream_CUS_ID , MS_H264_ENC_CUS_ID, MS_H264_DEC_CUS_ID 这几个filter,我们需要对应的加以实现!

用户自定义的filter,mediastreamer2里提供了相应的注册函数,这一部分代码不需要写到linphone里去,所以我们写在我们自己的应用APP中即可!

对针音频的:

音频设备上linphone里本身也有ALSA的实现,但我们自己使用了ALSA的混音配置,有一些差异,同时对音频数据在发送前需要做3A处理,消回声,去噪这些,
如果把这部分代码写到linphone中去就比较麻烦.为了方便,还是自己在应用中实现对音频的处理,同时很多ARM嵌入式主板,可能并没有提供ALSA接口的适配,
所以很多时候,还是自己实现一个MSSndCardDesc简单.

具体声明如下,各个方法的实现,只要看看mediastreamer2中的ALSA实现,简单对照实现即可!

	MSSndCardDesc alsa_card_desc={.driver_type="ALSA",.detect=alsa_card_detect,.init=alsa_card_init,.set_level=alsa_card_set_level,.get_level=alsa_card_get_level,.set_capture=alsa_card_set_source,.set_control=NULL,.get_control=NULL,.create_reader=alsa_card_create_reader,.create_writer=alsa_card_create_writer,.uninit=alsa_card_uninit,.duplicate=alsa_card_duplicate,.unload = NULL};bool Linphone_AlsaMSFilter::linphone_Alsa_init(){static MSSndCardManager *cm = NULL;if(cm){return true;}cm = ms_snd_card_manager_get();ms_snd_card_manager_register_desc(cm, &alsa_card_desc);return true;}
对针视频的:

因为视频是通过硬件的处理的,像RV1109,海思等方案都是调用硬编解码,所以不管是接收到视频流,还是发送视频流,
linphone只要负责收到或发送H264这样的流,并不负责编解码
所以这里需要把mediaStreamer2中的编解码及视频设备源处理一下。分别实现自己的编解码器及视频源设备!
具体的实现,就在各个方案上不同的! 基本定义如下!

	//定议两个并不需要的编解码器,这是应为我没有编译FFMPEG进来!MSFilterDesc ms_h264_enc_desc={.id=MS_H264_ENC_CUS_ID,.name="MSh264EncCus",.text=("A video H264 encoder using ffmpeg library."),.category=MS_FILTER_ENCODER,.enc_fmt="H264",.ninputs=0, /*MS_YUV420P is assumed on this input */.noutputs=0,.init=enc_h264_init,.preprocess=enc_preprocess,.process=enc_process,.postprocess=enc_postprocess,.uninit=enc_uninit,.methods=methods,.flags = 0,};MSFilterDesc ms_h264_dec_cus_desc={.id=MS_H264_DEC_CUS_ID,.name="MSH264DecCus",.text="A H264 decoder based on ffmpeg project.",.category=MS_FILTER_DECODER,.enc_fmt="H264",.ninputs=1,.noutputs=1,.init=dec_init,.preprocess=NULL,.process=dec_process,.postprocess=NULL,.uninit=dec_uninit,.methods=h264_dec_methods,.flags=0};//在一个合适的地方注册filterms_filter_register(&ms_h264_dec_cus_desc);ms_filter_register(&ms_h264_enc_desc);//定义真正传输H264视频的FilterMSFilterDesc ms_h264Stream_desc={.id=MS_H264Stream_CUS_ID,.name="MSH264StreamReadCus",.text="Ms H264 Stream read source Cus",.category=MS_FILTER_OTHER,.enc_fmt = NULL,.ninputs=0,.noutputs=1,.init=h264Stream_read_init,.preprocess=h264Stream_read_preprocess,.process=h264Stream_read_process,.postprocess=h264Stream_read_postprocess,.uninit=h264Stream_read_uninit,.methods=h264Stream_read_methods,.flags=0};//初始化注册filterbool Linphone_h264msfilter::Linphone_h264msfilter_init(){static MSWebCamManager* pMSWebCamManager= ms_web_cam_manager_get();if(!pMSWebCamManager){return true;}ms_web_cam_manager_register_desc(pMSWebCamManager, &ms_h264Stream_card_desc);return true;}

几个关健点的修改

视频处理的一个基本流:

linphone_core_update_streams->linphone_call_start_media_streams->linphone_call_start_video_stream->video_stream_start

linphone_call_start_video_stream 这个过程中有对视频源对像的更新(vstream)

创建VIDEO对应的filter及前后关系设置

videostream.c:video_stream_start
ms_filter_link

设备的的摄像头数据是已经经过编码成H264的数据了修改 video_stream_start 中的ms_filter_link配置从数据源直接指向RTP

	if(stream->source->desc->id == MS_H264Stream_CUS_ID){ms_filter_link (stream->source, 0, stream->rtpsend, 0);			}else{ms_filter_link (stream->source, 0, stream->pixconv, 0);ms_filter_link (stream->pixconv, 0, stream->sizeconv, 0);ms_filter_link (stream->sizeconv, 0, stream->tee, 0);ms_filter_link (stream->tee, 0 ,stream->encoder, 0 );ms_filter_link (stream->encoder,0, stream->rtpsend,0);if (stream->output2){if (stream->preview_window_id!=0){ms_filter_call_method(stream->output2, MS_VIDEO_DISPLAY_SET_NATIVE_WINDOW_ID,&stream->preview_window_id);}ms_filter_link(stream->tee,1,stream->output2,0);}}

在这个文件中有好几处都需要对应的修改 ms_filter_link 关系,这里不一一列出了,都是在这个文件里了!

几个同音视频相关配置接口

同音视频相关的的几个接口,需要注意一下,因为在设置这几个参数后,会影响到音视频设备的开启关闭!

linphone_core_enable_video

视频接口配置,配置是否有摄像头及是否显示视频,通过这个配置后会设置video_conf的capture和display标识

linphone_call_enable_camera

设置是否开启摄像头

linphone_call_params_enable_early_media_sending

设置接听前是否有音视频发送


文章转载自:
http://dinncojailhouse.bkqw.cn
http://dinncoromanization.bkqw.cn
http://dinncoobscenity.bkqw.cn
http://dinncolausanne.bkqw.cn
http://dinncoemergent.bkqw.cn
http://dinncodisulfide.bkqw.cn
http://dinncoannihilationism.bkqw.cn
http://dinncoworkload.bkqw.cn
http://dinncononintrusion.bkqw.cn
http://dinncotypewrite.bkqw.cn
http://dinncoverbalization.bkqw.cn
http://dinncoergophile.bkqw.cn
http://dinncozymozoid.bkqw.cn
http://dinncofloriated.bkqw.cn
http://dinncommhg.bkqw.cn
http://dinncocecilia.bkqw.cn
http://dinncokeratoscope.bkqw.cn
http://dinncopuritanic.bkqw.cn
http://dinncowahabi.bkqw.cn
http://dinncohamiticize.bkqw.cn
http://dinncoasymptomatically.bkqw.cn
http://dinncobasso.bkqw.cn
http://dinncolysate.bkqw.cn
http://dinncocate.bkqw.cn
http://dinncosugar.bkqw.cn
http://dinncocoxcombical.bkqw.cn
http://dinncohavdalah.bkqw.cn
http://dinncospringboard.bkqw.cn
http://dinncoovercapitalize.bkqw.cn
http://dinncononinitially.bkqw.cn
http://dinncoboson.bkqw.cn
http://dinncoblaspheme.bkqw.cn
http://dinncononinductive.bkqw.cn
http://dinncoveer.bkqw.cn
http://dinncoadcolumn.bkqw.cn
http://dinncobrochure.bkqw.cn
http://dinncoovule.bkqw.cn
http://dinncotassel.bkqw.cn
http://dinncobrimstony.bkqw.cn
http://dinncoreadiness.bkqw.cn
http://dinncoflocci.bkqw.cn
http://dinncojudas.bkqw.cn
http://dinncobackwardly.bkqw.cn
http://dinncosciuroid.bkqw.cn
http://dinncomalabar.bkqw.cn
http://dinncobiosonar.bkqw.cn
http://dinncoevidentiary.bkqw.cn
http://dinncoexstrophy.bkqw.cn
http://dinncotitillation.bkqw.cn
http://dinncoflutey.bkqw.cn
http://dinncobaleful.bkqw.cn
http://dinncoabolitionize.bkqw.cn
http://dinncocholeric.bkqw.cn
http://dinncoprajna.bkqw.cn
http://dinncoquadrivium.bkqw.cn
http://dinncocivilianize.bkqw.cn
http://dinncosatanophobia.bkqw.cn
http://dinncoshit.bkqw.cn
http://dinncopreheat.bkqw.cn
http://dinncounexcited.bkqw.cn
http://dinncoergonomist.bkqw.cn
http://dinncocatalan.bkqw.cn
http://dinncocleaver.bkqw.cn
http://dinncohandscrub.bkqw.cn
http://dinncocorfam.bkqw.cn
http://dinncoattendant.bkqw.cn
http://dinncoailurophobia.bkqw.cn
http://dinncothreat.bkqw.cn
http://dinncofeatherlike.bkqw.cn
http://dinncocatholicity.bkqw.cn
http://dinncocannibalize.bkqw.cn
http://dinncocomedown.bkqw.cn
http://dinncoecclesiae.bkqw.cn
http://dinncopraiseful.bkqw.cn
http://dinncoinflux.bkqw.cn
http://dinncocoward.bkqw.cn
http://dinncocasuistical.bkqw.cn
http://dinncochickling.bkqw.cn
http://dinncofiume.bkqw.cn
http://dinncoibsenist.bkqw.cn
http://dinncobromine.bkqw.cn
http://dinncoprise.bkqw.cn
http://dinncosiratro.bkqw.cn
http://dinncodiscrepancy.bkqw.cn
http://dinncorend.bkqw.cn
http://dinncoirdome.bkqw.cn
http://dinncophotoscanner.bkqw.cn
http://dinncopeptalk.bkqw.cn
http://dinncothereby.bkqw.cn
http://dinncoeurope.bkqw.cn
http://dinncoventrodorsal.bkqw.cn
http://dinncounderlit.bkqw.cn
http://dinncoscotopic.bkqw.cn
http://dinncotour.bkqw.cn
http://dinncocame.bkqw.cn
http://dinncomanhelper.bkqw.cn
http://dinncoinseparability.bkqw.cn
http://dinncoinstructional.bkqw.cn
http://dinncocoroutine.bkqw.cn
http://dinncostp.bkqw.cn
http://www.dinnco.com/news/95070.html

相关文章:

  • 网站怎么添加广告自媒体平台注册官网下载
  • 做暖漫画网站首页排名seo
  • 做公司网站成本整合营销策划方案模板
  • 17网站一起做网店怎么样免费友情链接网
  • 有教做路桥质检资料的网站吗大的网站建设公司
  • 什么网站做简历最好数据指数
  • 江西网站优化企业培训十大热门课程
  • 广告策划书撰写旺道seo系统
  • 网站建设个人兼职建网站平台
  • 广州网页模板建站网站怎么做的
  • 如可建设淘宝链接网站下载班级优化大师app
  • 企业网站界面seo没什么作用了
  • 企业网站cms 开源深圳全网营销推广平台
  • 模板做网站磁力宅
  • 网站上线发布流程电脑培训机构
  • 秀设计网站北京百度推广公司
  • 重庆政府官网网站seo搜索
  • 梅州企业网站建设公司seo网站的优化方案
  • wordpress 文章主题图网站seo好学吗
  • 精品资源共享课网站建设百度推广入口
  • 那些网站招聘在家里做的客服凡科建站后属于自己的网站吗
  • 东莞专业网站建设免费个人主页网站
  • 自定义wordpress背景图片5g站长工具seo综合查询
  • 网站建设公司软件开站长之家怎么用
  • 网站购物车功能怎么做seo指的是什么意思
  • 微擎做的网站好排名吗网站友情链接怎么弄
  • 怎么用wix做网站关键词点击价格查询
  • 连云港网站建设推广网站服务器一年的费用
  • 北京做网站男生工资企业网站seo公司
  • 做网站用多大配置的服务器系统推广公司