# Executing Libargus oneShot Sample with custom driver.

**URL:** <https://forums.developer.nvidia.com/t/executing-libargus-oneshot-sample-with-custom-driver/48072>\
**Category:** Jetson TX1\
**Created:** [February 23, 2017, 12:01pm UTC](https://forums.developer.nvidia.com/t/executing-libargus-oneshot-sample-with-custom-driver/48072 "2017-02-23T12:01:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alamuru](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@alamuru](https://forums.developer.nvidia.com/u/alamuru)\
**Post date:** [February 23, 2017, 12:01pm UTC](https://forums.developer.nvidia.com/t/executing-libargus-oneshot-sample-with-custom-driver/48072/1 "2017-02-23T12:01:03Z")

</div>

Hi

I’m trying to execute libargus sample oneShot.

I put prints to understand whether my device is detected or not. It is being detected.  
i.e cameraDevices.size() is 1.

But oneShot is failing while acquiring the frame. And giving the below error.

```auto
(Argus) Error InvalidState: Error returned from streamConsumerUpdateFrame (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 271)

Failed to get IFrame interface

```

Could anybody help me out.

---

<div class="post-metadata">

**Author:** ![MarcoMadrigal](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/marcomadrigal/32/370714_2.png) [@MarcoMadrigal](https://forums.developer.nvidia.com/u/MarcoMadrigal)\
**Post date:** [February 23, 2017, 9:38pm UTC](https://forums.developer.nvidia.com/t/executing-libargus-oneshot-sample-with-custom-driver/48072/2 "2017-02-23T21:38:03Z")

</div>

Hi,

1. What sensor are you using?

2. Does it provide Bayer?

3. Are you able to capture using GStreamer? ( Here there are some GStreamer examples for your convenience: [Jetson TX1 GStreamer Pipelines | Jetson TX1 ARM Load](http://developer.ridgerun.com/wiki/index.php?title=Gstreamer_pipelines_for_Tegra_X1) )

Regards,

---

<div class="post-metadata">

**Author:** ![ShaneCCC](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/shaneccc/32/14043_2.png) [@ShaneCCC](https://forums.developer.nvidia.com/u/ShaneCCC)\
**Post date:** [February 24, 2017, 2:33am UTC](https://forums.developer.nvidia.com/t/executing-libargus-oneshot-sample-with-custom-driver/48072/3 "2017-02-24T02:33:43Z")

</div>

Hi alamuru  
MarcoMadrigal is correct. You have to make sure your driver can work with nvcamerasrc first. You can reference to document “Sensor Driver Programming Guide” to check your sensor driver is not problem first.

---

<div class="post-metadata">

**Author:** ![alamuru](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@alamuru](https://forums.developer.nvidia.com/u/alamuru)\
**Post date:** [February 24, 2017, 6:09am UTC](https://forums.developer.nvidia.com/t/executing-libargus-oneshot-sample-with-custom-driver/48072/4 "2017-02-24T06:09:04Z")

</div>

Hi MarcoMadrigal and Shane

1. I’m using imx219.
2. yes it provides bayer.
3. I’m able to capture using gstreamer.

Earlier in my dtsi file I did not add mode node.  
After adding the mode node gstreamer is working and also I’m able to capture a frame using oneshot.

Thank you Shane and MarcoMadrigal for the support :)

---

<div class="post-metadata">

**Author:** ![alamuru](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@alamuru](https://forums.developer.nvidia.com/u/alamuru)\
**Post date:** [February 24, 2017, 8:56am UTC](https://forums.developer.nvidia.com/t/executing-libargus-oneshot-sample-with-custom-driver/48072/5 "2017-02-24T08:56:07Z")

</div>

Hi Shane and Marco

I’m able to run oneShot and yuvJpeg samples successfully.  
But when I try to run any other sample which is linked to OpenGL as consumer I’m facing this error.

```auto
ubuntu@tegra-ubuntu:~/tegra_multimedia_api/argus/build/samples/openglBox$ ./argus_openglbox
PRODUCER: Creating output stream
PRODUCER: Launching consumer thread
CONSUMER: Creating context.
CONSUMER: Connecting to stream.
Error generated. /home/ubuntu/tegra_multimedia_api/argus/samples/openglBox/main.cpp, threadInitialize:180 Unable to connect GL as consumer
Error generated. /home/ubuntu/tegra_multimedia_api/argus/samples/utils/Thread.cpp, threadFunction:126 (propagating)
Error generated. /home/ubuntu/tegra_multimedia_api/argus/samples/openglBox/main.cpp, execute:290 (propagating)
Segmentation fault

```

Could you please help me resolve this.

---

<div class="post-metadata">

**Author:** ![alamuru](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@alamuru](https://forums.developer.nvidia.com/u/alamuru)\
**Post date:** [February 27, 2017, 7:05am UTC](https://forums.developer.nvidia.com/t/executing-libargus-oneshot-sample-with-custom-driver/48072/6 "2017-02-27T07:05:50Z")

</div>

Hi guys

All the argus samples are working on flash memory. But EGL dependent samples are not running on SD Card.

Scenario:

1. Flash memory is flashed with jetpack 2.3.1.
2. SD Card’s rootfs is similar to jetpack 2.3.1. But only multimedia API with all dependencies is installed from a host machine via network.
3. I replaced the image and dtb in the flash with the image and dtb from the SD card.
4. I executed all the samples in flash. All are working and running smoothly.
5. But they are not running on SD Card. I am getting error in the above post.

It looks like something is not installed properly.

I faced similar issue in VisionWorks also. I couldn’t execute the visionworks default samples provided by NVIDIA on sd card whereas the same samples could be executed if I switch to flash memory.

How can I run the argus samples on SD Card also. What am I missing??

---

<div class="post-metadata">

**Author:** ![ShaneCCC](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/shaneccc/32/14043_2.png) [@ShaneCCC](https://forums.developer.nvidia.com/u/ShaneCCC)\
**Post date:** [March 1, 2017, 10:12am UTC](https://forums.developer.nvidia.com/t/executing-libargus-oneshot-sample-with-custom-driver/48072/7 "2017-03-01T10:12:00Z")

</div>

Does the flash memory is the on board EMMC memory? What the format of the SD card. I can run the argsu\_openglbox on my SD card (Ext4) that copy from the internal EMMC memory.

---

<div class="post-metadata">

**Author:** ![kayccc](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kayccc/32/14043_2.png) [@kayccc](https://forums.developer.nvidia.com/u/kayccc)\
**Post date:** [March 9, 2017, 7:57am UTC](https://forums.developer.nvidia.com/t/executing-libargus-oneshot-sample-with-custom-driver/48072/8 "2017-03-09T07:57:15Z")

</div>

Hi alamuru,

Have you managed to run the argus samples on your SD card?  
Any result can be shared?

Thanks
