cpu load is 100% over when audio streaming is paused.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

cpu load is 100% over when audio streaming is paused.

iris12
This post was updated on .
I'm developing android live streaming app with raspberry pi.
In normal case everything is working fine.
but when streaming has pause and restart at app side, cpu load was increased and eventually audio sound is craking with dropping sample warning messges.
When the app is stopped and destroyed the problem is gone and cpu load is restored.
I could confirm this situation at top log message on raspberry pi.
How can I resolve or prevent this issue?
Thanks in advence.
Reply | Threaded
Open this post in threaded view
|

Re: cpu load is 100% over when audio streaming is paused.

Yasushi SHOJI-2
Hi,

On Mon, Jul 3, 2017 at 9:16 AM, iris12 <[hidden email]> wrote:
>
> but when streaming has pause and restart cpu load was increased and
> eventually audio sound is craking with dropping sample warning messges.

It's hard to tell for anyone without any code.  Do you have smallest possible code to
reproduce?

Or, you can run your code under your debugger and break it when you see
the load spike. your debugger should tell you where it was.

my 2 cents,
-- 
             yashi


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: cpu load is 100% over when audio streaming is paused.

iris12
Here is my pause code.

static void gst_native_pause (JNIEnv* env, jobject thiz) {
    CustomData *data = GET_CUSTOM_DATA (env, thiz, custom_data_field_id_a);
    if (!data) return;
    GST_DEBUG ("Setting state to PAUSED Audio");
    data->target_state = GST_STATE_PAUSED;
    data->is_live = (gst_element_set_state (data->pipeline, GST_STATE_PAUSED) == GST_STATE_CHANGE_NO_PREROLL);
}

and pipeline for audio below.

gst-launch-1.0 -v alsasrc device=plughw:1,0 ! audio/x-raw,rate=16000,depth=16,width=16, channels=1 ! queue ! tcpserversink host=$ipadd port=$port_a

Is there any problem?