<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic AVSync::SetPosition()  problem in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/AVSync-SetPosition-problem/m-p/895425#M11989</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am writing a MP4 player using AVSync class. It works fine. The problem arised when I tried to implement a simple scrolling throught the video file (when the video is paused). I use AVSync::SetPosition() method which calls m_pSplitter-&amp;gt;SetPosition(dfPos). But I see nothing on the screen. It looks like VideoRenderer has nothing to display in this case.&lt;/P&gt;
&lt;P&gt;Do I miss something? &lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
    <pubDate>Fri, 01 Dec 2006 21:50:14 GMT</pubDate>
    <dc:creator>mazhurin1</dc:creator>
    <dc:date>2006-12-01T21:50:14Z</dc:date>
    <item>
      <title>AVSync::SetPosition()  problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/AVSync-SetPosition-problem/m-p/895425#M11989</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am writing a MP4 player using AVSync class. It works fine. The problem arised when I tried to implement a simple scrolling throught the video file (when the video is paused). I use AVSync::SetPosition() method which calls m_pSplitter-&amp;gt;SetPosition(dfPos). But I see nothing on the screen. It looks like VideoRenderer has nothing to display in this case.&lt;/P&gt;
&lt;P&gt;Do I miss something? &lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2006 21:50:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/AVSync-SetPosition-problem/m-p/895425#M11989</guid>
      <dc:creator>mazhurin1</dc:creator>
      <dc:date>2006-12-01T21:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: AVSync::SetPosition()  problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/AVSync-SetPosition-problem/m-p/895426#M11990</link>
      <description>&lt;P&gt;Did you try to decode after re-positioning? Change position in bitstreams do not decode frame, it just set new position.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2006 05:51:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/AVSync-SetPosition-problem/m-p/895426#M11990</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2006-12-04T05:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: AVSync::SetPosition()  problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/AVSync-SetPosition-problem/m-p/895427#M11991</link>
      <description>&lt;P&gt;Hi Vladimir,&lt;/P&gt;
&lt;P&gt;Thank you for the reply, but I still have problem. &lt;/P&gt;
&lt;P&gt;1) I decode frames as you suggested. I call AVSync-&amp;gt;Init(); AVSync-&amp;gt;SetPosition(); and then my new function AVSync-&amp;gt;RenderCurrentFrame(). See below (I uses VideoProc() as a template):&lt;/P&gt;
&lt;P&gt;bool&lt;BR /&gt;AVSync::RenderCurrentFrame()&lt;BR /&gt;{&lt;BR /&gt; UMC::Status umcSplitRes = UMC::UMC_OK;&lt;BR /&gt; UMC::MediaDataEx data;&lt;BR /&gt; UMC::VideoData out_data;&lt;BR /&gt; UMC::Status umcRes = UMC::UMC_OK;&lt;/P&gt;
&lt;P&gt; out_data.Init(m_DecodedFrameSize.width,&lt;BR /&gt; m_DecodedFrameSize.height,&lt;BR /&gt; m_cFormat);&lt;/P&gt;
&lt;P&gt; umcRes = m_pVideoRender-&amp;gt;LockInputBuffer(&amp;amp;out_data);&lt;/P&gt;
&lt;P&gt; double dfDecTime = 0;&lt;BR /&gt; do &lt;BR /&gt; {&lt;/P&gt;
&lt;P&gt; if ((4 &amp;gt;= data.GetDataSize() || umcRes == UMC::UMC_NOT_ENOUGH_DATA)&lt;BR /&gt; &amp;amp;&amp;amp; UMC::UMC_OK == umcSplitRes)&lt;BR /&gt; {&lt;BR /&gt; umcSplitRes = umcRes = m_pSplitter-&amp;gt;GetNextVideoData(&amp;amp;data);&lt;BR /&gt; vm_debug_trace(1, VM_STRING("VideoProc: data size from splitter is %d
"),&lt;BR /&gt; data.GetDataSize());&lt;BR /&gt; if(UMC::UMC_WAIT_FOR_REPOSITION == umcSplitRes)&lt;BR /&gt; {&lt;BR /&gt; umcSplitRes = UMC::UMC_OK;&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; { umcRes = UMC::UMC_OK; }&lt;/P&gt;
&lt;P&gt; if (UMC::UMC_OK == umcRes &amp;amp;&amp;amp; NULL == data.GetDataPointer())&lt;BR /&gt; { umcSplitRes = UMC::UMC_END_OF_STREAM; }&lt;/P&gt;
&lt;P&gt; if (UMC::UMC_END_OF_STREAM == umcSplitRes)&lt;BR /&gt; { umcRes = UMC::UMC_OK; }&lt;/P&gt;
&lt;P&gt; out_data.SetTime(data.GetTime());&lt;/P&gt;
&lt;P&gt; if (UMC::UMC_OK == umcRes)&lt;BR /&gt; {&lt;/P&gt;
&lt;P&gt; if (UMC::UMC_END_OF_STREAM != umcSplitRes)&lt;BR /&gt; { &lt;BR /&gt; umcRes = GetFrameStub(&amp;amp;data, out_data, dfDecTime); &lt;BR /&gt; }&lt;BR /&gt; else // sweap reference frames from the decoder&lt;BR /&gt; { &lt;BR /&gt; umcRes = GetFrameStub(NULL, out_data, dfDecTime); &lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt; if(umcRes != UMC::UMC_OK)&lt;BR /&gt;&amp;amp;n
bsp; { vm_time_sleep(10);}&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt; } while (UMC::UMC_NOT_ENOUGH_DATA == umcRes ||&lt;BR /&gt; UMC::UMC_NOT_FIND_SYNCWORD == umcRes);&lt;/P&gt;
&lt;P&gt; m_pVideoRender-&amp;gt;UnLockInputBuffer(&amp;amp;out_data);&lt;/P&gt;
&lt;P&gt; if (UMC::UMC_OK != umcRes) &lt;BR /&gt; { &lt;BR /&gt; return false;&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt; m_pVideoRender-&amp;gt;GetRenderFrame();&lt;BR /&gt; m_pVideoRender-&amp;gt;RenderFrame();&lt;BR /&gt; return true;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;2) After thatI always had UMC_NOT_INITIALIZED from GetFrameStub().I added another function &lt;/P&gt;
&lt;P&gt;void AVSync::InitializeDecoder()&lt;BR /&gt;{&lt;BR /&gt; UMC::Status umcSplitRes = UMC::UMC_OK;&lt;BR /&gt; UMC::MediaDataEx data;&lt;BR /&gt; UMC::VideoData out_data;&lt;BR /&gt; UMC::Status umcRes = UMC::UMC_OK;&lt;/P&gt;
&lt;P&gt; out_data.Init(m_DecodedFrameSize.width,&lt;BR /&gt; m_DecodedFrameSize.height,&lt;BR /&gt; m_cFormat);&lt;/P&gt;
&lt;P&gt; double dfDecTime = 0;&lt;BR /&gt; do &lt;BR /&gt; {&lt;BR /&gt; umcSplitRes = umcRes = m_pSplitter-&amp;gt;GetNextVideoData(&amp;amp;data);&lt;BR /&gt; if (data.GetDataSize() &amp;lt;= 0)&lt;BR /&gt; break;&lt;BR /&gt; umcRes = GetFrameStub(&amp;amp;data, out_data, dfDecTime); &lt;BR /&gt; } while (UMC::UMC_FAILED_TO_INITIALIZE == umcRes);&lt;/P&gt;
&lt;P&gt; return;&lt;BR /&gt;}&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;3) After that m_pSplitter-&amp;gt;GetNextVideoData() couldn't find the next I-Frame. I modifiyed UMC::MPEG4EncoderParams.IVOPdist from 300 to 1 in my mp4 encoder.&lt;/P&gt;
&lt;P&gt;4) After that m_pSplitter-&amp;gt;GetNextVideoData() always returns the very first frame.&lt;/P&gt;
&lt;P&gt;Please tell me what I do wrong since it's pretty hard for me to understandwhat is happening in m_pSplitter-&amp;gt;GetNextVideoData() function.&lt;/P&gt;
&lt;P&gt;Thanks, Anton&lt;/P&gt;
&lt;P&gt;PS: My debug window&lt;/P&gt;
&lt;P&gt;Reposition starts&lt;BR /&gt;m_pSplitter-&amp;gt;SetPosition started = 2.624000&lt;BR /&gt;m_pSplitter-&amp;gt;SetPosition returned&lt;BR /&gt;Reposition ends: v = 2.550 a = 2.560&lt;BR /&gt;VideoProc: data size from splitter is 2812&lt;BR /&gt;Splitter PTS: 2.600000&lt;BR /&gt;Decoder PTS: 2.600000&lt;BR /&gt;Reposition starts&lt;BR /&gt;m_pSplitter-&amp;gt;SetPosition started = 1.707000&lt;BR /&gt;m_pSplitter-&amp;gt;SetPosition returned&lt;BR /&gt;Reposition ends: v = 1.650 a = 1.672&lt;BR /&gt;VideoProc: data size from splitter is 3716&lt;BR /&gt;Splitter PTS: 1.700000&lt;BR /&gt;Decoder PTS: 1.700000&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2007 22:04:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/AVSync-SetPosition-problem/m-p/895427#M11991</guid>
      <dc:creator>mazhurin</dc:creator>
      <dc:date>2007-02-12T22:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: AVSync::SetPosition()  problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/AVSync-SetPosition-problem/m-p/895428#M11992</link>
      <description>I am trying to implement the same thing. Have you had any progress?</description>
      <pubDate>Fri, 29 Feb 2008 19:42:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/AVSync-SetPosition-problem/m-p/895428#M11992</guid>
      <dc:creator>mfarook</dc:creator>
      <dc:date>2008-02-29T19:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: AVSync::SetPosition()  problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/AVSync-SetPosition-problem/m-p/895429#M11993</link>
      <description>&lt;P&gt;so did someone implement the setPosition/getPosition functions by himself? or are there other possibilities to get such funktionality?&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2009 11:09:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/AVSync-SetPosition-problem/m-p/895429#M11993</guid>
      <dc:creator>mikl_la</dc:creator>
      <dc:date>2009-05-11T11:09:09Z</dc:date>
    </item>
  </channel>
</rss>

