You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an Android box which allows a HDMI input. I have been given some code that grabs the data stream from the HDMI input and writes an MPEG TS stream to a FileDescriptor. I wondered if I could pass this FileDescriptor into ExoPlayer as a MediaSource for playback? I couldn't see a way to do that in the current API. Old questions reference a FrameworkSampleSource that seems long since removed.
The text was updated successfully, but these errors were encountered:
Since the content is TransportStream, the media source will be an ExtractorMediaSource. Your issue is going to be the DataSource which you pass to the media source.
As far as I know, there is no way to create a DataSource from a FileDescriptor directly. However, you might be able to emulate what the AssetDataSource does, which uses an InputStream to read the assets' data. So, you could create a FileInputStream and use that in a similar way to create a FileDescriptorDataSource (or equivalent). Note: we already count with a FileDataSource, but it uses a RandomAccessFile. I don't know whether synchronization is going to be an issue for you. Or maybe there is a simpler solution, but it is not possible to know with the provided information. Let us know if you manage to give it a try.
I have a similar use case, I have the file contents (only MP3 and MP4) in a non-seekable InputStream extracted on-the-fly from a compressed container. Has anyone managed to create a custom AssetDataSource-like wrapper for the InputStream?
I have an Android box which allows a HDMI input. I have been given some code that grabs the data stream from the HDMI input and writes an MPEG TS stream to a
FileDescriptor
. I wondered if I could pass thisFileDescriptor
into ExoPlayer as aMediaSource
for playback? I couldn't see a way to do that in the current API. Old questions reference aFrameworkSampleSource
that seems long since removed.The text was updated successfully, but these errors were encountered: