GstMse.SourceBuffer¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Either Segments or Sequence |
||
r |
The timestamp representing the end of the append window |
||
r |
The timestamp representing the start of the append window |
||
r |
The set of Time Intervals that have been loaded into the current Source Buffer |
||
r/w/c |
The MIME content-type of the data stream |
||
r/w |
The next media segment appended to the current Source Buffer will have its start timestamp increased by this amount |
||
r |
Whether the current Source Buffer is still asynchronously processing previously issued commands |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when self was aborted after a call to |
|
Emitted when self has encountered an error after a call to |
|
Emitted when self has successfully processed data after a call to |
|
Emitted when self is no longer in the updating state after a call to |
|
Emitted when self has begun to process data after a call to |
Fields¶
- Inherited:
Class Details¶
- class GstMse.SourceBuffer(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The Source Buffer is the primary means of data flow between an application and the Media Source API. It represents a single timeline of media, containing some combination of audio, video, and text tracks. An application is responsible for feeding raw data into the Source Buffer using
GstMse.SourceBuffer.append_buffer
() and the Source Buffer will asynchronously process the data into tracks of time-coded multimedia samples.The application as well as the associated playback component can then select to play media from any subset of tracks across all Source Buffers of a Media Source.
A few control points are also provided to customize the behavior.
GstMse.SourceBuffer
:append-mode
controls how timestamps of processed samples are interpreted. They are either inserted in the timeline directly where the decoded media states they should, or inserted directly after the previously encountered sample.GstMse.SourceBuffer
:append-window-start
/GstMse.SourceBuffer
:append-window-end
control the planned time window where media from appended data can be added to the current timeline. Any samples outside that range may be ignored.GstMse.SourceBuffer
:timestamp-offset
is added to the start time of any sample processed.
New in version 1.24.
- abort()¶
- Raises:
- Returns:
TRUE
on success,FALSE
otherwise- Return type:
Attempts to end any processing of the currently pending data and reset the media parser.
New in version 1.24.
- append_buffer(buf)¶
- Parameters:
buf (
Gst.Buffer
) – The media data to append- Raises:
- Returns:
TRUE
on success,FALSE
otherwise- Return type:
Schedules the bytes inside buf to be processed by self. When it is possible to accept the supplied data, it will be processed asynchronously and fill in the track buffers for playback purposes.
New in version 1.24.
- change_content_type(type)¶
- Parameters:
type (
str
) – the desired content type- Raises:
- Returns:
TRUE
on success,FALSE
otherwise- Return type:
Attempts to change the content type of self to type. Any new data appended to the Source Buffer must be of the supplied type afterward.
New in version 1.24.
- get_append_mode()¶
- Returns:
The current
GstMse.SourceBufferAppendMode
- Return type:
New in version 1.24.
- get_append_window_end()¶
- Returns:
The current Append Window end time as a #GstClockTime
- Return type:
Returns the current append window end time. Any segment processed that starts after this value will be ignored.
New in version 1.24.
- get_append_window_start()¶
- Returns:
The current Append Window start time as a #GstClockTime
- Return type:
Returns the current append window start time. Any segment processed that ends earlier than this value will be ignored.
New in version 1.24.
- get_buffered()¶
- Raises:
- Returns:
a
GLib.Array
ofGstMse.MediaSourceRange
values.- Return type:
Returns a sequence of
GstMse.MediaSourceRange
values representing which segments of self are buffered in memory.New in version 1.24.
- get_content_type()¶
- Returns:
a string representing the content type
- Return type:
Returns the current content type of self.
New in version 1.24.
- get_timestamp_offset()¶
- Returns:
The current timestamp offset as a #GstClockTime
- Return type:
New in version 1.24.
- get_updating()¶
- Returns:
Whether self is currently adding or removing media content.
- Return type:
New in version 1.24.
- remove(start, end)¶
- Parameters:
- Raises:
- Returns:
TRUE
on success,FALSE
otherwise- Return type:
Attempts to remove any parsed data between start and end from self.
New in version 1.24.
- set_append_mode(mode)¶
- Parameters:
mode (
GstMse.SourceBufferAppendMode
) –GstMse.SourceBufferAppendMode
the desired Append Mode- Raises:
- Returns:
TRUE
on success,FALSE
otherwise- Return type:
Changes the Append Mode of self. This influences what timestamps will be assigned to media processed by this Source Buffer. In Segment mode, the timestamps in each segment determine the position of each sample after it is processed. In Sequence mode, the timestamp of each processed sample is generated based on the end of the most recently processed segment.
New in version 1.24.
- set_append_window_end(end)¶
- Parameters:
end (
int
) – the append window end- Raises:
- Returns:
TRUE
on success,FALSE
otherwise- Return type:
Modifies the current append window end of self. If successful, samples processed after setting this value that start after this point will be ignored.
New in version 1.24.
- set_append_window_start(start)¶
- Parameters:
start (
int
) – the append window end- Raises:
- Returns:
TRUE
on success,FALSE
otherwise- Return type:
Modifies the current append window start of self. If successful, samples processed after setting this value that end before this point will be ignored.
New in version 1.24.
- set_timestamp_offset(offset)¶
- Parameters:
offset (
int
) – The new timestamp offset- Raises:
- Returns:
TRUE
on success,FALSE
otherwise- Return type:
Attempt to set the timestamp offset of self. Any media processed after this value is set will have this value added to its start time.
New in version 1.24.
Signal Details¶
- GstMse.SourceBuffer.signals.on_abort(source_buffer)¶
- Signal Name:
on-abort
- Flags:
- Parameters:
source_buffer (
GstMse.SourceBuffer
) – The object which received the signal
Emitted when self was aborted after a call to
GstMse.SourceBuffer.abort
().New in version 1.24.
- GstMse.SourceBuffer.signals.on_error(source_buffer)¶
- Signal Name:
on-error
- Flags:
- Parameters:
source_buffer (
GstMse.SourceBuffer
) – The object which received the signal
Emitted when self has encountered an error after a call to
GstMse.SourceBuffer.append_buffer
().New in version 1.24.
- GstMse.SourceBuffer.signals.on_update(source_buffer)¶
- Signal Name:
on-update
- Flags:
- Parameters:
source_buffer (
GstMse.SourceBuffer
) – The object which received the signal
Emitted when self has successfully processed data after a call to
GstMse.SourceBuffer.append_buffer
().New in version 1.24.
- GstMse.SourceBuffer.signals.on_update_end(source_buffer)¶
- Signal Name:
on-update-end
- Flags:
- Parameters:
source_buffer (
GstMse.SourceBuffer
) – The object which received the signal
Emitted when self is no longer in the updating state after a call to
GstMse.SourceBuffer.append_buffer
(). This can happen after a successful or unsuccessful append.New in version 1.24.
- GstMse.SourceBuffer.signals.on_update_start(source_buffer)¶
- Signal Name:
on-update-start
- Flags:
- Parameters:
source_buffer (
GstMse.SourceBuffer
) – The object which received the signal
Emitted when self has begun to process data after a call to
GstMse.SourceBuffer.append_buffer
().New in version 1.24.
Property Details¶
- GstMse.SourceBuffer.props.append_mode¶
- Name:
append-mode
- Type:
- Default Value:
- Flags:
Affects how timestamps of processed media segments are interpreted. In
GstMse.SourceBufferAppendMode.SEGMENTS
, the start timestamp of a processed media segment is used directly along withGstMse.SourceBuffer
:timestamp-offset
. InGstMse.SourceBufferAppendMode.SEQUENCE
, the timestamp of a processed media segment is ignored and replaced with the end time of the most recently appended segment.New in version 1.24.
- GstMse.SourceBuffer.props.append_window_end¶
-
Any segments processed which have a start time greater than this value will be ignored by this Source Buffer.
New in version 1.24.
- GstMse.SourceBuffer.props.append_window_start¶
-
Any segments processed which end before this value will be ignored by this Source Buffer.
New in version 1.24.
- GstMse.SourceBuffer.props.buffered¶
- Name:
buffered
- Type:
- Default Value:
- Flags:
The set of Time Intervals that have been loaded into the current Source Buffer
New in version 1.24.
- GstMse.SourceBuffer.props.content_type¶
-
The MIME content-type of the data stream
New in version 1.24.
- GstMse.SourceBuffer.props.timestamp_offset¶
-
The next media segment appended to the current Source Buffer will have its start timestamp increased by this amount.
New in version 1.24.
- GstMse.SourceBuffer.props.updating¶
-
Whether the current source buffer is still asynchronously processing previously issued commands.
New in version 1.24.