X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimage_proxy.cc;h=c426e796fba8d05819ac9d9133f03415dadba4db;hb=913bb4e71f287ec7fc050ba5bcf12e3fae26ecfa;hp=f6f6350d8f53a258caa4814fb5aea2c4a77f6947;hpb=dd9be86db6cde0afa5da0d1d1ac43b42e05dca26;p=dcpomatic.git diff --git a/src/lib/image_proxy.cc b/src/lib/image_proxy.cc index f6f6350d8..c426e796f 100644 --- a/src/lib/image_proxy.cc +++ b/src/lib/image_proxy.cc @@ -18,32 +18,36 @@ */ -#include "image_proxy.h" -#include "raw_image_proxy.h" + +#include "cross.h" +#include "exceptions.h" #include "ffmpeg_image_proxy.h" -#include "j2k_image_proxy.h" #include "image.h" -#include "exceptions.h" -#include "cross.h" +#include "image_proxy.h" +#include "j2k_image_proxy.h" +#include "raw_image_proxy.h" #include #include #include #include "i18n.h" + using std::cout; -using std::string; +using std::make_shared; using std::shared_ptr; +using std::string; + shared_ptr image_proxy_factory (shared_ptr xml, shared_ptr socket) { if (xml->string_child("Type") == N_("Raw")) { - return shared_ptr (new RawImageProxy (xml, socket)); + return make_shared(xml, socket); } else if (xml->string_child("Type") == N_("FFmpeg")) { - return shared_ptr (new FFmpegImageProxy(xml, socket)); + return make_shared(socket); } else if (xml->string_child("Type") == N_("J2K")) { - return shared_ptr (new J2KImageProxy (xml, socket)); + return make_shared(xml, socket); } throw NetworkError (_("Unexpected image type received by server"));