Exemplo n.º 1
0
//
// Load images from network video, timestamp image, write to MP4 file
//
int main( int argc, const char *argv[] )
{
    debugInitialise( "example3", "", 0 );

    Info( "Starting" );

    avInit();

    Application app;

    //RemoteVideoInput input( "rtsp://*****:*****@axis207.home/mpeg4/media.amp" );
    NetworkAVInput input( "input1", "rtsp://*****:*****@webcam.com/mpeg4/media.amp" );
    app.addThread( &input );

    ImageTimestamper timestamper( input.cname() );
    app.addThread( &timestamper );

    VideoParms videoParms( 640, 480 );
    AudioParms audioParms;
    MovieFileOutput output( input.cname(), "/tmp", "mp4", 300, videoParms, audioParms );
    output.registerProvider( timestamper );
    app.addThread( &output );

    app.run();
}
Exemplo n.º 2
0
//
// Load images from network stream, run motion detection, write to MP4 files and trap and print notifications
// WARNING - This example can write lots of files, some large, to /tmp (or wherever configured)
//
int main( int argc, const char *argv[] )
{
    debugInitialise( "example9", "", 0 );

    Info( "Starting" );

    avInit();

    Application app;

    NetworkAVInput input( "input", "rtsp://170.93.143.139:1935/rtplive/0b01b57900060075004d823633235daa" );
    app.addThread( &input );

    MotionDetector motionDetector( "detector" );
    motionDetector.registerProvider( input );
    app.addThread( &motionDetector );

    VideoParms videoParms( 640, 480 );
    AudioParms audioParms;
    VideoRecorder recorder( "recorder" , "/transfer", "mp4", videoParms, audioParms );
    //MovieFileOutput recorder( "recorder" , "/tmp", "mp4", 300, videoParms, audioParms );
    recorder.registerProvider( motionDetector );
    app.addThread( &recorder );

    NotifyOutput notifier( "notifier" );
    notifier.registerProvider( recorder );
    app.addThread( &notifier );

    app.run();
}
Exemplo n.º 3
0
//
// Capture from local V4L2 device and write to ZM V2 compatible shared memory
//
int main( int argc, const char *argv[] )
{
    debugInitialise( "example1", "", 5 );

    Info( "Starting" );

    avInit();

    Application app;

    LocalVideoInput input( "input1", "/dev/video0" );
    app.addThread( &input );

    MemoryOutput memoryOutput( input.cname(), "/dev/shm", 10 );
    memoryOutput.registerProvider( input );
    app.addThread( &memoryOutput );

    app.run();
}
Exemplo n.º 4
0
MainWindow::MainWindow(QWidget *parent) :
	QMainWindow(parent),
	ui(new Ui::MainWindow)
{
	ui->setupUi(this);
	ui->txt_pkt_data->setFont(QFont("Monospace"));
	ui->txt_unpackinfo->setFont(QFont("Monospace"));

	m_unpackStatus = UNPACK_START;
	m_pUnpackThread = NULL;

	initStatusBar();
	createDB();
	avInit();

	m_timer = new QTimer(this);
	//connect(m_timer,SIGNAL(timeout()),this,SLOT(slot_bind_tableview()));
	ui->tvw_unpack->setContextMenuPolicy(Qt::CustomContextMenu);
	connect(ui->tvw_unpack, SIGNAL(customContextMenuRequested(const QPoint&)),
            this, SLOT(slot_show_unpack_menu()));//this是datatable所在窗口
}
Exemplo n.º 5
0
//
// Run motion detection on a saved file, provide debug images in matrix mode over HTTP
//
int main( int argc, const char *argv[] )
{
    debugInitialise( "example6", "", 5 );

    Info( "Starting" );

    avInit();

    Application app;

    NetworkAVInput input( "input", "/tmp/movie.mp4" );
    app.addThread( &input );

    MotionDetector motionDetector( "modect" );
    motionDetector.registerProvider( input );
    //EventRecorder eventRecorder( "/transfer/ozx" );
    app.addThread( &motionDetector );

    MatrixVideo matrixVideo( "matrix", PIX_FMT_YUV420P, 640, 480, FrameRate( 1, 10 ), 2, 2 );
    matrixVideo.registerProvider( *motionDetector.refImageSlave() );
    matrixVideo.registerProvider( *motionDetector.compImageSlave() );
    matrixVideo.registerProvider( *motionDetector.deltaImageSlave() );
    matrixVideo.registerProvider( *motionDetector.varImageSlave() );
    app.addThread( &matrixVideo );

    Listener listener;
    app.addThread( &listener );

    HttpController httpController( "p8080", 8080 );
    listener.addController( &httpController );

    httpController.addStream( "file", input );
    httpController.addStream( "debug", SlaveVideo::cClass() );
    httpController.addStream( "debug", matrixVideo );
    httpController.addStream( "debug", motionDetector );

    app.run();
}