Hi, just wondering if anyone had any new ideas on a plugin for Pidgin to enable video and voice. One of the problems is the way the data is used by each protocol. I figured that mplayer is a capable backend to display sounds and graphics from various formats. This could allow the plugin to at least receive voice and video. Another thing was to enable a v4l2 device like a webcam with built in mic. If the users had a registered device, they could have the plugin enable it for the program. Each protocol may handle the audio and video differently, so I guess to handle that the plugin would have to create a new v4l2 soft device stream from the main inputs ran through mencoder to produce the proper video and audio objects. That way a single video device (webcam) could be used to broadcast on multiple networks by having each protocol get the software device from the plugin. I have no idea if this is a good start, but after thinking about it, this could be a useful implementation at least to the plugin aspect. If anyone has any thoughts on this, like where to begin, or similair projects, or if you know about some of this stuff, drop a line. I have no idea how to program with libpurple or v4l2. I know how to call mplayer and mencoder from bash scripts buts thats about it. Any ideas are welcome.
Does anyone have any experience with coding for mplayer frontends? I think that information would be extremely useful in what I am trying to do. I am looking into the the libpurple core library and I have a feeling that is where the plugin should go for integrating mplayer as a media handler. If a libpurple plugin capable of opening and closing instances of mplayer can be created, then the core of the software will have the mechanism to at least receive signals and do SOMETHING with it. So far I am not so much interested in capturing video and audio, because that to me seems the easiest to research how to do for v4l,v4l2 and alsa/oss APIs. I'm sure there is copy and paste code lying around for that. But what I really want to work on is creating a libpurple plugin to create an Mplayer instance. I'm thinking exactly along the lines of how an Mplayer frontend would do it. Difference would include the fact that the plugin should handle multiple instances of mplayer so that it can handle receiving multiple streams of audio/video. This is necessary for the program to be able to display more than one incoming webcam/voice stream from the multiple clients libpurple can handle.
I really think that that once the protocols video/audio stream format is identified, mplayer more than likely can handle it. I have seen Mplayer play some corrupt files. I have no doubt that Mplayer is more than capable of handling the diversity of multiple messaging protocols video/audio streams. As soon as I successfully implement this, or find similar code and modify it to comply with libpurple plugin scheme, I will start a sourceforge software entry. I think this could really fill the gap for Video and Voice on libpurple(Pidgin). I understand from the developer trac at pidgin.im that this would be difficult to implement directly into libpurple, but in the meantime, I feel this type of plugin would do just fine. Just trying to get started anyways. Any help, knowledge, insight, or even code would be very much appreciated. Hopefully there are other open source enthusiast here who would like to see Pidgin handle webcam sessions and what have you. Thanks for any input that will help organize or develop this concept.
Ok, so far I have figured out that the best way for me to go about this, is to make a program that creates child processes of mplayer. Basically the plugin will call this program with pipes handling the communication between the libpurple and the instance of the program. The program will then create pipes and fork itself according to the arguments coming in from the plugin pipe. Based on the input, will fork() and execlp() mplayer to play a stream. I just haven't figured out how to get the data from the plugin, to the instance of mplayer. Anyone got a clue? Thanks in advance.