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

Enable playback of video from bytes #267

Open
EliteMasterEric opened this issue May 7, 2023 · 3 comments
Open

Enable playback of video from bytes #267

EliteMasterEric opened this issue May 7, 2023 · 3 comments
Labels
enhancement New feature or request
Projects

Comments

@EliteMasterEric
Copy link
Collaborator

It would be useful to be able to take a video file as bytes, and play them back in hxCodec as a video, without having to have the video on the disk, or have the video on a remote server.

The public interface on the video handler for this functionality would look something like this:

public function playVideoFromBytes(videoData:haxe.io.Bytes, shouldLoop:Bool = false);

This could be implemented using the following function: https://videolan.videolan.me/vlc/group__libvlc__media.html#ga591c3cbe56444f1949165b2b9b75d8e2

LIBVLC_API libvlc_media_t* libvlc_media_new_callbacks (libvlc_instance_t * instance, libvlc_media_open_cb open_cb, libvlc_media_read_cb read_cb, libvlc_media_seek_cb seek_cb, libvlc_media_close_cb close_cb, void * opaque);

This allows defining your own functions for opening, reading, seeking (fast-forwarding or rewinding) and closing a media file. We just need to incorporate these with Haxe code to access a byte array.

@EliteMasterEric EliteMasterEric added the enhancement New feature or request label May 7, 2023
@JonnycatMeow
Copy link
Collaborator

this whould be useful but then agian it requires libvlc 4.0.0 and i don't think the libs work for mac

@EliteMasterEric
Copy link
Collaborator Author

this whould be useful but then agian it requires libvlc 4.0.0 and i don't think the libs work for mac

libvlc_media_new_callbacks was added in libvlc 3.0

@JonnycatMeow
Copy link
Collaborator

oh ok

@MAJigsaw77 MAJigsaw77 added this to To do in hxCodec via automation Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
hxCodec
To do
Development

No branches or pull requests

2 participants