Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 7a65d2578765429f23843d9c8d1c0efa > files > 719

libgstreamermm-devel-0.10.5.2-1mdv2010.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>gstreamermm: Gst::Segment Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceGst.html">Gst</a>::<a class="el" href="classGst_1_1Segment.html">Segment</a>
  </div>
</div>
<div class="contents">
<h1>Gst::Segment Class Reference</h1><!-- doxytag: class="Gst::Segment" -->
<p><a class="el" href="classGst_1_1Segment.html" title="Gst::Segment - Class describing the configured region of interest in a media file...">Gst::Segment</a> - Class describing the configured region of interest in a media file. <a href="#_details">More...</a></p>

<p><a href="classGst_1_1Segment-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#a93349f552c878d0cfc864ddcd5223c9f">Segment</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#a53d348dc091f1d60b49ca4f5b3b7daa7">Segment</a> (GstSegment* gobject, bool make_a_copy=true)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#ae2091311c2538ace8a40689a9187c93e">Segment</a> (const <a class="el" href="classGst_1_1Segment.html">Segment</a>&amp; other)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGst_1_1Segment.html">Segment</a>&amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#ab136f825fb986624e7073996e9c38b6c">operator=</a> (const <a class="el" href="classGst_1_1Segment.html">Segment</a>&amp; other)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#a9c785a5c067f329cd5ae353a0fbeda55">~Segment</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#a15197a0152e490c23591cd98574a5e6e">swap</a> (<a class="el" href="classGst_1_1Segment.html">Segment</a>&amp; other)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">GstSegment*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#a27d809117a1d68a72404f6c2f3499b95">gobj</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides access to the underlying C instance. <a href="#a27d809117a1d68a72404f6c2f3499b95"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const GstSegment*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#ab60c35e4c103f9dedfb7e2738f5537d9">gobj</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides access to the underlying C instance. <a href="#ab60c35e4c103f9dedfb7e2738f5537d9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">GstSegment*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#a0f02c6699e4b413ef665f5a5be549880">gobj_copy</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs. <a href="#a0f02c6699e4b413ef665f5a5be549880"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#a61ad7fa4a3ec58bdb8bc8187679fbbbb">clip</a> (<a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a> format, gint64 <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01007.html#ga1bd4227a2c4a6cc74342b797384fbab2">start</a>, gint64 stop, gint64&amp; clip_start, gint64&amp; clip_stop) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Clip the given <em>start</em> and <em>stop</em> values to the segment boundaries given in <em>segment</em>. <a href="#a61ad7fa4a3ec58bdb8bc8187679fbbbb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#a07ebca2ab8b587993047db0b1850aa9f">init</a> (<a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a> format)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The start/last_stop positions are set to 0 and the stop/duration fields are set to -1 (unknown). <a href="#a07ebca2ab8b587993047db0b1850aa9f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#abcec459136536b5a885845caaddfe00c">set_duration</a> (<a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a> format, gint64 duration)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the duration of the segment to <em>duration</em>. <a href="#abcec459136536b5a885845caaddfe00c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#a032785b52e3c75fc449bec71b7ad9c42">set_last_stop</a> (<a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a> format, gint64 position)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the last observed stop position in the segment to <em>position</em>. <a href="#a032785b52e3c75fc449bec71b7ad9c42"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#a4bcf0e54ef5cd2064e9dbe21f59a5a43">set_newsegment</a> (bool update, double rate, <a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a> format, gint64 <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01007.html#ga1bd4227a2c4a6cc74342b797384fbab2">start</a>, gint64 stop, gint64 time)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the segment structure with the field values of a new segment event and with a default applied_rate of 1.0. <a href="#a4bcf0e54ef5cd2064e9dbe21f59a5a43"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#abe5068fedd1af536f443fcb69a895b22">set_newsegment</a> (bool update, double rate, double applied_rate, <a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a> format, gint64 <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01007.html#ga1bd4227a2c4a6cc74342b797384fbab2">start</a>, gint64 stop, gint64 time)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the segment structure with the field values of a new segment event. <a href="#abe5068fedd1af536f443fcb69a895b22"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#a0a026748daacd1571401f9831124c540">set_seek</a> (double rate, <a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a> format, <a class="el" href="group__gstreamermmEnums.html#ga511d96d2c1136202d0d4b90de2485cf3">SeekFlags</a> flags, <a class="el" href="group__gstreamermmEnums.html#gaa7c6407bbc8040f51718d1be753422c0">SeekType</a> start_type, gint64 <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01007.html#ga1bd4227a2c4a6cc74342b797384fbab2">start</a>, <a class="el" href="group__gstreamermmEnums.html#gaa7c6407bbc8040f51718d1be753422c0">SeekType</a> stop_type, gint64 stop, bool&amp; update)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the segment structure with the field values of a seek event (see Gst::Event::new_seek()). <a href="#a0a026748daacd1571401f9831124c540"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">gint64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#a3d5cb685c518d9e53423e0389ba3f92d">to_running_time</a> (<a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a> format, gint64 position) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Translate <em>position</em> to the total running time using the currently configured and previously accumulated segments. <a href="#a3d5cb685c518d9e53423e0389ba3f92d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">gint64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#a55bfcaf62bc7534cf0d3c009d1829d0b">to_stream_time</a> (<a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a> format, gint64 position) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Translate <em>position</em> to stream time using the currently configured segment. <a href="#a55bfcaf62bc7534cf0d3c009d1829d0b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">gint64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#af400c8bf2b2b93437a7ab6289a46b607">to_position</a> (<a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a> format, gint64 running_time) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert <em>running_time</em> into a position in the segment so that gst_segment_to_running_time() with that position returns <em>running_time</em>. <a href="#af400c8bf2b2b93437a7ab6289a46b607"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#af3c15234c585b351a96364b4dd0f2b97">set_running_time</a> (<a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a> format, gint64 running_time)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adjust the start/stop and accum values of <em>segment</em> such that the next valid buffer will be one with <em>running_time</em>. <a href="#af3c15234c585b351a96364b4dd0f2b97"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">GstSegment*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#a4c39d26385a85f298f521219250e2d4c">gobject_</a></td></tr>
<tr><td colspan="2"><h2>Related Functions</h2></td></tr>
<tr><td colspan="2"><p>(Note that these are not member functions.) </p>
<br/><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGst_1_1Segment.html">Gst::Segment</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGst_1_1Segment.html#a5280aac4c1d3e3a26c0dcf9af1a173da">wrap</a> (GstSegment* object, bool take_copy=false)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A <a class="elRef" href="../../../glibmm-2.4/reference/html/namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <a href="#a5280aac4c1d3e3a26c0dcf9af1a173da"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p><a class="el" href="classGst_1_1Segment.html" title="Gst::Segment - Class describing the configured region of interest in a media file...">Gst::Segment</a> - Class describing the configured region of interest in a media file. </p>
<p>This helper structure holds the relevant values for tracking the region of interest in a media file, called a segment.</p>
<p>The structure can be used for two purposes:</p>
<ul>
<li>performing seeks (handling seek events)</li>
<li>tracking playback regions (handling newsegment events)</li>
</ul>
<p>The segment is usually configured by the application with a seek event which is propagated upstream and eventually handled by an element that performs the seek.</p>
<p>The configured segment is then propagated back downstream with a newsegment event. This information is then used to clip media to the segment boundaries.</p>
<p>A segment structure is initialized with <a class="el" href="classGst_1_1Segment.html#a07ebca2ab8b587993047db0b1850aa9f" title="The start/last_stop positions are set to 0 and the stop/duration fields are set to...">init()</a>, which takes a Format that will be used as the format of the segment values. The segment will be configured with a start value of 0 and a stop/duration of -1, which is undefined. The default rate and applied_rate is 1.0.</p>
<p>If the segment is used for managing seeks, the segment duration should be set with <a class="el" href="classGst_1_1Segment.html#abcec459136536b5a885845caaddfe00c" title="Set the duration of the segment to duration.">set_duration()</a>. The public duration field contains the duration of the segment. When using the segment for seeking, the start and time members should normally be left to their default 0 value. The stop position is left to -1 unless explicitly configured to a different value after a seek event.</p>
<p>The current position in the segment should be set with the <a class="el" href="classGst_1_1Segment.html#a032785b52e3c75fc449bec71b7ad9c42" title="Set the last observed stop position in the segment to position.">set_last_stop()</a>. The public last_stop field contains the last set stop position in the segment.</p>
<p>For elements that perform seeks, the current segment should be updated with the <a class="el" href="classGst_1_1Segment.html#a0a026748daacd1571401f9831124c540" title="Update the segment structure with the field values of a seek event (see Gst::Event::new_seek())...">set_seek()</a> and the values from the seek event. This method will update all the segment fields. The last_stop field will contain the new playback position. If the cur_type was different from <a class="el" href="group__gstreamermmEnums.html#ggaa7c6407bbc8040f51718d1be753422c0aef04c5b861d6d172fa35e3e8573cd17f">Gst::SEEK_TYPE_NONE</a>, playback continues from the last_stop position, possibly with updated flags or rate.</p>
<p>For elements that want to use <a class="el" href="classGst_1_1Segment.html" title="Gst::Segment - Class describing the configured region of interest in a media file...">Gst::Segment</a> to track the playback region, use <a class="el" href="classGst_1_1Segment.html#a4bcf0e54ef5cd2064e9dbe21f59a5a43" title="Update the segment structure with the field values of a new segment event and with...">set_newsegment()</a> to update the segment fields with the information from the newsegment event. The <a class="el" href="classGst_1_1Segment.html#a61ad7fa4a3ec58bdb8bc8187679fbbbb" title="Clip the given start and stop values to the segment boundaries given in segment.">clip()</a> method can be used to check and clip the media data to the segment boundaries.</p>
<p>For elements that want to synchronize to the pipeline clock, <a class="el" href="classGst_1_1Segment.html#a3d5cb685c518d9e53423e0389ba3f92d" title="Translate position to the total running time using the currently configured and previously...">to_running_time()</a> can be used to convert a timestamp to a value that can be used to synchronize to the clock. This function takes into account all accumulated segments as well as any rate or applied_rate conversions.</p>
<p>For elements that need to perform operations on media data in stream_time, <a class="el" href="classGst_1_1Segment.html#a55bfcaf62bc7534cf0d3c009d1829d0b" title="Translate position to stream time using the currently configured segment.">to_stream_time()</a> can be used to convert a timestamp and the segment info to stream time (which is always between 0 and the duration of the stream).</p>
<p>Last reviewed on 2007-05-17 (0.10.13) </p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a93349f552c878d0cfc864ddcd5223c9f"></a><!-- doxytag: member="Gst::Segment::Segment" ref="a93349f552c878d0cfc864ddcd5223c9f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Gst::Segment::Segment </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a53d348dc091f1d60b49ca4f5b3b7daa7"></a><!-- doxytag: member="Gst::Segment::Segment" ref="a53d348dc091f1d60b49ca4f5b3b7daa7" args="(GstSegment *gobject, bool make_a_copy=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Gst::Segment::Segment </td>
          <td>(</td>
          <td class="paramtype">GstSegment *&#160;</td>
          <td class="paramname"> <em>gobject</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"> <em>make_a_copy</em> = <code>true</code></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ae2091311c2538ace8a40689a9187c93e"></a><!-- doxytag: member="Gst::Segment::Segment" ref="ae2091311c2538ace8a40689a9187c93e" args="(const Segment &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Gst::Segment::Segment </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classGst_1_1Segment.html">Segment</a>&amp;&#160;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a9c785a5c067f329cd5ae353a0fbeda55"></a><!-- doxytag: member="Gst::Segment::~Segment" ref="a9c785a5c067f329cd5ae353a0fbeda55" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Gst::Segment::~Segment </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a61ad7fa4a3ec58bdb8bc8187679fbbbb"></a><!-- doxytag: member="Gst::Segment::clip" ref="a61ad7fa4a3ec58bdb8bc8187679fbbbb" args="(Format format, gint64 start, gint64 stop, gint64 &amp;clip_start, gint64 &amp;clip_stop) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Gst::Segment::clip </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a>&#160;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>stop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64 &amp;&#160;</td>
          <td class="paramname"> <em>clip_start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64 &amp;&#160;</td>
          <td class="paramname"> <em>clip_stop</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Clip the given <em>start</em> and <em>stop</em> values to the segment boundaries given in <em>segment</em>. </p>
<p><em>start</em> and <em>stop</em> are compared and clipped to <em>segment</em> start and stop values.</p>
<p>If the function returns <code>false</code>, <em>start</em> and <em>stop</em> are known to fall outside of <em>segment</em> and <em>clip_start</em> and <em>clip_stop</em> are not updated.</p>
<p>When the function returns <code>true</code>, <em>clip_start</em> and <em>clip_stop</em> will be updated. If <em>clip_start</em> or <em>clip_stop</em> are different from <em>start</em> or <em>stop</em> respectively, the region fell partially in the segment.</p>
<p>Note that when <em>stop</em> is -1, <em>clip_stop</em> will be set to the end of the segment. Depending on the use case, this may or may not be what you want. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>format</em>&#160;</td><td>The format of the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start</em>&#160;</td><td>The start position in the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>stop</em>&#160;</td><td>The stop position in the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>clip_start</em>&#160;</td><td>The clipped start position in the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>clip_stop</em>&#160;</td><td>The clipped stop position in the segment. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the given <em>start</em> and <em>stop</em> times fall partially or completely in <em>segment</em>, <code>false</code> if the values are completely outside of the segment. </dd></dl>

</div>
</div>
<a class="anchor" id="ab60c35e4c103f9dedfb7e2738f5537d9"></a><!-- doxytag: member="Gst::Segment::gobj" ref="ab60c35e4c103f9dedfb7e2738f5537d9" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const GstSegment* Gst::Segment::gobj </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Provides access to the underlying C instance. </p>

</div>
</div>
<a class="anchor" id="a27d809117a1d68a72404f6c2f3499b95"></a><!-- doxytag: member="Gst::Segment::gobj" ref="a27d809117a1d68a72404f6c2f3499b95" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GstSegment* Gst::Segment::gobj </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Provides access to the underlying C instance. </p>

</div>
</div>
<a class="anchor" id="a0f02c6699e4b413ef665f5a5be549880"></a><!-- doxytag: member="Gst::Segment::gobj_copy" ref="a0f02c6699e4b413ef665f5a5be549880" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GstSegment* Gst::Segment::gobj_copy </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs. </p>

</div>
</div>
<a class="anchor" id="a07ebca2ab8b587993047db0b1850aa9f"></a><!-- doxytag: member="Gst::Segment::init" ref="a07ebca2ab8b587993047db0b1850aa9f" args="(Format format)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Gst::Segment::init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a>&#160;</td>
          <td class="paramname"> <em>format</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The start/last_stop positions are set to 0 and the stop/duration fields are set to -1 (unknown). </p>
<p>The default rate of 1.0 and no flags are set.</p>
<p>Initialize <em>segment</em> to its default values. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>format</em>&#160;</td><td>The format of the segment. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab136f825fb986624e7073996e9c38b6c"></a><!-- doxytag: member="Gst::Segment::operator=" ref="ab136f825fb986624e7073996e9c38b6c" args="(const Segment &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classGst_1_1Segment.html">Segment</a>&amp; Gst::Segment::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classGst_1_1Segment.html">Segment</a>&amp;&#160;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="abcec459136536b5a885845caaddfe00c"></a><!-- doxytag: member="Gst::Segment::set_duration" ref="abcec459136536b5a885845caaddfe00c" args="(Format format, gint64 duration)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Gst::Segment::set_duration </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a>&#160;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>duration</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the duration of the segment to <em>duration</em>. </p>
<p>This function is mainly used by elements that perform seeking and know the total duration of the segment.</p>
<p>This field should be set to allow seeking requests relative to the duration. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>format</em>&#160;</td><td>The format of the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>duration</em>&#160;</td><td>The duration of the segment info or -1 if unknown. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a032785b52e3c75fc449bec71b7ad9c42"></a><!-- doxytag: member="Gst::Segment::set_last_stop" ref="a032785b52e3c75fc449bec71b7ad9c42" args="(Format format, gint64 position)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Gst::Segment::set_last_stop </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a>&#160;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>position</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the last observed stop position in the segment to <em>position</em>. </p>
<p>This field should be set to allow seeking requests relative to the current playing position. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>format</em>&#160;</td><td>The format of the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>position</em>&#160;</td><td>The position. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="abe5068fedd1af536f443fcb69a895b22"></a><!-- doxytag: member="Gst::Segment::set_newsegment" ref="abe5068fedd1af536f443fcb69a895b22" args="(bool update, double rate, double applied_rate, Format format, gint64 start, gint64 stop, gint64 time)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Gst::Segment::set_newsegment </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"> <em>update</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>rate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>applied_rate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a>&#160;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>stop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>time</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Update the segment structure with the field values of a new segment event. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>update</em>&#160;</td><td>Flag indicating a new segment is started or updated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>rate</em>&#160;</td><td>The rate of the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>applied_rate</em>&#160;</td><td>The applied rate of the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>format</em>&#160;</td><td>The format of the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start</em>&#160;</td><td>The new start value. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>stop</em>&#160;</td><td>The new stop value. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>time</em>&#160;</td><td>The new stream time. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a4bcf0e54ef5cd2064e9dbe21f59a5a43"></a><!-- doxytag: member="Gst::Segment::set_newsegment" ref="a4bcf0e54ef5cd2064e9dbe21f59a5a43" args="(bool update, double rate, Format format, gint64 start, gint64 stop, gint64 time)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Gst::Segment::set_newsegment </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"> <em>update</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>rate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a>&#160;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>stop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>time</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Update the segment structure with the field values of a new segment event and with a default applied_rate of 1.0. </p>
<dl class="since_0_10"><dt><b><a class="el" href="since_0_10.html#_since_0_10000092">Since gstreamermm 0.10:</a></b></dt><dd>.6 </dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>update</em>&#160;</td><td>Flag indicating a new segment is started or updated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>rate</em>&#160;</td><td>The rate of the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>format</em>&#160;</td><td>The format of the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start</em>&#160;</td><td>The new start value. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>stop</em>&#160;</td><td>The new stop value. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>time</em>&#160;</td><td>The new stream time. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af3c15234c585b351a96364b4dd0f2b97"></a><!-- doxytag: member="Gst::Segment::set_running_time" ref="af3c15234c585b351a96364b4dd0f2b97" args="(Format format, gint64 running_time)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Gst::Segment::set_running_time </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a>&#160;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>running_time</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adjust the start/stop and accum values of <em>segment</em> such that the next valid buffer will be one with <em>running_time</em>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>format</em>&#160;</td><td>The format of the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>running_time</em>&#160;</td><td>The running_time in the segment. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the segment could be updated successfully. If <code>false</code> is returned, <em>running_time</em> is -1 or not in <em>segment</em>.</dd></dl>
<dl class="since_0_10"><dt><b><a class="el" href="since_0_10.html#_since_0_10000094">Since gstreamermm 0.10:</a></b></dt><dd>.24. </dd></dl>

</div>
</div>
<a class="anchor" id="a0a026748daacd1571401f9831124c540"></a><!-- doxytag: member="Gst::Segment::set_seek" ref="a0a026748daacd1571401f9831124c540" args="(double rate, Format format, SeekFlags flags, SeekType start_type, gint64 start, SeekType stop_type, gint64 stop, bool &amp;update)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Gst::Segment::set_seek </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"> <em>rate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a>&#160;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gstreamermmEnums.html#ga511d96d2c1136202d0d4b90de2485cf3">SeekFlags</a>&#160;</td>
          <td class="paramname"> <em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gstreamermmEnums.html#gaa7c6407bbc8040f51718d1be753422c0">SeekType</a>&#160;</td>
          <td class="paramname"> <em>start_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gstreamermmEnums.html#gaa7c6407bbc8040f51718d1be753422c0">SeekType</a>&#160;</td>
          <td class="paramname"> <em>stop_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>stop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool &amp;&#160;</td>
          <td class="paramname"> <em>update</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Update the segment structure with the field values of a seek event (see Gst::Event::new_seek()). </p>
<p>After calling this method, the segment field last_stop and time will contain the requested new position in the segment. The new requested position in the segment depends on <em>rate</em> and <em>start_type</em> and <em>stop_type</em>.</p>
<p>For positive <em>rate</em>, the new position in the segment is the new <em>segment</em> start field when it was updated with a <em>start_type</em> different from <a class="el" href="group__gstreamermmEnums.html#ggaa7c6407bbc8040f51718d1be753422c0aef04c5b861d6d172fa35e3e8573cd17f">Gst::SEEK_TYPE_NONE</a>. If no update was performed on <em>segment</em> start position (<a class="el" href="group__gstreamermmEnums.html#ggaa7c6407bbc8040f51718d1be753422c0aef04c5b861d6d172fa35e3e8573cd17f">Gst::SEEK_TYPE_NONE</a>), <em>start</em> is ignored and <em>segment</em> last_stop is unmodified.</p>
<p>For negative <em>rate</em>, the new position in the segment is the new <em>segment</em> stop field when it was updated with a <em>stop_type</em> different from <a class="el" href="group__gstreamermmEnums.html#ggaa7c6407bbc8040f51718d1be753422c0aef04c5b861d6d172fa35e3e8573cd17f">Gst::SEEK_TYPE_NONE</a>. If no stop was previously configured in the segment, the duration of the segment will be used to update the stop position. If no update was performed on <em>segment</em> stop position (<a class="el" href="group__gstreamermmEnums.html#ggaa7c6407bbc8040f51718d1be753422c0aef04c5b861d6d172fa35e3e8573cd17f">Gst::SEEK_TYPE_NONE</a>), <em>stop</em> is ignored and <em>segment</em> last_stop is unmodified.</p>
<p>The applied rate of the segment will be set to 1.0 by default. If the caller can apply a rate change, it should update <em>segment</em> rate and applied_rate after calling this function.</p>
<p><em>update</em> will be set to <code>true</code> if a seek should be performed to the segment last_stop field. This field can be <code>false</code> if, for example, only the <em>rate</em> has been changed but not the playback position. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rate</em>&#160;</td><td>The rate of the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>format</em>&#160;</td><td>The format of the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flags</em>&#160;</td><td>The seek flags for the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start_type</em>&#160;</td><td>The seek method. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>start</em>&#160;</td><td>The seek start value. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>stop_type</em>&#160;</td><td>The seek method. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>stop</em>&#160;</td><td>The seek stop value. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>update</em>&#160;</td><td>Boolean holding whether last_stop was updated. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a15197a0152e490c23591cd98574a5e6e"></a><!-- doxytag: member="Gst::Segment::swap" ref="a15197a0152e490c23591cd98574a5e6e" args="(Segment &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Gst::Segment::swap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classGst_1_1Segment.html">Segment</a>&amp;&#160;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="af400c8bf2b2b93437a7ab6289a46b607"></a><!-- doxytag: member="Gst::Segment::to_position" ref="af400c8bf2b2b93437a7ab6289a46b607" args="(Format format, gint64 running_time) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gint64 Gst::Segment::to_position </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a>&#160;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>running_time</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convert <em>running_time</em> into a position in the segment so that gst_segment_to_running_time() with that position returns <em>running_time</em>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>format</em>&#160;</td><td>The format of the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>running_time</em>&#160;</td><td>The running_time in the segment. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The position in the segment for <em>running_time</em>. This function returns -1 when <em>running_time</em> is -1 or when it is not inside <em>segment</em>.</dd></dl>
<dl class="since_0_10"><dt><b><a class="el" href="since_0_10.html#_since_0_10000093">Since gstreamermm 0.10:</a></b></dt><dd>.24. </dd></dl>

</div>
</div>
<a class="anchor" id="a3d5cb685c518d9e53423e0389ba3f92d"></a><!-- doxytag: member="Gst::Segment::to_running_time" ref="a3d5cb685c518d9e53423e0389ba3f92d" args="(Format format, gint64 position) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gint64 Gst::Segment::to_running_time </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a>&#160;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>position</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Translate <em>position</em> to the total running time using the currently configured and previously accumulated segments. </p>
<p>Position is a value between <em>segment</em> start and stop time.</p>
<p>This function is typically used by elements that need to synchronize to the global clock in a pipeline. The runnning time is a constantly increasing value starting from 0. When gst_segment_init() is called, this value will reset to 0.</p>
<p>This function returns -1 if the position is outside of <em>segment</em> start and stop. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>format</em>&#160;</td><td>The format of the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>position</em>&#160;</td><td>The position in the segment. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The position as the total running time or -1 when an invalid position was given. </dd></dl>

</div>
</div>
<a class="anchor" id="a55bfcaf62bc7534cf0d3c009d1829d0b"></a><!-- doxytag: member="Gst::Segment::to_stream_time" ref="a55bfcaf62bc7534cf0d3c009d1829d0b" args="(Format format, gint64 position) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">gint64 Gst::Segment::to_stream_time </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__gstreamermmEnums.html#ga9aeb4c7c49680888ff819ac95fb13cff">Format</a>&#160;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">gint64&#160;</td>
          <td class="paramname"> <em>position</em></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Translate <em>position</em> to stream time using the currently configured segment. </p>
<p>The <em>position</em> value must be between <em>segment</em> start and stop value.</p>
<p>This function is typically used by elements that need to operate on the stream time of the buffers it receives, such as effect plugins. In those use cases, <em>position</em> is typically the buffer timestamp or clock time that one wants to convert to the stream time. The stream time is always between 0 and the total duration of the media stream. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>format</em>&#160;</td><td>The format of the segment. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>position</em>&#160;</td><td>The position in the segment. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The position in stream_time or -1 when an invalid position was given. </dd></dl>

</div>
</div>
<hr/><h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="a5280aac4c1d3e3a26c0dcf9af1a173da"></a><!-- doxytag: member="Gst::Segment::wrap" ref="a5280aac4c1d3e3a26c0dcf9af1a173da" args="(GstSegment *object, bool take_copy=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classGst_1_1Segment.html">Gst::Segment</a> wrap </td>
          <td>(</td>
          <td class="paramtype">GstSegment *&#160;</td>
          <td class="paramname"> <em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"> <em>take_copy</em> = <code>false</code></td><td>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [related]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A <a class="elRef" href="../../../glibmm-2.4/reference/html/namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>object</em>&#160;</td><td>The C instance. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>take_copy</em>&#160;</td><td>False if the result should take ownership of the C instance. True if it should take a new copy or ref. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a4c39d26385a85f298f521219250e2d4c"></a><!-- doxytag: member="Gst::Segment::gobject_" ref="a4c39d26385a85f298f521219250e2d4c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GstSegment* <a class="el" href="classGst_1_1Segment.html#a4c39d26385a85f298f521219250e2d4c">Gst::Segment::gobject_</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>gstreamermm/segment.h</li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Mon Sep 21 22:33:01 2009 for gstreamermm by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>