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

[SampleReader][cleanups] Separate Get/Set stream id methods #1718

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

CastagnaIT
Copy link
Collaborator

@CastagnaIT CastagnaIT commented Nov 4, 2024

Description

Separate Get/Set stream id methods
so that its possible set streamid without use the factory

Motivation and context

on the future drm rework for the drm autoselection im moving this code

stream->m_adStream.start_stream(m_lastPts);
stream->SetAdByteStream(std::make_unique<CAdaptiveByteStream>(&stream->m_adStream));
ContainerType reprContainerType = rep->GetContainerType();
uint32_t mask = (1U << stream->m_info.GetStreamType()) | m_session->GetIncludedStreamMask();
auto reader = ADP::CreateStreamReader(reprContainerType, stream, static_cast<uint32_t>(streamid), mask);
if (!reader)
{
m_session->EnableStream(stream, false);
return false;
}

in to Session::PrepareStream (PrepareStream method will be used to initialize drm for all types of manifests)

this is required because currently there is CFragmentedSampleReader that needs reader->SetDecrypter
on the rework code GetSingleSampleDecryptor/GetDecrypterCaps dont exists anymore
and i need to get them by using session id that on main.cpp on new code cannot be achieved without adding additional methods which in my opinion are not necessary

along this change i changed all vars types by using int everywhere, since kodi interface use int only

How has this been tested?

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • I have read the Contributing document
  • My code follows the Code Guidelines of this project
  • My change requires a change to the Wiki documentation
  • I have updated the documentation accordingly

@CastagnaIT CastagnaIT added Type: Cleanup non-breaking change which removes non-working or unmaintained functionality v22 Piers labels Nov 4, 2024
@CastagnaIT CastagnaIT merged commit 9d7d90a into xbmc:Piers Nov 6, 2024
10 checks passed
@CastagnaIT CastagnaIT deleted the cleanup_streamid branch November 6, 2024 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Cleanup non-breaking change which removes non-working or unmaintained functionality v22 Piers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant