Java Code Examples for com.google.android.exoplayer2.C#MSG_SET_SURFACE
The following examples show how to use
com.google.android.exoplayer2.C#MSG_SET_SURFACE .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MediaCodecVideoRenderer.java From MediaSDK with Apache License 2.0 | 6 votes |
@Override public void handleMessage(int messageType, @Nullable Object message) throws ExoPlaybackException { if (messageType == C.MSG_SET_SURFACE) { setSurface((Surface) message); } else if (messageType == C.MSG_SET_SCALING_MODE) { scalingMode = (Integer) message; MediaCodec codec = getCodec(); if (codec != null) { codec.setVideoScalingMode(scalingMode); } } else if (messageType == C.MSG_SET_VIDEO_FRAME_METADATA_LISTENER) { frameMetadataListener = (VideoFrameMetadataListener) message; } else { super.handleMessage(messageType, message); } }
Example 2
Source File: MediaCodecVideoRenderer.java From Telegram-FOSS with GNU General Public License v2.0 | 6 votes |
@Override public void handleMessage(int messageType, @Nullable Object message) throws ExoPlaybackException { if (messageType == C.MSG_SET_SURFACE) { setSurface((Surface) message); } else if (messageType == C.MSG_SET_SCALING_MODE) { scalingMode = (Integer) message; MediaCodec codec = getCodec(); if (codec != null) { codec.setVideoScalingMode(scalingMode); } } else if (messageType == C.MSG_SET_VIDEO_FRAME_METADATA_LISTENER) { frameMetadataListener = (VideoFrameMetadataListener) message; } else { super.handleMessage(messageType, message); } }
Example 3
Source File: MediaCodecVideoRenderer.java From Telegram with GNU General Public License v2.0 | 6 votes |
@Override public void handleMessage(int messageType, @Nullable Object message) throws ExoPlaybackException { if (messageType == C.MSG_SET_SURFACE) { setSurface((Surface) message); } else if (messageType == C.MSG_SET_SCALING_MODE) { scalingMode = (Integer) message; MediaCodec codec = getCodec(); if (codec != null) { codec.setVideoScalingMode(scalingMode); } } else if (messageType == C.MSG_SET_VIDEO_FRAME_METADATA_LISTENER) { frameMetadataListener = (VideoFrameMetadataListener) message; } else { super.handleMessage(messageType, message); } }
Example 4
Source File: MediaCodecVideoRenderer.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public void handleMessage(int messageType, Object message) throws ExoPlaybackException { if (messageType == C.MSG_SET_SURFACE) { setSurface((Surface) message); } else if (messageType == C.MSG_SET_SCALING_MODE) { scalingMode = (Integer) message; MediaCodec codec = getCodec(); if (codec != null) { codec.setVideoScalingMode(scalingMode); } } else { super.handleMessage(messageType, message); } }
Example 5
Source File: MediaCodecVideoRenderer.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public void handleMessage(int messageType, Object message) throws ExoPlaybackException { if (messageType == C.MSG_SET_SURFACE) { setSurface((Surface) message); } else if (messageType == C.MSG_SET_SCALING_MODE) { scalingMode = (Integer) message; MediaCodec codec = getCodec(); if (codec != null) { codec.setVideoScalingMode(scalingMode); } } else { super.handleMessage(messageType, message); } }
Example 6
Source File: SoftVideoRenderer.java From DanDanPlayForAndroid with MIT License | 5 votes |
@Override public void handleMessage(int messageType, Object message) throws ExoPlaybackException { if (messageType == C.MSG_SET_SURFACE) { setOutput((Surface) message); } else if (messageType == Constant.MSG_SURFACE_SIZE_CHANGED) { Point size = (Point) message; onSurfaceSizeChanged(size.x, size.y); } else if (messageType == Constant.MSG_PLAY_RELEASED) { onPlayReleased(); } else { super.handleMessage(messageType, message); } }
Example 7
Source File: MediaCodecVideoRenderer.java From K-Sonic with MIT License | 5 votes |
@Override public void handleMessage(int messageType, Object message) throws ExoPlaybackException { if (messageType == C.MSG_SET_SURFACE) { setSurface((Surface) message); } else if (messageType == C.MSG_SET_SCALING_MODE) { scalingMode = (Integer) message; MediaCodec codec = getCodec(); if (codec != null) { setVideoScalingMode(codec, scalingMode); } } else { super.handleMessage(messageType, message); } }