Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PhilLab/Android-MediaCodec-Examples
/ functions
Functions
160 in github.com/PhilLab/Android-MediaCodec-Examples
⨍
Functions
160
◇
Types & classes
21
↓ 20 callers
Method
release
Discards all resources held by this class, notably the EGL context. Also releases the Surface that was passed to our constructor.
CameraToMpegTest.java:572
↓ 13 callers
Method
checkGlError
(String op)
CameraToMpegTest.java:938
↓ 13 callers
Method
checkGlError
(String op)
ExtractMpegFramesTest.java:807
↓ 13 callers
Method
checkGlError
(String op)
ExtractMpegFramesTest_egl14.java:798
↓ 10 callers
Method
setParameters
Sets the desired frame size and bit rate.
EncodeDecodeTest.java:184
↓ 6 callers
Method
checkEglError
Checks for EGL errors. Throws an exception if one is found.
CameraToMpegTest.java:618
↓ 6 callers
Method
checkEglError
Checks for EGL errors. Throws an exception if one is found.
EncodeAndMuxTest.java:460
↓ 6 callers
Method
isColorClose
Returns true if the actual color value is close to the expected color value. Updates mLargestColorDelta.
EncodeDecodeTest.java:1007
↓ 5 callers
Method
awaitNewImage
Latches the next buffer into the texture. Must be called from the thread that created the OutputSurface object.
CameraToMpegTest.java:692
↓ 5 callers
Method
computePresentationTime
Generates the presentation time for frame N, in microseconds.
EncodeDecodeTest.java:1018
↓ 5 callers
Method
drawImage
Draws the data from SurfaceTexture onto the current EGL surface.
CameraToMpegTest.java:721
↓ 5 callers
Method
getSurface
Returns the Surface.
ExtractMpegFramesTest.java:479
↓ 5 callers
Method
makeCurrent
Makes our EGL context and surface current.
CameraToMpegTest.java:593
↓ 4 callers
Method
checkLocation
(int location, String label)
CameraToMpegTest.java:946
↓ 4 callers
Method
checkLocation
(int location, String label)
ExtractMpegFramesTest.java:815
↓ 4 callers
Method
checkLocation
(int location, String label)
ExtractMpegFramesTest_egl14.java:806
↓ 4 callers
Method
encodeDecodeVideoFromBuffer
Tests encoding and subsequently decoding video from frames generated into a buffer. <p> We encode several frames of a video test pattern using MediaCo
EncodeDecodeTest.java:200
↓ 4 callers
Method
setPresentationTime
Sends the presentation time stamp to EGL. Time is expressed in nanoseconds.
CameraToMpegTest.java:610
↓ 4 callers
Method
swapBuffers
Calls eglSwapBuffers. Use this to "publish" the current frame.
CameraToMpegTest.java:601
↓ 3 callers
Method
changeFragmentShader
Replaces the fragment shader. Pass in null to reset to default.
CameraToMpegTest.java:881
↓ 3 callers
Method
getNumChunks
Returns the number of chunks currently held.
DecodeEditEncodeTest.java:767
↓ 3 callers
Method
isColorClose
Returns true if the actual color value is close to the expected color value. Updates mLargestColorDelta.
DecodeEditEncodeTest.java:717
↓ 3 callers
Method
release
Discards all resources held by this class, notably the EGL context. Also releases the Surface that was passed to our constructor.
EncodeAndMuxTest.java:413
↓ 3 callers
Method
release
Discard all resources held by this class, notably the EGL context.
ExtractMpegFramesTest.java:443
↓ 3 callers
Method
release
Discard all resources held by this class, notably the EGL context.
ExtractMpegFramesTest_egl14.java:436
↓ 3 callers
Method
runTest
Entry point.
DecodeEditEncodeTest.java:111
↓ 3 callers
Method
runTest
Entry point.
EncodeDecodeTest.java:127
↓ 3 callers
Method
runTest
Entry point.
EncodeDecodeTest.java:171
↓ 3 callers
Method
setParameters
Sets the desired frame size and bit rate.
DecodeEditEncodeTest.java:124
↓ 2 callers
Method
addChunk
Adds a new chunk. Advances buf.position to buf.limit.
DecodeEditEncodeTest.java:757
↓ 2 callers
Method
checkEglError
Checks for EGL errors.
ExtractMpegFramesTest.java:595
↓ 2 callers
Method
checkEglError
Checks for EGL errors.
ExtractMpegFramesTest_egl14.java:586
↓ 2 callers
Method
checkSurfaceFrame
Checks the frame for correctness. Similar to {@link #checkFrame}, but uses GL to read pixels from the current surface. @return true if the frame loo
EncodeDecodeTest.java:962
↓ 2 callers
Method
computePresentationTime
Generates the presentation time for frame N, in microseconds.
DecodeEditEncodeTest.java:728
↓ 2 callers
Method
createProgram
(String vertexSource, String fragmentSource)
CameraToMpegTest.java:908
↓ 2 callers
Method
createProgram
(String vertexSource, String fragmentSource)
ExtractMpegFramesTest.java:777
↓ 2 callers
Method
createProgram
(String vertexSource, String fragmentSource)
ExtractMpegFramesTest_egl14.java:768
↓ 2 callers
Method
drainEncoder
Extracts all pending data from the encoder and forwards it to the muxer. <p> If endOfStream is not set, this returns when there is no more data to dra
CameraToMpegTest.java:411
↓ 2 callers
Method
drainEncoder
Extracts all pending data from the encoder. <p> If endOfStream is not set, this returns when there is no more data to drain. If it is set, we send EO
EncodeAndMuxTest.java:212
↓ 2 callers
Method
getChunkData
Copies the data from chunk N into "dest". Advances dest.position.
DecodeEditEncodeTest.java:773
↓ 2 callers
Method
getChunkFlags
Returns the flags associated with chunk N.
DecodeEditEncodeTest.java:780
↓ 2 callers
Method
getChunkTime
Returns the timestamp associated with chunk N.
DecodeEditEncodeTest.java:786
↓ 2 callers
Method
getMediaFormat
Gets the MediaFormat that was used by the encoder.
DecodeEditEncodeTest.java:751
↓ 2 callers
Method
getSurfaceTexture
Returns the SurfaceTexture.
CameraToMpegTest.java:677
↓ 2 callers
Method
getTextureId
()
CameraToMpegTest.java:796
↓ 2 callers
Method
getTextureId
()
ExtractMpegFramesTest.java:661
↓ 2 callers
Method
getTextureId
()
ExtractMpegFramesTest_egl14.java:652
↓ 2 callers
Method
isRecognizedFormat
Returns true if this is a color format that this test code understands (i.e. we know how to read and generate frames in this format).
EncodeDecodeTest.java:351
↓ 2 callers
Method
isSemiPlanarYUV
Returns true if the specified color format is semi-planar YUV. Throws an exception if the color format is not recognized (e.g. not YUV).
EncodeDecodeTest.java:368
↓ 2 callers
Method
loadShader
(int shaderType, String source)
CameraToMpegTest.java:892
↓ 2 callers
Method
loadShader
(int shaderType, String source)
ExtractMpegFramesTest.java:761
↓ 2 callers
Method
loadShader
(int shaderType, String source)
ExtractMpegFramesTest_egl14.java:752
↓ 2 callers
Method
saveToFile
Writes the chunks to a file as a contiguous stream. Useful for debugging.
DecodeEditEncodeTest.java:792
↓ 2 callers
Method
selectCodec
Returns the first codec capable of encoding the specified MIME type, or null if no match was found.
EncodeDecodeTest.java:315
↓ 2 callers
Method
selectTrack
Selects the video track, if any. @return the track index, or -1 if no video track is found.
ExtractMpegFramesTest.java:185
↓ 2 callers
Method
selectTrack
Selects the video track, if any. @return the track index, or -1 if no video track is found.
ExtractMpegFramesTest_egl14.java:183
↓ 2 callers
Method
setMediaFormat
Sets the MediaFormat, for the benefit of a future decoder.
DecodeEditEncodeTest.java:745
↓ 1 callers
Method
awaitNewImage
Latches the next buffer into the texture. Must be called from the thread that created the CodecOutputSurface object. (More specifically, it must be
ExtractMpegFramesTest.java:488
↓ 1 callers
Method
awaitNewImage
Latches the next buffer into the texture. Must be called from the thread that created the CodecOutputSurface object. (More specifically, it must be
ExtractMpegFramesTest_egl14.java:479
↓ 1 callers
Method
checkFrame
Performs a simple check to see if the frame is more or less right. <p> See {@link #generateFrame} for a description of the layout. The idea is to sam
EncodeDecodeTest.java:866
↓ 1 callers
Method
checkSurfaceFrame
Checks the frame for correctness, using GL to check RGB values. @return true if the frame looks good
DecodeEditEncodeTest.java:672
↓ 1 callers
Method
checkVideoData
Checks the video data. @return the number of bad frames
DecodeEditEncodeTest.java:583
↓ 1 callers
Method
checkVideoFile
Checks the video file to see if the contents match our expectations. We decode the video to a Surface and check the pixels with GL.
DecodeEditEncodeTest.java:552
↓ 1 callers
Method
choosePreviewSize
Attempts to find a preview size that matches the provided width and height (which specify the dimensions of the encoded video). If it fails to find a
CameraToMpegTest.java:267
↓ 1 callers
Method
computePresentationTimeNsec
Generates the presentation time for frame N, in nanoseconds.
EncodeAndMuxTest.java:326
↓ 1 callers
Method
doEncodeDecodeVideoFromBuffer
Does the actual work for encoding frames from buffers of byte[].
EncodeDecodeTest.java:384
↓ 1 callers
Method
doEncodeDecodeVideoFromSurfaceToSurface
Does the actual work for encoding and decoding from Surface to Surface.
EncodeDecodeTest.java:630
↓ 1 callers
Method
doExtract
Work loop.
ExtractMpegFramesTest.java:205
↓ 1 callers
Method
doExtract
Work loop.
ExtractMpegFramesTest_egl14.java:203
↓ 1 callers
Method
drawFrame
(SurfaceTexture st)
CameraToMpegTest.java:800
↓ 1 callers
Method
drawFrame
Draws the external texture in SurfaceTexture onto the current EGL surface.
ExtractMpegFramesTest.java:668
↓ 1 callers
Method
drawFrame
Draws the external texture in SurfaceTexture onto the current EGL surface.
ExtractMpegFramesTest_egl14.java:659
↓ 1 callers
Method
drawImage
Draws the data from SurfaceTexture onto the current EGL surface. @param invert if set, render the image with Y inverted (0,0 in top left)
ExtractMpegFramesTest.java:519
↓ 1 callers
Method
drawImage
Draws the data from SurfaceTexture onto the current EGL surface. @param invert if set, render the image with Y inverted (0,0 in top left)
ExtractMpegFramesTest_egl14.java:510
↓ 1 callers
Method
editVideoData
Edits a stream of video data.
DecodeEditEncodeTest.java:406
↓ 1 callers
Method
editVideoFile
Edits a video file, saving the contents to a new file. This involves decoding and re-encoding, not to mention conversions between YUV and RGB, and so
DecodeEditEncodeTest.java:351
↓ 1 callers
Method
eglSetup
Prepares EGL. We want a GLES 2.0 context and a surface that supports recording.
CameraToMpegTest.java:524
↓ 1 callers
Method
eglSetup
Prepares EGL. We want a GLES 2.0 context and a surface that supports recording.
EncodeAndMuxTest.java:365
↓ 1 callers
Method
eglSetup
Prepares EGL. We want a GLES 2.0 context and a surface that supports pbuffer.
ExtractMpegFramesTest.java:384
↓ 1 callers
Method
eglSetup
Prepares EGL. We want a GLES 2.0 context and a surface that supports pbuffer.
ExtractMpegFramesTest_egl14.java:380
↓ 1 callers
Method
encodeCameraToMpeg
Tests encoding of AVC video from Camera input. The output is saved as an MP4 file.
CameraToMpegTest.java:149
↓ 1 callers
Method
encodeDecodeVideoFromSurfaceToSurface
Tests encoding and subsequently decoding video from frames generated into a buffer. <p> We encode several frames of a video test pattern using MediaCo
EncodeDecodeTest.java:252
↓ 1 callers
Method
extractMpegFrames
Tests extraction from an MP4 to a series of PNG files. <p> We scale the video to 640x480 for the PNG just to demonstrate that we can scale the video w
ExtractMpegFramesTest.java:121
↓ 1 callers
Method
extractMpegFrames
Tests extraction from an MP4 to a series of PNG files. <p> We scale the video to 640x480 for the PNG just to demonstrate that we can scale the video w
ExtractMpegFramesTest_egl14.java:119
↓ 1 callers
Method
generateFrame
Generates data for frame N into the supplied buffer. We have an 8-frame animation sequence that wraps around. It looks like this: <pre> 0 1 2 3
EncodeDecodeTest.java:815
↓ 1 callers
Method
generateSurfaceFrame
Generates a frame of data using GL commands. <p> We have an 8-frame animation sequence that wraps around. It looks like this: <pre> 0 1 2 3 7 6 5
DecodeEditEncodeTest.java:323
↓ 1 callers
Method
generateSurfaceFrame
Generates a frame of data using GL commands. We have an 8-frame animation sequence that wraps around. It looks like this: <pre> 0 1 2 3 7 6 5 4
EncodeAndMuxTest.java:300
↓ 1 callers
Method
generateSurfaceFrame
Generates a frame of data using GL commands.
EncodeDecodeTest.java:937
↓ 1 callers
Method
generateVideoData
Generates video frames, feeds them into the encoder, and writes the output to the VideoChunks instance.
DecodeEditEncodeTest.java:231
↓ 1 callers
Method
generateVideoFile
Generates a test video file, saving it as VideoChunks. We generate frames with GL to avoid having to deal with multiple YUV formats. @return true on
DecodeEditEncodeTest.java:162
↓ 1 callers
Method
getSurface
Returns the Surface.
ExtractMpegFramesTest_egl14.java:470
↓ 1 callers
Method
makeCurrent
Makes our EGL context and surface current.
EncodeAndMuxTest.java:435
↓ 1 callers
Method
makeCurrent
Makes our EGL context and surface current.
ExtractMpegFramesTest.java:470
↓ 1 callers
Method
makeCurrent
Makes our EGL context and surface current.
ExtractMpegFramesTest_egl14.java:461
↓ 1 callers
Method
prepareCamera
Configures Camera for video capture. Sets mCamera. <p> Opens a Camera and sets parameters. Does not start preview.
CameraToMpegTest.java:226
↓ 1 callers
Method
prepareEncoder
Configures encoder and muxer state, and prepares the input Surface. Initializes mEncoder, mMuxer, mInputSurface, mBufferInfo, mTrackIndex, and mMuxer
CameraToMpegTest.java:331
↓ 1 callers
Method
prepareEncoder
Configures encoder and muxer state, and prepares the input Surface.
EncodeAndMuxTest.java:135
↓ 1 callers
Method
prepareSurfaceTexture
Configures SurfaceTexture for camera preview. Initializes mStManager, and sets the associated SurfaceTexture as the Camera's "preview texture". <p> C
CameraToMpegTest.java:307
↓ 1 callers
Method
releaseCamera
Stops camera preview, and releases the camera to the system.
CameraToMpegTest.java:292
↓ 1 callers
Method
releaseEncoder
Releases encoder resources.
CameraToMpegTest.java:383
next →
1–100 of 160, ranked by callers