This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/DRA746: Waylandsink: Video Playback qurey

Part Number: DRA746

Tool/software: Linux

Hello Team, 

We use custom h/w and software based on DRA746 and SDK 3.03.

We are trying to play High resolution(2560x1442) videos. 

We have two different files with same codec properties one is playing properly with both pipeline and media player, but one is only playable with pipeline and failing with media player and causing weston crash.

Also getting these kind of logs:

log info verbose 1 T2511 GSTLogs FIXME playbin gstplaybin2.c(3182):_uridecodebin_event_probe:<uridecodebin0:src_0> Consider implementing group-id handling on stream-start event
log info verbose 1 T2511 GSTLogs FIXME playbin gstplaybin2.c(3182):_uridecodebin_event_probe:<uridecodebin0:src_0> Consider implementing group-id handling on stream-start event
log info verbose 1 T2510 GSTLogs WARN default mp4_interface.c(1150):gst_update_creation_data:<ittmp4parser0> Can't handle datetimes before 1970 yet
log info verbose 1 T2511 GSTLogs WARN ducati gstducatividdec.c(1472):gst_ducati_viddec_chain:<decoder> push from codec_process failed flushing
log info verbose 1 T2511 GSTLogs WARN ducati gstducatih264dec.c(402):gst_ducati_h264dec_set_sink_caps:<decoder> num-reorder-frames not found on caps, calculation from stream parameters gives 5
log info verbose 1 T2511 GSTLogs WARN ducati gstducatih264dec.c(402):gst_ducati_h264dec_set_sink_caps:<decoder> num-reorder-frames not found on caps, calculation from stream parameters gives 5
log info verbose 1 T2511 GSTLogs WARN ducati gstducatih264dec.c(410):gst_ducati_h264dec_set_sink_caps:<decoder> Using 0 frames for reordering
log info verbose 1 T2511 GSTLogs WARN ducati gstducatividdec.c(590):codec_process:<decoder> changing max-ref-frames in caps to 13
log info verbose 1 T2511 GSTLogs WARN waylandsink wlvideoformat.c(102):gst_wl_shm_format_to_video_format: gst video format not found
log info verbose 1 T2511 GSTLogs WARN waylandsink wlvideoformat.c(102):gst_wl_shm_format_to_video_format: gst video format not found
log info verbose 1 T2511 GSTLogs WARN ducati gstducatividdec.c(753):codec_process:<decoder> push failed flushing
log info verbose 1 T2530 GSTLogs WARN ducati gstducatividdec.c(590):codec_process:<decoder> changing max-ref-frames in caps to 16
log info verbose 1 T1951 GSTLogs FIXME bin gstbin.c(4075):gst_bin_query: implement duration caching in GstBin again
log info verbose 1 T2511 GSTLogs WARN ducati gstducatih264dec.c(402):gst_ducati_h264dec_set_sink_caps:<decoder> num-reorder-frames not found on caps, calculation from stream parameters gives 5
log info verbose 1 T2526 GSTLogs FIXME bin gstbin.c(4075):gst_bin_query: implement duration caching in GstBin again
log info verbose 1 T2526 GSTLogs FIXME bin gstbin.c(4075):gst_bin_query: implement duration caching in GstBin again
log info verbose 1 T2526 GSTLogs FIXME bin gstbin.c(4075):gst_bin_query: implement duration caching in GstBin again
log info verbose 1 T2511 GSTLogs WARN ducati gstducatividdec.c(753):codec_process:<decoder> push failed flushing
log info verbose 1 T2511 GSTLogs WARN ducati gstducatividdec.c(1472):gst_ducati_viddec_chain:<decoder> push from codec_process failed flushing
log info verbose 1 T2321 GSTLogs WARN ducati gstducatividdec.c(570):codec_process:<decoder> err=-1, extendedError=00040000
log info verbose 1 T2321 GSTLogs ERROR ducati gstducati.c(61):gst_ducati_log_extended_error_info: Bit 18 (00040000): stream end
log info verbose 1 T2321 GSTLogs WARN basesrc gstbasesrc.c(3481):gst_base_src_start_complete:<source> pad not activated yet
log info verbose 1 T2321 GSTLogs WARN basesrc gstbasesrc.c(3481):gst_base_src_start_complete:<source> pad not activated yet

Could you please suggest what is went wrong here?

Thanks & Regards,

Ikshwaku

  • Hi Ikshwaku,
    I have already provided a solution for this here.
    e2e.ti.com/.../668140

    Haven't you taken this fix?

    Ram
  • Now U realized you have taken the fix in gstducati to support high resolution streams.
    A specific steam has issue. Please share the stream
  • Hello Ram,

    We have included this fix to our build. Initially we have raised this issue for an video file, that file was not playable. After including for fix we are able to play that and another file with gstreamer pipeline. But weston is crashing when we are trying to playing with media player.

    Regards,
    Ikshwaku
  • Hello Ram,

    You can download video file from this link: transfer.harman.com/.../2Q4SzThb0NPljmj4JV3uml

    Regards,
    Ikshwaku
  • Hi Ikshwaku,
    I am not seeing any issue with media stream playback of the new High resolution stream. It is playing fine with the patch I mentioned.

    You need to add the patch on gstvpe also since playbin always chooses vpe.

    --- a/src/gstvpebins.c
    +++ b/src/gstvpebins.c
    @@ -40,12 +40,12 @@ static GstStaticPadTemplate ducatih264dec_sink_factory = GST_STATIC_PAD_TEMPLATE
    GST_STATIC_CAPS ("video/x-h264, "
    "stream-format = byte-stream, " /* only byte-stream */
    "alignment = au, " /* only entire frames */
    - "width = (int)[ 16, 2048 ], "
    + "width = (int)[ 16, 2560 ], "
    "height = (int)[ 16, 2048 ]; "
    "video/x-h264, "
    "stream-format = byte-stream, " /* only byte-stream */
    "alignment = au, " /* only entire frames */
    - "width = (int)[ 16, 2048 ], "
    + "width = (int)[ 16, 2560 ], "
    "height = (int)[ 16, 2048 ], "
    "profile = (string) {high, high-10-intra, high-10, high-4:2:2-intra, "
    "high-4:2:2, high-4:4:4-intra, high-4:4:4, cavlc-4:4:4-intra}, "

    Without this patch also, playbin works fine for me. Can you apply this patch on gstvpe and give a try
  • Hello Ram,

    With playbin we are able to play this video, but when tried with Media Player then weston is crashing and video is not playable and getting the logs I sahed in the first post.
    But other high resolution video is playable with both gstreamer pipeline and Media Player

    So, any input why it is failing with Media Player.

    Regards,
    Ikshwaku
  • Ikshwaku,
    Can you check dmesg logs and see any logs "omapdrm omapdrm.0: could not remap: -12 " or
    any error from libdce MMRpc ?

    I suspect TILER memory of 128 MB is exhausted to playback this . Please confirm if you are observing these errors.

    From your media player logg, it looks like playbin chooses Ittiam's demuxer, but pipeline which demuxer you are trying?
    What if you use same demuxer is explicit pipeline instead of qtdemux?
  • Ram
    got these logs in demsg

    [ 613.317416] omapdrm omapdrm.0: could not remap: -12 (3)
    [ 613.317439] PVR_K:(Error): DmaBufImportAndAcquirePhysAddr: dma_buf_map_attachment failed: -487782080
    [ 613.317455] PVR_K:(Error): PVRSRVMapDmaBufKM: Failed to get dma-buf phys addr
    [ 613.317470] PVR_K:(Error): PVRSRVMapDmaBufBW: Failed to map dma-buf handle

    With Media player we are not using explicit pipeline, using normal playbin pipeline with waylandsink as video-sink.
  • Ok, 128MB of TILER is exhausted and this is the reason for error and playback fails this particular stream.
    Can you check
    cat /sys/kernel/debug/dri/0/tiler_map before starting playback. This shows how much TILER memory is already occupied. Ideally this should be around 8 MB if your LCD size is 1920x1080

    PSDKLA3.03 has a fix to allocate SGX buffers in non-TILER memory

    Ram
  • cat /sys/kernel/debug/dri/0/tiler_map is printing CONTAINER 0 and CONTAINER 1, I am not able understand the output.

    Regards,
    ikshwaku
  • Hi Ikshwaku,

    I downloaded your tiler_map logs. Container 0 shows the TILER2D memory occupied at any time and CONTAINER 1 is TILER1D memory pinning information. TILER2D is not used by any of the applications.

    The pattern shows how much memory is occupied or left. In before_playback.txt, around 99MB is left before starting the playback. It also shows the buffer allocations of 1440k, 1500k and 1024k . Do you have any idea what else is running on weston before starting the applications?

    After_playback.txt shows many 6048k buffers. These are the buffers allocated for ducati decoder's output. The padded width and height of 2560x1440 is 2688x1536 and 2688x1536x1.5=6048kb.  The tiler_map says around 35MB is left when playback is in progress.

    For the issue stream you will observe entire 128MB is exhausted and results in the error.

    But on EVM, media player playback shows around 20MB still left.

    dra7xx-evm login: root
    Last login: Fri Dec  8 20:15:34 UTC 2017 on ttyS0
    root@dra7xx-evm:~# cat /sys/kernel/debug/dri/0/tiler_map
    CONTAINER 0 DUMP BEGIN
    000:fffffffffffff(64*1)fffffffffffffeeeeeeeeeeeee(64*1)eeeeeeeeeeeeeddddd(32*1)dddddccccc(32*1)cccccbbbbb(32*1)bbbbbaaaaa(32*1)aaaaa
    001:
    002:
    003:
    004:
    005:
    006:
    007:
    008:
    009:
    010:
    011:
    012:
    013:
    014:
    015:
    016:
    017:
    018:
    019:
    020:
    021:
    022:
    023:
    024:
    025:
    026:
    027:
    028:
    029:
    030:
    031:
    032:
    033:
    034:
    035:
    036:
    037:
    038:
    039:
    040:
    041:
    042:
    043:
    044:
    045:
    046:
    047:
    048:
    049:
    050:
    051:
    052:
    053:
    054:
    055:
    056:
    057:
    058:
    059:
    060:
    061:
    062:
    063:
    064:
    065:
    066:
    067:
    068:
    069:
    070:
    071:
    072:
    073:
    074:
    075:
    076:
    077:
    078:
    079:
    080:
    081:
    082:
    083:
    084:
    085:
    086:
    087:
    088:
    089:
    090:
    091:
    092:
    093:
    094:
    095:
    096:
    097:
    098:
    099:
    100:
    101:
    102:
    103:
    104:
    105:
    106:
    107:
    108:
    109:
    110:
    111:
    112:
    113:
    114:
    115:
    116:
    117:
    118:
    119:
    120:
    121:
    122:
    123:
    124:
    125:
    126:
    127:
    CONTAINER 0 DUMP END
    CONTAINER 1 DUMP BEGIN
    000:
    001:
    002:
    003:
    004:
    005:
    006:
    007:
    008:
    009:
    010:
    011:
    012:
    013:
    014:
    015:
    016:
    017:
    018:
    019:
    020:
    021:
    022:
    023:
    024:
    025:
    026:
    027:
    028:
    029:
    030:
    031:
    032:
    033:
    034:
    035:
    036:
    037:
    038:
    039:
    040:
    041:
    042:
    043:
    044:
    045:
    046:
    047:
    048:
    049:
    050:
    051:
    052:
    053:
    054:
    055:
    056:
    057:
    058:
    059:
    060:
    061:
    062:
    063:
    064:
    065:
    066:
    067:
    068:
    069:
    070:
    071:
    072:
    073:
    074:
    075:
    076:
    077:
    078:
    079:
    080:
    081:
    082:
    083:
    084:
    085:
    086:
    087:
    088:
    089:
    090:
    091:
    092:
    093:
    094:
    095:
    096:
    097:
    098:
    099:
    100:
    101:
    102:
    103:
    104:
    105:
    106:
    107:
    108:
    109:
    110:
    111:
    112:
    113:
    114:
    115:
    116:
    117:
    118:                                                                                <===============================================
    119:================================================================================================================================
    120:================================================================================================================================
    121:================================================================================================================================
    122:=============================================================9600K==============================================================
    123:================================================================================================================================
    124:================================================================================================================================
    125:================================================================================================================================
    126:================================================================================================================================
    127:===============================================================================================================================>
    CONTAINER 1 DUMP END
    root@dra7xx-evm:~#
    

    root@dra7xx-evm:~# cat /sys/kernel/debug/dri/0/tiler_map
    CONTAINER 0 DUMP BEGIN
    000:fffffffffffff(64*1)fffffffffffffeeeeeeeeeeeee(64*1)eeeeeeeeeeeeeddddd(32*1)dddddccccc(32*1)cccccbbbbb(32*1)bbbbbaaaaa(32*1)aaaaa
    001:
    002:
    003:
    004:
    005:
    006:
    007:
    008:
    009:
    010:
    011:
    012:
    013:
    014:
    015:
    016:
    017:
    018:
    019:
    020:
    021:
    022:
    023:
    024:
    025:
    026:
    027:
    028:
    029:
    030:
    031:
    032:
    033:
    034:
    035:
    036:
    037:
    038:
    039:
    040:
    041:
    042:
    043:
    044:
    045:
    046:
    047:
    048:
    049:
    050:
    051:
    052:
    053:
    054:
    055:
    056:
    057:
    058:
    059:
    060:
    061:
    062:
    063:
    064:
    065:
    066:
    067:
    068:
    069:
    070:
    071:
    072:
    073:
    074:
    075:
    076:
    077:
    078:
    079:
    080:
    081:
    082:
    083:
    084:
    085:
    086:
    087:
    088:
    089:
    090:
    091:
    092:
    093:
    094:
    095:
    096:
    097:
    098:
    099:
    100:
    101:
    102:
    103:
    104:
    105:
    106:
    107:
    108:
    109:
    110:
    111:
    112:
    113:
    114:
    115:
    116:
    117:
    118:
    119:
    120:
    121:
    122:
    123:
    124:
    125:
    126:
    127:
    CONTAINER 0 DUMP END
    CONTAINER 1 DUMP BEGIN
    000:
    001:
    002:
    003:
    004:
    005:
    006:
    007:
    008:
    009:
    010:
    011:
    012:
    013:
    014:
    015:
    016:
    017:
    018:                        <=======================================================================================================
    019:================================================================================================================================
    020:================================================================================================================================
    021:=============================================================6048K==============================================================
    022:================================================================================================================================
    023:================================================================================================================================
    024:============X===================================================================================================================
    025:================================================================================================================================
    026:================================================================================================================================
    027:=============================================================6048K==============================================================
    028:================================================================================================================================
    029:================================================================================================================================
    030:X===============================================================================================================================
    031:================================================================================================================================
    032:=============================================================6048K==============================================================
    033:================================================================================================================================
    034:================================================================================================================================
    035:====================================================================================================================X===========
    036:================================================================================================================================
    037:================================================================================================================================
    038:=============================================================6048K==============================================================
    039:================================================================================================================================
    040:================================================================================================================================
    041:========================================================================================================X=======================
    042:================================================================================================================================
    043:================================================================================================================================
    044:=============================================================6048K==============================================================
    045:================================================================================================================================
    046:================================================================================================================================
    047:============================================================================================X===================================
    048:================================================================================================================================
    049:================================================================================================================================
    050:=============================================================6048K==============================================================
    051:================================================================================================================================
    052:================================================================================================================================
    053:================================================================================>
    054:
    055:
    056:  <=============================================================================================================================
    057:================================================================================================================================
    058:=============================================================6048K==============================================================
    059:================================================================================================================================
    060:================================================================================================================================
    061:======================================================================================================================X=========
    062:================================================================================================================================
    063:================================================================================================================================
    064:=============================================================6048K==============================================================
    065:================================================================================================================================
    066:================================================================================================================================
    067:==========================================================================================================X=====================
    068:================================================================================================================================
    069:================================================================================================================================
    070:=============================================================6048K==============================================================
    071:================================================================================================================================
    072:================================================================================================================================
    073:==============================================================================================X=================================
    074:================================================================================================================================
    075:================================================================================================================================
    076:=============================================================6048K==============================================================
    077:================================================================================================================================
    078:================================================================================================================================
    079:==================================================================================X=============================================
    080:================================================================================================================================
    081:================================================================================================================================
    082:=============================================================6048K==============================================================
    083:================================================================================================================================
    084:================================================================================================================================
    085:======================================================================X=========================================================
    086:================================================================================================================================
    087:================================================================================================================================
    088:=============================================================6048K==============================================================
    089:================================================================================================================================
    090:================================================================================================================================
    091:==========================================================X=====================================================================
    092:=============================================================3600K==============================================================
    093:================================================================================================================================
    094:============================================================================================================================X===
    095:================================================================================================================================
    096:================================================================================================================================
    097:=============================================================6048K==============================================================
    098:================================================================================================================================
    099:================================================================================================================================
    100:================================================================================================================X===============
    101:================================================================================================================================
    102:================================================================================================================================
    103:=============================================================6048K==============================================================
    104:================================================================================================================================
    105:================================================================================================================================
    106:====================================================================================================X===========================
    107:================================================================================================================================
    108:================================================================================================================================
    109:=============================================================6048K==============================================================
    110:================================================================================================================================
    111:================================================================================================================================
    112:========================================================================================X=======================================
    113:================================================================================================================================
    114:================================================================================================================================
    115:=============================================================6048K==============================================================
    116:================================================================================================================================
    117:================================================================================================================================
    118:============================================================================XXXX<===============================================
    119:================================================================================================================================
    120:================================================================================================================================
    121:================================================================================================================================
    122:=============================================================9600K==============================================================
    123:================================================================================================================================
    124:================================================================================================================================
    125:================================================================================================================================
    126:================================================================================================================================
    127:===============================================================================================================================>
    CONTAINER 1 DUMP END
    

    Ram