Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mpeg4 mediacodec support #1875

Closed
wants to merge 2 commits into from
Closed

Conversation

yuazhen
Copy link
Contributor

@yuazhen yuazhen commented Aug 23, 2016

According to the instructions on the https://developer.android.com/reference/android/media/MediaCodec.html, when playing mpeg4 encoded video, the esds data must be submitted to csd-0 buffer, so I added a method named " restore_mpeg4_esds ", when enabled mediacodec_mpeg4 the esds data will be restored from codecpar-> extradata and submitted to csd-0 buffer, so that mpeg4 can be correctly decoded by mediacodec.
The implementation of "restore_mpeg4_esds" is referenced to http://xhelmboyx.tripod.com/formats/mp4-layout.txt "ES Descriptor box" section.
HOWEVER, not all devices can support DivX, so in ffpipenode_create_video_decoder_from_android_mediacodec() there's a filter using codec_tag to determine whether the video encoding is DivX or not.
AND this patch could solve issue #1428

@@ -0,0 +1,64 @@
/*
* hevc_nal.h
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong file name.

@bbcallen
Copy link
Contributor

bbcallen commented Aug 23, 2016

Looks good to me.
Since this feature is disabled by default, I would merge it blindly without test in one or two days, if there is no more objection.

@yuazhen
Copy link
Contributor Author

yuazhen commented Aug 24, 2016

file name fixed.

@xinzhengzhang
Copy link
Member

Merged.
Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants