[DllImport(Libraries.MediaTool, EntryPoint = "media_packet_get_duration")]
internal static extern int GetDuration(IntPtr handle, out ulong value);
+
+ [DllImport(Libraries.MediaTool, EntryPoint = "media_packet_get_tbm_surface")]
+ internal static extern int GetTbmSurface(IntPtr handle, out IntPtr surface);
+
+ [DllImport(Libraries.MediaTool, EntryPoint = "media_packet_has_tbm_surface_buffer")]
+ internal static extern int HasTbmSurface(IntPtr handle, out bool hasTbmSurface);
+
}
internal static class MediaFormat
}
}
+ /// <summary>
+ /// Gets the pointer to the TBM surface object associated with the packet.
+ /// </summary>
+ /// <value>
+ /// The pointer to the TBM surface object.<br/>
+ /// If packet doesn't have TBM surface, this will return IntPtr.Zero.
+ /// </value>
+ /// <exception cref="ObjectDisposedException">The MediaPacket has already been disposed.</exception>
+ /// <since_tizen> 12 </since_tizen>
+ public IntPtr TbmSurface
+ {
+ get
+ {
+ ValidateNotDisposed();
+
+ int ret = Native.GetTbmSurface(_handle, out var value);
+ MultimediaDebug.AssertNoError(ret);
+
+ return value;
+ }
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether the packet has TBM surface or not.
+ /// </summary>
+ /// <value>true if the packet has TBM surface; otherwise, false.</value>
+ /// <exception cref="ObjectDisposedException">The MediaPacket has already been disposed.</exception>
+ /// <since_tizen> 12 </since_tizen>
+ public bool HasTbmSurface
+ {
+ get
+ {
+ ValidateNotDisposed();
+
+ int ret = Native.HasTbmSurface(_handle, out var value);
+ MultimediaDebug.AssertNoError(ret);
+
+ return value;
+ }
+ }
+
#region Dispose support
/// <summary>
/// Gets a value indicating whether the packet has been disposed.