/*****************************************************************************
* MediaPlayer.java
*****************************************************************************
* Copyright © 2015 VLC authors and VideoLAN
*
* Authors Jean-Baptiste Kempf <jb@videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
package org.videolan.libvlc;
import android.annotation.TargetApi;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.media.AudioDeviceCallback;
import android.media.AudioDeviceInfo;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.util.SparseArray;
import org.videolan.libvlc.util.AndroidUtil;
import org.videolan.libvlc.util.VLCUtil;
import java.io.File;
@SuppressWarnings("unused, JniMissingFunction")
public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
public static class Event extends VLCEvent {
public static final int MediaChanged = 0x100;
//public static final int NothingSpecial = 0x101;
public static final int Opening = 0x102;
public static final int Buffering = 0x103;
public static final int Playing = 0x104;
public static final int Paused = 0x105;
public static final int Stopped = 0x106;
//public static final int Forward = 0x107;
//public static final int Backward = 0x108;
public static final int EndReached = 0x109;
public static final int EncounteredError = 0x10a;
public static final int TimeChanged = 0x10b;
public static final int PositionChanged = 0x10c;
public static final int SeekableChanged = 0x10d;
public static final int PausableChanged = 0x10e;
//public static final int TitleChanged = 0x10f;
//public static final int SnapshotTaken = 0x110;
//public static final int LengthChanged = 0x111;
public static final int Vout = 0x112;
//public static final int ScrambledChanged = 0x113;
public static final int ESAdded = 0x114;
public static final int ESDeleted = 0x115;
public static final int ESSelected = 0x116;
protected Event(int type) {
super(type);
}
protected Event(int type, long arg1) {
super(type, arg1);
}
protected Event(int type, long arg1, long arg2) {
super(type, arg1, arg2);
}
protected Event(int type, float argf) {
super(type, argf);
}
public long getTimeChanged() {
return arg1;
}
public float getPositionChanged() {
return argf1;
}
public int getVoutCount() {
return (int) arg1;
}
public int getEsChangedType() {
return (int) arg1;
}
public int getEsChangedID() {
return (int) arg2;
}
public boolean getPausable() {
return arg1 != 0;
}
public boolean getSeekable() {
return arg1 != 0;
}
public float getBuffering() {
return argf1;
}
}
public interface EventListener extends VLCEvent.Listener<MediaPlayer.Event> {}
public static class Position {
public static final int Disable = -1;
public static final int Center = 0;
public static final int Left = 1;
public static final int Right = 2;
public static final int Top = 3;
public static final int TopLeft = 4;
public static final int TopRight = 5;
public static final int Bottom = 6;
public static final int BottomLeft = 7;
public static final int BottomRight = 8;
}
public static class Navigate {
public static final int Activate = 0;
public static final int Up = 1;
public static final int Down = 2;
public static final int Left = 3;
public static final int Right = 4;
}
public static class Title {
private static class Flags {
public static final int MENU = 0x01;
public static final int INTERACTIVE = 0x02;
};
/**
* duration in milliseconds
*/
public final long duration;
/**
* title name
*/
public final String name;
/**
* true if the title is a menu
*/
private final int flags;
public Title(long duration, String name, int flags) {
this.duration = duration;
this.name = name;
this.flags = flags;
}
public boolean isMenu() {
return (this.flags & Flags.MENU) != 0;
}
public boolean isInteractive() {
return (this.flags & Flags.INTERACTIVE) != 0;
}
@Override
public String toString() {
return "Title{" +
"duration=" + duration +
", name='" + name + '\'' +
", flags=" + flags +
'}';
}
}
@SuppressWarnings("unused") /* Used from JNI */
private static Title createTitleFromNative(long duration, String name, int flags) {
return new Title(duration, name, flags);
}
public static class Chapter {
/**
* time-offset of the chapter in milliseconds
*/
public final long timeOffset;
/**
* duration of the chapter in milliseconds
*/
public final long duration;
/**
* chapter name
*/
public final String name;
private Chapter(long timeOffset, long duration, String name) {
this.timeOffset = timeOffset;
this.duration = duration;
this.name = name;
}
}
@SuppressWarnings("unused") /* Used from JNI */
private static Chapter createChapterFromNative(long timeOffset, long duration, String name) {
return new Chapter(timeOffset, duration, name);
}
public static class TrackDescription {
public final int id;
public final String name;
private TrackDescription(int id, String name) {
this.id = id;
this.name = name;
}
@Override
public String toString() {
return "TrackDescription{" +
"id=" + id +
", name='" + name + '\'' +
'}';
}
}
@SuppressWarnings("unused") /* Used from JNI */
private static TrackDescription createTrackDescriptionFromNative(int id, String name) {
return new TrackDescription(id, name);
}
public static class Equalizer {
@SuppressWarnings("unused") /* Used from JNI */
private long mInstance;
private Equalizer() {
nativeNew();
}
private Equalizer
没有合适的资源?快使用搜索试试~ 我知道了~
Rtmp 远程拉流/ Android、things(估计也适用)
共170个文件
xml:69个
java:49个
so:23个
5星 · 超过95%的资源 需积分: 9 49 下载量 161 浏览量
2018-09-01
11:26:35
上传
评论 1
收藏 39.9MB ZIP 举报
温馨提示
使用步骤: 在自己项目到入 lib依赖,在函数中初始化之后调用,可以实时查看视频流,延迟很小, 点击按钮 拍照片,拉去当前帧的转bitmap,显示在 UI 。
资源推荐
资源详情
资源评论
收起资源包目录
Rtmp 远程拉流/ Android、things(估计也适用) (170个子文件)
gradlew.bat 2KB
.gitignore 147B
.gitignore 80B
.gitignore 8B
build.gradle 1KB
build.gradle 1KB
build.gradle 573B
settings.gradle 32B
gradlew 5KB
app.iml 12KB
libvlc2.5.17.iml 10KB
Rtmpvideo.iml 863B
MediaPlayer.java 37KB
Media.java 31KB
AWindow.java 29KB
Medialibrary.java 23KB
VlcPlayer.java 23KB
MediaWrapper.java 22KB
VLCUtil.java 21KB
Dialog.java 14KB
MediaPlayer.java 12KB
MediaBrowser.java 11KB
VLCOptions.java 10KB
VlcVideoView.java 9KB
HWDecoderUtil.java 8KB
IVLCVout.java 7KB
LibVLC.java 7KB
MediaList.java 7KB
VLCObject.java 6KB
VideoView.java 6KB
MediaDiscoverer.java 5KB
Strings.java 5KB
Tools.java 5KB
Dumper.java 4KB
AndroidUtil.java 4KB
Playlist.java 3KB
VLCInstance.java 3KB
Extensions.java 3KB
Album.java 3KB
MainActivity.java 3KB
MediaLibraryItem.java 3KB
Artist.java 3KB
SearchAggregate.java 2KB
Preferences.java 2KB
VLCEvent.java 2KB
HistoryItem.java 2KB
MediaSearchAggregate.java 2KB
Genre.java 2KB
Storage.java 1KB
DummyItem.java 1KB
ExampleInstrumentedTest.java 752B
ThumbnailUtils.java 671B
MediaPlayerControl.java 587B
MediaListenerEvent.java 567B
EntryPointsEventsCb.java 434B
ExampleUnitTest.java 398B
DevicesDiscoveryCb.java 370B
LogUtils.java 367B
VideoSizeChange.java 229B
MediaUpdatedCb.java 188B
MediaAddedCb.java 184B
ic_launcher_round.png 15KB
ic_launcher_round.png 10KB
ic_launcher.png 9KB
pushpin_blue.png 8KB
ic_launcher_round.png 7KB
ic_launcher.png 6KB
ic_launcher_round.png 5KB
ic_launcher.png 4KB
ic_launcher.png 3KB
ic_launcher_round.png 3KB
ic_launcher.png 2KB
proguard-rules.pro 772B
gradle.properties 739B
project.properties 669B
local.properties 433B
local.properties 373B
build_file_checksums.ser 606B
libvlcjni.so 34.89MB
libvlcjni.so 33.13MB
libvlcjni.so 22.96MB
libiomx.14.so 33KB
libiomx.13.so 33KB
libiomx.10.so 33KB
libiomx.13.so 29KB
libiomx.14.so 29KB
libiomx.10.so 29KB
libanw.13.so 17KB
libanw.18.so 17KB
libanw.14.so 17KB
libanw.21.so 17KB
libanw.10.so 17KB
libjniloader.so 13KB
libanw.21.so 10KB
libanw.18.so 9KB
libanw.10.so 9KB
libanw.14.so 9KB
libanw.13.so 9KB
libanw.21.so 9KB
libjniloader.so 6KB
共 170 条
- 1
- 2
资源评论
- sqlhl2019-03-19可以使用 可惜rtsp流不可以推送
xiaoniu_my
- 粉丝: 4
- 资源: 19
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功