Closed palinek closed 6 years ago
1.) seems fine to me, I picked the master m3u8 and pasted into strm file and it works well. 2.) Not necessary as long you make adaptive optional. But - if someone activates adaptive, you should check (programmatically) if inputstream.adaptive is installed / enabled. 3.) Looks odd, because the playlist in strm file is working. Let me give your addon a try...
you should check (programmatically) if inputstream.adaptive is installed / enabled.
How to do that? :)
I picked the master m3u8 and pasted into strm file and it works well.
...so I tried it as well, with the file contents as:
#KODIPROP:inputstreamaddon=inputstream.adaptive
#KODIPROP:inputstream.adaptive.manifest_type=hls
http://sledovanitv.cz/vlc/api-channel/stv1sk.m3u8?PHPSESSID=qd9oktb3p4nmpp8p4or9pelkk1&quality=40&capabilities=adaptive%2Ch265
and it works also here. So I really don't get why it doesn't work when used in the pvr addon...
You are right, there is currently no "native" possibility to check if inputstream is installed / enabled, we'll have to add some functionality into kodi.
The current .ts reader in inputstream.adaptive is not capable of parsing hevc codec extra data (only h.264 / mpeg4). When playing strm file VideoPlayer is falling back to ffmpeg, this fallback does not work for pvr triggered streams.
For now you should not use inputstream.adaptive for hevc streams in ts container, simply remove the listitem properties and be happy with ffmpeg.
The current .ts reader in inputstream.adaptive is not capable of parsing hevc codec extra data (only h.264 / mpeg4)
Right... if I switch to h.264 (this provider can serve h.264 or h.265 based on client request), channels/streams are played well.
When playing strm file VideoPlayer is falling back to ffmpeg, this fallback does not work for pvr triggered streams.
Why not?
Why not
Under investigation, no clue yet
Just testing the streams with inpusttream.adaptive... and by using it, we're getting new functionality for free -> now seek works perfectly for timeshift -> EPG tags already started, but not finished yet (which wasn't the case by using the standard kodi's playing capability).
There will be more timeshift functionality in the future, I'll need more time to implement the GetStreamTimes API.
you should check (programmatically) if inputstream.adaptive is installed / enabled
Just tested...and if the inputstream.adaptive is disabled, kodi "ignores the adaptive properties" and falls back to ffmpeg.
...I believe, it's OK now for regular use... @peak3d thanks for your time and all advices.
I'll push hevc extradata changes for ts streams later
peak3d/inputstream.adaptive@036f014
Great! I definitely don't understand any line of that code, but now it works as a charm here with h.265.
Just one note: in the "video settings" for the h.265 there is no codec information shown with the inputstream.adaptive. It shows:
@peak3d I'm getting a crash when seeking in HEVC stream (most of the time, but sometimes the seek works as expected). Can you, please, have a look?
Thread 1 (Thread 0x7f28f6ffd700 (LWP 5162)):
#0 0x00007f29464e4a98 in __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:306
#1 0x00007f28dbef4660 in TSDemux::ES_hevc::Parse_HEVC(int, unsigned int, bool&) (this=0x7f28e8067a70, buf_ptr=4, NumBytesInNalUnit=29, complete=@0x7f28f6ffaaab: false) at /home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:183
#2 0x00007f28dbef40fc in TSDemux::ES_hevc::Parse(TSDemux::STREAM_PKT*) (this=0x7f28e8067a70, pkt=0x7f28e82fedf0) at /home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:66
#3 0x00007f28dbee78e6 in TSDemux::ElementaryStream::GetStreamPacket(TSDemux::STREAM_PKT*) (this=0x7f28e8067a70, pkt=0x7f28e82fedf0) at /home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/elementaryStream.cpp:185
#4 0x00007f28dbe38e66 in TSReader::GetPacket() (this=0x7f28e82fedd8) at /home/palco/work/oss/kodi/inputstream.adaptive/src/TSReader.cpp:257
#5 0x00007f28dbe3837e in TSReader::ReadPacket(bool) (this=0x7f28e82fedd8, scanStreamInfo=false) at /home/palco/work/oss/kodi/inputstream.adaptive/src/TSReader.cpp:201
#6 0x00007f28dbdfd2c5 in TSSampleReader::ReadSample() (this=0x7f28e82fedd0) at /home/palco/work/oss/kodi/inputstream.adaptive/src/main.cpp:1600
#7 0x00007f28dbdfd56c in TSSampleReader::TimeSeek(unsigned long, bool) (this=0x7f28e82fedd0, pts=785604037, preceeding=false) at /home/palco/work/oss/kodi/inputstream.adaptive/src/main.cpp:1637
#8 0x00007f28dbdeb6f5 in Session::SeekTime(double, unsigned int, bool) (this=0x7f28e813d2f0, seekTime=785.60403731418774, streamId=0, preceeding=false) at /home/palco/work/oss/kodi/inputstream.adaptive/src/main.cpp:2638
#9 0x00007f28dbdee14d in CInputStreamAdaptive::PosTime(int) (this=0x7f28e81f82a0, ms=785604) at /home/palco/work/oss/kodi/inputstream.adaptive/src/main.cpp:3291
#10 0x00007f28dbdf8bd6 in kodi::addon::CInstanceInputStream::ADDON_PosTime(AddonInstance_InputStream const*, int) (instance=0x7f28e80dc038, ms=785604) at /home/palco/work/oss/kodi/inputstream.adaptive/build/build/depends/include/kodi/addon-instance/Inputstream.h:635
#11 0x000000000190b4c7 in CInputStreamAddon::PosTime(int) (this=0x7f28e80dbc00, ms=785604) at /home/palco/work/oss/kodi/xbmc/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp:279
#12 0x000000000190c32a in CInputStreamAddon::SeekTime(double, bool, double*) (this=0x7f28e80dbc00, time=785604.42578200146, backward=true, startpts=0x7f28f6ffb370) at /home/palco/work/oss/kodi/xbmc/xbmc/cores/VideoPlayer/DVDInputStreams/InputStreamAddon.cpp:442
#13 0x000000000193d798 in CDVDDemuxClient::SeekTime(double, bool, double*) (this=0x7f28e8096650, timems=785604.42578200146, backwards=true, startpts=0x7f28f6ffb370) at /home/palco/work/oss/kodi/xbmc/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp:621
#14 0x00000000019f01f5 in CVideoPlayer::HandleMessages() (this=0x56ed280) at /home/palco/work/oss/kodi/xbmc/xbmc/cores/VideoPlayer/VideoPlayer.cpp:2668
#15 0x00000000019ee024 in CVideoPlayer::Process() (this=0x56ed280) at /home/palco/work/oss/kodi/xbmc/xbmc/cores/VideoPlayer/VideoPlayer.cpp:1400
#16 0x0000000001d613f9 in CThread::Action() (this=0x56ed2d0) at /home/palco/work/oss/kodi/xbmc/xbmc/threads/Thread.cpp:202
#17 0x0000000001d6025b in CThread::staticThread(void*) (data=0x56ed2d0) at /home/palco/work/oss/kodi/xbmc/xbmc/threads/Thread.cpp:116
#18 0x00007f294a02efa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#19 0x00007f294648182f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
2019-03-11 12:34:38.743 T:139815022863168 DEBUG: Keyboard: scancode: 0x87, sym: 0x013f, unicode: 0x0000, modifier: 0x0
2019-03-11 12:34:38.844 T:139815022863168 DEBUG: Previous line repeats 1 times.
2019-03-11 12:34:38.844 T:139815022863168 DEBUG: HandleKey: menu (0xf0d8) pressed, action is OSD
2019-03-11 12:34:38.844 T:139815022863168 DEBUG: ------ Window Init (VideoOSD.xml) ------
2019-03-11 12:34:38.848 T:139815022863168 DEBUG: Window VideoOSD.xml was already loaded
2019-03-11 12:34:38.848 T:139815022863168 DEBUG: Alloc resources: 4.15ms
2019-03-11 12:34:38.849 T:139815022863168 DEBUG: ------ Window Init (DialogSeekBar.xml) ------
2019-03-11 12:34:38.850 T:139815022863168 DEBUG: Window DialogSeekBar.xml was already loaded
2019-03-11 12:34:38.850 T:139815022863168 DEBUG: Alloc resources: 0.40ms
2019-03-11 12:34:38.861 T:139815022863168 DEBUG: ------ Window Init (Custom_1109_TopBarOverlay.xml) ------
2019-03-11 12:34:38.861 T:139815022863168 DEBUG: Window Custom_1109_TopBarOverlay.xml was already loaded
2019-03-11 12:34:38.861 T:139815022863168 DEBUG: Alloc resources: 0.00ms
2019-03-11 12:34:38.901 T:139813454071552 DEBUG: AddOnLog: InputStream Adaptive: Download https://ttc-cdn3-pub.mtv.cdn.moderntv.eu/moderntv/stream/jednotka/41-hls/1552304046-000R-00294745-00294737.ts?_cdn_session=13666049516&_cdn_timestamp=1552736074&_cdn_token=924aba3ac82fe2ed52de7b2a32e00a53db88e7d4 finished, avg speed: 2323023.00byte/s, current speed: 2323023.00byte/s
2019-03-11 12:34:38.902 T:139813919381248 DEBUG: CurlFile::Open(0x7f28e8121f50) https://ttc-cdn3-pub.mtv.cdn.moderntv.eu/moderntv/stream/jednotka/41-hls/storage-media.m3u8?_cdn_session=13666049516&_cdn_timestamp=1552736074&_cdn_token=ac1eae4ea133a8ff32a172b334f2ed43a5936e39&duration=6600&start=1552303200
2019-03-11 12:34:38.933 T:139813919381248 DEBUG: AddOnLog: InputStream Adaptive: Download https://ttc-cdn3-pub.mtv.cdn.moderntv.eu/moderntv/stream/jednotka/41-hls/storage-media.m3u8?_cdn_session=13666049516&_cdn_timestamp=1552736074&_cdn_token=ac1eae4ea133a8ff32a172b334f2ed43a5936e39&duration=6600&start=1552303200 finished
2019-03-11 12:34:38.934 T:139813454071552 DEBUG: CurlFile::ParseAndCorrectUrl() adding custom header option 'connection: keep-alive'
2019-03-11 12:34:38.934 T:139813454071552 DEBUG: CurlFile::Open(0x7f28ac01c330) https://ttc-cdn3-pub.mtv.cdn.moderntv.eu/moderntv/stream/jednotka/41-hls/1552304056-000R-00294746-00294738.ts?_cdn_session=13666049516&_cdn_timestamp=1552736074&_cdn_token=1ff495d01460475b8ba49a8ae35540b1a76cd928
2019-03-11 12:34:39.513 T:139815022863168 DEBUG: Keyboard: scancode: 0x6f, sym: 0x0111, unicode: 0x0000, modifier: 0x0
2019-03-11 12:34:39.513 T:139815022863168 DEBUG: HandleKey: up (0xf080) pressed, action is Up
2019-03-11 12:34:39.663 T:139815022863168 DEBUG: Keyboard: scancode: 0x6f, sym: 0x0111, unicode: 0x0000, modifier: 0x0
2019-03-11 12:34:40.782 T:139815022863168 DEBUG: Keyboard: scancode: 0x71, sym: 0x0114, unicode: 0x0000, modifier: 0x0
2019-03-11 12:34:40.782 T:139815022863168 DEBUG: HandleKey: left (0xf082) pressed, action is Left
2019-03-11 12:34:40.849 T:139815022863168 DEBUG: Keyboard: scancode: 0x71, sym: 0x0114, unicode: 0x0000, modifier: 0x0
2019-03-11 12:34:40.948 T:139815022863168 DEBUG: Previous line repeats 1 times.
2019-03-11 12:34:40.948 T:139815022863168 DEBUG: HandleKey: left (0xf082) pressed, action is Left
2019-03-11 12:34:41.032 T:139815022863168 DEBUG: Keyboard: scancode: 0x71, sym: 0x0114, unicode: 0x0000, modifier: 0x0
2019-03-11 12:34:41.149 T:139815022863168 DEBUG: Previous line repeats 1 times.
2019-03-11 12:34:41.149 T:139815022863168 DEBUG: HandleKey: left (0xf082) pressed, action is Left
2019-03-11 12:34:41.248 T:139813462464256 DEBUG: CPtsTracker: detected pattern of length 1: 40000.00, frameduration: 40000.000000
2019-03-11 12:34:41.316 T:139815022863168 DEBUG: Keyboard: scancode: 0x71, sym: 0x0114, unicode: 0x0000, modifier: 0x0
2019-03-11 12:34:41.900 T:139815022835456 DEBUG: CAnnouncementManager - Announcement: OnSeek from xbmc
2019-03-11 12:34:41.901 T:139815022835456 DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnSeek
2019-03-11 12:34:41.901 T:139813919381248 DEBUG: CVideoPlayer::SetCaching - caching state 2
2019-03-11 12:34:41.901 T:139813919381248 DEBUG: CDVDClock::SetSpeedAdjust - adjusted:0.000000
2019-03-11 12:34:41.901 T:139813919381248 DEBUG: demuxer seek to: 785604.425782
2019-03-11 12:34:41.901 T:139813919381248 INFO: AddOnLog: InputStream Adaptive: PosTime (785604)
2019-03-11 12:34:41.905 T:139813454071552 DEBUG: AddOnLog: InputStream Adaptive: Download https://ttc-cdn3-pub.mtv.cdn.moderntv.eu/moderntv/stream/jednotka/41-hls/1552304056-000R-00294746-00294738.ts?_cdn_session=13666049516&_cdn_timestamp=1552736074&_cdn_token=1ff495d01460475b8ba49a8ae35540b1a76cd928 finished, avg speed: 2312149.00byte/s, current speed: 2312149.00byte/s
2019-03-11 12:34:41.906 T:139813454071552 DEBUG: CurlFile::ParseAndCorrectUrl() adding custom header option 'connection: keep-alive'
2019-03-11 12:34:41.906 T:139813454071552 DEBUG: CurlFile::Open(0x7f28ac01c330) https://ttc-cdn3-pub.mtv.cdn.moderntv.eu/moderntv/stream/jednotka/41-hls/1552303996-000R-00294740-00294732.ts?_cdn_session=13666049516&_cdn_timestamp=1552736074&_cdn_token=ad08d81be598e72942cdec2ee9f79460dd536264
2019-03-11 12:34:41.916 T:139813445678848 DEBUG: CDVDAudio::Pause - pausing audio stream
This is on debian testing, kodi & inputstream.adaptive compiled from source....
Now I've added some dirty debug messages and it really seems there is some problem with the stream_info.extra_data_size
over/under-flow:
$ git diff
diff --git a/lib/mpegts/ES_hevc.cpp b/lib/mpegts/ES_hevc.cpp
index 47224bd..9ad6ec4 100644
--- a/lib/mpegts/ES_hevc.cpp
+++ b/lib/mpegts/ES_hevc.cpp
@@ -23,6 +23,7 @@
#include "ES_hevc.h"
#include "bitstream.h"
#include "debug.h"
+#include <iostream>
#include <cstring> // for memset memcpy
@@ -180,6 +181,7 @@ void ES_hevc::Parse_HEVC(int buf_ptr, unsigned int NumBytesInNalUnit, bool &comp
case NAL_VPS_NUT:
if (m_NeedVPS)
{
+std::cerr << __FILE__ << ':' <<__LINE__ << ' ' << static_cast<void*>(stream_info.extra_data) << ',' << stream_info.extra_data_size << ',' << static_cast<void*>(es_buf) << ',' << buf_ptr << ',' << NumBytesInNalUnit << '\n';
memcpy(stream_info.extra_data + stream_info.extra_data_size, es_buf + (buf_ptr - 4), NumBytesInNalUnit);
stream_info.extra_data_size += NumBytesInNalUnit;
m_NeedVPS = false;
@@ -197,6 +199,7 @@ void ES_hevc::Parse_HEVC(int buf_ptr, unsigned int NumBytesInNalUnit, bool &comp
Parse_SPS(buf, NumBytesInNalUnit, hdr);
if (m_NeedSPS)
{
+std::cerr << __FILE__ << ':' <<__LINE__ << ' ' << static_cast<void*>(stream_info.extra_data) << ',' << stream_info.extra_data_size << ',' << static_cast<void*>(es_buf) << ',' << buf_ptr << ',' << NumBytesInNalUnit << '\n';
memcpy(stream_info.extra_data + stream_info.extra_data_size, es_buf + (buf_ptr - 4), NumBytesInNalUnit);
stream_info.extra_data_size += NumBytesInNalUnit;
m_NeedSPS = false;
@@ -215,6 +218,7 @@ void ES_hevc::Parse_HEVC(int buf_ptr, unsigned int NumBytesInNalUnit, bool &comp
Parse_PPS(buf, NumBytesInNalUnit);
if (m_NeedPPS)
{
+std::cerr << __FILE__ << ':' <<__LINE__ << ' ' << static_cast<void*>(stream_info.extra_data) << ',' << stream_info.extra_data_size << ',' << static_cast<void*>(es_buf) << ',' << buf_ptr << ',' << NumBytesInNalUnit << '\n';
memcpy(stream_info.extra_data + stream_info.extra_data_size, es_buf + (buf_ptr - 4), NumBytesInNalUnit);
stream_info.extra_data_size += NumBytesInNalUnit;
m_NeedPPS = false;
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7fad2405dad9,0,0x7fad4cf5d010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7fad2405dad9,28,0x7fad4cf5d010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7fad2405dad9,78,0x7fad4cf5d010,82,11
sh: nmblookup: command not found
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7fad2405dad9,89,0x7fad4cf5d010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7fad2405dad9,117,0x7fad4cf5d010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7fad2405dad9,167,0x7fad4cf5d010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7fad2405dad9,178,0x7fad4cf5d010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7fad2405dad9,206,0x7fad4cf5d010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7fad2405dad9,256,0x7fad4cf5d010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7fad2405dad9,-1073658868,0x7fad4cf5d010,4,28
/home/palco/opt/kodi/bin/kodi: line 219: 6894 Segmentation fault (core dumped) ${KODI_BINARY} $SAVED_ARGS
@palinek interesting to get huge codec extradata for streams which should not have multiple SPS identifier.
pls increase the value here: https://github.com/peak3d/inputstream.adaptive/blob/master/lib/mpegts/elementaryStream.h#L76 to 4096, keep the log lines and let me know how much extra-data is required for your stream, thx!
It increases with each seek:
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,0,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,28,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,78,0x7f9f00008010,82,11
sh: nmblookup: command not found
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,89,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,117,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,167,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,178,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,206,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,256,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,267,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,295,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,345,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,356,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,384,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,434,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,445,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,473,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,523,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,534,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,562,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,612,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,623,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,651,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,701,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,712,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,740,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,790,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,801,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,829,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,879,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,890,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,918,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,968,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,979,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,1007,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,1057,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,1068,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,1096,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,1146,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,1157,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,1185,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,1235,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,1246,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,1274,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,1324,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,1335,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,1363,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,1413,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,1424,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,1452,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,1502,0x7f9f00008010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7f9efc18ae69,1513,0x7f9f00008010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7f9efc18ae69,1541,0x7f9f00008010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7f9efc18ae69,1591,0x7f9f00008010,82,11
... the size is each time 28, 50 & 11 ... to me it seems there is some "reset" missing, not?
yes, looks like that.
can you set extra_data_size = 0; pls here: https://github.com/peak3d/inputstream.adaptive/blob/master/lib/mpegts/elementaryStream.cpp#L68
can you set extra_data_size = 0; pls here: https://github.com/peak3d/inputstream.adaptive/blob/master/lib/mpegts/elementaryStream.cpp#L68
I've already tested this before (found some Reset()
...), but with this change the stream does not start to play:
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7fe274138089,0,0x7fe280267010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7fe274138089,28,0x7fe280267010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7fe274138089,78,0x7fe280267010,82,11
(next try to start playing)
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7fe2741a6e49,0,0x7fe2804f7010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7fe2741a6e49,28,0x7fe2804f7010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7fe2741a6e49,78,0x7fe2804f7010,82,11
(next try to start playing)
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:184 0x7fe2940cbc69,0,0x7fe2831b4010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:202 0x7fe2940cbc69,28,0x7fe2831b4010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:221 0x7fe2940cbc69,78,0x7fe2831b4010,82,11
pls. provide a full debug log
Got it working... but I'm totally confused, if it's OK -> I moved the m_need*PS
initialization only into constructor:
diff --git a/lib/mpegts/ES_hevc.cpp b/lib/mpegts/ES_hevc.cpp
index 47224bd..86c0380 100644
--- a/lib/mpegts/ES_hevc.cpp
+++ b/lib/mpegts/ES_hevc.cpp
@@ -40,6 +40,9 @@ ES_hevc::ES_hevc(uint16_t pes_pid)
m_PTS = PTS_UNSET;
m_Interlaced = false;
es_alloc_init = 240000;
+ m_NeedVPS = true;
+ m_NeedSPS = true;
+ m_NeedPPS = true;
Reset();
}
@@ -116,9 +119,6 @@ void ES_hevc::Reset()
ElementaryStream::Reset();
m_StartCode = 0xffffffff;
m_LastStartPos = -1;
- m_NeedVPS = true;
- m_NeedSPS = true;
- m_NeedPPS = true;
memset(&m_streamData, 0, sizeof(m_streamData));
}
pls. provide a full debug log
Log with your git master? Or with some changes I've made into the sources?
I pushed a commit that prevents adding extra_data per seek
I pushed a commit that prevents adding extra_data per seek
Great! Just tested with the peak3d/inputstream.adaptive@f63bd0cc389a75e23cd7671682be805d04b06a15... and seeks are not segfaulting any more:
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:187 0x7f0fe40ffbc9,0,0x7f0fec088010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:205 0x7f0fe40ffbc9,28,0x7f0fec088010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:224 0x7f0fe40ffbc9,78,0x7f0fec088010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:187 0x7f0fe40ffbc9,0,0x7f0fec088010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:205 0x7f0fe40ffbc9,28,0x7f0fec088010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:224 0x7f0fe40ffbc9,78,0x7f0fec088010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:187 0x7f0fe40ffbc9,0,0x7f0fec088010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:205 0x7f0fe40ffbc9,28,0x7f0fec088010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:224 0x7f0fe40ffbc9,78,0x7f0fec088010,82,11
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:187 0x7f0fe40ffbc9,0,0x7f0fec088010,4,28
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:205 0x7f0fe40ffbc9,28,0x7f0fec088010,32,50
/home/palco/work/oss/kodi/inputstream.adaptive/lib/mpegts/ES_hevc.cpp:224 0x7f0fe40ffbc9,78,0x7f0fec088010,82,11
...
Thank you.
@peak3d Please, can you have a quick look?
inputstream.adaptive
?inpustream.adaptive
addon in ouraddon.xml
? (if yes, is there a possibility to require only some min. version?)