<?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 To make my question clearer - in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Streaming-Using-Events-In-C/m-p/1022434#M38808</link>
    <description>&lt;P&gt;To make my question clearer - does the event handler approach work and if so why do none of the samples use it?&lt;/P&gt;

&lt;P&gt;They all create a new thread and run the polling loop there which is what the event handler approach is supposed to do for you.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Apr 2015 08:31:08 GMT</pubDate>
    <dc:creator>Mike_J_</dc:creator>
    <dc:date>2015-04-14T08:31:08Z</dc:date>
    <item>
      <title>Streaming Using Events In C#</title>
      <link>https://community.intel.com/t5/Software-Archive/Streaming-Using-Events-In-C/m-p/1022433#M38807</link>
      <description>&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;Can anyone get the example from the documentation &amp;nbsp;to work.&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;When I try it the OnNewSample is never called. &amp;nbsp;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&amp;nbsp;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;pxcmStatus OnNewSample(Int32 mid, PXCMCapture.Sample sample) {&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;if (sample.color!=null) {&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// work on the color sample&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;}&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;if (sample.depth!=null) {&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// work on the depth sample&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;}&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;// return NO_ERROR to continue, or any error to exit the loop&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;return pxcmStatus.PXCM_STATUS_NO_ERROR;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;};&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;void CaptureUnalignedColorDepthSamples() {&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;PXCMSenseManager sm=PXCMSenseManager.CreateInstance();&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;// select the color and depth streams&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR,640,480,30);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_DEPTH,320,240,30);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;// Initialize my handler&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;PXCMSenseManager.Handler handler=new PXCMSenseManager.Handler();&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;handler.onNewSample=OnNewSample;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;sm.Init(handler);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;// Streaming&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;sm.StreamFrames(true);&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;// Clean up&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &amp;nbsp;sm.Dispose();&lt;/SPAN&gt;&lt;/P&gt;

&lt;P class="p_CodeExample" style="margin-bottom: 0px; color: rgb(0, 0, 0); font-family: Calibri; font-size: 14.6666669845581px; line-height: normal;"&gt;&lt;SPAN class="f_CodeExample" style="font-size: 10pt; font-family: 'Courier New';"&gt;}&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2015 10:49:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Streaming-Using-Events-In-C/m-p/1022433#M38807</guid>
      <dc:creator>Mike_J_</dc:creator>
      <dc:date>2015-04-13T10:49:59Z</dc:date>
    </item>
    <item>
      <title>To make my question clearer -</title>
      <link>https://community.intel.com/t5/Software-Archive/Streaming-Using-Events-In-C/m-p/1022434#M38808</link>
      <description>&lt;P&gt;To make my question clearer - does the event handler approach work and if so why do none of the samples use it?&lt;/P&gt;

&lt;P&gt;They all create a new thread and run the polling loop there which is what the event handler approach is supposed to do for you.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2015 08:31:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Streaming-Using-Events-In-C/m-p/1022434#M38808</guid>
      <dc:creator>Mike_J_</dc:creator>
      <dc:date>2015-04-14T08:31:08Z</dc:date>
    </item>
  </channel>
</rss>

