[LibVLC in C] Logo from memory instead of file

This forum is about all development around libVLC.
derjanni
New Cone
New Cone
Posts: 5
Joined: 14 Jan 2017 22:01

[LibVLC in C] Logo from memory instead of file

Postby derjanni » 14 Jan 2017 22:16

Hello everybody,

is there a way in C to avoid using a temporary file as below and pass the PNG image to LibVLC as a byte array from memory?

Code: Select all

libvlc_video_set_logo_string(mp,libvlc_logo_file,"/tmp/overlay.png");
Many thanks in advance,

Jan

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: [LibVLC in C] Logo from memory instead of file

Postby Rémi Denis-Courmont » 15 Jan 2017 15:21

No. You can use a memory mapped file from tmpfs though (not pretty).
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

derjanni
New Cone
New Cone
Posts: 5
Joined: 14 Jan 2017 22:01

Re: [LibVLC in C] Logo from memory instead of file

Postby derjanni » 18 Jan 2017 09:57

No. You can use a memory mapped file from tmpfs though (not pretty).
Thank you. I finally decided to switch to SDL for it.

wecVideoLanUser
New Cone
New Cone
Posts: 1
Joined: 19 Jan 2017 21:37

Re: [LibVLC in C] Logo from memory instead of file

Postby wecVideoLanUser » 19 Jan 2017 21:49

I have a similar question. I simply need to extract a frame to a memory buffer instead of to file.
I don't want to have to call TakeSnapshot(), save to a temp file, then open that file.
The information has to be in memory (as a bit map etc...) before it can be saved to file so i know it is in there somewhere.

Does anyone know how to get the raw image data without using a file?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: [LibVLC in C] Logo from memory instead of file

Postby Jean-Baptiste Kempf » 20 Jan 2017 00:32

I have a similar question. I simply need to extract a frame to a memory buffer instead of to file.
I don't want to have to call TakeSnapshot(), save to a temp file, then open that file.
The information has to be in memory (as a bit map etc...) before it can be saved to file so i know it is in there somewhere.

Does anyone know how to get the raw image data without using a file?
Look at the video_format callbacks.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: Google [Bot] and 14 guests