/** * Creates a minimal subtitle format. * @param title The content of the Subtitle * @param language The language of the content, using either ISO 639-1 or 639-2/T * codes. Specify null or "und" if language information is only included * in the content. (This will also work if there are multiple language * tracks in the content.) */ public static final MediaFormat createSubtitleFormat( String title, String language) { MediaFormat format = new MediaFormat(); format.setString(KEY_TITLE, title); format.setString(KEY_LANGUAGE, language); return format; }
SparseArray<MediaFormat> trackInfoArray = new SparseArray<MediaFormat>(); MediaFormat mediaFormat = new MediaFormat(); mediaFormat.setString(MediaFormat.KEY_TITLE, timedTextPath.substring(timedTextPath.lastIndexOf("/"))); mediaFormat.setString(MediaFormat.KEY_PATH, timedTextPath); SparseArray<MediaFormat> timedTextSparse = findTrackFromTrackInfo(TrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT, trackInfo); if (timedTextSparse == null || timedTextSparse.size() == 0)
/** * Creates a minimal audio format. * @param mime The mime type of the content. * @param sampleRate The sampling rate of the content. * @param channelCount The number of audio channels in the content. */ public static final MediaFormat createAudioFormat( String mime, int sampleRate, int channelCount) { MediaFormat format = new MediaFormat(); format.setString(KEY_MIME, mime); format.setInteger(KEY_SAMPLE_RATE, sampleRate); format.setInteger(KEY_CHANNEL_COUNT, channelCount); return format; }
/** * Creates a minimal video format. * @param mime The mime type of the content. * @param width The width of the content (in pixels) * @param height The height of the content (in pixels) */ public static final MediaFormat createVideoFormat( String mime, int width, int height) { MediaFormat format = new MediaFormat(); format.setString(KEY_MIME, mime); format.setInteger(KEY_WIDTH, width); format.setInteger(KEY_HEIGHT, height); return format; }
/** * Creates a minimal subtitle format. * @param title The content of the Subtitle * @param language The language of the content, using either ISO 639-1 or 639-2/T * codes. Specify null or "und" if language information is only included * in the content. (This will also work if there are multiple language * tracks in the content.) */ public static final MediaFormat createSubtitleFormat( String title, String language) { MediaFormat format = new MediaFormat(); format.setString(KEY_TITLE, title); format.setString(KEY_LANGUAGE, language); return format; }
/** * Creates a minimal subtitle format. * @param title The content of the Subtitle * @param language The language of the content, using either ISO 639-1 or 639-2/T * codes. Specify null or "und" if language information is only included * in the content. (This will also work if there are multiple language * tracks in the content.) */ public static final MediaFormat createSubtitleFormat( String title, String language) { MediaFormat format = new MediaFormat(); format.setString(KEY_TITLE, title); format.setString(KEY_LANGUAGE, language); return format; }
/** * Creates a minimal subtitle format. * @param title The content of the Subtitle * @param language The language of the content, using either ISO 639-1 or 639-2/T * codes. Specify null or "und" if language information is only included * in the content. (This will also work if there are multiple language * tracks in the content.) */ public static final MediaFormat createSubtitleFormat( String title, String language) { MediaFormat format = new MediaFormat(); format.setString(KEY_TITLE, title); format.setString(KEY_LANGUAGE, language); return format; }
/** * Creates a minimal subtitle format. * @param title The content of the Subtitle * @param language The language of the content, using either ISO 639-1 or 639-2/T * codes. Specify null or "und" if language information is only included * in the content. (This will also work if there are multiple language * tracks in the content.) */ public static final MediaFormat createSubtitleFormat( String title, String language) { MediaFormat format = new MediaFormat(); format.setString(KEY_TITLE, title); format.setString(KEY_LANGUAGE, language); return format; }
SparseArray<MediaFormat> trackInfoArray = new SparseArray<MediaFormat>(); MediaFormat mediaFormat = new MediaFormat(); mediaFormat.setString(MediaFormat.KEY_TITLE, timedTextPath.substring(timedTextPath.lastIndexOf("/"))); mediaFormat.setString(MediaFormat.KEY_PATH, timedTextPath); SparseArray<MediaFormat> timedTextSparse = findTrackFromTrackInfo(TrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT, trackInfo); if (timedTextSparse == null || timedTextSparse.size() == 0)
SparseArray<MediaFormat> trackInfoArray = new SparseArray<MediaFormat>(); MediaFormat mediaFormat = new MediaFormat(); mediaFormat.setString(MediaFormat.KEY_TITLE, timedTextPath.substring(timedTextPath.lastIndexOf("/"))); mediaFormat.setString(MediaFormat.KEY_PATH, timedTextPath); SparseArray<MediaFormat> timedTextSparse = findTrackFromTrackInfo(TrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT, trackInfo); if (timedTextSparse == null || timedTextSparse.size() == 0)
SparseArray<MediaFormat> trackInfoArray = new SparseArray<MediaFormat>(); MediaFormat mediaFormat = new MediaFormat(); mediaFormat.setString(MediaFormat.KEY_TITLE, timedTextPath.substring(timedTextPath.lastIndexOf("/"))); mediaFormat.setString(MediaFormat.KEY_PATH, timedTextPath); SparseArray<MediaFormat> timedTextSparse = findTrackFromTrackInfo(TrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT, trackInfo); if (timedTextSparse == null || timedTextSparse.size() == 0)
SparseArray<MediaFormat> trackInfoArray = new SparseArray<MediaFormat>(); MediaFormat mediaFormat = new MediaFormat(); mediaFormat.setString(MediaFormat.KEY_TITLE, timedTextPath.substring(timedTextPath.lastIndexOf("/"))); mediaFormat.setString(MediaFormat.KEY_PATH, timedTextPath); SparseArray<MediaFormat> timedTextSparse = findTrackFromTrackInfo(TrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT, trackInfo); if (timedTextSparse == null || timedTextSparse.size() == 0)
/** * Creates a minimal video format. * @param mime The mime type of the content. * @param width The width of the content (in pixels) * @param height The height of the content (in pixels) */ public static final MediaFormat createVideoFormat( String mime, int width, int height) { MediaFormat format = new MediaFormat(); format.setString(KEY_MIME, mime); format.setInteger(KEY_WIDTH, width); format.setInteger(KEY_HEIGHT, height); return format; }
/** * Creates a minimal video format. * @param mime The mime type of the content. * @param width The width of the content (in pixels) * @param height The height of the content (in pixels) */ public static final MediaFormat createVideoFormat( String mime, int width, int height) { MediaFormat format = new MediaFormat(); format.setString(KEY_MIME, mime); format.setInteger(KEY_WIDTH, width); format.setInteger(KEY_HEIGHT, height); return format; }
/** * Creates a minimal audio format. * @param mime The mime type of the content. * @param sampleRate The sampling rate of the content. * @param channelCount The number of audio channels in the content. */ public static final MediaFormat createAudioFormat( String mime, int sampleRate, int channelCount) { MediaFormat format = new MediaFormat(); format.setString(KEY_MIME, mime); format.setInteger(KEY_SAMPLE_RATE, sampleRate); format.setInteger(KEY_CHANNEL_COUNT, channelCount); return format; }
/** * Creates a minimal video format. * @param mime The mime type of the content. * @param width The width of the content (in pixels) * @param height The height of the content (in pixels) */ public static final MediaFormat createVideoFormat( String mime, int width, int height) { MediaFormat format = new MediaFormat(); format.setString(KEY_MIME, mime); format.setInteger(KEY_WIDTH, width); format.setInteger(KEY_HEIGHT, height); return format; }
/** * Creates a minimal audio format. * @param mime The mime type of the content. * @param sampleRate The sampling rate of the content. * @param channelCount The number of audio channels in the content. */ public static final MediaFormat createAudioFormat( String mime, int sampleRate, int channelCount) { MediaFormat format = new MediaFormat(); format.setString(KEY_MIME, mime); format.setInteger(KEY_SAMPLE_RATE, sampleRate); format.setInteger(KEY_CHANNEL_COUNT, channelCount); return format; }
/** * Creates a minimal audio format. * @param mime The mime type of the content. * @param sampleRate The sampling rate of the content. * @param channelCount The number of audio channels in the content. */ public static final MediaFormat createAudioFormat( String mime, int sampleRate, int channelCount) { MediaFormat format = new MediaFormat(); format.setString(KEY_MIME, mime); format.setInteger(KEY_SAMPLE_RATE, sampleRate); format.setInteger(KEY_CHANNEL_COUNT, channelCount); return format; }
/** * Creates a minimal video format. * @param mime The mime type of the content. * @param width The width of the content (in pixels) * @param height The height of the content (in pixels) */ public static final MediaFormat createVideoFormat( String mime, int width, int height) { MediaFormat format = new MediaFormat(); format.setString(KEY_MIME, mime); format.setInteger(KEY_WIDTH, width); format.setInteger(KEY_HEIGHT, height); return format; }
/** * Creates a minimal audio format. * @param mime The mime type of the content. * @param sampleRate The sampling rate of the content. * @param channelCount The number of audio channels in the content. */ public static final MediaFormat createAudioFormat( String mime, int sampleRate, int channelCount) { MediaFormat format = new MediaFormat(); format.setString(KEY_MIME, mime); format.setInteger(KEY_SAMPLE_RATE, sampleRate); format.setInteger(KEY_CHANNEL_COUNT, channelCount); return format; }