> On Oct 27, 2022, at 05:17, Tomas Härdin <g...@haerdin.se> wrote:
> 
> mån 2022-10-24 klockan 11:16 +0800 skrev Zhao Zhili:
>> 
>> +typedef struct MediaCodecEncContext {
>> +    AVClass *avclass;
>> +    FFAMediaCodec *codec;
>> +    int use_ndk_codec;
>> +    FFANativeWindow *window;
>> +
>> +    int fps;
>> +    int width;
>> +    int height;
>> +
>> +    uint8_t *extradata;
>> +    int extradata_size;
> 
> Why not extradata in AVCodecContext?

The extradata (BUFFER_FLAG_CODEC_CONFIG) is popped after codec
init, I’m not sure if it’s OK to touch AVCodecContext->extradata
after code init.

Secondly, it isn’t specified in Android doc, but better be safe
to handle the case of BUFFER_FLAG_CODEC_CONFIG show up multiple
times.

So BUFFER_FLAG_CODEC_CONFIG is handled as in-band data, without
touch AVCodecContext->extradata too late or multiple times. Did
I overthinking or misunderstood something?

> 
> Some tests would be nice

Did you mean fate test or manual test?

It’s an external codec wrapper, so maybe not in fate.

For NDK MediaCodec wrapper, good news is we can test it with ffmpeg
cmd now. For Java wrapper, it was tested by changing fftool/ffmepg
into a lib: ugly but simple.

https://github.com/quink-black/ffmpeg-ci/tree/master/android

Any suggestion is welcome.

> 
> /Tomas
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to