|
Valkka
1.6.1
OpenSource Video Management
|
LiveThread sends a special frame if a camera is detected offline. More...
#include <framefilter2.h>


Public Member Functions | |
| AlertFrameFilter (const char *name, PyObject *pycallback, FrameFilter *next=NULL) | |
Public Member Functions inherited from FrameFilter | |
| FrameFilter (const char *name, FrameFilter *next=NULL) | |
| Default constructor. More... | |
| virtual | ~FrameFilter () |
| Virtual destructor // <pyapi> | |
| void | setVoid () |
| nullifies the next framefilter in the chain -> cuts the framefilter chain | |
Protected Member Functions | |
| void | run (Frame *frame) |
| Calls this->go(Frame* frame) and then calls the this->next->run(Frame* frame) (if this->next != NULL) | |
| void | go (Frame *frame) |
| Does the actual filtering/modification to the Frame. Define in subclass. | |
Protected Attributes | |
| PyObject * | pycallback |
Additional Inherited Members | |
Public Attributes inherited from FrameFilter | |
| std::string | name |
| FrameFilter * | next |
| The next frame filter in the chain to be applied. | |
LiveThread sends a special frame if a camera is detected offline.
This framefilter catches that frame and executes a python callback
Your callback should be a python function like this:
def cb(tup):
slot = tup[0]
# congrats: now you have the slot that has some
# problems with the rtsp stream
print("problems at slot", slot)
# this python callback is launched from the cpp side
# so it is a good idea to exit asap so that your callback chain
# from cpp side exists asap
Remember also that the frequency of the check is set by LiveConnectionContext.mstimeout