本文整理汇总了C++中GF_REGISTER_MODULE_INTERFACE函数的典型用法代码示例。如果您正苦于以下问题:C++ GF_REGISTER_MODULE_INTERFACE函数的具体用法?C++ GF_REGISTER_MODULE_INTERFACE怎么用?C++ GF_REGISTER_MODULE_INTERFACE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GF_REGISTER_MODULE_INTERFACE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: gf_malloc
static void *NewGAPIVideoOutput()
{
GAPIPriv *priv;
GF_VideoOutput *driv = (GF_VideoOutput *) gf_malloc(sizeof(GF_VideoOutput));
memset(driv, 0, sizeof(GF_VideoOutput));
GF_REGISTER_MODULE_INTERFACE(driv, GF_VIDEO_OUTPUT_INTERFACE, "GAPI Video Output", "gpac distribution")
priv = (GAPIPriv *) gf_malloc(sizeof(GAPIPriv));
memset(priv, 0, sizeof(GAPIPriv));
priv->mx = gf_mx_new("GAPI");
driv->opaque = priv;
#ifdef GPAC_USE_OGL_ES
driv->hw_caps = GF_VIDEO_HW_OPENGL | GF_VIDEO_HW_OPENGL_OFFSCREEN | GF_VIDEO_HW_OPENGL_OFFSCREEN_ALPHA;
#endif
/*rgb, yuv to do*/
driv->Setup = GAPI_Setup;
driv->Shutdown = GAPI_Shutdown;
driv->Flush = GAPI_Flush;
driv->ProcessEvent = GAPI_ProcessEvent;
driv->Blit = NULL;
driv->LockBackBuffer = GAPI_LockBackBuffer;
driv->SetFullScreen = GAPI_SetFullScreen;
return (void *)driv;
}
开发者ID:bigbensk,项目名称:gpac,代码行数:26,代码来源:gapi.cpp
示例2: GF_SAFEALLOC
static void *EPOC_vout_new()
{
EPOCVideo *priv;
GF_VideoOutput *driv;
GF_SAFEALLOC(driv, GF_VideoOutput);
GF_REGISTER_MODULE_INTERFACE(driv, GF_VIDEO_OUTPUT_INTERFACE, "EPOC Video Output", "gpac distribution")
GF_SAFEALLOC(priv, EPOCVideo);
driv->opaque = priv;
/*alpha and keying to do*/
driv->hw_caps = 0;
#ifdef GPAC_USE_OGL_ES
/*no offscreen opengl with epoc at the moment*/
driv->hw_caps |= GF_VIDEO_HW_OPENGL;
#endif
driv->Setup = EVID_Setup;
driv->Shutdown = EVID_Shutdown;
driv->Flush = EVID_Flush;
driv->ProcessEvent = EVID_ProcessEvent;
driv->Blit = NULL;
driv->LockBackBuffer = EVID_LockBackBuffer;
driv->SetFullScreen = EVID_SetFullScreen;
return (void *)driv;
}
开发者ID:Bevara,项目名称:GPAC,代码行数:26,代码来源:epoc_vout.cpp
示例3: GF_SAFEALLOC
GF_EXPORT
GF_BaseInterface *LoadInterface(u32 InterfaceType)
{
GF_HYB_In *hyb_in;
GF_InputService *plug;
if (InterfaceType != GF_NET_CLIENT_INTERFACE) return NULL;
GF_SAFEALLOC(plug, GF_InputService);
GF_REGISTER_MODULE_INTERFACE(plug, GF_NET_CLIENT_INTERFACE, "GPAC HYBRID MEDIA Loader", "gpac distribution")
plug->RegisterMimeTypes= HYB_RegisterMimeTypes;
plug->CanHandleURL= HYB_CanHandleURL;
plug->ConnectService= HYB_ConnectService;
plug->CloseService= HYB_CloseService;
plug->GetServiceDescriptor= HYB_GetServiceDesc;
plug->ConnectChannel= HYB_ConnectChannel;
plug->DisconnectChannel= HYB_DisconnectChannel;
plug->ServiceCommand= HYB_ServiceCommand;
plug->CanHandleURLInService=HYB_CanHandleURLInService;
plug->ChannelGetSLP= HYB_ChannelGetSLP;
plug->ChannelReleaseSLP= HYB_ChannelReleaseSLP;
GF_SAFEALLOC(hyb_in, GF_HYB_In);
plug->priv = hyb_in;
return (GF_BaseInterface *)plug;
}
开发者ID:Kurtnoise,项目名称:gpac,代码行数:26,代码来源:hyb_in.c
示例4: GF_SAFEALLOC
void *NewLoaderInterface()
{
IMGLoader *priv;
GF_InputService *plug;
GF_SAFEALLOC(plug, GF_InputService);
if (!plug) return NULL;
GF_REGISTER_MODULE_INTERFACE(plug, GF_NET_CLIENT_INTERFACE, "GPAC Image Reader", "gpac distribution")
GF_SAFEALLOC(priv, IMGLoader);
if (!priv) {
gf_free(plug);
return NULL;
}
plug->priv = priv;
plug->RegisterMimeTypes = IMG_RegisterMimeTypes;
plug->CanHandleURL = IMG_CanHandleURL;
plug->CanHandleURLInService = NULL;
plug->ConnectService = IMG_ConnectService;
plug->CloseService = IMG_CloseService;
plug->GetServiceDescriptor = IMG_GetServiceDesc;
plug->ConnectChannel = IMG_ConnectChannel;
plug->DisconnectChannel = IMG_DisconnectChannel;
plug->ChannelGetSLP = IMG_ChannelGetSLP;
plug->ChannelReleaseSLP = IMG_ChannelReleaseSLP;
plug->ServiceCommand = IMG_ServiceCommand;
return plug;
}
开发者ID:ARSekkat,项目名称:gpac,代码行数:29,代码来源:img_in.c
示例5: GF_SAFEALLOC
GF_BaseDecoder *NewHEVCDec()
{
GF_MediaDecoder *ifcd;
HEVCDec *dec;
GF_SAFEALLOC(ifcd, GF_MediaDecoder);
if (!ifcd) return NULL;
GF_SAFEALLOC(dec, HEVCDec);
if (!dec) {
gf_free(ifcd);
return NULL;
}
GF_REGISTER_MODULE_INTERFACE(ifcd, GF_MEDIA_DECODER_INTERFACE, "HEVC Decoder", "gpac distribution")
ifcd->privateStack = dec;
/*setup our own interface*/
ifcd->AttachStream = HEVC_AttachStream;
ifcd->DetachStream = HEVC_DetachStream;
ifcd->GetCapabilities = HEVC_GetCapabilities;
ifcd->SetCapabilities = HEVC_SetCapabilities;
ifcd->GetName = HEVC_GetCodecName;
ifcd->CanHandleStream = HEVC_CanHandleStream;
ifcd->ProcessData = HEVC_ProcessData;
ifcd->GetOutputBuffer = HEVC_GetOutputBuffer;
return (GF_BaseDecoder *) ifcd;
}
开发者ID:TotoLulu94,项目名称:gpac,代码行数:27,代码来源:openhevc_dec.c
示例6: GF_SAFEALLOC
GF_InputService *isor_client_load()
{
ISOMReader *reader;
GF_InputService *plug;
GF_SAFEALLOC(plug, GF_InputService);
GF_REGISTER_MODULE_INTERFACE(plug, GF_NET_CLIENT_INTERFACE, "GPAC IsoMedia Reader", "gpac distribution")
plug->RegisterMimeTypes = ISOR_RegisterMimeTypes;
plug->CanHandleURL = ISOR_CanHandleURL;
plug->ConnectService = ISOR_ConnectService;
plug->CloseService = ISOR_CloseService;
plug->GetServiceDescriptor = ISOR_GetServiceDesc;
plug->ConnectChannel = ISOR_ConnectChannel;
plug->DisconnectChannel = ISOR_DisconnectChannel;
plug->ServiceCommand = ISOR_ServiceCommand;
plug->CanHandleURLInService = ISOR_CanHandleURLInService;
/*we do support pull mode*/
plug->ChannelGetSLP = ISOR_ChannelGetSLP;
plug->ChannelReleaseSLP = ISOR_ChannelReleaseSLP;
GF_SAFEALLOC(reader, ISOMReader);
reader->channels = gf_list_new();
reader->segment_mutex = gf_mx_new("ISO Segment");
plug->priv = reader;
return plug;
}
开发者ID:supperlitt,项目名称:gpac,代码行数:26,代码来源:read.c
示例7: gf_malloc
GF_FontReader *ft_load()
{
GF_FontReader *dr;
FTBuilder *ftpriv;
dr = gf_malloc(sizeof(GF_FontReader));
memset(dr, 0, sizeof(GF_FontReader));
GF_REGISTER_MODULE_INTERFACE(dr, GF_FONT_READER_INTERFACE, "FreeType Font Reader", "gpac distribution");
ftpriv = gf_malloc(sizeof(FTBuilder));
memset(ftpriv, 0, sizeof(FTBuilder));
ftpriv->font_dirs = gf_list_new();
ftpriv->loaded_fonts = gf_list_new();
dr->udta = ftpriv;
dr->init_font_engine = ft_init_font_engine;
dr->shutdown_font_engine = ft_shutdown_font_engine;
dr->set_font = ft_set_font;
dr->get_font_info = ft_get_font_info;
dr->get_glyphs = ft_get_glyphs;
dr->load_glyph = ft_load_glyph;
return dr;
}
开发者ID:Brilon314,项目名称:gpac,代码行数:26,代码来源:ft_font.c
示例8: gf_malloc
void *SDL_NewAudio()
{
SDLAudCtx *ctx;
GF_AudioOutput *dr;
ctx = gf_malloc(sizeof(SDLAudCtx));
memset(ctx, 0, sizeof(SDLAudCtx));
dr = gf_malloc(sizeof(GF_AudioOutput));
memset(dr, 0, sizeof(GF_AudioOutput));
GF_REGISTER_MODULE_INTERFACE(dr, GF_AUDIO_OUTPUT_INTERFACE, "SDL Audio Output", "gpac distribution");
dr->opaque = ctx;
dr->Setup = SDLAud_Setup;
dr->Shutdown = SDLAud_Shutdown;
dr->ConfigureOutput = SDLAud_ConfigureOutput;
dr->SetVolume = SDLAud_SetVolume;
dr->SetPan = SDLAud_SetPan;
dr->Play = SDLAud_Play;
dr->SetPriority = SDLAud_SetPriority;
dr->GetAudioDelay = SDLAud_GetAudioDelay;
dr->GetTotalBufferTime = SDLAud_GetTotalBufferTime;
dr->QueryOutputSampleRate = SDLAud_QueryOutputSampleRate;
/*always threaded*/
dr->SelfThreaded = 1;
ctx->audioBuff = NULL;
ctx->volume = SDL_MIX_MAXVOLUME;
return dr;
}
开发者ID:Bevara,项目名称:GPAC,代码行数:32,代码来源:audio.c
示例9: GF_SAFEALLOC
GF_BaseDecoder *NewFAADDec()
{
GF_MediaDecoder *ifce;
FAADDec *dec;
GF_SAFEALLOC(ifce, GF_MediaDecoder);
if (!ifce) return NULL;
GF_SAFEALLOC(dec, FAADDec);
if (!dec) {
gf_free(dec);
return NULL;
}
GF_REGISTER_MODULE_INTERFACE(ifce, GF_MEDIA_DECODER_INTERFACE, "FAAD2 Decoder", "gpac distribution")
ifce->privateStack = dec;
/*setup our own interface*/
ifce->AttachStream = FAAD_AttachStream;
ifce->DetachStream = FAAD_DetachStream;
ifce->GetCapabilities = FAAD_GetCapabilities;
ifce->SetCapabilities = FAAD_SetCapabilities;
ifce->ProcessData = FAAD_ProcessData;
ifce->CanHandleStream = FAAD_CanHandleStream;
ifce->GetName = FAAD_GetCodecName;
return (GF_BaseDecoder *) ifce;
}
开发者ID:indiereign,项目名称:gpac,代码行数:26,代码来源:faad_dec.c
示例10: gf_malloc
GF_VideoOutput *NewDektecVideoOutput()
{
GF_VideoOutput *driv = (GF_VideoOutput *) gf_malloc(sizeof(GF_VideoOutput));
memset(driv, 0, sizeof(GF_VideoOutput));
GF_REGISTER_MODULE_INTERFACE(driv, GF_VIDEO_OUTPUT_INTERFACE, "Dektec Video Output", "gpac distribution")
DtDevice *dvc = new DtDevice;
DtFrameBuffer *dtf = new DtFrameBuffer;
if (!dtf || !dvc) {
GF_LOG(GF_LOG_ERROR, GF_LOG_MODULE, ("[Dektec Out] DTA API couldn't be initialized.\n"));
delete dvc;
delete dtf;
gf_free(driv);
return NULL;
}
DtContext *dtc = new DtContext;
memset(dtc, 0, sizeof(DtContext));
dtc->dvc = dvc;
dtc->dtf = dtf;
driv->opaque = (void*)dtc;
driv->Flush = Dektec_Flush;
driv->LockBackBuffer = Dektec_LockBackBuffer;
driv->Setup = Dektec_Setup;
driv->Shutdown = Dektec_Shutdown;
driv->ProcessEvent = Dektec_ProcessEvent;
driv->Blit = Dektec_Blit;
driv->hw_caps |= GF_VIDEO_HW_HAS_YUV_OVERLAY | GF_VIDEO_HW_HAS_YUV;
return driv;
}
开发者ID:DmitrySigaev,项目名称:gpac-sf,代码行数:33,代码来源:dektec_video.cpp
示例11: GF_SAFEALLOC
GF_InputService *RTP_Load()
{
RTPClient *priv;
GF_InputService *plug;
GF_SAFEALLOC(plug, GF_InputService);
memset(plug, 0, sizeof(GF_InputService));
GF_REGISTER_MODULE_INTERFACE(plug, GF_NET_CLIENT_INTERFACE, "GPAC RTP/RTSP Client", "gpac distribution")
plug->CanHandleURL = RP_CanHandleURL;
plug->CanHandleURLInService = RP_CanHandleURLInService;
plug->ConnectService = RP_ConnectService;
plug->CloseService = RP_CloseService;
plug->GetServiceDescriptor = RP_GetServiceDesc;
plug->ConnectChannel = RP_ConnectChannel;
plug->DisconnectChannel = RP_DisconnectChannel;
plug->ServiceCommand = RP_ServiceCommand;
plug->RegisterMimeTypes = RP_RegisterMimeTypes;
/*PULL mode for embedded streams*/
plug->ChannelGetSLP = RP_ChannelGetSLP;
plug->ChannelReleaseSLP = RP_ChannelReleaseSLP;
GF_SAFEALLOC(priv, RTPClient);
priv->sessions = gf_list_new();
priv->channels = gf_list_new();
plug->priv = priv;
priv->time_out = 30000;
priv->mx = gf_mx_new("RTPDemux");
priv->th = gf_th_new("RTPDemux");
return plug;
}
开发者ID:jnorthrup,项目名称:gpac,代码行数:34,代码来源:rtp_in.c
示例12: gf_malloc
void *NewRawAudioOutput()
{
RawContext *ctx;
GF_AudioOutput *driv;
ctx = gf_malloc(sizeof(RawContext));
memset(ctx, 0, sizeof(RawContext));
driv = gf_malloc(sizeof(GF_AudioOutput));
memset(driv, 0, sizeof(GF_AudioOutput));
GF_REGISTER_MODULE_INTERFACE(driv, GF_AUDIO_OUTPUT_INTERFACE, "Raw Audio Output", "gpac distribution")
driv->opaque = ctx;
driv->SelfThreaded = 0;
driv->Setup = RAW_AudioSetup;
driv->Shutdown = RAW_AudioShutdown;
driv->ConfigureOutput = RAW_ConfigureOutput;
driv->GetAudioDelay = RAW_GetAudioDelay;
driv->GetTotalBufferTime = RAW_GetTotalBufferTime;
driv->SetVolume = RAW_SetVolume;
driv->SetPan = RAW_SetPan;
driv->Play = RAW_Play;
driv->QueryOutputSampleRate = RAW_QueryOutputSampleRate;
driv->WriteAudio = RAW_WriteAudio;
return driv;
}
开发者ID:DmitrySigaev,项目名称:gpac-sf,代码行数:25,代码来源:raw_video.c
示例13: GF_SAFEALLOC
GF_BaseInterface *isow_load_cache()
{
ISOMReader *cache;
GF_StreamingCache *plug;
GF_SAFEALLOC(plug, GF_StreamingCache);
if (!plug) return NULL;
GF_REGISTER_MODULE_INTERFACE(plug, GF_STREAMING_MEDIA_CACHE, "GPAC IsoMedia Cache", "gpac distribution")
GF_SAFEALLOC(cache, ISOMReader);
if (!cache) {
gf_free(plug);
return NULL;
}
cache->channels = gf_list_new();
plug->priv = cache;
plug->Open = ISOW_Open;
plug->Close = ISOW_Close;
plug->Write = ISOW_Write;
plug->ChannelGetSLP = ISOW_ChannelGetSLP;
plug->ChannelReleaseSLP = ISOW_ChannelReleaseSLP;
plug->ServiceCommand = ISOW_ServiceCommand;
return (GF_BaseInterface *) plug;
}
开发者ID:ARSekkat,项目名称:gpac,代码行数:25,代码来源:isom_cache.c
示例14: GF_SAFEALLOC
GF_BaseDecoder *NewVTBDec()
{
GF_MediaDecoder *ifcd;
VTBDec *dec;
GF_SAFEALLOC(ifcd, GF_MediaDecoder);
if (!ifcd) return NULL;
GF_SAFEALLOC(dec, VTBDec);
if (!dec) {
gf_free(ifcd);
return NULL;
}
GF_REGISTER_MODULE_INTERFACE(ifcd, GF_MEDIA_DECODER_INTERFACE, "VideoToolbox Decoder", "gpac distribution")
ifcd->privateStack = dec;
/*setup our own interface*/
ifcd->AttachStream = VTBDec_AttachStream;
ifcd->DetachStream = VTBDec_DetachStream;
ifcd->GetCapabilities = VTBDec_GetCapabilities;
ifcd->SetCapabilities = VTBDec_SetCapabilities;
ifcd->GetName = VTBDec_GetCodecName;
ifcd->CanHandleStream = VTBDec_CanHandleStream;
ifcd->ProcessData = VTBDec_ProcessData;
return (GF_BaseDecoder *) ifcd;
}
开发者ID:emmanouil,项目名称:gpac,代码行数:26,代码来源:vtb_decode.c
示例15: GF_SAFEALLOC
GPAC_MODULE_EXPORT
GF_BaseInterface *LoadInterface(u32 InterfaceType)
{
DCReader *read;
GF_InputService *plug;
if (InterfaceType != GF_NET_CLIENT_INTERFACE) return NULL;
GF_SAFEALLOC(plug, GF_InputService);
memset(plug, 0, sizeof(GF_InputService));
GF_REGISTER_MODULE_INTERFACE(plug, GF_NET_CLIENT_INTERFACE, "GPAC Dummy Loader", "gpac distribution")
plug->RegisterMimeTypes = DC_RegisterMimeTypes;
plug->CanHandleURL = DC_CanHandleURL;
plug->ConnectService = DC_ConnectService;
plug->CloseService = DC_CloseService;
plug->GetServiceDescriptor = DC_GetServiceDesc;
plug->ConnectChannel = DC_ConnectChannel;
plug->DisconnectChannel = DC_DisconnectChannel;
plug->ServiceCommand = DC_ServiceCommand;
plug->CanHandleURLInService = DC_CanHandleURLInService;
plug->ChannelGetSLP = DC_ChannelGetSLP;
plug->ChannelReleaseSLP = DC_ChannelReleaseSLP;
GF_SAFEALLOC(read, DCReader);
read->channels = gf_list_new();
plug->priv = read;
return (GF_BaseInterface *)plug;
}
开发者ID:drakeguan,项目名称:gpac,代码行数:27,代码来源:dummy_in.c
示例16: gf_malloc
GF_VideoOutput *NewRawVideoOutput()
{
AndroidContext *pCtx;
GF_VideoOutput *driv = (GF_VideoOutput *) gf_malloc(sizeof(GF_VideoOutput));
LOG( ANDROID_LOG_INFO, TAG, "Android Video Initialization in progress...");
memset(driv, 0, sizeof(GF_VideoOutput));
GF_REGISTER_MODULE_INTERFACE(driv, GF_VIDEO_OUTPUT_INTERFACE, "Android Video Output", "gpac distribution")
pCtx = gf_malloc(sizeof(AndroidContext));
memset(pCtx, 0, sizeof(AndroidContext));
pCtx->texID = -1;
pCtx->framebuff = -1;
pCtx->depthbuff = -1;
driv->opaque = pCtx;
driv->Flush = droid_Flush;
driv->LockBackBuffer = droid_LockBackBuffer;
driv->Setup = droid_Setup;
driv->Shutdown = droid_Shutdown;
driv->ProcessEvent = droid_ProcessEvent;
driv->max_screen_width = 1024;
driv->max_screen_height = 1024;
driv->hw_caps = GF_VIDEO_HW_OPENGL;// | GF_VIDEO_HW_OPENGL_OFFSCREEN_ALPHA;//GF_VIDEO_HW_DIRECT_ONLY;//
LOG( ANDROID_LOG_INFO, TAG, "Android Video Init Done.\n");
return (void *)driv;
}
开发者ID:jnorthrup,项目名称:gpac,代码行数:30,代码来源:droid_vout.c
示例17: GF_SAFEALLOC
GF_EXPORT
GF_BaseInterface *LoadInterface(u32 InterfaceType)
{
GF_MPD_In *mpdin;
GF_InputService *plug;
if (InterfaceType != GF_NET_CLIENT_INTERFACE) return NULL;
GF_SAFEALLOC(plug, GF_InputService);
GF_REGISTER_MODULE_INTERFACE(plug, GF_NET_CLIENT_INTERFACE, "GPAC MPD Loader", "gpac distribution")
plug->RegisterMimeTypes = MPD_RegisterMimeTypes;
plug->CanHandleURL = MPD_CanHandleURL;
plug->ConnectService = MPD_ConnectService;
plug->CloseService = MPD_CloseService;
plug->GetServiceDescriptor = MPD_GetServiceDesc;
plug->ConnectChannel = MPD_ConnectChannel;
plug->DisconnectChannel = MPD_DisconnectChannel;
plug->ServiceCommand = MPD_ServiceCommand;
plug->CanHandleURLInService = MPD_CanHandleURLInService;
plug->ChannelGetSLP = MPD_ChannelGetSLP;
plug->ChannelReleaseSLP = MPD_ChannelReleaseSLP;
GF_SAFEALLOC(mpdin, GF_MPD_In);
plug->priv = mpdin;
mpdin->plug = plug;
return (GF_BaseInterface *)plug;
}
开发者ID:jnorthrup,项目名称:gpac,代码行数:25,代码来源:mpd_in.c
示例18: gf_malloc
/**
* function DirectFBNewVideo
* - creates a DirectFb module
**/
void *DirectFBNewVideo()
{
DirectFBVidCtx *ctx;
GF_VideoOutput *driv;
driv = gf_malloc(sizeof(GF_VideoOutput));
memset(driv, 0, sizeof(GF_VideoOutput));
GF_REGISTER_MODULE_INTERFACE(driv, GF_VIDEO_OUTPUT_INTERFACE, "DirectFB Video Output", "gpac distribution");
ctx = gf_malloc(DirectFBVid_GetCtxSizeOf());
memset(ctx, 0, DirectFBVid_GetCtxSizeOf());
/* GF_VideoOutput */
driv->opaque = ctx;
driv->Setup = DirectFBVid_Setup;
driv->Shutdown = DirectFBVid_Shutdown;
driv->Flush = DirectFBVid_Flush;
driv->SetFullScreen = DirectFBVid_SetFullScreen;
driv->ProcessEvent = DirectFBVid_ProcessEvent;
driv->LockBackBuffer = DirectFBVid_LockBackBuffer;
driv->LockOSContext = NULL;
driv->Blit = DirectFBVid_Blit;
driv->hw_caps |= GF_VIDEO_HW_HAS_RGB | GF_VIDEO_HW_HAS_RGBA | GF_VIDEO_HW_HAS_YUV | GF_VIDEO_HW_HAS_STRETCH;
return driv;
}
开发者ID:Bevara,项目名称:GPAC,代码行数:30,代码来源:directfb_out.c
示例19: GF_SAFEALLOC
void *NewX11VideoOutput ()
{
GF_VideoOutput *driv;
XWindow *xWindow;
GF_SAFEALLOC(driv, GF_VideoOutput);
if (!driv) return NULL;
GF_SAFEALLOC(xWindow, XWindow);
if (!xWindow) {
gf_free(driv);
return NULL;
}
GF_REGISTER_MODULE_INTERFACE(driv, GF_VIDEO_OUTPUT_INTERFACE, "X11 Video Output", "gpac distribution")
driv->opaque = xWindow;
driv->Flush = X11_Flush;
driv->SetFullScreen = X11_SetFullScreen;
driv->Setup = X11_Setup;
driv->Shutdown = X11_Shutdown;
driv->LockBackBuffer = X11_LockBackBuffer;
driv->ProcessEvent = X11_ProcessEvent;
driv->hw_caps = GF_VIDEO_HW_OPENGL;
/*fixme - needs a better detection scheme*/
driv->hw_caps |= GF_VIDEO_HW_OPENGL_OFFSCREEN | GF_VIDEO_HW_OPENGL_OFFSCREEN_ALPHA;
return (void *) driv;
}
开发者ID:gorinje,项目名称:gpac-svn,代码行数:27,代码来源:x11_out.c
示例20: gf_malloc
void *New_FFMPEG_Demux()
{
FFDemux *priv;
GF_InputService *ffd = gf_malloc(sizeof(GF_InputService));
memset(ffd, 0, sizeof(GF_InputService));
GF_SAFEALLOC(priv, FFDemux);
GF_LOG(GF_LOG_INFO, GF_LOG_CONTAINER, ("[FFMPEG Demuxer] Registering all ffmpeg plugins...\n") );
/* register all codecs, demux and protocols */
av_register_all();
GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[FFMPEG Demuxer] Registering all ffmpeg plugins DONE.\n") );
ffd->RegisterMimeTypes = FFD_RegisterMimeTypes;
ffd->CanHandleURL = FFD_CanHandleURL;
ffd->CloseService = FFD_CloseService;
ffd->ConnectChannel = FFD_ConnectChannel;
ffd->ConnectService = FFD_ConnectService;
ffd->DisconnectChannel = FFD_DisconnectChannel;
ffd->GetServiceDescriptor = FFD_GetServiceDesc;
ffd->ServiceCommand = FFD_ServiceCommand;
ffd->CanHandleURLInService = FFD_CanHandleURLInService;
priv->thread = gf_th_new("FFMPEG Demux");
priv->mx = gf_mx_new("FFMPEG Demux");
GF_REGISTER_MODULE_INTERFACE(ffd, GF_NET_CLIENT_INTERFACE, "FFMPEG Demuxer", "gpac distribution");
ffd->priv = priv;
return ffd;
}
开发者ID:claudiordgz,项目名称:gpac,代码行数:31,代码来源:ffmpeg_demux.c
注:本文中的GF_REGISTER_MODULE_INTERFACE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论