Hi Ross,<div>Thank you very much for your attention.</div><div>I am facing with some kind of difficulties, because I don't know what is missing, the data just seems not to be fed to the output of the filter.</div><div>
<br></div><div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
That looks fine - but don't forget to enter the event loop, by calling <br><span style="white-space:pre-wrap">        </span>env->taskScheduler().doEventLoop();<br>at the end of this code, otherwise nothing will happen.</blockquote>
</div><div><br></div><div>Actually I am using the code of the testMPEG4VideoStreamer, so that function is called after play(), in the main function.</div><div><div>        *env << "Beginning streaming...\n";</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>play();</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>env->taskScheduler().doEventLoop(); // does not return</div><div><br></div>
<div>What I am confused about is when replacing historyFilter with videoSource in videoSink->startPlaying, then it works perfectly.</div><div><blockquote type="cite"><div><div>videoSink->startPlaying(*historyFilter, afterPlaying, videoSink);</div>
</div></blockquote></div><div>This indicates that the problem is somewhere within the filter class itself, however, as I said before, I couldn't find anything out of order.</div><br><div class="gmail_quote">On Mon, Dec 19, 2011 at 4:51 AM, Ross Finlayson <span dir="ltr"><<a href="mailto:finlayson@live555.com">finlayson@live555.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="im"><blockquote type="cite">I have been playing with the FramedFilter class for a while, and created a simple filter that will just deliver its input to its output. However, it is not working for some reason. Can you point me to the point that I'm missing?</blockquote>
</div>[...]<br><blockquote type="cite"><div>void HistoryFilter::doGetNextFrame()</div><div><div>{</div><div><span style="white-space:pre-wrap"> </span>fFrameSize=0;</div></div></blockquote>You don't need to do this here (although it does no harm), because you are (properly) setting "fFrameSize" later, in your 'after getting' function.</div>
<div><div class="im"><br><blockquote type="cite"><div>
<div>void HistoryFilter::afterGettingFrame(void* clientData, unsigned  </div>
<div><span style="white-space:pre-wrap">  </span>frameSize,<span style="white-space:pre-wrap">      </span>unsigned /*numTruncatedBytes*/,<span style="white-space:pre-wrap"> </span>struct timeval  </div>
<div><span style="white-space:pre-wrap">  </span>presentationTime, unsigned /*durationInMicroseconds*/)</div><div>{</div><div><span style="white-space:pre-wrap">   </span>HistoryFilter* filter = (HistoryFilter*)clientData;</div>

<div><span style="white-space:pre-wrap">  </span>filter->afterGettingFrame1(frameSize, presentationTime);</div><div>}</div><div><br></div><div>void HistoryFilter::afterGettingFrame1(unsigned frameSize, struct timeval presentationTime)</div>

<div>{</div><div><span style="white-space:pre-wrap">  </span>fFrameSize = frameSize;</div><div><span style="white-space:pre-wrap">  </span>fPresentationTime = presentationTime;</div><div>
<span style="white-space:pre-wrap">     </span>afterGetting(this);</div><div>}</div></div></blockquote><div><br></div></div>Your filter also needs to be setting "fNumTruncatedBytes" and "fDurationInMicroseconds" (in your case, because you're making a direct copy, these will be the values of the "numTruncatedBytes" and "durationInMicroseconds" parameters, respectively).</div>
<div><br></div><div><div class="im"><br><blockquote type="cite"><div><div>In my main server play() function, I put in this code:</div></div><div><br></div><div><div>FramedSource* videoES = fileSource;</div>
<div>// Create a framer for the Video Elementary Stream:</div><div>videoSource = MPEG4VideoStreamFramer::createNew(*env, videoES);</div><div>historyFilter = HistoryFilter::createNew(*env, videoSource, "history.mp4");</div>

<div>// Finally, start playing:</div><div>*env << "Beginning to read from file...\n";</div><div>videoSink->startPlaying(*historyFilter, afterPlaying, videoSink);</div></div></blockquote><div><br></div>
</div>That looks fine - but don't forget to enter the event loop, by calling </div><div><span style="white-space:pre-wrap">       </span>env->taskScheduler().doEventLoop();</div><div>at the end of this code, otherwise nothing will happen.  (In a LIVE555-based application, almost everything gets done within the event loop).</div>
<div class="im"><br><br><div>
<span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium">Ross Finlayson<br>
Live Networks, Inc.<br><a href="http://www.live555.com/" target="_blank">http://www.live555.com/</a></span></span>
</div>
<br></div></div><br>_______________________________________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
<br></blockquote></div><br></div>