GstVideo.VideoFrame¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
buffer |
r/w |
the mapped buffer |
|
data |
[ |
r/w |
pointers to the plane data |
flags |
r/w |
|
|
id |
r/w |
id of the mapped frame. the id can for example be used to identify the frame in case of multiview video. |
|
info |
r/w |
||
map |
r/w |
mappings of the planes |
|
meta |
r/w |
pointer to metadata if any |
Methods¶
class |
|
|
|
|
|
|
Details¶
- class GstVideo.VideoFrame¶
A video frame obtained from
GstVideo.VideoFrame.map()- classmethod map_id(info, buffer, id, flags)[source]¶
- Parameters:
info (
GstVideo.VideoInfo) – aGstVideo.VideoInfobuffer (
Gst.Buffer) – the buffer to mapid (
int) – the frame id to mapflags (
Gst.MapFlags) –Gst.MapFlags
- Returns:
Trueon success.- frame:
pointer to
GstVideo.VideoFrame
- Return type:
(
bool, frame:GstVideo.VideoFrame)
Use info and buffer to fill in the values of frame with the video frame information of frame id.
When id is -1, the default frame is mapped. When id != -1, this function will return
Falsewhen there is noGstVideo.VideoMetawith that id.All video planes of buffer will be mapped and the pointers will be set in frame->data.
- copy(src)[source]¶
- Parameters:
src (
GstVideo.VideoFrame) – aGstVideo.VideoFrame- Returns:
Trueif the contents could be copied.- Return type:
Copy the contents from src to self.
Note: Since: 1.18, self dimensions are allowed to be smaller than src dimensions.
- copy_plane(src, plane)[source]¶
- Parameters:
src (
GstVideo.VideoFrame) – aGstVideo.VideoFrameplane (
int) – a plane
- Returns:
Trueif the contents could be copied.- Return type:
Copy the plane with index plane from src to self.
Note: Since: 1.18, self dimensions are allowed to be smaller than src dimensions.