MCPcopy Create free account
hub / github.com/MediaArea/MediaInfoLib / Event_CallBackFunction_Set

Method Event_CallBackFunction_Set

Source/MediaInfo/MediaInfo_Config.cpp:3806–3831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3804//---------------------------------------------------------------------------
3805#if MEDIAINFO_EVENTS
3806Ztring MediaInfo_Config::Event_CallBackFunction_Set (const Ztring &Value)
3807{
3808 ZtringList List=Value;
3809
3810 CriticalSectionLocker CSL(CS);
3811
3812 if (List.empty())
3813 {
3814 Event_CallBackFunction=(MediaInfo_Event_CallBackFunction*)NULL;
3815 Event_UserHandler=NULL;
3816 }
3817 else
3818 for (size_t Pos=0; Pos<List.size(); Pos++)
3819 {
3820 if (List[Pos].find(__T("CallBack=memory://"))==0)
3821 Event_CallBackFunction=(MediaInfo_Event_CallBackFunction*)Ztring(List[Pos].substr(18, std::string::npos)).To_int64u();
3822 else if (List[Pos].find(__T("UserHandle=memory://"))==0)
3823 Event_UserHandler=(void*)Ztring(List[Pos].substr(20, std::string::npos)).To_int64u();
3824 else if (List[Pos].find(__T("UserHandler=memory://"))==0)
3825 Event_UserHandler=(void*)Ztring(List[Pos].substr(21, std::string::npos)).To_int64u();
3826 else
3827 return("Problem during Event_CallBackFunction value parsing");
3828 }
3829
3830 return Ztring();
3831}
3832#endif //MEDIAINFO_EVENTS
3833
3834//---------------------------------------------------------------------------

Callers 1

MI_CreateMethod · 0.45

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected