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

[Binary Addon] Generic interface provider callback #13706

Merged
merged 1 commit into from
Mar 31, 2018
Merged

[Binary Addon] Generic interface provider callback #13706

merged 1 commit into from
Mar 31, 2018

Conversation

peak3d
Copy link
Contributor

@peak3d peak3d commented Mar 28, 2018

Description

Binary addons may need platform specific information to work as expected.
This PR adds a generic Interface provider to the Kodi binary addon system and as an example platform specific interface to some android system propertiesan android system info.

The new interface callback is implemented in kodi::Addon base class, is named GetInterface() and is designated to provide a pointer to a function table.

Min Addon Basel API version was not modified because the change does not affect existing functionality.
Therefore old binary addons should still work after this change

Motivation and Context

Get JNI MediaDrm working in binary addon (Android), because NDK is not working as expected / some functionality is not existant in NDK.

How Has This Been Tested?

Android + DRM encrypted sample streams

Types of change

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

@peak3d
Copy link
Contributor Author

peak3d commented Mar 28, 2018

jenkins build this please

1 similar comment
@peak3d
Copy link
Contributor Author

peak3d commented Mar 29, 2018

jenkins build this please

@peak3d
Copy link
Contributor Author

peak3d commented Mar 29, 2018

OSX64 test failure unrelated

Copy link
Member

@ksooo ksooo left a comment

Choose a reason for hiding this comment

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

sprintf vs snprintf?

}
else if (strcmp(name,"sdk_version") == 0)
{
sprintf(buffer, "%d", CXBMCApp::get()->getActivity()->sdkVersion);

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

namespace ADDON
{

char* Interface_General::get_platform_property(void* kodiBase, const char *name)

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@peak3d
Copy link
Contributor Author

peak3d commented Mar 31, 2018

jenkins build this please

@peak3d peak3d changed the title [Addon] Provide platform specific information [Binary Addon] Generic interface provider callback Mar 31, 2018
@peak3d peak3d merged commit 567c70e into xbmc:master Mar 31, 2018
@peak3d peak3d deleted the platforminfo branch March 31, 2018 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants