Skip to content

Pvrparse #1464

Merged
merged 2 commits into from Oct 1, 2012

5 participants

@elupus
Team Kodi member
elupus commented Sep 22, 2012

This will continuously parse input streams from PVR manager for changes in codec parameters. This
should reduce the burden on addons to provide data we need to init codecs.

This suffers same behaviour as the extradata parsing. On startup we will attempt to open a stream, without full knowledge of it's internals. This mean we will potentially re-open it again after first packet.

@elupus elupus was assigned Sep 22, 2012
@elupus
Team Kodi member
elupus commented Sep 22, 2012

I have one concern about this. I'm not sure how the ffmpeg parsers will behave on bad quality streams. there is a risk it will sucessfullly parse invalid data, leading to codec info changes that should not have occured. But i suspect only way to find out is to test it.

@elupus
Team Kodi member
elupus commented Sep 22, 2012

@opdenkamp @FernetMenta you might be interested in testing this stuff out. You have more experience with pvr stuff than me.

@da-anda
Team Kodi member
@FernetMenta
Team Kodi member

Will test this as soon as I have a chance. From what I can see so far is that either for tvheadend or vdr an immediate re-open will happen. tvheadend reports a height of 1088 on hd channels whereas vnsi reports the cropped height 1080.

@opdenkamp
Team Kodi member
@davilla
davilla commented Sep 23, 2012

Anyway we can get frame_mbs_only_flag from sps ? That way we know that it 'might' be interlaced and can vector to a decoder that can handled h264 interlaced ? Right now for VDA/VTB, we parse extradata and only accept if frame_mbs_only_flag is 1 (signaling progressive), if 0, then it's either interlaced, paff or mbaff and we can only tell progressive vs interlaced frame usage by looking at individual frames.

Currently we try VDA/VTB and bail on such content, it would be nicer to use this info in codec factory to pick a suitable codec and skip the whole try/fail/try/fail path.

@elupus
Team Kodi member
@davilla
davilla commented Sep 23, 2012

Factory codec already qualifies the codec type (mpeg2, h264, etc) and software/hardware flag. I don't see why qualifying the type of h264 is any different. Try/fail/try/fail is very inefficient, it sucks resources loading/unload things and delays the time it takes to spin up video playback.

@FernetMenta FernetMenta commented on an outdated diff Sep 24, 2012
xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPVRClient.cpp
{
- CLog::Log(LOGDEBUG, "%s - extradata found for %d:%d - closing parser", __FUNCTION__, st->iId, st->iPhysicalId);
- pvr->DisposeParser();
- st->changes++;
+#define CHECK_UPDATE(st, trg, src, invalid) do { \
+ if(src != invalid \
+ && src != st->trg) { \
+ st->trg = src; \
@FernetMenta
Team Kodi member
FernetMenta added a note Sep 24, 2012

should be after the log. I was wondering about this message: ParsePacket - {0} profile changed from 100 to 100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@FernetMenta
Team Kodi member

I have tested this for 2 evenings on my living room box (vnsi). Apart from the log mentioned above no negatives. Although PVR streams don't have profile and level set, the increase of the change counter does not harm when done on the first packet.

I like this idea of parsing the streams very much. Maybe in a next step only validated streams can be accepted.

@da-anda
Team Kodi member
da-anda commented Sep 30, 2012

bump - something for Frodo? @cptspiff

@elupus
Team Kodi member
@opdenkamp
Team Kodi member

+1

@elupus elupus merged commit 72e64a3 into xbmc:master Oct 1, 2012
@tru tru added a commit to plexinc/plex-home-theater-public that referenced this pull request Dec 23, 2014
@tru tru Make pre-play loading better in a few places.
1) make sure that we increase the timeout for loading things with
checkFiles=1 to 60 seconds instead of 10.
2) don’t send X-Plex-Container options to the metadata endpoints so we
can cache it properly
3) increase the default read-timeout to 30 instead of 10 seconds.

Related to #1464
cf180c6
@LongChair LongChair added a commit to RasPlex/plex-home-theatre that referenced this pull request Jan 8, 2015
@LongChair LongChair Fix Improve preplay loading to delay the checkFiles=1 call, fixes #1464 76f4bce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.