Interface ISimpleMediaFile

  • All Known Implementing Classes:
    SimpleMediaFile

    public interface ISimpleMediaFile
    This class contains meta-information about simple media files. A simple media file is defined as a file with at most one video and at most one audio stream, and no other streams. This is useful or objects that want to contain all the interesting data about a media file in one handy dandy object.
    Author:
    aclarke
    • Method Detail

      • setAudioBitRate

        void setAudioBitRate​(int bitRate)
        Set the audio bitrate
        Parameters:
        bitRate - bitrate to use
      • getAudioBitRate

        int getAudioBitRate()
        Get the audio bit rate
        Returns:
        bit rate, in Hz.
      • setAudioChannels

        void setAudioChannels​(int numChannels)
        Set the number of audio channels.
        Parameters:
        numChannels - Number of channels; only 1 or 2 supported
      • getAudioChannels

        int getAudioChannels()
        Get the number of audio channels
        Returns:
        number of audio channels
      • setAudioSampleRate

        void setAudioSampleRate​(int sampleRate)
        Set the audio sample rate
        Parameters:
        sampleRate - Audio sample rate in Hz (e.g. 22050)
      • getAudioSampleRate

        int getAudioSampleRate()
        Get the audio sample rate.
        Returns:
        sample rate, in Hz.
      • setAudioCodec

        void setAudioCodec​(ICodec.ID audioCodec)
        Set the audio codec to use.
        Parameters:
        audioCodec - The audio codec to use; if null, a user may guess the codec from other information.
      • getAudioCodec

        ICodec.ID getAudioCodec()
        Get the audio codec set on this configuration object.
        Returns:
        The audiocodec. if null, a user may guess the codec from other information.
      • setVideoWidth

        void setVideoWidth​(int width)
        Set the width of the video frames in broadcasted packets
        Parameters:
        width - width in pixels
      • getVideoWidth

        int getVideoWidth()
        Get the video width of video frames broadcasted
        Returns:
        width in pixels
      • setVideoHeight

        void setVideoHeight​(int height)
        Set the height of the video frames in broadcasted packets
        Parameters:
        height - height in pixels
      • getVideoHeight

        int getVideoHeight()
        Get the video height of video frames broadcasted
        Returns:
        height in pixels
      • setVideoBitRate

        void setVideoBitRate​(int bitRate)
        Set the timebase that we encode video for.
        Parameters:
        bitRate - The bitrate to use for encoding video
      • getVideoBitRate

        int getVideoBitRate()
        Get the video bit rate
        Returns:
        video bit rate
      • setVideoTimeBase

        void setVideoTimeBase​(IRational timeBase)
        Set the TimeBase that video packets are encoded with.
        Parameters:
        timeBase - The timebase to use with this configuration, or null if unknowbn.
      • getVideoTimeBase

        IRational getVideoTimeBase()
        Get the timebase that packets should be encoded with.
        Returns:
        The timebase or null if unknown.
      • setVideoCodec

        void setVideoCodec​(ICodec.ID videoCodec)
        Set the video codec that packets are encoded with.
        Parameters:
        videoCodec - video codec that packets are encoded with.
      • getVideoCodec

        ICodec.ID getVideoCodec()
        Get the video codec that packets are encoded with.
        Returns:
        the video codec
      • setVideoNumPicturesInGroupOfPictures

        void setVideoNumPicturesInGroupOfPictures​(int gops)
        Set the MPEG2 Num Pictures In Group Of Pictures (GOPS) settings
        Parameters:
        gops - Set the GOPS
      • setVideoFrameRate

        void setVideoFrameRate​(IRational frameRate)
        Set the Video Frame Rate as a rational.
        Parameters:
        frameRate - The frame rate (e.g. 15/1), or null if unknown.
      • setVideoGlobalQuality

        void setVideoGlobalQuality​(int quality)
        Set the default quality quality setting for video. 0 is highest quality. > 0 is decreasing quality.
        Parameters:
        quality - The quality to use.
      • setHasVideo

        void setHasVideo​(boolean hasVideo)
        Set whether you want the output stream to have video
        Parameters:
        hasVideo - Whether you want the output stream to have video
      • hasVideo

        boolean hasVideo()
        Tells whether or not the output stream should have video
        Returns:
        Should the output stream have video?
      • setHasAudio

        void setHasAudio​(boolean hasAudio)
        Set whether you want the output stream to have audio
        Parameters:
        hasAudio - Whether you want the output stream to have audio
      • hasAudio

        boolean hasAudio()
        Tells whether or not the output stream should have audio
        Returns:
        Should the output stream have audio?
      • isAudioBitRateKnown

        boolean isAudioBitRateKnown()
        is the audio bit rate known?
        Returns:
        the audioBitRateKnown
      • setAudioChannelsKnown

        void setAudioChannelsKnown​(boolean audioChannelsKnown)
        set if the audio channels are known
        Parameters:
        audioChannelsKnown - the audioChannelsKnown to set
      • isAudioChannelsKnown

        boolean isAudioChannelsKnown()
        are the # of audio channels known?
        Returns:
        the audioChannelsKnown
      • setAudioSampleRateKnown

        void setAudioSampleRateKnown​(boolean audioSampleRateKnown)
        set if the audio sample rate is known.
        Parameters:
        audioSampleRateKnown - the audioSampleRateKnown to set
      • isAudioSampleRateKnown

        boolean isAudioSampleRateKnown()
        is the audio sample rate known?
        Returns:
        the audioSampleRateKnown
      • setVideoHeightKnown

        void setVideoHeightKnown​(boolean videoHeightKnown)
        set if the video height is known.
        Parameters:
        videoHeightKnown - the videoHeightKnown to set
      • isVideoHeightKnown

        boolean isVideoHeightKnown()
        is the video height known?
        Returns:
        the videoHeightKnown
      • setVideoWidthKnown

        void setVideoWidthKnown​(boolean videoWidthKnown)
        set if the video width is known.
        Parameters:
        videoWidthKnown - the videoWidthKnown to set
      • isVideoWidthKnown

        boolean isVideoWidthKnown()
        is the video width known?
        Returns:
        the videoWidthKnown
      • setVideoBitRateKnown

        void setVideoBitRateKnown​(boolean videoBitRateKnown)
        set if the video bit rate is known.
        Parameters:
        videoBitRateKnown - the videoBitRateKnown to set
      • isVideoBitRateKnown

        boolean isVideoBitRateKnown()
        is the video bit rate known?
        Returns:
        the videoBitRateKnown
      • setVideoNumPicturesInGroupOfPicturesKnown

        void setVideoNumPicturesInGroupOfPicturesKnown​(boolean videoGOPSKnown)
        set if the MPEG number of pictures in a group of pictures is known?
        Parameters:
        videoGOPSKnown - the videoGOPSKnown to set
      • setVideoGlobalQualityKnown

        void setVideoGlobalQualityKnown​(boolean videoGlobalQualityKnown)
        set if the global quality setting is known.
        Parameters:
        videoGlobalQualityKnown - the videoGlobalQualityKnown to set
      • isVideoGlobalQualityKnown

        boolean isVideoGlobalQualityKnown()
        is the global quality setting known?
        Returns:
        the videoGlobalQualityKnown
      • setVideoPixelFormatKnown

        void setVideoPixelFormatKnown​(boolean videoPixelFormatKnown)
        set if the video pixel format is known.
        Parameters:
        videoPixelFormatKnown - the videoPixelFormatKnown to set
      • isVideoPixelFormatKnown

        boolean isVideoPixelFormatKnown()
        is the video pixel format known?
        Returns:
        the videoPixelFormatKnown
      • setAudioTimeBase

        void setAudioTimeBase​(IRational aTimeBase)
        Set the time base to use when encoding or decoding audio
        Parameters:
        aTimeBase - The timebase to use, or null if unknown.
      • getAudioTimeBase

        IRational getAudioTimeBase()
        Get the time base used when encoding or decoding audio.
        Returns:
        the timebase, or null if unknown.
      • setDuration

        void setDuration​(ITimeValue duration)
        Set the duration that we'll assume for the stream we're representing.
        Parameters:
        duration - the duration to assume for this file. null means unknown.
      • getDuration

        ITimeValue getDuration()
        Get the duration that we'll assume for the stream we're representing.
        Returns:
        the duration, or null if unknown.
      • setAudioBitRateKnown

        void setAudioBitRateKnown​(boolean audioBitRateKnown)
        set if the audio bit rate is known.
        Parameters:
        audioBitRateKnown - the audioBitRateKnown to set
      • setURL

        void setURL​(java.lang.String aUrl)
        Set the URL that this stream contains info for.
        Parameters:
        aUrl - The url, including protocol string, or null if unknown.
      • getURL

        java.lang.String getURL()
        Return the URL for this stream.
        Returns:
        The URL, or null if unknown.