[Live-devel] How to receive mp4 video data
Fabien LAI-HONG-TING
elios.flht at thales-bm.com
Fri Jun 2 01:15:22 PDT 2006
Hi,
This is certainly a basic question, but i'm a programmer and english
learner .. i need some help.
My goal is to write a basic RTP mp4 video player for windows using
live55 and directshow mp4 decoder.
For the moment i'm trying to receive video data to send them to the mp4
decoder, (i'll deal with the audio track later)
This is my flow control:
RTSP: description parsing, setup video only, play,
while (1)
{
getNextFrame(buffer, max_size_of_Buffer, afterReadingFunc, void *,
onSourceClose, void * )
doEventLoop( flag)
}
in my afterReadingFunc i'm doing: flag = ~0;
I believed that on each getNextFrame call "Buffer" should be filled
with all the data of one frame, with the size in byte of the frame
thanks to the second parameter of afterGettingFunc.
And i thought that i would give each frame one after another to the decoder.
But when i launch the programm, the unsigned frameSize parameter doesn't
correspond to the amount of data written in buffer.
Sometimes the length is taller than the data vailable in the buffer,
sometimes the buffer is empty and not the length,
And i can't make find any similarities between the data received from
getNextFrame and the ethereal capture.
There is a lot of things that i 'm misunderstanding if someone could
give me some hints, that would be very kind!
Thanks
More information about the live-devel
mailing list