# By using go coder SDK not able to live stream GLSurfaceview for camera live stream

**URL:** <https://community.wowza.com/t/by-using-go-coder-sdk-not-able-to-live-stream-glsurfaceview-for-camera-live-stream/52232>\
**Category:** Wowza GoCoder SDK\
**Created:** [October 29, 2018, 4:21pm UTC](https://community.wowza.com/t/by-using-go-coder-sdk-not-able-to-live-stream-glsurfaceview-for-camera-live-stream/52232 "2018-10-29T16:21:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![parth\_shah](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@parth\_shah](https://community.wowza.com/u/parth_shah)\
**Post date:** [October 29, 2018, 4:21pm UTC](https://community.wowza.com/t/by-using-go-coder-sdk-not-able-to-live-stream-glsurfaceview-for-camera-live-stream/52232/1 "2018-10-29T16:21:35Z")

</div>

Hello, I have followed your GoCoder SDK Samples in which I have found Live Streaming with GLSurfaceView.

Now, I want to render Camera preview with GLSurfaceview and live to stream that camera preview. I am not able to live stream camera preview. Can you please help me on that how to stream my camera view.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [October 30, 2018, 8:42pm UTC](https://community.wowza.com/t/by-using-go-coder-sdk-not-able-to-live-stream-glsurfaceview-for-camera-live-stream/52232/2 "2018-10-30T20:42:03Z")

</div>

Hello @parth shah, we do have this GitHub example on how to do this. Please let me know if this helps you or if you need more guidance. Thanks!

[https://github.com/WowzaMediaSystems/gocoder-sdk-samples-android/search?q=GLSurfaceView&unscoped\_q=GLSurfaceView](https://github.com/WowzaMediaSystems/gocoder-sdk-samples-android/search?q=GLSurfaceView&unscoped_q=GLSurfaceView)

[https://github.com/WowzaMediaSystems/gocoder-sdk-samples-android/blob/b6d6bed7afad05331791a89cab8767680cb98030/gocoder-sdk-sample-app/src/main/java/com/wowza/gocoder/sdk/sampleapp/graphics/OpenGLActivity.java](https://github.com/WowzaMediaSystems/gocoder-sdk-samples-android/blob/b6d6bed7afad05331791a89cab8767680cb98030/gocoder-sdk-sample-app/src/main/java/com/wowza/gocoder/sdk/sampleapp/graphics/OpenGLActivity.java)

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [October 30, 2018, 8:43pm UTC](https://community.wowza.com/t/by-using-go-coder-sdk-not-able-to-live-stream-glsurfaceview-for-camera-live-stream/52232/3 "2018-10-30T20:43:14Z")

</div>

This shows you how to initialize the surface view:

```auto
 // Initialize the OpenGL ES surface view
        mGLSurfaceView = (GLSurfaceView)findViewById(R.id.gl_surface_view);
        mGLSurfaceView.setEGLContextClientVersion(2);

        mOpenGLRenderer = new OpenGLRenderer();
        mGLSurfaceView.setRenderer(mOpenGLRenderer);

```

---

<div class="post-metadata">

**Author:** ![parth\_shah](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@parth\_shah](https://community.wowza.com/u/parth_shah)\
**Post date:** [November 1, 2018, 3:41pm UTC](https://community.wowza.com/t/by-using-go-coder-sdk-not-able-to-live-stream-glsurfaceview-for-camera-live-stream/52232/4 "2018-11-01T15:41:08Z")

</div>

hi, @Rose Power Thank you for your response. Yes, I am using this sample. It has one class called OpenGLRenderer but here I want to stream my camera preview by using GLSurfaceview. Here in the example, they have draw cubes and lights on the surface. But I need to show my camera preview. so can you help me with that? i want to stream my camera preview on GlSurfaceview, and after that, I will put objects using ARcore on that and draw some stuff on the surface and I want to stream all this.

---

<div class="post-metadata">

**Author:** ![parth\_shah](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@parth\_shah](https://community.wowza.com/u/parth_shah)\
**Post date:** [November 1, 2018, 6:50am UTC](https://community.wowza.com/t/by-using-go-coder-sdk-not-able-to-live-stream-glsurfaceview-for-camera-live-stream/52232/5 "2018-11-01T06:50:30Z")

</div>

mGLSurfaceView.setRenderer(this);

// onSurfacecreated I am using below code

if (mGLBroadcaster == null) {

mGLBroadcaster=new WOWZGLBroadcaster(EGL14.eglGetCurrentContext());

mGLBroadcaster.setVideoFrameRenderer(this);

configmSurfaceSize = new WOWZSize(width,height);

mGLBroadcaster.getVideoSourceConfig().setVideoFrameSize(mSurfaceSize);

} else {

mSurfaceSize.set(width, height);

if (!isStreaming()) streamingmGLBroadcaster.getVideoSourceConfig().setVideoFrameSize(mSurfaceSize)}

---

<div class="post-metadata">

**Author:** ![parth\_shah](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@parth\_shah](https://community.wowza.com/u/parth_shah)\
**Post date:** [November 1, 2018, 6:51am UTC](https://community.wowza.com/t/by-using-go-coder-sdk-not-able-to-live-stream-glsurfaceview-for-camera-live-stream/52232/6 "2018-11-01T06:51:29Z")

</div>

// onDrawFrame I am using below code @Rose Power

```auto
session.setCameraTextureName(backgroundRenderer.getTextureId());
Frame frame = session.update();Camera camera = frame.getCamera();

TrackingState cameraTrackingState = camera.getTrackingState();

backgroundRenderer.draw(frame);

camera.getProjectionMatrix(projectionMatrix, 0, 0.1f, 100.0f);

camera.getViewMatrix(viewMatrix, 0);

PointCloud pointCloud = frame.acquirePointCloud();

pointCloudRenderer.update(pointCloud);

pointCloudRenderer.draw(viewMatrix, projectionMatrix);

planeRenderer.drawPlanes(session.getAllTrackables(Plane.class), camera.getDisplayOrientedPose(), projectionMatrix);<br>

```

---

<div class="post-metadata">

**Author:** ![parth\_shah](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@parth\_shah](https://community.wowza.com/u/parth_shah)\
**Post date:** [November 1, 2018, 3:40pm UTC](https://community.wowza.com/t/by-using-go-coder-sdk-not-able-to-live-stream-glsurfaceview-for-camera-live-stream/52232/7 "2018-11-01T15:40:42Z")

</div>

@Rose Power looks into the code, I am trying to render camera preview and draw on the frame. but it’s not able to live stream my camera preview.

when I am hitting RTSP URL on VLC media player it shows a black screen and not streaming my camera frame.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [November 1, 2018, 3:37pm UTC](https://community.wowza.com/t/by-using-go-coder-sdk-not-able-to-live-stream-glsurfaceview-for-camera-live-stream/52232/8 "2018-11-01T15:37:59Z")

</div>

Did this work for you?

---

<div class="post-metadata">

**Author:** ![parth\_shah](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@parth\_shah](https://community.wowza.com/u/parth_shah)\
**Post date:** [November 5, 2018, 5:03am UTC](https://community.wowza.com/t/by-using-go-coder-sdk-not-able-to-live-stream-glsurfaceview-for-camera-live-stream/52232/9 "2018-11-05T05:03:39Z")

</div>

Hi, @Rose Power no I am not able to stream my camera preview with GLSufaceview by using this code. That’s why i need your help on this. can you provide any sample code where i can stream my camera preview with GLSurfaceview using go coder for stream.

---

<div class="post-metadata">

**Author:** ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)\
**Post date:** [November 5, 2018, 6:39pm UTC](https://community.wowza.com/t/by-using-go-coder-sdk-not-able-to-live-stream-glsurfaceview-for-camera-live-stream/52232/10 "2018-11-05T18:39:53Z")

</div>

Hello @parth shah, I checked with my team and we only have the GitHub sample I shared. But, what you can do is submit a support ticket and we can assign you to an engineer that may be able to troubleshoot the code with you. We can’t do that through the forum, but again through a ticket they can run some tests with you and provide suggestions.

You can do that here:

> **[Open a Support Ticket | Wowza Media Systems](https://www.wowza.com/support/open-ticket)**
>
> Wowza technical support engineers worldwide help you succeed with your Wowza Streaming Engine™ software or the Wowza Streaming Cloud™ service.
