Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The decklinkSrcWorker_taxi file contains the decklinkSrc_worker_taxi() method called by main.py that takes pipelineOut as a parameter. Python parameters are pass by reference, so whatever the pipelineOut variable is changed to in the function is also changed in the main program, main.py. In decklinkSrcWorker_taxi(), a DeckLinkSRC object is created and this object has functions that are defined in decklinksrc.py. Using this object, functions from decklinksrc.py are called in a forever loop to store and update a frame into a variable called curr_frame.

The decklinksrc.py file uses OpenCV to start a webcam video capture for the DeckLinkSRC object, and uses the grab() function to store the current webcam frame and return it to the curr_frame variable in decklinkSrcWorker_taxi. Finally, the parameter pipelineOut is set as the curr_frame. Note that decklinksrc is always used in parallel with other functions such as qr_worker or videoDisplayWorker. The updated pipelineOut parameter becomes containing the current frame is constantly grabbed and updated to a new frame at a high speed. This frame is then passed into the parameter of functions like qr_worker or videoDisplayWorker, and then used to display the camera and call its corresponding functions.

...