]> git.sesse.net Git - casparcg/blobdiff - core/consumer/output.cpp
2.1.0: Seal of appropriate classes.
[casparcg] / core / consumer / output.cpp
index 391c4382758141356d5cc6bf79433f7830880b6d..504898e927abe5ec075622bce8a788dfd31860f7 100644 (file)
@@ -1,23 +1,24 @@
 /*\r
-* copyright (c) 2010 Sveriges Television AB <info@casparcg.com>\r
+* Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>\r
 *\r
-*  This file is part of CasparCG.\r
+* This file is part of CasparCG (www.casparcg.com).\r
 *\r
-*    CasparCG is free software: you can redistribute it and/or modify\r
-*    it under the terms of the GNU General Public License as published by\r
-*    the Free Software Foundation, either version 3 of the License, or\r
-*    (at your option) any later version.\r
+* CasparCG is free software: you can redistribute it and/or modify\r
+* it under the terms of the GNU General Public License as published by\r
+* the Free Software Foundation, either version 3 of the License, or\r
+* (at your option) any later version.\r
 *\r
-*    CasparCG is distributed in the hope that it will be useful,\r
-*    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-*    GNU General Public License for more details.\r
-\r
-*    You should have received a copy of the GNU General Public License\r
-*    along with CasparCG.  If not, see <http://www.gnu.org/licenses/>.\r
+* CasparCG is distributed in the hope that it will be useful,\r
+* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+* GNU General Public License for more details.\r
+*\r
+* You should have received a copy of the GNU General Public License\r
+* along with CasparCG. If not, see <http://www.gnu.org/licenses/>.\r
 *\r
+* Author: Robert Nagy, ronag89@gmail.com\r
 */\r
-// TODO: Try to recover consumer from bad_alloc...\r
+\r
 #include "../StdAfx.h"\r
 \r
 #ifdef _MSC_VER\r
@@ -142,7 +143,7 @@ public:
                });\r
        }\r
 \r
-       std::pair<size_t, size_t> minmax_buffer_depth() const\r
+       std::pair<int, int> minmax_buffer_depth() const\r
        {               \r
                if(consumers_.empty())\r
                        return std::make_pair(0, 0);\r
@@ -173,7 +174,7 @@ public:
                                if(!has_synchronization_clock())\r
                                        sync_timer_.tick(1.0/format_desc_.fps);\r
 \r
-                               if(input_frame->image_size() != format_desc_.size)\r
+                               if(input_frame->image_data().size() != format_desc_.size)\r
                                {\r
                                        sync_timer_.tick(1.0/format_desc_.fps);\r
                                        return;\r
@@ -212,7 +213,10 @@ public:
                                                        if(consumer->send(frame))\r
                                                                ++it;\r
                                                        else\r
+                                                       {\r
+                                                               CASPAR_LOG(info) << print() << L" " << it->second->print() << L" Removed.";\r
                                                                consumers_.erase(it++);\r
+                                                       }\r
                                                }\r
                                                catch(...)\r
                                                {\r