[英]Writing file to remote server
I'm using this C# code, for acquiring the frames generated by the kinect device, and for writing these frames to .wmv file: 我正在使用此C#代码,以获取由kinect设备生成的框架,并将这些框架写入.wmv文件:
writer = new VideoFileWriter();
writer.Open("outputFileName.wmv", 320, 240, 15, VideoCodec.WMV2);
void client_ColorFrameReady(object sender, ColorFrameReadyEventArgs e)
{
using (var frame = BitmapImage2Bitmap(e.ColorFrame.BitmapImage))
using (var thumb = ResizeBitmap(frame, 320, 240))
{
writer.WriteVideoFrame(thumb);
}
}
When all the frames are written into the file, the file is closed (using writer.Close()
) and sent to a remote server a Java application using ftp client . 将所有框架都写入文件后,将关闭文件(使用writer.Close()
),然后使用ftp client将Java应用程序发送到远程服务器。
Is there any way to write the file directly to the server, while it is still processing? 在仍在处理文件的情况下,有什么方法可以将文件直接写入服务器吗? Can I associate a writer to remote file? 我可以将编写器与远程文件关联吗? For example: writer.Open("remoteServer\\outputFileName.wmv", 320, 240, 15, VideoCodec.WMV2);
例如: writer.Open("remoteServer\\outputFileName.wmv", 320, 240, 15, VideoCodec.WMV2);
, or do I have to write first the entire file to local disk, then send it to the remote server? ,还是我必须先将整个文件写入本地磁盘,然后将其发送到远程服务器?
If the account the application is running under has permission to write to a folder on the server, then in theory you should be able to write to it. 如果运行该应用程序的帐户有权写入服务器上的文件夹,那么从理论上讲,您应该可以对其进行写入。 You should be able to just use the UNC path for the server eg 您应该能够只使用服务器的UNC路径,例如
\\remoteServer\path\to\outputFileName.wmv
However, you might find you experience problems due to network performance. 但是,您可能会发现由于网络性能而遇到问题。 I guess the only way to know is to try it. 我想知道的唯一方法就是尝试一下。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.