Class WrappingMediaSource

    • Constructor Detail

      • WrappingMediaSource

        protected WrappingMediaSource​(MediaSource mediaSource)
        Deprecated.
        Creates the wrapping MediaSource.
        Parameters:
        mediaSource - The wrapped child MediaSource.
    • Method Detail

      • getInitialTimeline

        @Nullable
        public Timeline getInitialTimeline()
        Deprecated.
        Description copied from interface: MediaSource
        Returns the initial placeholder timeline that is returned immediately when the real timeline is not yet known, or null to let the player create an initial timeline.

        Should not be called directly from application code.

        The initial timeline must use the same uids for windows and periods that the real timeline will use. It also must provide windows which are marked as dynamic to indicate that the window is expected to change when the real timeline arrives.

        Any media source which has multiple windows should typically provide such an initial timeline to make sure the player reports the correct number of windows immediately.

        This method must be called on the application thread.

      • isSingleWindow

        public boolean isSingleWindow()
        Deprecated.
        Description copied from interface: MediaSource
        Returns true if the media source is guaranteed to never have zero or more than one window.

        Should not be called directly from application code.

        The default implementation returns true.

        This method must be called on the application thread.

        Returns:
        true if the source has exactly one window.
      • getMediaItem

        public MediaItem getMediaItem()
        Deprecated.
        Returns the MediaItem for this media source.

        This method can be overridden to amend the MediaItem of the child source. It is only used before the child source is prepared.

        See Also:
        MediaSource.getMediaItem()
      • onChildSourceInfoRefreshed

        protected final void onChildSourceInfoRefreshed​(Void childSourceId,
                                                        MediaSource mediaSource,
                                                        Timeline newTimeline)
        Deprecated.
        Description copied from class: CompositeMediaSource
        Called when the source info of a child source has been refreshed.
        Specified by:
        onChildSourceInfoRefreshed in class CompositeMediaSource<Void>
        Parameters:
        childSourceId - The unique id used to prepare the child source.
        mediaSource - The child source whose source info has been refreshed.
        newTimeline - The timeline of the child source.
      • getWindowIndexForChildWindowIndex

        protected final int getWindowIndexForChildWindowIndex​(Void childSourceId,
                                                              int windowIndex)
        Deprecated.
        Description copied from class: CompositeMediaSource
        Returns the window index in the composite source corresponding to the specified window index in a child source. The default implementation does not change the window index.
        Overrides:
        getWindowIndexForChildWindowIndex in class CompositeMediaSource<Void>
        Parameters:
        childSourceId - The unique id used to prepare the child source.
        windowIndex - A window index of the child source.
        Returns:
        The corresponding window index in the composite source.
      • getWindowIndexForChildWindowIndex

        protected int getWindowIndexForChildWindowIndex​(int windowIndex)
        Deprecated.
        Returns the window index in the wrapping source corresponding to the specified window index in a child source. The default implementation does not change the window index.
        Parameters:
        windowIndex - A window index of the child source.
        Returns:
        The corresponding window index in the wrapping source.
      • getMediaTimeForChildMediaTime

        protected final long getMediaTimeForChildMediaTime​(Void childSourceId,
                                                           long mediaTimeMs)
        Deprecated.
        Description copied from class: CompositeMediaSource
        Returns the media time in the MediaPeriod of the composite source corresponding to the specified media time in the MediaPeriod of the child source. The default implementation does not change the media time.
        Overrides:
        getMediaTimeForChildMediaTime in class CompositeMediaSource<Void>
        Parameters:
        childSourceId - The unique id used to prepare the child source.
        mediaTimeMs - A media time in the MediaPeriod of the child source, in milliseconds.
        Returns:
        The corresponding media time in the MediaPeriod of the composite source, in milliseconds.
      • getMediaTimeForChildMediaTime

        protected long getMediaTimeForChildMediaTime​(long mediaTimeMs)
        Deprecated.
        Returns the media time in the MediaPeriod of the wrapping source corresponding to the specified media time in the MediaPeriod of the child source. The default implementation does not change the media time.
        Parameters:
        mediaTimeMs - A media time in the MediaPeriod of the child source, in milliseconds.
        Returns:
        The corresponding media time in the MediaPeriod of the wrapping source, in milliseconds.
      • enableChildSource

        protected final void enableChildSource()
        Deprecated.
        Enables the child source.
      • disableChildSource

        protected final void disableChildSource()
        Deprecated.
        Disables the child source.
      • releaseChildSource

        protected final void releaseChildSource()
        Deprecated.
        Releases the child source.