Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by import android.hardware.Camera
Expo Is The Peep Squeak To DroidScript.
DroidScript also formerly known as AndroidScript, is a javascript framework (more of a bridge between native android api's and jacvascript using V8 normally*. That means you can create interfaces natively, no mimicking using HTML or using another rendering engine. That also means the hundreds of lines of Java or Kotlin (XML or Using Jetpack Compose) you have to write can be reduced to 1 to 10 for every Api and component. Everything is as clear as daytime.
android camera系列(Camera1、Camera2、CameraX)的使用以及输出的图像格式
一、Camera 1.1.1、布局 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".CameraActivity"> <SurfaceView android:id="@+id/preview" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1"/>...
Android 摄像头预览 ---- SurfaceView 和 Camera
SurfaceView SurfaceView 的特性: Surface 是纵深排序(Z-ordered)的,这表明它总在自己所在窗口的后面。SurfaceView 提供了一个可见区域,只有在这个可见区域内 的 Surface 部分内容才可见,可见区域外的部分不可见。surface的排版显示受到视图层级关系的影响,它的兄弟视图结点会在顶端显示。这意味者 surface的内容会被它的兄弟视图遮挡。 可以通过 SurfaceHolder 接口访问这个 Surface,getHolder() 方法可以得到这个接口。 SurfaceSView变得可见时,Surface被创建;SurfaceView隐藏前,Surface被销毁。这样能节省资源。如果你要查看 Surface被创建和销毁的时机,可以重载 surfaceCreated(SurfaceHolder)和 surfaceDestroyed(SurfaceHolder)。 所有 SurfaceView 和 SurfaceHolder.Callback 的方法都应该在 UI线程...
RTMP直播推流(一)视频推流_rtmp推流_不如沉默啊的博客-CSDN博客
关于cmakeList的配置,这里就直接给出代码: cmake_minimum_required(VERSION 3.4.1) # 引入指定目录下的CMakeLists.txt add_subdirectory(src/main/cpp/librtmp) add_library( native-lib SHARED src/main/cpp/native-lib.cpp src/main/cpp/VideoChannel.cpp) include_directories(src/main/cpp/include) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_SOURCE_DIR}/src/main/cpp/libs/${ANDROID_ABI}") target_link_libraries( native-lib rtmp x264 log) 在视频推流中,java层主要实现初始化、设置画布、转摄像头、开始直播和停止直播操作: MainActivity: import...
Unity 渲染YUV数据 ---- 以Unity渲染Android Camera数据为例子
一般Unity都是RGB直接渲染的,但是总有特殊情况下,需要渲染YUV数据。比如,Unity读取Android的Camera YUV数据,并渲染。本文就基于这种情况,来展开讨论。 Unity读取Android的byte数组,本身就耗时,如果再把YUV数据转为RGB也在脚本中实现(即CPU运行),那就很卡了。 一种办法,就是这个转换,放在GPU完成,即,在shader实现! 接下来,分2块来贴出源码和实现。 Android的Camera数据,一般是YUV格式的,最常用的就是NV21。其像素布局如下: 即数据排列是YYYYVUVU… 现在,Android就做一项工作,打开Camera,随便渲染到一个空纹理,然后呢,获得Preview的帧数据。 用一个SimpleCameraPlugin作为Unity调用Android的接口类: 代码如下: package com.chenxf.unitycamerasdk; import android.app.Activity; import android.content.Context; import...
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with import
Contact import, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack