ip kamera ocx bir türlü çalışmıyor

Delphi'de kod yazma ile ilgili sorularınızı bu foruma yazabilirsiniz.
Cevapla
forumsad
Üye
Mesajlar: 296
Kayıt: 29 Tem 2010 10:47

ip kamera ocx bir türlü çalışmıyor

Mesaj gönderen forumsad »

arkadaşlar ip kamera ocx'ini install ettim forma ekledim
aşağıdaki şekilde ayarlarını yapıyorum kamera kendi programıyla çalışıyor ama delphide çalıştıramadım bir türlü..
sorun ne olabilir acaba?

saygılarımla

Kod: Tümünü seç

procedure TForm1.Button1Click(Sender: TObject);
begin
AxMediaControl1.HostIP:='192.168.2.131';
AxMediaControl1.HttpPort:=80;

AxMediaControl1.Play(1);
//AxMediaControl1.AutoStart;
//AxMediaControl1.Enabled:=true;
//AxMediaControl1.AutoStart;
//AxMediaControl1.Show;
end;


Resim

Kod: Tümünü seç

 API, ActiveX reference guide

Revision: 2.0.33.2142

Date: 2010-February-24


--------------------------------------------------------------------------------

TABLE OF CONTENTS
DOCUMENT HISTORY 
1 OVERVIEW 
2 CONTROL PROPERTY 
2.1 Media Property 
2.1.1 AutoStart 
2.1.2 CurrentPosition 
2.1.3 Duration 
2.1.4 FPS 
2.1.5 FramesDrawn 
2.1.6 H264VideoDecoding 
2.1.7 HostIP 
2.1.8 HttpPort 
2.1.9 MPEG4VideoDecodingMode 
2.1.10 MediaChannel 
2.1.11 MediaDelay 
2.1.12 MediaFile 
2.1.13 MediaPassword 
2.1.14 MediaProtocol 
2.1.15 MediaType 
2.1.16 MediaURL 
2.1.17 MediaUsername 
2.1.18 MulticastIP 
2.1.19 MulticastPort 
2.1.20 Mute 
2.1.21 NetworkTimeout 
2.1.22 RTSPEnabled 
2.1.23 Resolution 
2.1.24 SSLPort 
2.1.25 StreamPort 
2.1.26 VideoConnNum 
2.1.27 Volume 
2.2 UI Property 
2.2.1 BkColor 
2.2.2 ButtonColor 
2.2.3 CaptionText 
2.2.4 DisplayMessages 
2.2.5 EnableContextMenu 
2.2.6 FullScreen 
2.2.7 HoverColor 
2.2.8 MaintainAspectRatio 
2.2.9 Popups 
2.2.10 ShowStatusBar 
2.2.11 ShowToolBar 
2.2.12 ShowToolTip 
2.2.13 StretchToFit 
2.2.14 TextColor 
2.2.15 ToolBarConfiguration 
2.2.16 UIMode 
2.2.17 Version 
2.2.18 VideoEffectMode 
2.3 PTZ Property 
2.3.1 PTZControlURL 
2.3.2 PTZMouseCtl 
2.4 Recod Property 
2.4.1 RecordFormat 
2.4.2 RecordName 
2.4.3 RecordPath 
2.4.4 RecordSize 
2.4.5 RecordSuffix 
2.5 Motion Detection Property 
2.5.1 MotionConfigURL 
2.5.2 MotionDataURL 
2.6 Audio Detection Property 
2.7 DIO Property 
2.8 OSD Property 
3 CONTROL METHODS 
3.1 Media Methods 
3.1.1 AudioReceiveStart() 
3.1.2 AudioReceiveStop() 
3.1.3 AudioTransmitStart() 
3.1.4 AudioTransmitStop() 
3.1.5 Play() 
3.1.6 Stop() 
3.1.7 TogglePause() 
3.2 UI Methods 
3.3 PTZ Methods 
3.3.1 DigitalZoom() 
3.3.2 DigitalZoomIn() 
3.3.3 DigitalZoomMove() 
3.3.4 DigitalZoomOffset() 
3.3.5 DigitalZoomOut() 
3.3.6 PTZFocus() 
3.3.7 PTZIris() 
3.3.8 PTZMove() 
3.3.9 PTZPatrol() 
3.3.10 PTZPreset() 
3.3.11 PTZSpeed() 
3.3.12 PTZZoom() 
3.3.13 SendPTZCmd() 
3.4 Record Methods 
3.4.1 GetCurrentImage() 
3.4.2 SaveCurrentImage() 
3.4.3 StartRecord() 
3.4.4 StopRecord() 
3.5 Motion Detection Methods 
3.5.1 ApplyMD() 
3.5.2 SetMD() 
3.5.3 SetMDEnable() 
3.5.4 SetMDEx() 
3.5.5 SetMDRegion() 
3.5.6 SetMDSensitivity() 
3.5.7 SetMDThreshold() 
3.5.8 ShowMD() 
3.5.9 StartMDEvent() 
3.5.10 StopMDEvent() 
3.6 Audio Detection Methods 
3.6.1 ApplyAD() 
3.6.2 SetAD() 
3.6.3 SetADEnable() 
3.6.4 SetADSensitivity() 
3.6.5 SetADThreshold() 
3.6.6 ShowAD() 
3.6.7 StartADEvent() 
3.6.8 StopADEvent() 
3.7 DIO Methods 
3.7.1 SetDO() 
3.7.2 StartDIOEvent() 
3.7.3 StopDIOEvent() 
3.8 OSD Methods 
3.8.1 ApplyMask() 
3.8.2 SetMask() 
3.8.3 SetMaskEnable() 
3.8.4 SetMaskRegion() 
3.8.5 ShowMask() 
3.9 System Setting Methods 
3.9.1 BackupConfig() 
3.9.2 DumpSyslog() 
3.9.3 FwUpgrade() 
3.9.4 GetSystemParam() 
3.9.5 Reboot() 
3.9.6 RefreshDiscovery() 
3.9.7 ResetDefault() 
3.9.8 RestoreConfig() 
3.9.9 SendHttpCmd() 
3.9.10 SetRawImageCallBack() 
3.9.11 SetSystemParam() 
3.9.12 StartDiscovery() 
3.9.13 StopDiscovery() 
4 EVENT HANDLER 
4.1 Media Event 
4.1.1 OnConnectStateNotify() 
4.1.2 OnNewImage() 
4.2 UI Event 
4.2.1 Click() 
4.2.2 DblClick() 
4.2.3 MouseDown() 
4.2.4 MouseHover() 
4.2.5 MouseLeave() 
4.2.6 MouseMove() 
4.2.7 MouseUp() 
4.2.8 MouseWheel() 
4.3 PTZ Event 
4.4 Record Event 
4.5 Motion Detection Event 
4.5.1 OnMDStateNotify() 
4.6 Audio Detection Event 
4.6.1 OnADStateNotify() 
4.7 DIO Event 
4.7.1 OnDIOStateNotify() 
4.8 OSD Event 
4.9 System Event 
4.9.1 OnDiscoveryNotify() 
4.9.2 OnError() 
4.9.3 OnStatusChange() 
4.9.4 OnUpgradeStateNotify() 
  


--------------------------------------------------------------------------------

 

DOCUMENT HISTORY
Version
 Date
 Comment
 
2
 2009-May-5
 Initial version
 
2.0.33.2142
 2010-Feb-24
 For AxMediaControl v2.0.33.2142
 

 

1 OVERVIEW
This document specifies the ActiveX-based application programming interface of the camera and video servers with AxMediaControl version 2,0,33,2142 and above.

The ActiveX-based video interface provides the functionality for video/audio streams play and record, PTZ control, Privacy Mask, and Motion Detection setting with the camera and video servers.

 

2 CONTROL PROPERTY
2.1 Media Property
Name
 Descruption
 
AutoStart
 Indicates if the media stream/file defined in MediaURL/MediaFile should be played automatically. 
 
CurrentPosition
 Current position in the media stream/file, expressed in milliseconds. 
 
Duration
 The total playing time of the current media file. 

Long: The total playing time of the current media file, expressed in milliseconds. 
 
FPS
 Sets/Gets the frame per second value of video configuration.
 
FramesDrawn
 The number of frames drawn since the media stream/file started playing. 
 
H264VideoDecoding
 Mode to use for decoding H.264 video streams/files. 
 
HostIP
 Sets/Gets the host IP address
 
HttpPort
 Sets/Gets the special Http port
 
MPEG4VideoDecodingMode
 Mode to use for decoding MPEG4 video streams/files.
 
MediaChannel
 Sets/Gets current stream channel to connect to target device
 
MediaDelay
 The number of milliseconds to delay the media stream. This buffer can be increased for smoother video on a slow network.
 
MediaFile
 Complete path and file name of the media file to display. 
 
MediaPassword
 Password for media stream access.
 
MediaProtocol
 RTSP connection protocol. 
 
MediaType
 Change the connecting video mode.
 
MediaURL
 URL where a media stream can be accessed. 
 
MediaUsername
 User name for media stream access. 
 
MulticastIP
 Sets/Gets the multicast IP address.
 
MulticastPort
 Sets/Gets the multicast port.
 
Mute
 Enables and disables to play the audio received from device.
 
NetworkTimeout
 The number of milliseconds to wait for network traffic before timing out.
 
RTSPEnabled
 Check target device's RTSP enabled or not.
 
Resolution
 Gets the resolution value of video configuration 
 
SSLPort
 Sets/Gets the SSL port.
 
StreamPort
 Sets/Gets the video port for streaming.
 
VideoConnNum
 Check does the number of connection reach the connection limitation, if no response return false.
 
Volume
 Sets/Gets the volume of current playing media.
 

 

2.1.1 AutoStart
Description: 

Indicates if the media stream/file defined in MediaURL/MediaFile should be played automatically.

Syntax: 

AutoStart= Input_Value
Return_Value = AutoStart 
 

Parameters:

Name
 Type
 Description
 
Input_Value
 short
 Set auto start enable or not.

0:disable, 1:enable
 

 

Returns: 

Name
 Type
 Description
 
Return_Value
 short
 Get the flag of auto start enable or not.

0:Disable, 1:Enable
 

 

Remarks:

Default is Disable(0).

Examples: 

short CAxViewer::GetBuffEn() {
short result;
GetProperty(23, VT_I2, (void*)&result);
return result;
}
void CAxViewer::SetBuffEn(short propVal) {
SetProperty(23, VT_I2, propVal);
}
 

 

2.1.2 CurrentPosition
Description: 

Current position in the media stream/file. 

 

Syntax: 

Return_Value = CurrentPosition 
 

Parameters:

None. 

Returns: 

Name
 Type
 Description
 
Return_Value
 short
 The current position in the media stream/file, expressed in milliseconds. 
 

 

Remarks:

Default is 0.

Examples: 

short CAxViewer::GetCurrentPosition (){
short result;
GetProperty(46, VT_I2, (void*)&result);
return result;
}
void CTESTDlg::testGetCurrentPosition () {
 short propVal = m_Viewer1->GetCurrentPosition();
}
 

 

2.1.3 Duration
Description: 

The total playing time of the current media file, expressed in milliseconds. 

 

Syntax: 

Return_Value = Duration
 

Parameters:

 None.

Returns: 

Name
 Type
 Description
 
Return_Value
 long
 The total playing time of the current media file, expressed in milliseconds.
 

 

Remarks:

Default is 0.

Examples: 

long CAxViewer::GetDuration(){
long result;
GetProperty(47, VT_I4, (void*)&result);
return result;
}
void CTESTDlg::testChangeHostIP() {
 long duration = m_Viewer1->GetDuration();
}
 

 

2.1.4 FPS
Description: 

Sets/Gets the frame per second value of video configuration.

 

Syntax: 

FPS = Input_Value
Return_Value = FPS
 

Parameters:

Name
 Type
 Description
 
Input_Value
 short
 Sets the frame per second value of video configuration.

(Not Implement yet)
 

 

Returns: 

Name
 Type
 Description
 
Return_Value
 short
 Gets the frame per second value of video configuration.
 

 

Remarks:

Default is 0.

Examples: 

short CAxViewer::GetFPS() {
 short result;
 GetProperty(37, VT_I2, (void*)&result);
 return result;
}
void CAxViewer::SetFPS(short propVal) {
 SetProperty(37, VT_I2, propVal);
}
void CTESTDlg::testChangeFPS(short port) {
 short fps = m_Viewer1->GetFPS();
 m_Viewer1->SetFPS(fps);
}
 

 

2.1.5 FramesDrawn
Description: 

The number of frames drawn since the media stream/file started playing. 

 

Syntax: 

Return_Value = MjpegName
 

Parameters:

None. 

Returns: 

Name
 Type
 Description
 
Return_Value
 long
 The number of frames drawn since the media stream/file started playing.
 

 

Remarks:

Default is 0.

Examples: 

long CAxViewer::GetFramesDrawn() {
 long result;
 GetProperty(39, VT_I4, (void*)&result);
 return result;
}
 

 

2.1.6 H264VideoDecoding
Description: 

Mode to use for decoding H.264 video streams/files. 

 

Syntax: 

H264VideoDecoding = Input_Value
Return_Value = H264VideoDecoding
 

Parameters:

Name
 Type
 Description
 
Input_Value
 long
 The mode is expressed as a combination of flags and can be used to control video quality and rendering performance. 

0 AMC_H264_VIDEO_DECODE_ONLY_KEY_FRAMES decode only key frames. 

3 - decode all frames. 
 

 

Returns: 

Name
 Type
 Description
 
Return_Value
 long
 Gets the H264 decode mdoe.
 

 

Remarks:

Default is 3 .

Examples: 

long CAxViewer::GetH264VideoDecoding() {
 long result;
 GetProperty(41, VT_I4, (void*)&result);
 return result;
}
void CAxViewer::SetH264VideoDecoding(long propVal) {
 SetProperty(41, VT_I4, propVal);
}
 

 

2.1.7 HostIP
Description: 

Sets/Gets the host IP address 

Syntax: 

HostIP = Input_Value
Return_Value = HostIP
 

Parameters:

Name
 Type
 Description
 
Input_Value
 BSTR
 Sets the IP address of the host 
 

 

Returns: 

Name
 Type
 Description
 
Return_Value
 BSTR
 Gets the IP address of the host 
 

 

Remarks:

Default is empty string. 

Examples: 

CString CAxViewer::GetHostIP() {
 CString result;
 GetProperty(6, VT_BSTR, (void*)&result);
 return result;
}
void CAxViewer::SetHostIP(LPCTSTR propVal) {
 SetProperty(6, VT_BSTR, propVal);
}
void CTESTDlg::testChangeHostIP(CString ipaddress) {
 CString curIP = m_Viewer1->GetHostIP();
 If(curIP != ipaddress)
 m_Viewer1->SetHostIP(ipaddress);
}
 

 

2.1.8 HttpPort
Description: 

Sets/Gets the special Http port 

Syntax: 

HttpPort = Input_Value
Return_Value = HttpPort
 

Parameters:

Name
 Type
 Description
 
Input_Value
 long 
 Sets the http port number of the host 
 

 

Returns: 

Name
 Type
 Description
 
Return_Value
 long 
 Gets the http port number of the host 
 

 

Remarks:

 Default is 80.

Examples: 

long CAxViewer::GetHttpPort() {
 long result;
 GetProperty(7, VT_I4, (void*)&result);
 return result;
}
void CAxViewer::SetHttpPort(long propVal) {
 SetProperty(7, VT_I4, propVal);
}
void CTESTDlg::testChangeHttpPort(long port) {
 long curPort = m_Viewer1->GetHttpPort();
 If(curPort != port)
 m_Viewer1->SetHttpPort(port);
}
 
3.1.5 Play()
Description: 

Starts playing the media stream/file.

Syntax: 

Return_Value = Play(bPreview);
 

Parameters:

Name
 Type
 Description
 
bPreview
 short
 Shows the media stream/file in live or in background

1: in live

0: in background
 

 

Returns: 

Name
 Type
 Description
 
Return_Value
 long
 If complete return 0 else return -1.
 

 

Remarks:

None.

Examples: 

long CAxViewer:: Play(short bPreview) {
 long result;
 static BYTE parms[] = VTS_I2;
 InvokeHelper(59, DISPATCH_METHOD, VT_I4, (void*)&result, parms, bPreview);
 return result;
}
 


Dosya ekleri
API reference Guide.rar
API reference Guide
(32.54 KiB) 123 kere indirildi
Cevapla