]> git.sesse.net Git - casparcg/blobdiff - shell/server.cpp
2.0.0: Fixed ogl_device destruction order.
[casparcg] / shell / server.cpp
index 52ac618a5b14fdece040e54a5930ff21c708399a..5734c25fbd1c1be8b125f9d4913d608b309edc4f 100644 (file)
@@ -51,7 +51,6 @@
 \r
 #include <boost/algorithm/string.hpp>\r
 #include <boost/lexical_cast.hpp>\r
-#include <boost/filesystem.hpp>\r
 #include <boost/foreach.hpp>\r
 #include <boost/property_tree/ptree.hpp>\r
 #include <boost/property_tree/xml_parser.hpp>\r
@@ -61,30 +60,31 @@ namespace caspar {
 using namespace core;\r
 using namespace protocol;\r
 \r
-\r
 struct server::implementation : boost::noncopyable\r
 {\r
-       std::vector<safe_ptr<IO::AsyncEventServer>> async_servers_;     \r
-       std::vector<safe_ptr<video_channel>>                            channels_;\r
        ogl_device                                                                      ogl_;\r
+       std::vector<safe_ptr<IO::AsyncEventServer>> async_servers_;     \r
+       std::vector<safe_ptr<video_channel>>            channels_;\r
 \r
        implementation()                                                                                                \r
        {                       \r
-               init_ffmpeg();\r
-               init_bluefish();\r
-               init_decklink();\r
-               init_flash();\r
-               init_oal();\r
-               init_ogl();\r
+               ffmpeg::init();\r
+               bluefish::init();\r
+               decklink::init();\r
+               flash::init();\r
+               oal::init();\r
+               ogl::init();\r
                //init_silverlight();\r
-               init_image();\r
+               image::init();\r
 \r
                setup_channels(env::properties());\r
                setup_controllers(env::properties());\r
        }\r
 \r
        ~implementation()\r
-       {                               \r
+       {               \r
+               ffmpeg::uninit();\r
+\r
                async_servers_.clear();\r
                channels_.clear();\r
        }\r
@@ -107,15 +107,15 @@ struct server::implementation : boost::noncopyable
                                {\r
                                        const std::string name = xml_consumer.first;\r
                                        if(name == "screen")\r
-                                               channels_.back()->output()->add(index++, create_ogl_consumer(xml_consumer.second));                                     \r
+                                               channels_.back()->output()->add(index++, ogl::create_consumer(xml_consumer.second));                                    \r
                                        else if(name == "bluefish")                                     \r
-                                               channels_.back()->output()->add(index++, create_bluefish_consumer(xml_consumer.second));                                        \r
+                                               channels_.back()->output()->add(index++, bluefish::create_consumer(xml_consumer.second));                                       \r
                                        else if(name == "decklink")                                     \r
-                                               channels_.back()->output()->add(index++, create_decklink_consumer(xml_consumer.second));                                \r
+                                               channels_.back()->output()->add(index++, decklink::create_consumer(xml_consumer.second));                               \r
                                        //else if(name == "file")                                       \r
                                        //      channels_.back()->output()->add(index++, create_ffmpeg_consumer(xml_consumer.second));                                          \r
                                        else if(name == "audio")\r
-                                               channels_.back()->output()->add(index++, make_safe<oal_consumer>());            \r
+                                               channels_.back()->output()->add(index++, oal::create_consumer());               \r
                                        else if(name != "<xmlcomment>")\r
                                                CASPAR_LOG(warning) << "Invalid consumer: " << widen(name);     \r
                                }\r