28 #include "ardour/debug.h"
40 SessionEvent::init_event_pool ()
46 SessionEvent::create_per_thread_pool (
const std::string&
name, uint32_t nitems)
52 pool->create_per_thread_pool (name,
sizeof (
SessionEvent), nitems);
59 , target_frame (where)
62 , second_yes_or_no (yn2)
63 , third_yes_or_no (yn3)
70 SessionEvent::operator
new (size_t)
87 SessionEvent::operator
delete (
void *ptr,
size_t )
89 Pool* p = pool->per_thread_pool (
false);
93 "%1 Deleting SessionEvent @ %2 type %3 action %4 ev thread pool = %5 ev pool = %6 size %7 free %8 used %9\n",
165 cerr <<
"EVENT DUMP" << endl;
166 for (Events::const_iterator i =
events.begin(); i !=
events.end(); ++i) {
168 cerr <<
"\tat " << (*i)->action_frame <<
' ' <<
enum_2_string ((*i)->type) <<
" target = " << (*i)->target_frame << endl;
170 cerr <<
"Next event: ";
173 cerr <<
"none" << endl;
175 cerr <<
"at " << (*next_event)->action_frame <<
' '
177 << (*next_event)->target_frame << endl;
179 cerr <<
"Immediate events pending:\n";
181 cerr <<
"\tat " << (*i)->action_frame <<
' ' <<
enum_2_string((*i)->type) <<
" target = " << (*i)->target_frame << endl;
183 cerr <<
"END EVENT_DUMP" << endl;
232 for (Events::iterator i =
events.begin(); i !=
events.end(); ++i) {
234 error <<
string_compose(
_(
"Session: cannot have two events of type %1 at the same frame (%2)."),
257 if ((*i)->type == ev->
type) {
311 Events::iterator i, tmp;
318 if ((*i)->type == type) {
334 if ((*i)->type == type) {
LIBPBD_API const char * pthread_name()
void clear_events(SessionEvent::Type type)
PBD::EventLoop * event_loop
CrossThreadPool * event_pool() const
boost::function< void(void)> rt_slot
void merge_event(SessionEvent *)
LIBPBD_API Transmitter error
RTeventCallback rt_return
std::ostream & endmsg(std::ostream &ostr)
static EventLoop * get_event_loop_for_thread()
void _clear_event_type(SessionEvent::Type)
guint pending_size() const
CrossThreadPool * own_pool
bool _replace_event(SessionEvent *)
LIBARDOUR_API uint64_t SessionEvents
virtual void queue_event(SessionEvent *ev)=0
virtual void release(void *)
virtual void set_next_event()=0
static const framepos_t Immediate
class LIBPBD_API PerThreadPool
Events::iterator next_event
#define DEBUG_TRACE(bits, str)
LIBPBD_API uint64_t debug_bits
void replace_event(SessionEvent::Type, framepos_t action_frame, framepos_t target=0)
virtual void call_slot(InvalidationRecord *, const boost::function< void()> &)=0
#define MISSING_INVALIDATOR
void remove_event(framepos_t frame, SessionEvent::Type type)
static bool compare(const SessionEvent *e1, const SessionEvent *e2)
void flush_pending_with_ev(void *)
std::string string_compose(const std::string &fmt, const T1 &o1)
bool _remove_event(SessionEvent *)
void add_event(framepos_t action_frame, SessionEvent::Type type, framepos_t target_frame=0)
virtual void process_event(SessionEvent *)=0