#import <NvsVideoFrameReceiver.h>
|
(BOOL) | - didVideoFrameReceived:videoFrameTextureId:videoSize:timelinePos: |
| Notifies the receiver that a video frame has been rendered. If the receiver wants to obtain the permission to use the video frame, it needs to return YES, otherwise the permission which use the video frame will not obtained. After obtaining the usage permission, users can use the OpenGL ES texture ID of the video frame to draw in users' own EAGLContext. Certainly,it's based on that the EAGLContext must be in the same EAGLSharegroup as the EAGLContext of MeiShe SDK. The receiver must call reclaimVideoFrame after ensuring that the texture is no longer used, so that Meishe SDK can recycle it, otherwise a leak will occur! Also, if the texture has been drawn by the receiver, please call glFlush() before calling reclaimVideoFrame to ensure synchronization of the texture usage. Note: This callback function is called in other threads of the engine, not the main thread! More...
|
|
(void) | - didVideoFrameReceived:pixelBuffer:videoSize:timelinePos: |
| Notifies the receiver that a video frame has been rendered. More...
|
|
◆ didVideoFrameReceived:pixelBuffer:videoSize:timelinePos:
- (void) didVideoFrameReceived: |
|
(NvsVideoFrameReceiver *) |
receiver |
pixelBuffer: |
|
(CVPixelBufferRef) |
pixelBuffer |
videoSize: |
|
(CGSize) |
videoSize |
timelinePos: |
|
(int64_t) |
timelinePos |
|
|
| |
|
optional |
Notifies the receiver that a video frame has been rendered.
Note: This callback function is called in other threads of the engine, not the main thread!
- Parameters
-
receiver | The NvsVideoFrameReceiver object corresponding to the callback interface |
pixelBuffer | The CVPixelBuffer object for video frames |
videoSize | The size of the video frame (in pixels) |
timelinePos | The timestamp of the video frame (in microseconds) |
◆ didVideoFrameReceived:videoFrameTextureId:videoSize:timelinePos:
- (BOOL) didVideoFrameReceived: |
|
(NvsVideoFrameReceiver *) |
receiver |
videoFrameTextureId: |
|
(unsigned int) |
videoFrameTextureId |
videoSize: |
|
(CGSize) |
videoSize |
timelinePos: |
|
(int64_t) |
timelinePos |
|
|
| |
|
optional |
Notifies the receiver that a video frame has been rendered. If the receiver wants to obtain the permission to use the video frame, it needs to return YES, otherwise the permission which use the video frame will not obtained. After obtaining the usage permission, users can use the OpenGL ES texture ID of the video frame to draw in users' own EAGLContext. Certainly,it's based on that the EAGLContext must be in the same EAGLSharegroup as the EAGLContext of MeiShe SDK. The receiver must call reclaimVideoFrame after ensuring that the texture is no longer used, so that Meishe SDK can recycle it, otherwise a leak will occur! Also, if the texture has been drawn by the receiver, please call glFlush() before calling reclaimVideoFrame to ensure synchronization of the texture usage. Note: This callback function is called in other threads of the engine, not the main thread!
- Parameters
-
receiver | The NvsVideoFrameReceiver object corresponding to the callback interface |
videoFrameTextureId | The OpenGL ES texture ID for video frames |
videoSize | The size of the video frame (in pixels) |
timelinePos | The timestamp of the video frame (in microseconds) |
- Returns
- Returns the BOOL value. YES means that the receiver has obtained the permission to use the video frame. NO means the permission which use the video frame will not obtained.
The documentation for this protocol was generated from the following file: