stagefright

FFmpeg support for libstagefright hardware decoding

一曲冷凌霜 提交于 2019-12-05 19:10:59
问题 everyone: I am new to ffmpeg. Recently I am working on project to port ffmpeg to android device. At the beginning, I compiled ffmpeg to shared libs(.so files) in a very normal way following some guides on Internet, load them into my android app. It works perfectly. Now I want ffmpeg to use libstagefright to fulfill HW decoding. The problem is, I can compile the .so libs, but when I launch my app and load those .so libs, there is always a java.lang.UnsatisfiedLinkError: Cannot load library:

Creating OMXCodec encoder in HW mode

空扰寡人 提交于 2019-12-05 02:45:07
问题 I'm trying to implement HW-accelrated H264 video encoding on Android ICS 4.0.4. Since MediaCodec class is not available I have to use stagefright API. But when I put HardwareCodecsOnly flag, OMXCodec::Create always returns NULL. If I call OMXCodec::findMatchingCodecs() with flag kHardwareCodecsOnly, I got following list: - OMX.TI.DUCATI1.VIDEO.H264E - OMX.qcom.7x30.video.encoder.avc - OMX.qcom.video.encoder.avc - OMX.TI.Video.encoder - OMX.Nvidia.h264.encoder - OMX.SEC.AVC.Encoder so I guess

Developing H264 hardware decoder Android - Stagefright or OpenMax IL?

拜拜、爱过 提交于 2019-12-04 23:56:59
问题 I am developing H264 H/W accelerated video decoder for android. So far, I've come around with some libraries MediaCodec , Stagefright , OpenMax IL , OpenMax AL and FFmpeg . After a bit research, I've found that - I found a great resource of using stagefright with FFmpeg, but I can not use FFmpeg as for its license, it is quite restrictive for distributed software. (Or possible to discard FFmpeg from this approach?) I can not use MediaCodec as its a Java API and I have to call it via the JNI

Android: MPEG4Writer fails to start when using OMXCodec as MediaSource

家住魔仙堡 提交于 2019-12-04 14:54:41
I'm trying to encode a video from a byte array buffer and to do so I'm using MPEG4Writer API from native code. I have created my custom MediaSource class to provide the data and I'm wrapping it with OMXCodec to give it to MPEG4Writer : sp<MediaSource> mVideoEncoder = OMXCodec::Create(client.interface(), omxEncMeta, true, mVideoOutSource); mVideoEncoder->start(); mVideoOutSource is my custom MediaSource class, omxEncMeta is the following: int32_t colorFormat = OMX_COLOR_FormatYUV420SemiPlanar; int32_t width = 480; int32_t height = 360; int32_t frameRate = 24; int32_t bitRate = 500 * 1024; int32

QOMX_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka converter

南楼画角 提交于 2019-12-04 05:29:24
问题 I need to handle YUV data from H/W decoding output on Android. Actually, I'm using Nexus4 and the decoding output format is QOMX_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka type. But I need YUV420 Planar format data, it need to be converted. Could you share the converting function or any way? 来源: https://stackoverflow.com/questions/21797923/qomx-color-formatyuv420packedsemiplanar64x32tile2m8ka-converter

FFmpeg support for libstagefright hardware decoding

你离开我真会死。 提交于 2019-12-04 03:02:54
everyone: I am new to ffmpeg. Recently I am working on project to port ffmpeg to android device. At the beginning, I compiled ffmpeg to shared libs(.so files) in a very normal way following some guides on Internet, load them into my android app. It works perfectly. Now I want ffmpeg to use libstagefright to fulfill HW decoding. The problem is, I can compile the .so libs, but when I launch my app and load those .so libs, there is always a java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1314]: 114 cannot locate '_ZN7android11MediaBufferC1Ej' I stuck there for a few days. Does

How to register a OMX core for adding a new decoder

佐手、 提交于 2019-12-04 01:52:50
问题 I'm referring to the post: Android: How to integrate a decoder to multimedia framework Following it i have registered my new decoder (Which is currently not supported by Android) in media_codecs.xml . The Step 2 of the above post requires me to perform OMX core registration . However, Since i'm really new to this topic, i'm not able to follow the step 2. I have the working code of the decoder in C and is already ported to android. So i request if anybody can provide information on: A step-by

Native window queueBuffer function not rendering output from Stagefright decoder

六月ゝ 毕业季﹏ 提交于 2019-12-03 16:47:54
I'm passing a SurfaceView surface from Java to JNI where I obtain the native window from that surface. Stagefright decodes h264 frames from an mp4 file. During the decoding process I call ANativeWindow::queueBuffer() in order to send decoded frames to be rendered. There are no errors on decoding or on calling queueBuffer() , all I get is a black screen. I really feel like I'm not setting up the native window properly so that when queueBuffer() is called, it is rendered to the screen. However, I can render pixels to the native window directly via memcpy. Unfortunately, after I instantiate the

Developing H264 hardware decoder Android - Stagefright or OpenMax IL?

我们两清 提交于 2019-12-03 15:47:32
I am developing H264 H/W accelerated video decoder for android. So far, I've come around with some libraries MediaCodec , Stagefright , OpenMax IL , OpenMax AL and FFmpeg . After a bit research, I've found that - I found a great resource of using stagefright with FFmpeg, but I can not use FFmpeg as for its license, it is quite restrictive for distributed software. (Or possible to discard FFmpeg from this approach?) I can not use MediaCodec as its a Java API and I have to call it via the JNI from C++ layer which is relatively slow and I am not allowed. I can not use OpenMax AL as it only

How MediaCodec finds the codec inside the framework in Android?

拜拜、爱过 提交于 2019-12-03 07:15:23
I am trying to understanding how MediaCodec is used for hardware decoding. My knowledge in android internal is very limited. Here is my findings: There is a xml file which represents the codec details in the android system . device/ti/omap3evm/media_codecs.xml for an example. Which means, that If we create a codec from the Java Application with Media Codec MediaCodec codec = MediaCodec.createDecoderByType(type); It should be finding out respective coder with the help of xml file. What am I doing? I am trying to figure our which part of the code is reading xml and find the codec based on given