MeiCam SDK For iOS  3.10.0
NvsCustomVideoTransition.h
Go to the documentation of this file.
1 //================================================================================
2 //
3 // (c) Copyright China Digital Video (Beijing) Limited, 2017. All rights reserved.
4 //
5 // This code and information is provided "as is" without warranty of any kind,
6 // either expressed or implied, including but not limited to the implied
7 // warranties of merchantability and/or fitness for a particular purpose.
8 //
9 //--------------------------------------------------------------------------------
10 // Birth Date: Jul 20. 2017
11 // Author: NewAuto video team
12 //================================================================================
13 #pragma once
14 
15 #import <Foundation/Foundation.h>
16 #import "NvsCommonDef.h"
17 
19  int texId;
20  int width;
21  int height;
23 };
24 
29  float progress;
30  int64_t effectTime;
31  int64_t effectStartTime;
32  int64_t effectEndTime;
33 };
34 
36 
46 
59 - (void)didInit;
60 
73 - (void)didCleanup;
74 
89 - (void)didPreloadResources;
90 
119 - (void)didRender:(struct NvsCustomVideoTransitionRenderContext *)renderContext
120  renderHelper:(NvsCustomVideoTransitionRenderHelper *)renderHelper;
121 
122 @end
123 
131 
146 - (int)allocateRGBATexture:(NvsSize)texSize;
147 
156 - (void)reclaimTexture:(int)texId;
157 
168 - (BOOL)uploadHostBufferToOpenGLTexture:(NvsVideoFrameInfo*)hostBuffer textureId:(int)tId;
169 
170 @end
171 
-[NvsCustomVideoTransitionRenderer-p didPreloadResources]
void didPreloadResources()
Meishe SDK calls this method on custom video effects to allow some resource preprocessing.
NvsCustomVideoTransitionRenderContext::outputVideoFrame
struct NvsCustomVideoTransitionVideoFrame outputVideoFrame
Output video frame.
Definition: NvsCustomVideoTransition.h:28
NvsCustomVideoTransitionRenderContext::effectStartTime
int64_t effectStartTime
Effect starting time (in microseconds).
Definition: NvsCustomVideoTransition.h:31
NvsCustomVideoTransitionRenderContext::outGoingVideoFrame
struct NvsCustomVideoTransitionVideoFrame outGoingVideoFrame
Inputs video frame.
Definition: NvsCustomVideoTransition.h:27
NvsVideoFrameInfo
Video frame information.
Definition: NvsCommonDef.h:377
NvsCustomVideoTransitionVideoFrame::texId
int texId
The texture ID of the video frame.
Definition: NvsCustomVideoTransition.h:19
NvsCustomVideoTransitionRenderContext
Definition: NvsCustomVideoTransition.h:25
-[NvsCustomVideoTransitionRenderer-p didInit]
void didInit()
Meishe SDK calls this method on custom video effects to let the user initialize resources.
NvsCustomVideoTransitionRenderContext::effectEndTime
int64_t effectEndTime
Effect ending time (in microseconds).
Definition: NvsCustomVideoTransition.h:32
NvsCustomVideoTransitionRenderContext::commingInVideoFrame
struct NvsCustomVideoTransitionVideoFrame commingInVideoFrame
Inputs video frame.
Definition: NvsCustomVideoTransition.h:26
NvsCustomVideoTransitionRenderContext::effectTime
int64_t effectTime
Special effect duration (in microseconds).
Definition: NvsCustomVideoTransition.h:30
-[NvsCustomVideoTransitionRenderer-p didCleanup]
void didCleanup()
Meishe SDK calls this method on custom video special effects to let users clean up resources.
NvsCustomVideoTransitionRenderer-p
Custom video effects renderer interface.
Definition: NvsCustomVideoTransition.h:45
NvsCustomVideoTransitionRenderContext::progress
float progress
Definition: NvsCustomVideoTransition.h:29
NvsCustomVideoTransitionRenderHelper
Auxiliary method interface for custom video effects.
Definition: NvsCustomVideoTransition.h:131
NVS_EXPORT
#define NVS_EXPORT
Definition: NvsCommonDef.h:20
NvsCommonDef.h
NvsCustomVideoTransitionVideoFrame::width
int width
The width of the video frame.
Definition: NvsCustomVideoTransition.h:20
NvsCustomVideoTransitionVideoFrame::height
int height
The height of the video frame.
Definition: NvsCustomVideoTransition.h:21
NvsCustomVideoTransitionVideoFrame::isUpsideDownTexture
BOOL isUpsideDownTexture
YES means that the texture in this video frame is upside down. The user needs to deal with the textur...
Definition: NvsCustomVideoTransition.h:22
NvsCustomVideoTransitionVideoFrame
Definition: NvsCustomVideoTransition.h:18
NvsSize
Size.
Definition: NvsCommonDef.h:281