本文整理汇总了Java中com.google.android.exoplayer2.audio.AudioCapabilities类的典型用法代码示例。如果您正苦于以下问题:Java AudioCapabilities类的具体用法?Java AudioCapabilities怎么用?Java AudioCapabilities使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AudioCapabilities类属于com.google.android.exoplayer2.audio包,在下文中一共展示了AudioCapabilities类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: buildRenderers
import com.google.android.exoplayer2.audio.AudioCapabilities; //导入依赖的package包/类
private void buildRenderers(Context context,
DrmSessionManager<FrameworkMediaCrypto> drmSessionManager, ArrayList<Renderer> renderersList,
long allowedVideoJoiningTimeMs) {
MediaCodecVideoRenderer videoRenderer = new MediaCodecVideoRenderer(context,
MediaCodecSelector.DEFAULT, MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT,
allowedVideoJoiningTimeMs, drmSessionManager, false, mainHandler, componentListener,
MAX_DROPPED_VIDEO_FRAME_COUNT_TO_NOTIFY);
renderersList.add(videoRenderer);
Renderer audioRenderer = new MediaCodecAudioRenderer(MediaCodecSelector.DEFAULT,
drmSessionManager, true, mainHandler, componentListener,
AudioCapabilities.getCapabilities(context), AudioManager.STREAM_MUSIC);
renderersList.add(audioRenderer);
Renderer textRenderer = new TextRenderer(componentListener, mainHandler.getLooper());
renderersList.add(textRenderer);
MetadataRenderer<List<Id3Frame>> id3Renderer = new MetadataRenderer<>(componentListener,
mainHandler.getLooper(), new Id3Decoder());
renderersList.add(id3Renderer);
}
开发者ID:zhanglibin123488,项目名称:videoPickPlayer,代码行数:22,代码来源:SimpleExoPlayer.java
示例2: buildAudioRenderers
import com.google.android.exoplayer2.audio.AudioCapabilities; //导入依赖的package包/类
@NonNull
protected List<Renderer> buildAudioRenderers() {
List<Renderer> renderers = new ArrayList<>();
renderers.add(new MediaCodecAudioRenderer(MediaCodecSelector.DEFAULT, drmSessionManager, true, handler, audioRendererEventListener, AudioCapabilities.getCapabilities(context)));
// Adds any registered classes
List<String> classNames = ExoMedia.Data.registeredRendererClasses.get(ExoMedia.RendererType.AUDIO);
if (classNames != null) {
for (String className: classNames) {
try {
Class<?> clazz = Class.forName(className);
Constructor<?> constructor = clazz.getConstructor(Handler.class, AudioRendererEventListener.class);
Renderer renderer = (Renderer) constructor.newInstance(handler, audioRendererEventListener);
renderers.add(renderer);
} catch (Exception e) {
// Purposefully left blank
}
}
}
return renderers;
}
开发者ID:brianwernick,项目名称:ExoMedia,代码行数:24,代码来源:RendererProvider.java
示例3: SonicMediaCodecAudioRenderer
import com.google.android.exoplayer2.audio.AudioCapabilities; //导入依赖的package包/类
public SonicMediaCodecAudioRenderer(MediaCodecSelector mediaCodecSelector,
DrmSessionManager<FrameworkMediaCrypto> drmSessionManager,
boolean playClearSamplesWithoutKeys, Handler eventHandler,
AudioRendererEventListener eventListener, AudioCapabilities audioCapabilities,
AudioProcessor... audioProcessors) {
super(mediaCodecSelector, drmSessionManager, playClearSamplesWithoutKeys, eventHandler, eventListener, audioCapabilities, audioProcessors);
//Init
bufferIndex = -1;
speed = 1.0f;
pitch = 1.0f;
rate = 1.0f;
}
开发者ID:jcodeing,项目名称:K-Sonic,代码行数:13,代码来源:SonicMediaCodecAudioRenderer.java
示例4: LibopusAudioRenderer
import com.google.android.exoplayer2.audio.AudioCapabilities; //导入依赖的package包/类
/**
* @param eventHandler A handler to use when delivering events to {@code eventListener}. May be
* null if delivery of events is not required.
* @param eventListener A listener of events. May be null if delivery of events is not required.
* @param audioCapabilities The audio capabilities for playback on this device. May be null if the
* default capabilities (no encoded audio passthrough support) should be assumed.
*/
public LibopusAudioRenderer(Handler eventHandler, AudioRendererEventListener eventListener,
AudioCapabilities audioCapabilities, DrmSessionManager<ExoMediaCrypto> drmSessionManager,
boolean playClearSamplesWithoutKeys) {
super(eventHandler, eventListener, audioCapabilities, drmSessionManager,
playClearSamplesWithoutKeys);
}
开发者ID:TakumaMochizuki,项目名称:Komica,代码行数:14,代码来源:LibopusAudioRenderer.java
示例5: LibflacAudioRenderer
import com.google.android.exoplayer2.audio.AudioCapabilities; //导入依赖的package包/类
/**
* @param eventHandler A handler to use when delivering events to {@code eventListener}. May be
* null if delivery of events is not required.
* @param eventListener A listener of events. May be null if delivery of events is not required.
* @param audioCapabilities The audio capabilities for playback on this device. May be null if the
* default capabilities (no encoded audio passthrough support) should be assumed.
*/
public LibflacAudioRenderer(Handler eventHandler, AudioRendererEventListener eventListener,
AudioCapabilities audioCapabilities) {
super(eventHandler, eventListener, audioCapabilities);
}
开发者ID:TakumaMochizuki,项目名称:Komica,代码行数:12,代码来源:LibflacAudioRenderer.java
示例6: FfmpegAudioRenderer
import com.google.android.exoplayer2.audio.AudioCapabilities; //导入依赖的package包/类
/**
* @param eventHandler A handler to use when delivering events to {@code eventListener}. May be
* null if delivery of events is not required.
* @param eventListener A listener of events. May be null if delivery of events is not required.
* @param audioCapabilities The audio capabilities for playback on this device. May be null if the
* default capabilities (no encoded audio passthrough support) should be assumed.
*/
public FfmpegAudioRenderer(Handler eventHandler, AudioRendererEventListener eventListener,
AudioCapabilities audioCapabilities) {
super(eventHandler, eventListener, audioCapabilities);
}
开发者ID:TakumaMochizuki,项目名称:Komica,代码行数:12,代码来源:FfmpegAudioRenderer.java
注:本文中的com.google.android.exoplayer2.audio.AudioCapabilities类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论