Class: Gsf::Blob

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initialize(size, data_to_copy) ⇒ Gsf::Blob

Creates a new Gsf::Blob object to hold the specified data. The blob can then be used as a facility for reference-counting for the data. The data is copied internally, so the blob does not hold references to external chunks of memory. Data which will be copied into the blob, or nil if size is zero. Error domain: #GSF_ERROR

Possible errors: #GSF_ERROR_OUT_OF_MEMORY if the data_to_copy could not be copied.

Parameters:

  • size (Integer)

    Size of the data in bytes.

  • data_to_copy (Array<Integer>)

Instance Method Details

#peek_dataGObject

Queries a pointer to the data stored in the blob. This does not copy the data for you; it returns a pointer to the actual buffer which the blob uses internally, so you should not free this buffer on your own. blob, or nil if the size of the data is zero.

Returns:

  • (GObject)

    Pointer to the data stored in the

#sizeInteger

Queries the size in bytes of the data stored in the blob.

Returns:

  • (Integer)

    Size in bytes, or 0 if the data is nil.