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

wordpress文章版权信息合肥seo网站推广外包

wordpress文章版权信息,合肥seo网站推广外包,团购网站发展,博客优化网站seo怎么写基于android的 rk3399 同时支持多个USB摄像头 一、前文二、CameraHal_Module.h三、CameraHal_Module.cpp四、编译烧录Image五、App验证 一、前文 Android系统默认支持2个摄像头#xff0c;一个前置摄像头#xff0c;一个后置摄像头 需要支持数量更多的摄像头#xff0… 基于android的 rk3399 同时支持多个USB摄像头 一、前文二、CameraHal_Module.h三、CameraHal_Module.cpp四、编译烧录Image五、App验证 一、前文 Android系统默认支持2个摄像头一个前置摄像头一个后置摄像头 需要支持数量更多的摄像头得修改Android Hal层的代码在这里插入图片描述 二、CameraHal_Module.h 修改CAMERAS_SUPPORT_MAX三、CameraHal_Module.cpp 修改camera_get_number_of_cameras()函数中变量camInfoTmp[]相关代码四、编译烧录Image 该部分的修改要生效的话需要进行全编译 ./build.sh./build.sh mkimage./build.sh mkupdate五、App验证 AndroidManifest.xml ?xml version1.0 encodingutf-8? manifest xmlns:androidhttp://schemas.android.com/apk/res/androidxmlns:toolshttp://schemas.android.com/tools uses-permission android:nameandroid.permission.INTERNET / uses-permission android:nameandroid.permission.ACCESS_NETWORK_STATE / uses-permission android:nameandroid.permission.ACCESS_WIFI_STATE / uses-permission android:nameandroid.permission.CAMERA / uses-permission android:nameandroid.permission.WRITE_EXTERNAL_STORAGE / uses-permission android:nameandroid.permission.READ_EXTERNAL_STORAGE / uses-featureandroid:nameandroid.hardware.cameraandroid:requiredfalse / uses-featureandroid:nameandroid.hardware.camera.autofocusandroid:requiredfalse / applicationandroid:allowBackuptrueandroid:dataExtractionRulesxml/data_extraction_rulesandroid:fullBackupContentxml/backup_rulesandroid:iconmipmap/ic_launcherandroid:labelstring/app_nameandroid:roundIconmipmap/ic_launcher_roundandroid:supportsRtltrueandroid:themestyle/Theme.CameraApplicationtools:targetApi31activityandroid:name.MainActivityandroid:exportedtrueintent-filteraction android:nameandroid.intent.action.MAIN /category android:nameandroid.intent.category.LAUNCHER //intent-filtermeta-dataandroid:nameandroid.app.lib_nameandroid:value //activity /application /manifestMainActivity.java package com.example.cameraapplication; import androidx.appcompat.app.AppCompatActivity; import android.hardware.Camera; import android.os.Bundle; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.widget.Toast;import java.util.ArrayList; import java.util.List; public class MainActivity extends AppCompatActivity { private static final String TAG MainActivity.class.getSimpleName(); Camera camera1, camera2, camera3, camera4; SurfaceHolder surfaceHolder1, surfaceHolder2, surfaceHolder3, surfaceHolder4; SurfaceView surfaceView1, surfaceView2, surfaceView3, surfaceView4; ListCamera cameraList new ArrayList(); ListSurfaceHolder surfaceHolderList new ArrayList(); ListSurfaceView surfaceViewList new ArrayList(); Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);surfaceView1 findViewById(R.id.camera_surface_view1);surfaceView2 findViewById(R.id.camera_surface_view2);surfaceView3 findViewById(R.id.camera_surface_view3);surfaceView4 findViewById(R.id.camera_surface_view4);cameraList.add(camera1);cameraList.add(camera2);cameraList.add(camera3);cameraList.add(camera4);surfaceHolderList.add(surfaceHolder1);surfaceHolderList.add(surfaceHolder2);surfaceHolderList.add(surfaceHolder3);surfaceHolderList.add(surfaceHolder4);surfaceViewList.add(surfaceView1);surfaceViewList.add(surfaceView2);surfaceViewList.add(surfaceView3);surfaceViewList.add(surfaceView4);for(int i0; icameraList.size(); i){initCamera(i, cameraList.get(i), surfaceHolderList.get(i), surfaceViewList.get(i));}int number Camera.getNumberOfCameras();//得到摄像头的个数Toast.makeText(MainActivity.this, 摄像头个数number, Toast.LENGTH_LONG).show(); } private void initCamera(int number, Camera camera, SurfaceHolder surfaceHolder, SurfaceView surfaceView){try{camera Camera.open(number);surfaceHolder surfaceView.getHolder();surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);final Camera mCamera camera;surfaceHolder.addCallback(new SurfaceHolder.Callback() {Overridepublic void surfaceCreated(SurfaceHolder surfaceHolder) {try {if (mCamera!null) {mCamera.setPreviewDisplay(surfaceHolder);mCamera.setDisplayOrientation(90);mCamera.startPreview();}} catch (Exception e) {e.printStackTrace();}}Overridepublic void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {}Overridepublic void surfaceDestroyed(SurfaceHolder holder) {releaseCamera(mCamera);}});}catch (Exception e){e.printStackTrace();} } /*** 释放相机资源*/ private void releaseCamera(Camera camera) {if (camera ! null) {camera.setPreviewCallback(null);camera.stopPreview();camera.release();camera null;} } /*** 释放相机资源*/ private void releaseAllCamera() {for(int i0; icameraList.size(); i){if (cameraList.get(i) ! null) {cameraList.get(i).setPreviewCallback(null);cameraList.get(i).stopPreview();cameraList.get(i).release();cameraList.set(i, null);}} } }activity_main.xml ?xml version1.0 encodingutf-8? LinearLayoutxmlns:androidhttp://schemas.android.com/apk/res/android xmlns:apphttp://schemas.android.com/apk/res-auto xmlns:toolshttp://schemas.android.com/tools android:layout_widthmatch_parent android:layout_heightmatch_parent android:orientationvertical tools:context.MainActivity !-- TextView-- !-- android:layout_gravitycenter-- !-- android:layout_margin10dp-- !-- android:layout_widthwrap_content-- !-- android:layout_heightwrap_content-- !-- android:text摄像头个数-- !-- app:layout_constraintBottom_toBottomOfparent-- !-- app:layout_constraintEnd_toEndOfparent-- !-- app:layout_constraintStart_toStartOfparent-- !-- app:layout_constraintTop_toTopOfparent /-- LinearLayoutandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:orientationhorizontalandroid:layout_weight1SurfaceViewandroid:idid/camera_surface_view1android:layout_weight1android:layout_widthmatch_parentandroid:layout_heightmatch_parentandroid:gravitycenter/SurfaceViewandroid:idid/camera_surface_view2android:layout_weight1android:layout_widthmatch_parentandroid:layout_heightmatch_parentandroid:gravitycenter/ /LinearLayout LinearLayoutandroid:layout_widthmatch_parentandroid:layout_heightwrap_contentandroid:orientationhorizontalandroid:layout_weight1SurfaceViewandroid:idid/camera_surface_view3android:layout_weight1android:layout_widthmatch_parentandroid:layout_heightmatch_parentandroid:gravitycenter/SurfaceViewandroid:idid/camera_surface_view4android:layout_weight1android:layout_widthmatch_parentandroid:layout_heightmatch_parentandroid:gravitycenter/ /LinearLayout /LinearLayout
http://www.huolong8.cn/news/287297/

相关文章:

  • 可以进入外国网站的浏览器wordpress版本对应的php版本号
  • 做公司网站要注意哪些问题ui参考网站
  • 自己做的网站怎么连接计算机做网站用到什么技术
  • 网站建设. 龙兵科技做设计用的常用网站
  • 建设银行网站能买手机无锡制作网站价格表
  • 陕西省网站开发自媒体网站程序
  • 网站开发多线程开发有免费做门户网站吗
  • 网站一般采用的设计方案装潢设计用什么软件
  • php网站开发实用技术课后习题一站式服务工作总结
  • 曹县有没有做网站1级a做爰免费网站
  • 网站源代码上传都需要怎么做建筑模板哪种好
  • 大同住房和城乡建设网站易飞erp系统
  • 比较好的网站设计互联网网站开发的未来方向
  • 网站建设要多少钱wordpress标题分隔符
  • 公司有网站域名,如何做网站百度浏览器手机版
  • 门户网站建设定制深圳小程序开发设计
  • 外贸网站定制大连中山网站建设
  • 太仓市住房和城乡建设局规网站自学设计软件的免费网站
  • 门户网站建设需求东莞市建设局网站首页
  • 网站建设火凤凰做的网站怎么进入互联网
  • html5网站单页模板鸿星尔克的网络营销策略
  • 数据统计网站有哪些饭店装修设计
  • 诸城人才网招聘网如何优化网络连接
  • 建自己博客网站哪个平台可以免费打广告
  • 网站建设补充合同范本国风网页设计欣赏
  • 南宁企业建站程序fc网页游戏排行榜
  • 石家庄建设厅官方网站简述网站开发的5个步骤
  • 手表网站欧米茄报价国外浏览器入口
  • 单页网站域名营销型网站具备的二大能力
  • 城北区建设局网站天津市建设工程网站