Giter VIP home page Giter VIP logo

cameragl's Introduction

hello_videocube

Sample for Raspberry Pi that uses egl_render to display camera feed to an opengl texture.

cameragl's People

Contributors

drhastings avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cameragl's Issues

display is black with recent firmware

hello,

first, thanks for your work !
I forked your repo and made some modifications to automatically expose shader parameters in OSC.

But I realize that your application doesn't work anymore after update firmware since this commit : Hexxeh/rpi-firmware@707c700

The camera LED is red, but the display remains black and here is what I got in the console :

./hello_teapot.bin 
255, 255, 255
255, 255, 255
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
^C5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5

And the 5, 10, 5 values doesn't change.

On the other hand, the raspivid and rpi-camera-playback works fine with new firmware.

Also if I decomment the say() function, I don't get any error but on the quit.
Here is the log :

./hello_teapot.bin 
Initializing component OMX.broadcom.camera
255, 255, 255
255, 255, 255
0, 0, 0
Disabling port 70 of component OMX.broadcom.camera
Received event 0x00000000 command complete, hComponent:0x0114ab50, nData1:0x00000002, nData2:0x00000046
Disabling port 71 of component OMX.broadcom.camera
Received event 0x00000000 command complete, hComponent:0x0114ab50, nData1:0x00000002, nData2:0x00000047
Disabling port 72 of component OMX.broadcom.camera
Received event 0x00000000 command complete, hComponent:0x0114ab50, nData1:0x00000002, nData2:0x00000048
0, 0, 0
Disabling port 73 of component OMX.broadcom.camera
Received event 0x00000000 command complete, hComponent:0x0114ab50, nData1:0x00000002, nData2:0x00000049
Initializing component OMX.broadcom.egl_render
Disabling port 220 of component OMX.broadcom.egl_render
0, 0, 0
Received event 0x00000000 command complete, hComponent:0x0114cd50, nData1:0x00000002, nData2:0x000000dc
Disabling port 221 of component OMX.broadcom.egl_render
Received event 0x00000000 command complete, hComponent:0x0114cd50, nData1:0x00000002, nData2:0x000000dd
Initializing component OMX.broadcom.null_sink
0, 0, 0
Disabling port 242 of component OMX.broadcom.null_sink
Received event 0x00000000 command complete, hComponent:0x0114ce20, nData1:0x00000002, nData2:0x000000f2
Disabling port 240 of component OMX.broadcom.null_sink
Received event 0x00000000 command complete, hComponent:0x0114ce20, nData1:0x00000002, nData2:0x000000f0
0, 0, 0
Disabling port 241 of component OMX.broadcom.null_sink
Received event 0x00000000 command complete, hComponent:0x0114ce20, nData1:0x00000002, nData2:0x000000f1
Initializing component OMX.broadcom.clock
0, 0, 0
Disabling port 80 of component OMX.broadcom.clock
Received event 0x00000000 command complete, hComponent:0x0114cf08, nData1:0x00000002, nData2:0x00000050
Disabling port 81 of component OMX.broadcom.clock
Received event 0x00000000 command complete, hComponent:0x0114cf08, nData1:0x00000002, nData2:0x00000051
Disabling port 82 of component OMX.broadcom.clock
0, 0, 0
Received event 0x00000000 command complete, hComponent:0x0114cf08, nData1:0x00000002, nData2:0x00000052
Disabling port 83 of component OMX.broadcom.clock
Received event 0x00000000 command complete, hComponent:0x0114cf08, nData1:0x00000002, nData2:0x00000053
Disabling port 84 of component OMX.broadcom.clock
Received event 0x00000000 command complete, hComponent:0x0114cf08, nData1:0x00000002, nData2:0x00000054
Disabling port 85 of component OMX.broadcom.clock
Received event 0x00000000 command complete, hComponent:0x0114cf08, nData1:0x00000002, nData2:0x00000055
0, 0, 0
Configuring camera...
Port 80 is output, disabled, buffers wants:1 needs:1, size:48, pop:0, aligned:16
Port 80 supports these video formats:
Default port definition for camera input port 73
Port 73 is input, disabled, buffers wants:1 needs:1, size:48, pop:0, aligned:16
Port 73 supports these video formats:
0, 0, 0
Default port definition for camera preview output port 70
Port 70 is output, disabled, buffers wants:1 needs:1, size:7680, pop:0, aligned:16
Video type:
    Width:      320
    Height:     240
    Stride:     320
    SliceHeight:    16
    Bitrate:    0
    Framerate:  0.00
    Error hiding:   no
    Codec:      not used
    Color:      OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers
Port 70 supports these video formats:
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: not used
    OMX_COLOR_FormatYUV420PackedSemiPlanar: Planar YUV, 4:2:0 (NV12), planes fragmented when a frame is split in multiple buffers, U and V planes interleaved with first U value, compression: not used
0, 0, 0
    OMX_COLOR_FormatYUV422PackedPlanar: Planes fragmented when a frame is split in multiple buffers, compression: not used
    OMX_COLOR_FormatYCbYCr, compression: not used
    OMX_COLOR_FormatYCrYCb, compression: not used
    OMX_COLOR_FormatCrYCbY, compression: not used
    OMX_COLOR_FormatCbYCrY, compression: not used
    OMX_COLOR_Format24bitRGB888, compression: not used
Default port definition for camera video output port 71
0, 0, 0
Port 71 is output, disabled, buffers wants:1 needs:1, size:15360, pop:0, aligned:16
Video type:
    Width:      640
    Height:     480
    Stride:     640
    SliceHeight:    16
    Bitrate:    0
    Framerate:  0.00
    Error hiding:   no
    Codec:      not used
    Color:      OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers
Port 71 supports these video formats:
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: not used
    OMX_COLOR_FormatYUV420PackedSemiPlanar: Planar YUV, 4:2:0 (NV12), planes fragmented when a frame is split in multiple buffers, U and V planes interleaved with first U value, compression: not used
    OMX_COLOR_FormatYUV422PackedPlanar: Planes fragmented when a frame is split in multiple buffers, compression: not used
    OMX_COLOR_FormatYCbYCr, compression: not used
    OMX_COLOR_FormatYCrYCb, compression: not used
0, 0, 0
    OMX_COLOR_FormatCrYCbY, compression: not used
    OMX_COLOR_FormatCbYCrY, compression: not used
    OMX_COLOR_Format24bitRGB888, compression: not used
0, 0, 0
Received event 0x7f000001 parameter or configuration changed, hComponent:0x0114ab50, nData1:0xffffffff, nData2:0x7f000031
0, 0, 0
Configuring render...
Default port definition for render input port 90
Port 220 is input, disabled, buffers wants:3 needs:1, size:15360, pop:0, aligned:16
Video type:
    Width:      160
    Height:     64
    Stride:     160
    SliceHeight:    64
    Bitrate:    0
    Framerate:  0.00
    Error hiding:   no
    Codec:      not used
    Color:      OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers
0, 0, 0
Port 220 supports these video formats:
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: not used
    OMX_COLOR_FormatYUV422PackedPlanar: Planes fragmented when a frame is split in multiple buffers, compression: not used
    OMX_COLOR_Format16bitRGB565, compression: not used
    OMX_COLOR_Format32bitABGR8888, compression: not used
Configuring null sink...
Default port definition for null sink input port 240
0, 0, 0
Port 240 is input, disabled, buffers wants:3 needs:1, size:0, pop:0, aligned:16
Video type:
    Width:      0
    Height:     0
    Stride:     0
    SliceHeight:    0
    Bitrate:    0
    Framerate:  0.00
    Error hiding:   no
    Codec:      not used
    Color:      OMX_COLOR_FormatUnused: not used
Port 240 supports these video formats:
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: MPEG2
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: H.263
0, 0, 0
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: MPEG4
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: Windows Media Video
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: RealVideo
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: H.264/AVC
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: Motion JPEG
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: VP6
0, 0, 0
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: VP7
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: VP8
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: Raw YUV video
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: Sorenson
    OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers, compression: OGG Theora
0, 0, 0
Setting up tunnel from camera preview output port 70 to null sink input port 240...
Setting up tunnel from camera preview output port 70 to null sink input port 240...
Setting up tunnel from camera video output port 71 to render input port 220...
Switching state of the camera component to idle...
Received event 0x00000000 command complete, hComponent:0x0114cf08, nData1:0x00000000, nData2:0x00000002
Switching state of the camera component to idle...
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
Received event 0x00000000 command complete, hComponent:0x0114ab50, nData1:0x00000000, nData2:0x00000002
Switching state of the render component to idle...
0, 0, 0
Received event 0x00000000 command complete, hComponent:0x0114cd50, nData1:0x00000000, nData2:0x00000002
Switching state of the null sink component to idle...
Received event 0x00000000 command complete, hComponent:0x0114ce20, nData1:0x00000000, nData2:0x00000002
Enabling ports...
Received event 0x00000000 command complete, hComponent:0x0114cf08, nData1:0x00000003, nData2:0x00000050
Received event 0x00000000 command complete, hComponent:0x0114ab50, nData1:0x00000003, nData2:0x00000049
0, 0, 0
Received event 0x00000000 command complete, hComponent:0x0114ab50, nData1:0x00000003, nData2:0x00000046
Received event 0x00000000 command complete, hComponent:0x0114ab50, nData1:0x00000003, nData2:0x00000047
Received event 0x00000003 port settings changed, hComponent:0x0114cd50, nData1:0x000000dd, nData2:0x00000000
Received event 0x00000000 command complete, hComponent:0x0114cd50, nData1:0x00000003, nData2:0x000000dc
0, 0, 0
Received event 0x00000000 command complete, hComponent:0x0114ce20, nData1:0x00000003, nData2:0x000000f0
0, 0, 0
Received event 0x00000000 command complete, hComponent:0x0114cd50, nData1:0x00000003, nData2:0x000000dd
Switching state of the camera component to executing...
Received event 0x00000000 command complete, hComponent:0x0114cf08, nData1:0x00000000, nData2:0x00000003
Switching state of the camera component to executing...
0, 0, 0
Received event 0x00000000 command complete, hComponent:0x0114ab50, nData1:0x00000000, nData2:0x00000003
0, 0, 0
Switching state of the render component to executing...
Received event 0x00000003 port settings changed, hComponent:0x0114cd50, nData1:0x000000dd, nData2:0x00000000
Received event 0x00000000 command complete, hComponent:0x0114cd50, nData1:0x00000000, nData2:0x00000003
Switching state of the null sink component to executing...
Received event 0x00000000 command complete, hComponent:0x0114ce20, nData1:0x00000000, nData2:0x00000003
Switching on capture on camera video output port 71...
Configured port definition for camera input port 73
0, 0, 0
Port 73 is input, enabled, buffers wants:1 needs:1, size:48, pop:1, aligned:16
Configured port definition for camera preview output port 70
Port 70 is output, enabled, buffers wants:0 needs:0, size:46080, pop:1, aligned:16
Video type:
    Width:      1920
    Height:     1080
    Stride:     1920
    SliceHeight:    16
    Bitrate:    0
    Framerate:  35.00
    Error hiding:   no
    Codec:      not used
    Color:      OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers
Configured port definition for camera video output port 71
Port 71 is output, enabled, buffers wants:0 needs:0, size:3133440, pop:1, aligned:16
Video type:
    Width:      1920
    Height:     1080
    Stride:     1920
    SliceHeight:    1088
    Bitrate:    0
    Framerate:  35.00
    Error hiding:   no
    Codec:      not used
    Color:      OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers
0, 0, 0
Configured port definition for render input port 90
0, 0, 0
Port 220 is input, enabled, buffers wants:0 needs:0, size:3133440, pop:1, aligned:16
Video type:
    Width:      1920
    Height:     1080
    Stride:     1920
    SliceHeight:    1088
    Bitrate:    0
    Framerate:  35.00
    Error hiding:   no
    Codec:      not used
    Color:      OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers
0, 0, 0
Configured port definition for null sink input port 240
Port 240 is input, enabled, buffers wants:0 needs:0, size:46080, pop:1, aligned:16
Video type:
    Width:      1920
    Height:     1080
    Stride:     1920
    SliceHeight:    16
    Bitrate:    0
    Framerate:  35.00
    Error hiding:   no
    Codec:      not used
    Color:      OMX_COLOR_FormatYUV420PackedPlanar: Planar YUV, 4:2:0 (I420), planes fragmented when a frame is split in multiple buffers
Enter capture and playback loop, press Ctrl-C to quit...
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
5, 10, 5
^CCleaning up...
5, 10, 5
5, 10, 5
5, 10, 5
Received event 0x00000000 command complete, hComponent:0x0114ab50, nData1:0x00000001, nData2:0x00000049
5, 10, 5
Received event 0x00000000 command complete, hComponent:0x0114ab50, nData1:0x00000001, nData2:0x00000046
5, 10, 5
Received event 0x00000000 command complete, hComponent:0x0114ab50, nData1:0x00000001, nData2:0x00000047
Received event 0x00000000 command complete, hComponent:0x0114cd50, nData1:0x00000001, nData2:0x000000dc
Received event 0x00000000 command complete, hComponent:0x0114ce20, nData1:0x00000001, nData2:0x000000f0
Received event 0x00000000 command complete, hComponent:0x0114ab50, nData1:0x00000002, nData2:0x00000046
5, 10, 5
Received event 0x00000000 command complete, hComponent:0x0114ab50, nData1:0x00000002, nData2:0x00000047
Received event 0x00000000 command complete, hComponent:0x0114cd50, nData1:0x00000002, nData2:0x000000dc
Received event 0x00000000 command complete, hComponent:0x0114ce20, nData1:0x00000002, nData2:0x000000f0
5, 10, 5
OMX error: Failed to free buffer for camera input port 73: 0x80001005 bad parameter

Any idea ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.