FX3/CX3(CYUSB3065) How do I pause and start recording after it start?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
YaXi_4492421
Level 2
Level 2
10 replies posted 10 questions asked 5 replies posted

I use CYUSB3065, and I upload the video to the computer through DMA.How do I pause and start the video after it starts?

0 Likes
1 Solution
KandlaguntaR_36
Moderator
Moderator
Moderator
25 solutions authored 10 solutions authored 5 solutions authored

Hello,

This depends on the host application.

Which host application you are using to stream the video?

In general, when you select the device to stream the video in the host application, it will set a CY_FX_UVC_STREAM_EVENT through UVCHandleVideoStreamingRqts.

When you close the host application, the host application will send a clear feature which set the CY_FX_UVC_STREAM_ABORT_EVENT. This will stop the DMA transfers.

If you want pause the video, the host application should stop the video streaming and display the last received frame.

Please refer AN75779 firmware to understand how the video streaming is being start and stop. Here are other events which will be used to reset the DMA and Suspending the device.

      The actual data forwarding from sensor to USB host is done from the DMA and GPIF callback

       functions. The UVC thread is only responsible for checking for streaming start/stop conditions.

     

       The CY_FX_UVC_STREAM_EVENT event flag will indicate that the UVC video stream should be started.

       The CY_FX_UVC_STREAM_ABORT_EVENT event indicates that we need to abort the video streaming. This

       only happens when we receive a CLEAR_FEATURE request indicating that streaming is to be stopped,

       or when we have a critical error in the data path.

       The CY_FX_UVC_DMA_RESET_EVENT indicates that we need to reset the DMA and endpoint buffers and

       disable GPIF. We restarting the GPIF state machine from first state and device will start streaming

       video after it receives the next frame. FOr camera applications, if we discard few frames and resatrt

       video stream, it shouldn't be a problem. It may be a bad user experience if we abruptly stop video stream.

       Note that we will not restart video stream after few commit buffer failures as this is required for MAC OS.

       The CY_FX_USB_SUSPEND_EVENT_HANDLER indicates that device must enter low power USB suspend mode.

       There is a provision for users to reset and/or turn OFF power to the sensor/Image signal processor (ISP).

Regards,

Sridhar

View solution in original post

1 Reply
KandlaguntaR_36
Moderator
Moderator
Moderator
25 solutions authored 10 solutions authored 5 solutions authored

Hello,

This depends on the host application.

Which host application you are using to stream the video?

In general, when you select the device to stream the video in the host application, it will set a CY_FX_UVC_STREAM_EVENT through UVCHandleVideoStreamingRqts.

When you close the host application, the host application will send a clear feature which set the CY_FX_UVC_STREAM_ABORT_EVENT. This will stop the DMA transfers.

If you want pause the video, the host application should stop the video streaming and display the last received frame.

Please refer AN75779 firmware to understand how the video streaming is being start and stop. Here are other events which will be used to reset the DMA and Suspending the device.

      The actual data forwarding from sensor to USB host is done from the DMA and GPIF callback

       functions. The UVC thread is only responsible for checking for streaming start/stop conditions.

     

       The CY_FX_UVC_STREAM_EVENT event flag will indicate that the UVC video stream should be started.

       The CY_FX_UVC_STREAM_ABORT_EVENT event indicates that we need to abort the video streaming. This

       only happens when we receive a CLEAR_FEATURE request indicating that streaming is to be stopped,

       or when we have a critical error in the data path.

       The CY_FX_UVC_DMA_RESET_EVENT indicates that we need to reset the DMA and endpoint buffers and

       disable GPIF. We restarting the GPIF state machine from first state and device will start streaming

       video after it receives the next frame. FOr camera applications, if we discard few frames and resatrt

       video stream, it shouldn't be a problem. It may be a bad user experience if we abruptly stop video stream.

       Note that we will not restart video stream after few commit buffer failures as this is required for MAC OS.

       The CY_FX_USB_SUSPEND_EVENT_HANDLER indicates that device must enter low power USB suspend mode.

       There is a provision for users to reset and/or turn OFF power to the sensor/Image signal processor (ISP).

Regards,

Sridhar