Don't build networking on Windows for now.
authorCarl Hetherington <cth@carlh.net>
Sun, 22 Jul 2012 15:55:35 +0000 (16:55 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 22 Jul 2012 15:55:35 +0000 (16:55 +0100)
src/lib/dcp_video_frame.cc
src/lib/dcp_video_frame.h

index f928b6602b7c207f9348f09dfc1dc448b65b350e..8a4c845d987f701e16624f9cd0a23df9b19c6968 100644 (file)
 #include <iostream>
 #include <unistd.h>
 #include <errno.h>
+#ifdef DVDOMATIC_POSIX
 #include <netinet/in.h>
 #include <netdb.h>
+#endif
 #include <boost/filesystem.hpp>
 #include "film.h"
 #include "dcp_video_frame.h"
@@ -290,6 +292,7 @@ DCPVideoFrame::encode_locally ()
 shared_ptr<EncodedData>
 DCPVideoFrame::encode_remotely (Server const * serv)
 {
+#ifdef DVDOMATIC_POSIX 
        int const fd = socket (AF_INET, SOCK_STREAM, 0);
        if (fd < 0) {
                throw NetworkError ("could not create socket");
@@ -376,6 +379,11 @@ DCPVideoFrame::encode_remotely (Server const * serv)
        
        close (fd);
        return e;
+#endif
+
+#ifdef DVDOMATIC_WINDOWS       
+       return shared_ptr<EncodedData> ();
+#endif
 }
 
 /** Write this data to a J2K file.
@@ -400,6 +408,7 @@ EncodedData::write (shared_ptr<const Options> opt, int frame)
        filesystem::rename (tmp_j2k, opt->frame_out_path (frame, false));
 }
 
+#ifdef DVDOMATIC_POSIX 
 /** Send this data to a file descriptor.
  *  @param fd File descriptor.
  */
@@ -411,6 +420,7 @@ EncodedData::send (int fd)
        socket_write (fd, (uint8_t *) s.str().c_str(), s.str().length() + 1);
        socket_write (fd, _data, _size);
 }
+#endif 
 
 #ifdef DEBUG_HASH
 void
index 26b44ad43c73a045c37eba4ea696a23769d9f8d1..9acf50692990269ecd78c41f2b67a8f553e9bdf9 100644 (file)
@@ -48,7 +48,9 @@ public:
 
        virtual ~EncodedData () {}
 
+#ifdef DVDOMATIC_POSIX 
        void send (int);
+#endif 
        void write (boost::shared_ptr<const Options>, int);
 
 #ifdef DEBUG_HASH