I want to use mediafoundation to encode a pcm stream to a aac stream. I've found out that I need to use the IMFMediaSink interface. But I could not find any implementation of that interface which does not use files. I just want to encode the pcm stream to an aac stream in memory.
Can't I use something like IMFByteStream? Does anyone know a solution for that? I really can't find anything, but I can't believe that there is no solution.
I found a solution. There is a function called MFCreateSinkWriterFromURL. The name is quite confusing but there is an optional parameter of the type MFByteStream. Simply pass a custom bytestream to the function and there you have it!
Related
Propably a pretty stupid/simple question:
I'm using the arduino wrapper of Petit FS and I'm trying to do a streaming read of data into a FIFO.
The Library says it supports streaming read and I need to pass buffer=NULL to activate it but I can't figure out which method I need to implement/Rewrite/Overrite to handle my data while reading/streaming
Can anyone help me out?
Never mind, in the avr_mmcp file, is a constant defining a function which is used as streaming function. No idea how I missed it.
In the avr_mmcp file, is a constant defining a function which is used as streaming function.
I use android platform . I have file in InputStream Datatybe , I want to convert it to MediaPlayer and play it
I have two suggestions for you:
Get the entire input into a properly formatted file, and pass that file to MediaPlayer. You're going to have to figure out if your data is formatted properly and how to format it.
Instead of using MediaPlayer, use MediaCodec (http://developer.android.com/reference/android/media/MediaCodec.html) where instead of passing a file or a link you're passing the data itself. With this solution, you're going to have to figure out if you're passing the data properly to Media Codec, but I suspect this is the solution you're looking for. The google documentation does have an example to get you started a bit.
Good luck to you!
What is the format of the data? MP4?
If it is a standard container like MP4 and is a file accessible as a URI in local filesystem (file://) or network (http://) then you should use Google's ExoPlayer library, with demo code here.
I would only resort to using MediaCodec if you have a custom container or transport mechanism.
I have binary asd i want to save as a myvideo.mp4, So my question is that if you have binary and you want to store your file,
So how it would accomplished any one idea i didn't work yet with binary and streaming i am new with these all things so if any one know please share a piece of example which solve my problem.
like response.outStream in this i am getting binary so can i save as a myvideo.mp4 what would be that process actually this binary is generating for mp4 conversion so any idea.
thanks.
You will need to create a FileStream to write to and then you will read the source stream in a loop, reading a block and then writing that block to the FileStream. It should be fairly easy to find an example of reading a stream in a loop using its Read method.
I am creating an application that takes a user's hand signature, input on the Blackberry playbook. When the JPEG is created, I would like to add Exif data such as the date/time to the JPEG. Does anyone know how to do this, or if it is possible?
Thanks
Phil
I couldn't find anything online about writing exif data, but I did find this interesting article on reading exif data. It mentions what bytes does what. I suggest you take that library to create something to write exif data. Seems fairly simple, just need to set the proper tags in the ByteArray, append the image byte array between 2 tags and write to the file.
i found two libries
As3 seems to be writing it to xml, but flash builder does not take in import com.adobe.xmp.*;
Metaphile
A Java developer just asked me the following:
If I send you byte[] for all the method calls on Remote Objects - will you be able to convert it to domain objects?
Can this be done? And how?
Thanks for any helpful tips!
Yes, you can. It won't happen automatically (ie, like it would if IExternalizable was implemented on both ends), but there's no reason you can't have, for example, a fromBytes static method on your domain objects which accept a ByteArray and construct the object from that.