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

[inputstream] change addon interface to new C++ style #12325

Merged
merged 1 commit into from Jun 22, 2017

Conversation

AlwinEsch
Copy link
Member

Description

This commit change the inputstream addon system to the new C++ style
and remove the old parts.

The parts from here are taken from kodi-agile and becomes mainly improved
and optimized from @peak3d on next changes.

Currently it supports only the same as the old, only a new interface way.

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of change

  • 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)

Checklist:

  • My code follows the Code guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the CONTRIBUTING document
  • I have added tests to cover my change
  • All new and existing tests passed

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.

some questions and suggstions

SUPPORTSSEEK = (1 << 3),

/// supports pause
SUPPORTSPAUSE = (1 << 4)

This comment was marked as spam.

{
kodi::addon::CInstanceInputStream* addonInstance;

bool (__cdecl* open)(AddonInstance_InputStream* instance, INPUTSTREAM&);

This comment was marked as spam.

int (__cdecl* get_time)(AddonInstance_InputStream* instance);

// IPosTime
bool (__cdecl* pos_time)(AddonInstance_InputStream* instance, int);

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.

int64_t (__cdecl* position_stream)(AddonInstance_InputStream* instance);
int64_t (__cdecl* length_stream)(AddonInstance_InputStream* instance);
void (__cdecl* pause_stream)(AddonInstance_InputStream* instance, double);
bool (__cdecl* is_real_time_stream)(AddonInstance_InputStream* instance);

This comment was marked as spam.

std::string name(addonBase->ID());

m_fileItemProps = StringUtils::Tokenize(listitemprops, "|");
for (auto &key : m_fileItemProps)

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.

if (addon.asString() != addonBase->ID())
return false;
else
return true;

This comment was marked as spam.

m_hasPosTime = m_addon->HasPosTime();
m_canPause = m_addon->CanPause();
m_canSeek = m_addon->CanSeek();
memset(&m_caps, 0, sizeof(m_caps));

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.

This comment was marked as spam.

This comment was marked as spam.

void CInputStreamAddon::DisposeStreams()
{
for (auto &stream : m_streams)
delete stream.second;

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@AlwinEsch AlwinEsch force-pushed the change-inputstream branch 2 times, most recently from ca57499 to 1aa9f2b Compare June 21, 2017 11:18
@AlwinEsch
Copy link
Member Author

Is updated.

@AlwinEsch
Copy link
Member Author

jenkins build this please

@AlwinEsch
Copy link
Member Author

Can someone help me to explain what on Windows now the second time fails? For me not related to this request but I'm not sure.

@peak3d
Copy link
Contributor

peak3d commented Jun 22, 2017

fatal: repository 'https://github.com/xbmc/FFmpeg/archive/' not found

Is the branch fresh rebased? there have been an ffmpeg version bunp some days ago....

@peak3d
Copy link
Contributor

peak3d commented Jun 22, 2017

thanx @AlwinEsch for this PR, we already approoved the changes in agile branch and it seems to be mostly identical. 👍 from my side.

@Rechi
Copy link
Member

Rechi commented Jun 22, 2017

strange build machine error, disabled it
jenkins build this please

This commit change the inputstream addon system to the new C++ style
and remove the old parts.

The parts from here are taken from kodi-agile and becomes mainly improved
and optimized from @peak3d on next changes.

Currently it supports only the same as the old, only a new interface way.
@AlwinEsch
Copy link
Member Author

jenkins build this please

@AlwinEsch AlwinEsch merged commit 506419b into xbmc:master Jun 22, 2017
@AlwinEsch AlwinEsch deleted the change-inputstream branch June 22, 2017 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Binary add-ons 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

7 participants