OK In C++ I have the following definitions and code.
Structure of preview information.
struct{
LONG lChannel;
LONG lLinkMode;
HWND hPlayWnd;
char *sMultiCastIP;
}NET_DVR_CLIENTINFO, *LPNET_DVR_CLIENTINFO;
Members
lChannel = channel number
lLinkMode = If 31st bit is 0, it means connecting main stream, 1 means sub stream. Bit 0~bit 30 are used for link mode: 0-TCP, 1-UDP, 2-multicast, 3-RTP
hPlayWnd = Handle of playing window. If the value is NULL, it doesn't display image
sMultiCastIP = Multicast IP address
So in delphi I made the following code in the past.
PNetDvrClientInfo = ^TNetDvrClientInfo;
TNetDvrClientInfo = record
lChannel: LONG;
lLinkMode: LONG;
hPlayWnd: HWND;
sMultiCastIP: PChar;
end;
zClient: TNetDvrClientInfo;
[login to view URL]:=1;
[login to view URL]:=0;
[login to view URL]:=[login to view URL];
[login to view URL]:=PAnsiChar('[login to view URL]');
With this code everything works.
The above code connects me to the "Main Stream" and Uses TCP for the connection. Just like it should.
if I change [login to view URL]:=1 the above code connects me to the "Main Stream" and Uses UDP for the connection. Just like it should.
if I change [login to view URL]:=3 the above code connects me to the "Main Stream" and Uses RTP for the connection. Just like it should.
My problem is I want to connect to the substream. Which according to the c++ definition I need to change the 31st bit to a 1 and not a 0. My question is how do I do this in delphi. So for a MainStream, TCP Connection bit 0~31should be 0 and bit 31 should be 0. For a SubStream, TCP Connection bit 0~31 should be 0 and bit 31 should be 1. How do I do this in delphi.
What should [login to view URL]:=??? in order to get the sub stream using tcp by changing the 31st bit to a 1 and not a 0?
Please let me know if there are any questions.