Page 1 of 1

reading player stats from VLC

Posted: 11 Sep 2011 20:21
by sirbow2
hello,
im working on a C# application that reads from shared memory and then sends the data to an arduino about time, elapsed, name etc to be displayed on an character LCD. i already have done similar to get PC temps and send them to arduino, now i was trying to get vlc stats when playing a movie or song. does VLC put this info(time elapsed etc) in shared memory where i can access it?

the code below is part of what i used for the pc temps shared memory C# app. it gets all of the shared memory(which is formatted as xml) and writes to string. then some other code(not below) takes that string and reads the xml like file and spits out values.

Code: Select all

using (var file = MemoryMappedFile.OpenExisting("AIDA64_SensorValues")) { using (var readerz = file.CreateViewAccessor(0, 0)) { var bytes = new byte[195]; var encoding = Encoding.ASCII; readerz.ReadArray<byte>(0, bytes, 0, bytes.Length); StringReader stringz = new StringReader(encoding.GetString(bytes));
so what im asking is:
does vlc use shared memory?
If so, what is the VLC shared memory address name?
and If so, how does vlc store this info in shared memory?

thanks!

Re: reading player stats from VLC

Posted: 12 Sep 2011 00:18
by Rémi Denis-Courmont
I don't understand what you're asking.

Re: reading player stats from VLC

Posted: 12 Sep 2011 00:21
by sirbow2
memory mapped files, i assume you know what they are. in mmap setting in VLC, but that is for a video cache not the actual video info like time title etc.

what is the name/address of it? like in the code i posted above it is: Aida64_Sensorvalues

Re: reading player stats from VLC

Posted: 12 Sep 2011 02:58
by Rémi Denis-Courmont
VLC does not support memory mapping because it is useless - in the context of playing files that is. So I still don't understand your question.

Re: reading player stats from VLC

Posted: 12 Sep 2011 03:55
by sirbow2
alright then, i did not know that. umm so then my new question:
how can i access the stats( time, title, elapsed etc) in a readable format(like xml, txt or something etc) of the currently open video in VLC through a C# application?

would you recommend something like a wrapper: http://www.codeproject.com/KB/audio-video/nVLC.aspx?