User`s manual
Function Library • 54
void __stdcall Decode_Callback(int Decoder_Index,
long int_status, long VideoBufferaddress)
{
if((int_status & 0x01) == 1) //Image Ready
{
//Start Drawing
memcpy(Temp,(PVOID)VideoBufferaddress,iWidth*i
Height*3);
gpDC->BitBlt(10,10,iWidth,iHeight,MemDC,0,0,SR
CCOPY);
}
if((int_status>>1 & 0x01) == 1) //MotionDetection
Occur
{
//Deal with MotionDetection
Beep(1024, 100);
}
if((int_status>>2 & 0x01) == 1) //Connection
establish
{
//Prepare DC for Preview
int Bitrate = 0, frame_rate = 0, colorspace = 0;
AngeloMPEG4_Decode_Get_Config(Decoder_Index,
&iWidth, &iHeight, &videoformat, &colorspace,
&Bitrate, &frame_rate);
}
}
Result =
AngeloMPEG4_Decode_Set_Callback
(Decoder_Index,
Decode_Callback);
< Visual Basic >
Dim Result As Long, Decoder_Index As Long
Public Sub lpcallback(ByVal Decoder_Index As Long, ByVal
int_status As Long, ByVal VideoBufferaddress As Long)
If int_status And &H2 Then “detected motion
ElseIf int_status And &H4 Then “ connect to
encoder
ElseIf int_status And &H1 Then “ image ready
End If
End Sub
Result =
AngeloMPEG4_Decode_Set_Callback
(Decoder_Index,
AddressOf lpcallback)