Closed mihailescu2m closed 6 years ago
Makes sense, I'll see what I can do to fill the BG black and possibly list the channel name in the middle or something.
Ideally this would pull and render the MGEG stream that's used for low-bandwidth graphics like radio channels and off-air messages. Unfortunately that's not supported by TvHeadend yet (waiting for this, which is due in 4.6).
In the mean time, showing the channel logo if it's available would be nice, and we could probably pull some information about the current program from the EPG if it's available.
Did some digging into this, looks like we would need to send the background through ExoPlayer as a stream, which means we'd need a custom StreamReader
implementation to send the image in a format that ExoPlayer supports. This would probably also need some fudging with HtspExtractor to get the reader's consume()
function called, as it wouldn't happen by default without HTS sending any packets for it. From there, we might also need something in Player.onTracksChanged()
to use the extra track if there's no default video track available.
I wonder if we can use a MergingMediaSource
to merge the HtspChannelDataSource
with a SingleSampleMediaSource
containing the background image?
I'm not sure we know to do this "early" enough though. So, I'm really only posting it here in case it triggers an idea rather than suggesting it as a solution :)
That might work, but wouldn't the URL for the ExoPlayer can deal with anything that Android can, which includes PNGs.SingleSampleMediaSource
still need to be in a format that ExoPlayer can handle?
I think the merge would need to be handled in Player.buildHtspMediaSource()
?
Radio transmitted over DVB play correctly (you can hear the sound) but the image, after initially being black when the stream connection is set up, changes to the last frame of a previous TV channel. It would be useful that either the background remains black, or a predefined image is shown while radio is playing.