I want to hack other vendor's microphone driver data. E.g. to change the voice from man to woman.
Solution 1:
Record the vendor's mic data and hack the data, then stream it to a virtual microphone driver, which could be listened by all apps.
Solution 2:
Use APO, and below is Microsoft's official code on GitHub. You could find its APOProcess() function which is used to handle its driver data, to add delay.
https://github.com/microsoft/Windows-driver-samples/blob/master/audio/sysvad/APO/DelayAPO/DelayAPOMFX.cpp
But in this case, the APO hacks its own driver's data.
While my purpose is to hack other vendor's microphone data, whose code is not available for me. So APO is still work in this kind of case? E.g. an accessable shared memory for all vendors' microphone data?
Or any other solution?
Related
I have a USB device (actually, a digital camera) that talks the MSC protocol, i.e. it appears as a disk device and can be talked to with SCSI commands. When it's connected to a Mac, the IOBlockStorageDriver takes over and mounts the volume.
Now, my goal is to prevent this from happening, in hopes that I can then talk to the device thru the SCSI interface functions for SCSITaskDeviceInterface, provided in <IOKit/scsi/SCSITaskLib.h>.
Is that possible? The SCSI Architecture Model Device Interface Guide states that the SCSITaskDeviceInterface is only available for types other than $00, $05, $07 and $0E (the MSC device is type 00), but I wonder if that's only because these types are taken over by the Mass Storage driver and therefore are not available. But if I prevent the Mass Storage driver to take over, will these types, such as 00, become available via SCSITaskDeviceInterface?
If that's possible, what must the kext code do to achieve this? E.g, which class should it subclass and which functions must it implement so that it prevents the mass storage driver from taking over while keeping the device visibile as a SCSI device in the io registry?
If that's not possible, could I then instead use the kext to provide a way to offer SCSI-cmd passthrough somehow? I would like to be able to send custom CDBs to this kext from userland, and it should then route them through the SCSI layer to the USB device. Is that possible? Assuming the kext has received a CDB string, how would it locate the SCSI functions for passing the data onward to the USB layer?
I've so far based my unsuccessful tests on Apple's VendorSpecificType00 sample project, which shows how to inject a kext that adds handling custom properties for a SCSI device.
For now, let's ignore upcoming kext deprecations by recent macOS versions (I want to get this working on High Sierra first).
I am working with Google Tango to extract data from the tablet and use it at the same time in another device. I am trying to record the data and use it with another laptop via live streaming.
I've looked at various topics about it and I found the Paraview topic. However the App records the data, save as ZIP file and send it via bluetooth(which is fine for me). I do not want to save the file as ZIP format and send it to another device. I want to record and use the data via live streaming(bluetooth or Wi-Fi).
Is that possible? How can I do it?
Paraview shared the source code so I think I can change it make it work for me. However I am not really used to programming.
Thank you very much for your help. I really appreciate it.
You might want to use sockets: setting a socket server on your computer and connecting to it via your tablet. It is a way to transfer information via what is called, for example, a TCP protocol.
However, there might be a more efficient way to do what you want to achieve with USB debugging. I did not got able to make USB debugging work yet on the tablet and computer I worked with.
You could use TangoAnywhere, I developed it so you can broadcast Google Tango position and orientation data to any device.
https://play.google.com/store/apps/details?id=de.grauonline.tangoanywhere
You connect using a TCP client on your PC/Mac (simple TCP client written Python or something) to port 8080 of your Tango device and will get the position data in realtime.
I recommend the Tango ROS Streamer app which enables you to choose which data (position, point cloud, RGB image) to stream or not.
You will need ROS to retrieve the data. On Linux ROS is easy to install, otherwise use a docker image of ROS.
Caution: the theorical WiFi bandwidth does not enable to stream all the RGB frames at full resolution without dropping some.
The problem background - there are two different windows applications that are trying to access webcam on the computer at the same time. Currently, only one application is able to access to it. I want to be able to allow both applications to simultaneously access the webcam. A common example of my problem is, skype and yahoo messenger trying to access the webcam on the computer at the same time.
I found a few softwares (manycam.com, http://www.splitcamera.com/) that allow this on windows. But I am not sure how they implemented it. I want to write the code myself to achieve this since my code needs to be integrated with other APIs.
I appreciate if anyone can shed light on how to write a device wrapper to achieve this.
The kernel camera driver registers several OS-defined callbacks. One of the callbacks is used for the output stream. Dedicated Windows applications have an interface to this stream - you'll need to do some reading on this subject, it's not something that can be covered in scope of SO. You need a component that will be layered in between the client applications and the camera driver. This component should intercept your camera driver output and duplicate it for the registered clients. This can be achieved either in kernel (filter driver) or in user mode (preferable). http://msdn.microsoft.com/en-us/library/windows/hardware/ff557573%28v=vs.85%29.aspx is a good place to start.
Note: this functionality might be already supported by your camera software (though I think the chances are very slim) and in this case you should dig into the corresponding documentation.
few days ago I asked here about implementing USB. Now, If I may, would like to ask few more questions, about thing I dind´t quite understood.
So, first, If I am right, Windows has device driver for USB interface, for the physical device that sends and receives communication. But what this driver offers to system (user)? I mean, USB protocol is made so its devices are adressed. So you first adress device than send message to it.
But how sophisticted is the device controller (HW) and its driver? Is it so sophisticated that it is a chip you just send device adress and data, and it writes the outcomming data out and incomming data to some internal register to be read, or thru DMA directly to memory?
Or, how its drivers (SW) really work? Does its driver has some advanced functions like send _data to _device? Becouse I somewhat internally hope there is a way to directly send some data thru USB, maybe by calling USB drivers itself? Is there any good article, tutorial you know about to really explain how all this logic works? Thanks.
The USB protocol stack has several layers and is quite complex. You really need to read a good book on USB (e.g. USB Complete) to get an understanding of how it all fits together. The bottom line though is that you want to go as high up the protocol stack as you can, ideally using a system level API (e.g. if it's a USB HID device then just treat it like any other HID device, rather than thinking if it as a USB device - ditto for mass storage devices, etc).
I want to have a stress/performance testing for my content management site, especially for hosted streamed video part. I am using IIS to host the videos. More specifically, I am using the new Windows Server 2008 x64 and IIS 7.0.
The confusion is,
I plan to write code to start a lot of threads, and in each thread I will send web request to video URL, and read response stream from server, but I am not sure whether in this way, it behaves the same as a real user using player to render the video (in my code, I just read the stream, without really play it or write to anywhere). I want to test similar to the real scenario as much as possible;
I also plan to use real Media Player to render video (or what-so-ever media player), but my concern is if I start multiple Media Players on my test machine, since Media Player will utilize some H/W or some other resources (video card specific memory?) to decode/render the video (not sure, needs guru help to check and confirm), if I start multiple players, are there any potential H/W or resource contention between the players? If there is contention, it is also not actual ens user scenario, i.e. few user will start 100 players on his/her machine. :-)
Does anyone have any advice to me?
BTW: I prefer to use any .Net based solution, but not a must.
thanks in advance,
George
You should use mplayer. It has a lot of command line options. I don't know how all theses options are available under Windows, but under linux something like this is possible :
mplayer some_url -dump-video -dump-file=some_file
It will behave the same as a "normal" player I think, and your test machine won't need to handle hundreds of decompression thread, sot it fits your need 1 and 2
If you know the bit rate of your video stream, you can pace your downloading request to simulate video player clients. The bit rate can be calculated from the information carried in the stream, but it's a little more complicated. There is software for stressing testing video server too, such as this IP Video Monitor.