diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-22 16:55:35 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-22 16:55:35 +0100 |
| commit | a44032f5e1c8218dcd58b053ebc4703fb3239988 (patch) | |
| tree | 3184ae68e26277cbdb6ffaf0d164eeb212938c17 /src | |
| parent | d089510518def36abda34ed4e9516ed5b2395093 (diff) | |
Don't build networking on Windows for now.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/dcp_video_frame.cc | 10 | ||||
| -rw-r--r-- | src/lib/dcp_video_frame.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/dcp_video_frame.cc b/src/lib/dcp_video_frame.cc index f928b6602..8a4c845d9 100644 --- a/src/lib/dcp_video_frame.cc +++ b/src/lib/dcp_video_frame.cc @@ -38,8 +38,10 @@ #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 diff --git a/src/lib/dcp_video_frame.h b/src/lib/dcp_video_frame.h index 26b44ad43..9acf50692 100644 --- a/src/lib/dcp_video_frame.h +++ b/src/lib/dcp_video_frame.h @@ -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 |
