Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Video recording on motion detection

Video recording on motion detection

Scheduled Pinned Locked Moved C / C++ / MFC
databasedebuggingtutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tyagineha
    wrote on last edited by
    #1

    i have used following four functions for motion detection part only: 1)AdjustMotionDetectPrecision() 2)SetupMotionDetection() 3)StartMotionDetection() 4)MotionAnalyzer() using these four functions,motion detected has started. but i dnt knw how to start recording???? i m sending u some code : here it is:::: if(frameType > 0) { if(frameType == PktSysHeader) { memcpy(FileHeader[channelNum], DataBuf, Length); FileHeaderLen = Length; } if(frameType == PktIFrames || frameType ==PktSubIFrames) { status = 1; } else { status = 0; } if(frameType == PktMotionDetection) { int result[4]; if(bOverlayMode) { hkdlg->m_VideoWin.DrawVectEx(channelNum, (char *)DataBuf); } else { hkdlg->m_bMoving[channelNum] = TRUE; memcpy(motionData[channelNum],(char*)DataBuf,Length); } MotionAnalyzer(ChannelHandle[channelNum],(char*)DataBuf,15,result); if((result[0] + result[1] + result[2] + result[3])) { if (channelNum ==0) TRACE("!!!!!!!CH=%d motion detect result is %d %d %d %d\n",channelNum,result[0],\ result[1],result[2],result[3]); //The function Trigger() do the following operation: write the video&audio data which are before the motion frame to file if(!hkdlg->baftermotion[channelNum]) alarmFile[channelNum].Trigger(gFileHandle[channelNum]); //when the motion frame returns,clear ualreadywriteframes[channelNum] and set it as 0 ,be ready for writing the video&audio data after motion hkdlg->ualreadywriteframes[channelNum]=0; hkdlg->baftermotion[channelNum]=TRUE; } return 0; } if(frameType == PktOrigImage) { return 0; } In this code should i start recording after motionanalyser() function????????????? tyagi

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups