Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Support playing videos from Stream objects #315

Merged
merged 6 commits into from
Sep 22, 2017
Merged

Support playing videos from Stream objects #315

merged 6 commits into from
Sep 22, 2017

Conversation

qmfrederik
Copy link
Contributor

This is #207 with some patches applied. I've kept the original commit; if you'd rather have the original author amend his PR that's also fine with me.

This adds support for playing videos based on .NET Stream objects. It requires VLC 3.0.

Changes w.r.t. #207:

  • Allocate a buffer per stream which is used for copying data. This avoids having to allocate a new byte[] array every time CallbackReadMedia is called. This has a fairly important performance impact.
  • The Stream does not have to be seekable
  • The code performs a version check and throws an exception when not on VLC 3.0
  • Some cleanup

var versionString = this.VlcVersion;
versionString = versionString.Split('-', ' ')[0];

var version = new Version(versionString);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we need to do that in many places. Could you move that in a property?

@jeremyVignelles
Copy link
Collaborator

Great work, as always. I let you check my comment and apply changes as needed. Feel free to come on gitter if you want to discuss about it

@qmfrederik
Copy link
Contributor Author

@jeremyVignelles Sure - I added a VlcVersionNumber property (as VlcVersion is already taken and contains the full version string).

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

Successfully merging this pull request may close these issues.

3 participants