Posts: 10
Joined: Sep 2013
Reputation:
0
2013-09-05, 20:50
(This post was last modified: 2013-09-05, 20:50 by OverSun.)
Long story short, recently I've created a DVDVideoCodec class to work with Samsung MFCv5 decoder and everything work fine except thumbnail generation.
As I see from the log, XBMC tries to process only one frame through video class, but this is not the case for MFC, since it requires several frames to be buffered before even first frame will be ready on the sink.
So my question is - is there any way to tell XBMC not to use some particular DVDVideoClass for thumbnail generation at all, some flag, mark it somehow or anything. Or, if it is not possible, how the thumbnail generation request could be recognized inside the DVDVideoClass to kick the thumb around MFC, probably through some other picture converter?
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
afaik none of the 'weird' platforms do this so i doubt the abstractions needed are in place.
Posts: 10
Joined: Sep 2013
Reputation:
0
I'm terribly sorry, but looks like I didn't get you.
What do you mean by 'weird' platforms and what abstractions did you mention?
Do you mean that thumb generation is straightforward and always just kicks the first available video decoder class?
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
by weird i meant platforms who do not have a software decoder available, phone lazyness..
afaik there is no way to have another implementation of the thumb extracting stuff currently, you' dhave to add the abstraction layer. code currently assumes/relies on the use of a software codec for this task. you can see we force off other hw decoders such as vdpau, dxva etc.
Posts: 10
Joined: Sep 2013
Reputation:
0
2013-09-06, 10:45
(This post was last modified: 2013-09-06, 10:47 by OverSun.)
The platform actually has ffmpeg software decoder as fail-through if hw decoder init was unsuccessful (which happens quite often) and this process works very well. It even can actually generate thumbs after unsuccessful tries on hw decoder. After dosen attempts.
What my concern is that every time you open a dir with files, XBMC tries to generate missing thumbs using hw decoder first, doing a lot of full hw initialization, the whole ::Open procedure for the codec, then fails on one frame and close it. It is a lot of hardware calls on a simple directory open. Sometimes after that, when you start playing video hw decoder fails, after all these unsuccessful one-frame tries to it.
What I want to implement is to exclude hw codec tries on thumb generation and tell XBMC use only ffmpeg fail-through for this.
You mention "force off other hw decoders such as", this sounds like my need, how do you do this?
Posts: 12,706
Joined: Nov 2003
Reputation:
129
spiff
Team-Kodi Member
Posts: 12,706
see DVDFileInfo.cpp ~l160. the hints.
Posts: 10
Joined: Sep 2013
Reputation:
0
if (hints.software)
return false;
at the Class ::Open worked like a charm, thanks.
PS. And the platform is not weird, it's Exynos4, the samsung chips which are everywhere now.
Posts: 11,582
Joined: Feb 2008
Reputation:
84
davilla
Retired-Team-XBMC Developer
Posts: 11,582
That!s the correct way to skip thumb :-)