To add a SRT resource tag to UPnP item in Platinum, you should do at least the following. I don't claim the list being functional, complete or tested. It's just my best guess at what needs to be changed. If it doesn't immediately work as expected, i may not be able to help you more specifically. It's a navigation hint, not a driving assistance.
- put your SRT file in the same folder as the media file, named the same way in some sensible way which would be easy for you to distinguish afterwards.
- in PltMimeType.cpp add
"srt","text/srt"
toPLT_HttpFileRequestHandler_DefaultFileTypeMap
. Platinum doesn't know SRT out of the box. - PltFileMediaServer.cpp is kinda dumb, it by default shows up all files found in a directory. It's an example, after all. You need to filter out SRTs from the visible listing by implementing
PltFileMediaServer::ProcessFile
filter. - still in PltFileMediaServer.cpp there is a method
PLT_FileMediaServerDelegate::BuildFromFilePath
. Here comesfilepath
which is the path of your media file (and ONLY that). Out of the filepath, you need to look in the folder whether there is a properly named subtitle file (with someNPT_File
methods, look it up). - if there is, you must add extra
PLT_MediaItemResource
to thePLT_MediaObject* object
. There is already oneresource
instance, but that's used exclusively for the media resource itself. Don't reuse it. You need to add another one, and IMO you need to set onlyresource.m_Uri
(with BuildResourceUri) andresource.m_ProtocolInfo
. - for
m_ProtocolInfo
, you need to callPLT_ProtocolInfo::GetProtocolInfo
with parameterfalse
so that theprotocolInfo
of your newly added<res>
is not clobbered with DLNA profile id.