| 70 | //**************************************************************************** |
| 71 | |
| 72 | void __stdcall Event_CallBackFunction(unsigned char* Data_Content, size_t Data_Size, void* UserHandler_Void) |
| 73 | { |
| 74 | //*integrity tests |
| 75 | if (Data_Size<4) |
| 76 | return; //There is a problem |
| 77 | |
| 78 | //*Retrieving UserHandler |
| 79 | struct UserHandle_struct* UserHandler=(struct UserHandle_struct*)UserHandler_Void; |
| 80 | struct MediaInfo_Event_Generic* Event_Generic=(struct MediaInfo_Event_Generic*) Data_Content; |
| 81 | |
| 82 | |
| 83 | //*Retrieving EventID |
| 84 | //MediaInfo_int8u ParserID =(MediaInfo_int8u) ((Event_Generic->EventCode&0xFF000000)>>24); |
| 85 | MediaInfo_int16u EventID =(MediaInfo_int16u)((Event_Generic->EventCode&0x00FFFF00)>>8 ); |
| 86 | MediaInfo_int8u EventVersion=(MediaInfo_int8u) ( Event_Generic->EventCode&0x000000FF ); |
| 87 | |
| 88 | //*Global to all parsers |
| 89 | switch (EventID) |
| 90 | { |
| 91 | case MediaInfo_Event_Log : if (EventVersion==0 && Data_Size>=sizeof(struct MediaInfo_Event_Log_0)) Log_0((struct MediaInfo_Event_Log_0*)Data_Content, UserHandler); break; |
| 92 | default : ; |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | //*************************************************************************** |
| 97 | // Main |