Video stuttering while playing with PCM External I/O plugin

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Video stuttering while playing with PCM External I/O plugin

Rajesh
logs.7z
HI,
We are working on an infotainment program where we are using gstreamer 1.0
to playback video from USB.We are observing video stuttering during playback.
In our implementaion we are having External I/O plugin to get the audio from the pipe and then write it into the hardware port(ESAI).When we create a pipe with External I/O plugin we see
stuttering in the video, but if we use the default sink video plays smoothly.We are not very clear on what is that we are missing in our External I/O plugin implementation.

We have tried few things with interesting observations before putting forward to you for help.

1. We tried playing with playbin and that worked fine for default sink not with External I/O plugin.
2. With some modification to our pipeline we are able to play video without issues with default sink and not with External I/O plugin.
3. We tried running the gst pipe as realtime priority 1, video plays fine with External I/O plugin, which is not the case with default,it runs ok with normal priority.

Our system configuration:
Operating system : Linux 4.1.15
Gstreamer : 1.6.3

Pipeline :

gst-launch-1.0 filesrc location=/tmp/usb/Pachhai_Thee_hd.mp4 ! 'video/quicktime' ! aiurdemux name=demux demux. ! queue max-size-bytes=2097152 max-size-buffers=0 max-size-time=0 ! h264parse ! imxvpudec ! streamsynchronizer name=synch synch. ! queue max-size-buffers=3 max-size-time=0 max-size-bytes=0 ! videoconvert qos=true ! videoscale qos=true ! imxeglvivsink ivi-surfaceid= 110 force-aspect-ratio=0 window-width=800 window-height=480 max-lateness=40000000 qos=true sync=true demux. ! queue max-size-bytes=2097152 max-size-buffers=0 max-size-time=0 ! beepdec tolerance=40000000 ! synch. synch. ! queue ! audioconvert ! audioresample ! 'audio/x-raw,rate=48000,channels=2'! alsasink device=route_media_sink qos=true sync=true &


asoundconf :

ESAI TX:

pcm_slave.esaitx {
        pcm esai_hw
        format S16_LE
        rate 48000
        channels 16
# period_time 13500  
        period_size 480
# buffer_time 109000
        buffer_size 1# ESAI RX SLAVE
pcm_slave.esairx {
        pcm esai_hw
        format S16_LE
        rate 48000
        channels 24
        period_time 5804  # period_size 256
        buffer_time 92879 # buffer_size 4096
}
9200
}

External I/O plugin:

 # "Virtual" virtualalsa sound device named "route_media_sink"
pcm.media_sink {
    type virtualalsa        # Use  pcm plugin for ALSA
    shm_name "/tmp/vats_media0_source"
    period_bytes 2048
    buffer_bytes 8192 #32768
        channels 2
}

pcm.route_media_sink {
    type plug           # use ALSA software conversions ("plug" PCM plugin)
    slave.pcm media_sink
    slave.rate 48000
}

Log:

Attched logs for your reference.