[FFmpeg-user] avcodec_open2() fails with error "Operation not permitted"

2020-05-20 Thread Juha Heinanen via ffmpeg-user
Juha Heinanen via ffmpeg-user writes: > And in h264_set_extradata(), the failing call is the first one: > > ret = ff_h264_decode_extradata(avctx->extradata, avctx->extradata_size, > &ps, &is_avc, &nal_length_size, 0, avctx); Since decode with standard

[FFmpeg-user] avcodec_open2() fails with error "Operation not permitted"

2020-05-20 Thread Juha Heinanen via ffmpeg-user
Juha Heinanen via ffmpeg-user writes: > When it is executed, I get to log: > > 05-20 15:27:56.638 13664 13664 D Baresip Lib: found h264_mediacodec > 05-20 15:27:56.638 13664 13664 D Baresip Lib: allocated context > 05-20 15:27:56.638 13664 13664 D Baresip Lib: avcodec_

[FFmpeg-user] avcodec_open2() fails with error "Operation not permitted"

2020-05-20 Thread Juha Heinanen via ffmpeg-user
I'm trying to use h264_mediacodec decoder in my Android app. The decoder is included in my ffmpeg build from master: Enabled decoders: h264 rawvideo vp8_mediacodec vp9_mediacodec h264_mediacodec vp8 vp9 I have followed the examples, e.g., https://ffmpeg.org/doxygen/trunk/decode__video_8c_source.

[FFmpeg-user] rotation of video from android_camera

2020-04-29 Thread Juha Heinanen via ffmpeg-user
I tried by replacing ctx->sensor_orientation with several constants, e.g., 0.0, 90.0, 180.0: static int add_display_matrix(AVFormatContext *avctx, AVStream *st) { AndroidCameraCtx *ctx = avctx->priv_data; uint8_t *side_data; int32_t display_matrix[9]; av_display_rotation_set(displ

[FFmpeg-user] rotation of video from android_camera

2020-04-27 Thread Juha Heinanen via ffmpeg-user
Juha Heinanen via ffmpeg-user writes: > If android_camera device would rotate the video clockwise by that > amount (270), orientation of the video would be correct. There is this > in android_camera.c: > > av_display_rotation_set(display_matrix, ctx->sensor_orientatio

[FFmpeg-user] rotation of video from android_camera

2020-04-27 Thread Juha Heinanen via ffmpeg-user
I'm using ffmpeg android_camera device as video source in my open source baresip VoIP app. If I make a call by holding the device upright (portrait), video from the front facing camera of the device is sent in landscape orientation rotated clockwise 90 degrees from portrait orientation. I added s

Re: [FFmpeg-user] compile fails using NDK r19 when arch is aarch64

2019-02-11 Thread Juha Heinanen
Moritz Barsnick writes: > No, but it sounds like a known issue, with a suggested workaround here: > http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2019-February/239921.html Thanks, I added the extra cflag and build succeeded. -- Juha ___ ffmpeg-user

[FFmpeg-user] compile fails using NDK r19 when arch is aarch64

2019-02-10 Thread Juha Heinanen
I'm able to build ffmpeg library using NDK r19 when architecture is arm, but compilation fails at libavcodec when architecture is aarch64: cd ffmpeg && \ CC="aarch64-linux-android21-clang --sysroot /usr/local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot" \ RANLIB=aarch64-