TRTCVideoFrame class

Video frame information

TRTCVideoFrame is used to describe the raw data of a frame of the video image, which is the image data before frame encoding or after frame decoding.

Annotations
  • @JsonSerializable(explicitToJson: true, includeIfNull: false)

Constructors

TRTCVideoFrame({TRTCVideoPixelFormat videoFormat = TRTCVideoPixelFormat.unknown, TRTCVideoBufferType bufferType = TRTCVideoBufferType.unknown, TRTCTexture? texture, int length = 0, int width = 640, int height = 360, int timestamp = 0, TRTCVideoRotation rotation = TRTCVideoRotation.rotation0, Uint8List? data})
TRTCVideoFrame.fromJson(Map<String, dynamic> json)
factory

Properties

bufferType TRTCVideoBufferType
  • Field description: Video data structure type.
  • getter/setter pair
    data Uint8List
  • Field description: Video data when bufferType is TRTCVideoBufferType_Buffer, which carries the memory data blocks for the C++ layer.
  • getter/setter pair
    hashCode int
    The hash code for this object.
    no setterinherited
    height int
  • Field description: Video height. Recommended value: please enter the height of the video data passed in.
  • getter/setter pair
    length int
  • Field description: Video data length in bytes. For I420, length = width * height * 3 / 2; for BGRA32, length = width * height * 4.
  • getter/setter pair
    rotation TRTCVideoRotation
  • Field description: Clockwise rotation angle of video pixels.
  • getter/setter pair
    runtimeType Type
    A representation of the runtime type of the object.
    no setterinherited
    texture TRTCTexture?
  • Field description: Video data when bufferType is TRTCVideoBufferType_Texture, which carries the texture data used for OpenGL rendering.
  • getter/setter pair
    timestamp int
  • Field description: Video frame timestamp in milliseconds. Recommended value: this parameter can be set to 0 for custom video capturing. In this case, the SDK will automatically set the timestamp field. However, please "evenly" set the calling interval of sendCustomVideoData.
  • getter/setter pair
    videoFormat TRTCVideoPixelFormat
  • Field description: Video pixel format.
  • getter/setter pair
    width int
  • Field description: Video width. Recommended value: please enter the width of the video data passed in.
  • getter/setter pair

    Methods

    noSuchMethod(Invocation invocation) → dynamic
    Invoked when a nonexistent method or property is accessed.
    inherited
    toJson() Map<String, dynamic>
    toString() String
    A string representation of this object.
    inherited

    Operators

    operator ==(Object other) bool
    The equality operator.
    inherited