<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><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>[...]<br><blockquote type="cite"><div>void HistoryFilter::doGetNextFrame()</div><div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre">   </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><br><blockquote type="cite"><div>
<div>void HistoryFilter::afterGettingFrame(void* clientData, unsigned  </div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>frameSize,<span class="Apple-tab-span" style="white-space:pre">  </span>unsigned /*numTruncatedBytes*/,<span class="Apple-tab-span" style="white-space:pre">     </span>struct timeval  </div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>presentationTime, unsigned /*durationInMicroseconds*/)</div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>HistoryFilter* filter = (HistoryFilter*)clientData;</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </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 class="Apple-tab-span" style="white-space:pre">      </span>fFrameSize = frameSize;</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>fPresentationTime = presentationTime;</div><div>
<span class="Apple-tab-span" style="white-space:pre"> </span>afterGetting(this);</div><div>}</div></div></blockquote><div><br></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><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>That looks fine - but don't forget to enter the event loop, by calling </div><div><span class="Apple-tab-span" style="white-space:pre">        </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><br><br><div apple-content-edited="true">
<span class="Apple-style-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; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-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; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>