Re: [Live-devel] Live555 with ffmpeg's MJPEG codec

2008-07-17 Thread Silvain Beriault
"JPEGVideoRTPSink" (which is used by the RTP sender) doesn't reconstruct the JPEG header. (Remember that the JPEG header is not sent in the RTP packet.) It's the RTP *receiver* ("JPEGVideoRTPSource" in our case) that reconstructs a JPEG header (from the parameters in the RTP payload forma

Re: [Live-devel] Live555 with ffmpeg's MJPEG codec

2008-07-15 Thread Silvain Beriault
If I don't use live555 it works just fine: i.e. encode to a memory block, decode from a memory block. I tried comparing the original jpeg compressed data with the received data and it seems that the jpeg header is broken. Could it be that JPEGVideoRTPSink fails to reconstruct the original JP

Re: [Live-devel] Live555 with ffmpeg's MJPEG codec

2008-07-14 Thread Silvain Beriault
Don't forget to also set "fPresentationTime". Ok I am setting it properly now, using gettimeofday(), however why is it needed in the case of a jpeg frame? Also, since my code runs on a windows platform, I had to download a custom implementation of this function. I can't help you with codec

[Live-devel] Live555 with ffmpeg's MJPEG codec

2008-07-14 Thread Silvain Beriault
Hello, I am trying to stream real-time video data over RTP using live555 library with MJPEG format. To to so, I created a derived class of JPEGVideoSource. Within the derived class, I have implemented the following methods: a) The doGetNextFrame() method which dequeue an RGB video frame, co

Re: [Live-devel] Proper cleanup of live555 instances

2008-07-04 Thread Silvain Beriault
Ross Finlayson wrote: here is currently how I currently cleanup: sink->stopPlaying(); Medium::close(framedSource); Medium::close(sink); <== crashes env->reclaim(); Here are my questions: 1. Overall what should be the full cleanup sequence for that example? I'm not sure why you got a crash, b

[Live-devel] Proper cleanup of live555 instances

2008-07-03 Thread Silvain Beriault
Hello, I have written an application similar to testMPEG1or2VideoStreamer.cpp but within a larger application. Therefore, I need to perform some cleanup to avoid memory leaks. Here is what I currently allocate (in that same order): TaskScheduler *scheduler; BasicUsageEnvironment *env; RTPSin

Re: [Live-devel] Blocking vs Non-Blocking doGetNextFrame()???

2008-06-30 Thread Silvain Beriault
According to the DeviceSource.cpp template, the doGetNextFrame() should deliver a frame "in a non-blocking fashion i.e., so that we return immediately from this function even if no data is currently available." However, if no data is available, the afterGetting() function is not invoked wit

[Live-devel] Blocking vs Non-Blocking doGetNextFrame()???

2008-06-30 Thread Silvain Beriault
Hello, According to the DeviceSource.cpp template, the doGetNextFrame() should deliver a frame "in a non-blocking fashion i.e., so that we return immediately from this function even if no data is currently available." However, if no data is available, the afterGetting() function is not invok

[Live-devel] Valid test.mpg file for testMPEG1or2VideoStreamer.exe

2008-06-24 Thread Silvain Beriault
code 01E0" Would anyone be kind enough to send me a valid test.mpg video file for the testMPEG1or2VideoStreamer.exe program. Your help is greatly appreciated! My excuse in advance if this question was already answered before. Silvain Beriault. __