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

CHG: [droid] use native interface for mediacodec #11931

Merged
merged 2 commits into from
Apr 11, 2017
Merged

Conversation

koying
Copy link
Contributor

@koying koying commented Apr 4, 2017

Motivation and Context

Gain of performance and resource by not having to use JNI

Types of change

  • Improvment / Refactor
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@koying koying added Platform: Android Type: Improvement non-breaking change which improves existing functionality v18 Leia Component: Video labels Apr 4, 2017
@peak3d
Copy link
Contributor

peak3d commented Apr 4, 2017

@koying is the performance gain / cpu reduction really noticable?

Copy link
Contributor

@peak3d peak3d left a comment

Choose a reason for hiding this comment

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

Looks good for me except the 2 minors.

Unfortunately this change bites completely with all the changes made in kodi-agile, what will be merged in the next time step by step into kodi master.

So question is how to proceed, any suggestion?


// clear any jni exceptions, jni gets upset if we do not.
if (xbmc_jnienv()->ExceptionCheck())
m_codec = AMediaCodec_createCodecByName(m_codecname.c_str());

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

ConfigureOutputFormat(&mediaformat);
AMediaFormat* mediaformat = AMediaCodec_getOutputFormat(m_codec);
if (!mediaformat)
CLog::Log(LOGERROR, "CDVDVideoCodecAndroidMediaCodec::GetOutputPicture(INFO_OUTPUT_FORMAT_CHANGED) ExceptionCheck: getOutputBuffers");

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@koying
Copy link
Contributor Author

koying commented Apr 4, 2017

@peak3d
Even if the gains are marginal, that's totally way-to-go, and has been implemented that way in ffmpeg, too (it's so that I found out a mediacodec C interface existed ;) )

Re rebase, honestly, it's been months that we wait for agile, and > 1 week I forewarned about mediacodec changes. Do you expect me to wait for more weeks and take the rebase burden upon myself because you preferred to work on agile?

@MrMC
Copy link

MrMC commented Apr 4, 2017

Been waiting till our current work settled down to adapt MrMC to using the native interface for mediacodec. Indeed, this is the way forward.

@MartijnKaijser
Copy link
Member

Jenkins build and merge

@MartijnKaijser MartijnKaijser added this to the L 18.0-alpha1 milestone Apr 11, 2017
@jenkins4kodi jenkins4kodi merged commit 5fe865b into xbmc:master Apr 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Video Platform: Android Type: Improvement non-breaking change which improves existing functionality v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants