1 #include "interface/mmal/mmal.h" 2 #include "interface/mmal/mmal_buffer.h" 3 #include "interface/mmal/mmal_logging.h" 4 #include "interface/mmal/util/mmal_connection.h" 5 #include "interface/mmal/util/mmal_default_components.h" 6 #include "interface/mmal/util/mmal_util.h" 7 #include "interface/mmal/util/mmal_util_params.h" 16 for (
size_t i = 0; i < ptr->output_num; ++i) {
17 if (ptr->output[i] && ptr->output[i]->is_enabled) {
18 mmal_port_disable(ptr->output[i]);
21 mmal_component_disable(ptr);
22 mmal_component_destroy(ptr);
26 typedef std::unique_ptr<MMAL_COMPONENT_T, component_deleter>
component_ptr;
31 mmal_connection_destroy(ptr);
35 typedef std::unique_ptr<MMAL_CONNECTION_T, connection_deleter>
connection_ptr;
39 fprintf(stderr,
"%s\n",
"LEAKED POOL! you need to define your own deleter");
42 typedef std::unique_ptr<MMAL_POOL_T, std::function<void(MMAL_POOL_T*)>>
pool_ptr;
void operator()(MMAL_CONNECTION_T *ptr) const
std::unique_ptr< MMAL_CONNECTION_T, connection_deleter > connection_ptr
std::unique_ptr< MMAL_COMPONENT_T, component_deleter > component_ptr
std::unique_ptr< MMAL_POOL_T, std::function< void(MMAL_POOL_T *)> > pool_ptr
void operator()(MMAL_COMPONENT_T *ptr) const
void default_delete_pool(MMAL_POOL_T *ptr)