-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Multimedia] Add MediaPacket TBM surface APIs #6278
[Multimedia] Add MediaPacket TBM surface APIs #6278
Conversation
Public API ChangedPlease follow the ACR process for the changed API below. Added: 2, Removed: 0, Changed: 0Added+ /// <since_tizen>12</since_tizen
+ System.Boolean Tizen.Multimedia.MediaPacket::HasTbmSurface()
+ /// <since_tizen>12</since_tizen
+ System.IntPtr Tizen.Multimedia.MediaPacket::TbmSurface()
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR감사합니다.
Public API ChangedPlease follow the ACR process for the changed API below. Added: 2, Removed: 0, Changed: 0Added+ /// <since_tizen>12</since_tizen
+ System.Boolean Tizen.Multimedia.MediaPacket::HasTbmSurface()
+ /// <since_tizen>12</since_tizen
+ System.IntPtr Tizen.Multimedia.MediaPacket::TbmSurface()
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API is simple, the description is good, but IntPtr should be avoided in public API. Some solutions would be: wrap the pointer in SafeHandle (or derivative) - it is still a pointer, but this way it would at least have a type (like SafeNativeWindowHandle), another idea is to expose an interface/class that would provide the pointer internally and the other side would consume that pointer internally so that the user would not touch the pointer - that one is possible only if the consuming part is somewhere in TizenFX.
Please share how the pointer is used / what API consumes it / what the app developer will need to do with it. I'm wondering if the usage scenario justifies having pointer in the API.
Yes, I understand your concern, but It can't wrapping with managed type. because it directly used on Interop calls We can consider, A managed TbmSurface class if we providing functionality of TbmSurface on C# API, but not now. |
We plan to provide a view that supporing tbm surface. Here We can update content of view with tbm_surface handle with below API /// <summary>
/// Sets the source of the TbmSurfaceView to the given tbm_surface_h.
/// </summary>
/// <param name="tbmSurface">The handle to the tbm_surface_h to set as the source.</param>
/// <remarks>
/// Note that this method must be called on the UI thread only during the first call. Subsequent calls can be made from any thread.
/// </remarks>
public void SetSource(IntPtr tbmSurface); |
Wanted to ensure that alternatives are considered. The chosen solution seems justified. |
Public API ChangedPlease follow the ACR process for the changed API below. Added: 2, Removed: 0, Changed: 0Added+ /// <since_tizen>12</since_tizen
+ System.Boolean Tizen.Multimedia.MediaPacket::HasTbmSurface()
+ /// <since_tizen>12</since_tizen
+ System.IntPtr Tizen.Multimedia.MediaPacket::TbmSurface()
|
* [Multimedia] Add MediaPacket TBM surface API
* [Multimedia] Add MediaPacket TBM surface API
Description of Change
API Changes