# Simple samples for custom backend implementation for streaming-mode

**URL:** <https://forum.opencv.org/t/simple-samples-for-custom-backend-implementation-for-streaming-mode/5868>\
**Category:** C++\
**Tags:** gapi\
**Created:** [October 27, 2021, 3:13am UTC](https://forum.opencv.org/t/simple-samples-for-custom-backend-implementation-for-streaming-mode/5868 "2021-10-27T03:13:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris.liu](https://avatars.discourse-cdn.com/v4/letter/c/e274bd/32.png) [@chris.liu](https://forum.opencv.org/u/chris.liu)\
**Post date:** [October 27, 2021, 3:13am UTC](https://forum.opencv.org/t/simple-samples-for-custom-backend-implementation-for-streaming-mode/5868/1 "2021-10-27T03:13:55Z")

</div>

I want to compile and run a graph using the gapi module, with new backend on hardware accelerators . Can someone please share a working example?

---

<div class="post-metadata">

**Author:** ![dmitryma](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/dmitryma/32/3536_2.png) [@dmitryma](https://forum.opencv.org/u/dmitryma)\
**Post date:** [October 27, 2021, 8:03pm UTC](https://forum.opencv.org/t/simple-samples-for-custom-backend-implementation-for-streaming-mode/5868/2 "2021-10-27T20:03:55Z")

</div>

The backend implementation doesn’t differ much between streaming and the regular mode.  
You may want take a look on the existing backends in G-API: [opencv/modules/gapi/src/backends at master · opencv/opencv · GitHub](https://github.com/opencv/opencv/tree/master/modules/gapi/src/backends)

In particular, the “CPU” backend is quite simple to get into the idea of what a backend should implement: [opencv/gcpubackend.cpp at master · opencv/opencv · GitHub](https://github.com/opencv/opencv/blob/master/modules/gapi/src/backends/cpu/gcpubackend.cpp)
