So if your curious as to how to get libssh support in FFmpeg on Windows then all you need to do is add the following lines to libavformat/libssh.c:
@@ -20,12 +20,34 @@
#include <fcntl.h>
#include <libssh/sftp.h>
+#include <sys/stat.h>
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "avformat.h"
#include "internal.h"
#include "url.h"
+#if defined(_WIN32)
+#ifndef S_IRUSR
+#define S_IRUSR S_IREAD
+#endif
+#ifndef S_IWUSR
+#define S_IWUSR S_IWRITE
+#endif
+#ifndef S_IRGRP
+#define S_IRGRP 0
+#endif
+#ifndef S_IWGRP
+#define S_IWGRP 0
+#endif
+#ifndef S_IROTH
+#define S_IROTH 0
+#endif
+#ifndef S_IWOTH
+#define S_IWOTH 0
+#endif
+#endif
+
typedef struct {
const AVClass *class;
ssh_session session;
And thats it. After adding those lines then assuming you have a built libssh library then everything should work fine.
No comments:
Post a Comment