我认为我使用的单位是错误的,因为我做了阅读程序:
procedure ReadStream (rtmp: RTMP; Stream: TStream);
var
Buffer: array [0 .. 16384-1] of Byte ;/ / 16kB buffer
BytesRead: Integer;
begin
while True do
begin
BytesRead: = RTMP_ReadData (rtmp, @ Buffer [0], SizeOf (Buffer));
if BytesRead = 0 then
exit;
Stream.WriteBuffer (Buffer [0], BytesRead);
end;
end;
过程调用:
var
MY_RTMP: RTMP;
URL_str: string;
MY_RTMPPacket: RTMPPacket;
URL_char: PAnsiChar;
F: TFileStream;
begin
F: = TFileStream.Create (ExtractFilePath (GetModuleName (0)) + 'Video.flv', fmCreate or fmOpenWrite);
URL_str: = 'rtmp :/ / localhost: 1935/Video/test.stream';
MY_RTMP: = RTMP_Alloc;
RTMP_Init (MY_RTMP);
RTMP_SetupURL (MY_RTMP, pcchar (URL_str));
RTMP_EnableWrite (MY_RTMP);
RTMP_Connect (MY_RTMP, MY_RTMPPacket);
RTMP_ConnectStream (MY_RTMP, 0);
ReadStream (MY_RTMP, F);
end;
程序可以编译,但是当您开始收到错误消息时: 在库 DLL librtmp 中找不到过程入口点 RTMP_ReadData? 但是这个功能在模块里有描述,帮我找个出入
如果信任 Dependency Walker,则该库无法运行 RTMP_ReadData。有一个函数RTMP_Read,根据源码:
C上的函数如下:
static int rtmp_read (URLContext * s, uint8_t * buf, int size)
{
LibRTMPContext * ctx = s-> priv_data;
RTMP * r = & ctx-> rtmp;
return RTMP_Read (r, buf, size);
}
在我使用的模块中,缺少描述
我使用现有条目的模块:
RTMP_READ = record
buf: pcchar;
bufpos: pcchar;
buflen: cuint;
timestamp: uint32_t;
dataType: uint8_t;
flags: uint8_t;
status: int8_t;
initialFrameType: uint8_t;
nResumeTS: uint32_t;
metaHeader: pcchar;
initialFrame: pcchar;
nMetaHeaderSize: uint32_t;
nInitialFrameSize: uint32_t;
nIgnoredFrameCounter: uint32_t;
nIgnoredFlvFrameCounter: uint32_t;
end;
她被调用的imee名称,但在我看来,它包含很多让我困惑的选项,与加载的功能无关。我该怎么处理这张唱片?