Sending again ,

Please, don't do this! Your message was already received, and I answered it. DO NOT send the same question to the mailing list multiple times.

I notice, however, that - for some unknown reason - your question, and my response, did not make it into the mailing list's archives. Therefore, this time, I'll give you the benefit of the doubt, and include a copy of my original response here.


------------------
Question #1:  How should  Notify MPEG4LiveSource::doGetNextFrame ?
while(true)
{
fWatchVariable = 0;
dummyTask(NULL);  // 100 ms to awake a sleeping server.
env->taskScheduler().doEventLoop(&fWatchVariable);
if (fWatchVariable =1)
{
                // How to Invoke MPEG4LiveSource::doGetNextFrame?
printf("\nEventThrown=%d,",fWatchVariable);
}
}

Assuming that "fWatchVariable" gets set when new data arrives for your "MPEG4LiveSource" object, then you would handle this event by calling whatever function - in your "MPEG4LIVESource" class - you have defined to handle the arrival of new data.

(E.g, if you were to use our "DeviceSource" code as a model ("liveMedia/DeviceSource.cpp"), this would be the "deliverFrame()" member function.)


Question #2: Is It ok to use MPEG4VideoStreamFramer or should I use MPEG4VideoStreamDiscreteFramer in order to parse test.m4e file.?

".m4e" files should always be streamed using the "MPEG4VideoStreamFramer" class (because files deliver a byte stream - not a stream of discrete frames).


void MPEG4LiveSource::doGetNextFrame() {

                if (!isCurrentlyAwaitingData())
                                  return; // we're not ready for the data yet

// WaitForSingleObject( hEvent, INFINITE ); // Question #3: Try to sync both thread Ignoring <http://www.live555.com/liveMedia/doxygen/html/classTaskScheduler.html>TaskScheduler::doEventLoop() , is that recommendable?

No! Your "doGetNextFrame()" function should never block. If no data is immediately available for delivery, then "doGetNextFrame()" should just return. (Again, see the "DeviceSource" code for an illustration.)


nextTask() = envir().taskScheduler().scheduleDelayedTask(0,(TaskFunc*)FramedSource::afterGetting, this); // Question #4: Is that good to call suitable here?

Yes.  This tells the downstream object that data has been delivered to it.


Question #5: Run over the Mailing list I could not found any example of streaming from DirectShopw filter, Is there a problem with that approach?

No. Several other people have done this. (However, I personally do not use 'DirectShow'.)
--

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to