|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gstreamer.lowlevel.NativeValue
org.gstreamer.lowlevel.Handle
org.gstreamer.lowlevel.NativeObject
org.gstreamer.lowlevel.RefCountedObject
org.gstreamer.MiniObject
org.gstreamer.Event
org.gstreamer.event.NewSegmentEvent
public class NewSegmentEvent
The newsegment event marks the range of buffers to be processed. All data not within the segment range is not to be processed. This can be used intelligently by plugins to apply more efficient methods of skipping unneeded data.
The position value of the segment is used in conjunction with the start value to convertTo the buffer timestamps into the stream time. This is usually done in sinks to report the current stream_time.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.gstreamer.lowlevel.NativeObject |
---|
NativeObject.Initializer |
Field Summary |
---|
Fields inherited from class org.gstreamer.lowlevel.NativeObject |
---|
defaultInit, LIFECYCLE, ownsHandle |
Constructor Summary | |
---|---|
NewSegmentEvent(boolean update,
double rate,
ClockTime start,
ClockTime stop,
ClockTime position)
|
|
NewSegmentEvent(boolean update,
double rate,
double appliedRate,
Format format,
long start,
long stop,
long position)
Allocates a new newsegment event with the given format/values triplets. |
|
NewSegmentEvent(boolean update,
double rate,
Format format,
long start,
long stop,
long position)
Allocates a new newsegment event with the given format/values triplets. |
|
NewSegmentEvent(NativeObject.Initializer init)
This constructor is for internal use only. |
Method Summary | |
---|---|
double |
getAppliedRate()
Gets the applied playback rate. |
long |
getEnd()
Gets the end of the new segment. |
Format |
getFormat()
Gets the format of the start, stop and position values. |
long |
getPosition()
Gets the position of the new segment. |
double |
getRate()
Gets the playback rate. |
long |
getStart()
Gets the start of the new segment. |
boolean |
isUpdate()
Gets whether this new segment event is an update or not. |
Methods inherited from class org.gstreamer.Event |
---|
getStructure |
Methods inherited from class org.gstreamer.MiniObject |
---|
disposeNativeHandle, isWritable, makeWritable, objectFor, ref, unref |
Methods inherited from class org.gstreamer.lowlevel.NativeObject |
---|
classFor, disown, dispose, equals, finalize, getNativeAddress, handle, hashCode, initializer, initializer, instanceFor, invalidate, isDisposed, nativeValue, objectFor, objectFor, toString |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NewSegmentEvent(NativeObject.Initializer init)
init
- initialization data.public NewSegmentEvent(boolean update, double rate, Format format, long start, long stop, long position)
position
represents the stream_time of a buffer carrying a timestamp of
start
.
position
cannot be -1, start
cannot be -1, stop
can be -1.
If there
is a valid stop
given, it must be greater or equal to start
, including
when the indicated playback rate
is < 0.
After a newsegment event, the buffer stream time is calculated with:
position + (TIMESTAMP(buf) - start) * ABS (rate * applied_rate)
update
- Whether this segment is an update to a previous onerate
- A new rate for playbackformat
- The format of the segment valuesstart
- The start value of the segmentstop
- The stop value of the segmentposition
- The stream positionpublic NewSegmentEvent(boolean update, double rate, ClockTime start, ClockTime stop, ClockTime position)
public NewSegmentEvent(boolean update, double rate, double appliedRate, Format format, long start, long stop, long position)
position
represents the stream_time of a buffer carrying a timestamp of
start
.
position
cannot be -1, start
cannot be -1, stop
can be -1.
If there is a valid stop
given, it must be greater or equal to
start
, including when the indicated playback rate
is < 0.
The appliedRate
value provides information about any rate adjustment that
has already been made to the timestamps and content on the buffers of the
stream. (rate * appliedRate
) should always equal the rate that has been
requested for playback.
For example, if an element has an input segment
with intended playback rate
of 2.0 and appliedRate
of 1.0, it can adjust
incoming timestamps and buffer content by half and output a newsegment event
with rate
of 1.0 and appliedRate
of 2.0
After a newsegment event, the buffer stream time is calculated with:
position + (TIMESTAMP(buf) - start) * ABS (rate * applied_rate)
update
- Whether this segment is an update to a previous onerate
- A new rate for playbackappliedRate
- The rate factor which has already been appliedformat
- The format of the segment valuesstart
- The start value of the segmentstop
- The stop value of the segmentposition
- The stream positionMethod Detail |
---|
public boolean isUpdate()
public Format getFormat()
Format
for the start, stop and position values.public double getRate()
public double getAppliedRate()
public long getStart()
public long getEnd()
public long getPosition()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |