Question

. Hello All?

I want to customize IMFByteStream interface, but i'm facing some problems.

Before explains my problems, describes how to create from what i've got.

First, customized IMFByteStream has IMFByteStream's instance that created using MFCreateFile method. Therefore, we need to implement the necessary ones (For example, BeginRead, Read, etc..)

Second, we need to decrypt to the received data. Because the file was encrypted.

As a result, the read sequence was following.

CustomByteStream::BeginRead() -> CustomByteStream::Read() -> IMFByteStream::Read() -> CustomByteStream::Decrypt() -> Passes the decrypted data.

But, I don't know how to pass the data. AsyncResult or AsyncCallback should I use? I don't know how.

Please help me. Thank you.

Was it helpful?

Solution

If you implement IMFByteStream, you have to implement IMFAsyncCallback too.

I can't explain here. But when i will update my project with Mpeg2 source: MFNode

you will see an implementation of IMFByteStream. I use it because original IMFByteStream fails on some video files with no reason. My implementation works well with all files i've tested. (For now my implementation does not handle big file.)

Edit: i checked my code. I don't implement IMFByteStream. i created a class that acts like IMFByteStream. I implement IMFAsyncCallback for BeginRead/EndRead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top