title: GStreamer External Clock
body: <p>I am using GStreamer in my media player application to play TS files. Though I am able to play audio &amp; video, not able to use PCR for synchronization.</p>
  
  <p>When googled, found the documentation for <a href="https://developer.gnome.org/gstreamer/stable/GstPipeline.html" rel="nofollow">gst_pipeline_use_clock()</a> and used the same in my code.
  However, it is not setting the clock and giving some random values [when clock time is retrieved using: gst_clock_get_time() ]</p>
  
  <p>This is how, I am setting the PCR clock: Is there anything I am missing?</p>
  
  <pre><code>GstClock stPCRClock = {0};
  stPCRClock.last_time = (GstClockTime)pcrInfo; //pcrInfo is the PCR value: 32-bit
  gst_pipeline_use_clock(pipeline, &amp;stPCRClock);
  </code></pre>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thanks,</p>
  
  <p>Kranti</p>