Develop a media player which accept commands from serial port. Is it possible? How to do it? - serial-port

I'm trying to develop a media player in which the control commands are comming from serial port like
for play you will get 'P' charcter from serial port.....
for Forward = 'F'
for Reverse = 'R'
for Pause = 'P'
These commands are comming from our microcontroller board.
Can anyone help me where should i start? How to do this?
Its going to be very very basic player. No fancy things at all. For e.g. a C program output etc.
I'm going to use it for my presentations. I don't know how to do this so please help.

It doesn't matter where the commands are coming from, you can pass them to a media player object like Windows Media Player. On Windows, .Net has pretty good support for the Media Player. I am sure the same can be done on other platforms too.
Here's a reference article for exposing the Media Player to C++ and here's another one for embedding it in a .NET form.
Also, take a look at this Video LAN project page (they manage the development of VLC). You can do a lot with the VLC player through command line.

A cross platform media player like VLC can be controlled via command line switches as mentioned here, or via API as explained here.

Related

Directshow capture from avermedia gamer portable C875

I have purchased an avermedia Gamer portable C875 capture device and wish to integrate to it using directshow.
I have tried OBS Studio and this captures fine, however when I try any of my own directshow code in c++ builder I can see the device, but I cannot obtain video format or any video feed.
I have tried datastead ffmpeg components, mitov basic video, winsoft wcamera and FFVCL components, all which are directshow compatible and all of which detect the device but cannot preview or capture any video.
I even used straight forward directshow code from #Spektre which is just a basic wrapper for the windows DirectShow API.
This detects but freezes when calling
hr = graph->AddSourceFilterForMoniker(moniker, 0, dev->filtername, &dev->filter);
and dev->filtename = "LGP Stream Engine"
If I take this device out of the list then directshow driver fails on Select of the "Avermedia C875 Capture device"
I contacted avermedia and they say the device is directshow 10 compatible and no new driver work being done as it is EOL.
Any suggestions as to how I can interface to and capture from this device using directshow? EZCapture works fine, C875 doesn't.
It turns out that the avermedia C875 is not compatible with writing direct to an AVI capture or video render. As it is an obsolete product avermedia are not interested in providing a more compliant directshow driver.
Avermedia gamer lite portable 2 plus, is directshow compliant and does render as well as save to AVI.
I am not sure what OBS does that is different, the project is a bit too complex for me to try and extract just the video recording section to see how it handles things differently.
Thanks for the feedback #Roman, helped me track things down.

Displaying different stuff to multiple Projectors.

I want to connect multiple projector to single laptop, I found about VGA Splitter (http://www.kvmswitchtech.com/vga-splitter-350mhz-8-port-p46359.htm) which can use to connect multiple projectors to single PC.
But I don’t want to display whole screen in both Projectors, in short Projectors should display different stuff at same time.
For Example:-
Projector 1 can Display Power point Presentation and Projector 2 can Display the running movie in player.
I got below set of Questions
Is there any Software available to perform this operation?
If I want to write my own application, Is Directshow (Provided by Microsoft ) is good one to start?
Is there any other VGA Programming language available?
Is there any Software available to perform this operation?
The primary question you are going to get here is how the projectors are connected to PC. The device might need specific integration and you're moving the item #2 below immediately. Otherwise it can be a sort of secondary monitor and you can extend your desktop over it, and then any full screen application running on the secondary monitor is going to be projected.
Perhaps, you will find more software choices going to SuperUser.
If I want to write my own application, Is Directshow (Provided by Microsoft ) is good one to start?
As mentioned above, the hardware might need you to use specific SDK from the vendor and this is your starting point. DirectShow is the API that covers multiple related tasks and might be of use here:
it is capable to built media pipelines terminating at DirectShow-compatible video output device (the projector might be not might be not capable/compatible)
it allows you to play media files into your application and otherwise control video/audio and integrate it into higher level software
DirectShow as API does not fully cover requested task, but it definitely relevant might be used in the in-house built Windows based app.
Is there any other VGA Programming language available?
The "language" is not actually language and it is how particular device is integrated with PC. This is typically covered by hardware vendors who provide the hardware with accompanying development kits and samples.

Using Google 'Protocol Buffers' in Arduino

Is it possible to make Google Protocol Buffers work in Arduino?
I have been trying for about a week and can't make it work, and I would like to know if it's even possible.
This should fit on an Arduino:
https://github.com/nanopb/nanopb
I've managed, after several attempts, to compile google protocol buffers for Arduino (using lite runtime), and still, the resulting code size was way over the 32k limit. So, for now, GPB isn't a viable option for Arduino projects. (maybe on Arduino Mega?)
I suggest you look at MQTT for a suitable replacement (I'll do that).
Looking at the link provided it says it has bindings for C++. This is essentially what the arduino is programed in. I see no reason why it wouldn't work. If you were to post some details (the data object your trying to process and the C++ code the system generated) we might be able to help. What exactly isn't working?
If you are looking for a tutorial on using Protobuf on Arduino, you can check out my article: A simple Arduino IoT example with Protobuf. The code is available on Github.
The tutorial uses my library Embedded Proto. You have to copy the Embedded Proto to the Arduino library folder, and it will build. Full details in the tutorial.
If you have any questions, let me know.

3d engine with telnet access

Does anyone know of a open source 3d engine which can be operated via telnet?
What I'm looking for is scripting via a socket connection. To allow for world creation and/or camera movement.
Does anybody know of any that has this built in or very, very easy to add as a plugin or script?
The platform is not crucial.
Doesn't look like it. I'll just do it myself.
You can script Blender using Python; probably this allows to open a listening socket connection, too. It also has a 'game engine' mode just for rapid prototyping.
It shouldn't take you more than 10 minutes to add this to an engine, so it really doesn't matter which one you go for.

Simulating a TWAIN Device

Our company is using some software that ONLY accepts input from an "Imaging Device" i.e. a TWAIN device (e.g. scanner).
The problem is that we are receiving our files digitally, so using an actual scanner would require us to print, scan, and shred documents that we already have on the computer, but not in the software.
I was curious if anybody has any idea of how we might be able to work around this problem in the meantime. My first thought was to find some way to trick the program into thinking we're using a scanner, via some new 'imaging device' that would just read in the file, and spit it out to the software, but I don't even know where to begin with that.
We put in a feature request, seeing as how this problem should obviously be addressed in the software itself, but the company is notorious for lagging pretty hard when it comes to updates.
The system used by scanners is called TWAIN, so you'd be looking for some sort of virtual twain driver.
A quick google search will produce several hits, I don't have any experience with the software myself so can't advise any further.
Two such providers I found via experts exchange:
http://www.twaintools.de
http://www.scanpoint-usa.com
OK, months late... but in case you are interested, I have a TWAIN driver framework/toolkit that might let you build this fairly easily, depending on just what your scanning app expects, and how hard it is to read images from your digital documents. It's a Microsoft Visual C++ project. No charge but you'd need our permission to redistribute a driver based on it: GenDS
The TWAIN Working Group also has a sample/skeleton driver, I think it's straight C - and used to have some rather bad bugs (Why I wrote mine ;-) but, it might have got better.
Look for the "sample data source and application" on their download page.
And of course I have a 'commercial' version of GenDS that I use to write TWAIN drivers on contract.

Resources