Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Battling the Media Framework

No description
by

Brad Grimm

on 28 July 2015

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Battling the Media Framework

What is the best app?
Thank You!
By Bradley Grimm
Battling the Media Framework
Who am I?
Who are we?
Facebook
Pandora
Instagram
Netflix
Snapchat
Flashlight
Camera
Video
Sound
Mic
The F Word
What is fragmentation?
The usual definition
Media loves this...
Painful
Deadly
Screen Size
Api Level
Memory
Api Breakage
Lies
Deception
The good news
The bad news
Advice #1: Keep it simple
Take photo intent
Easy media player
VideoView
Audio Trick #1
General trick #2
General trick #3
Fast Fourier Transform
FFT What is it good for?
Working w/ FFT
Fragmentation
Android CTS (Compatability Test Suite)

More and more holes being filled.

Support for the old is slowly dying.

Rumored new camera libraries...
http://phandroid.com/2013/11/25/android-camera-api-burst-mode-raw-support-coming-soon/
Issues resurface in latest versions

Fixes are slow, workarounds inadecuate

Still old devices running around

Weird devices from weird places

Dependency on other apps
onActivityResult
Request
loadBitmapToFitScreen
Audio Fun
Use correct buffer sizes
AudioTrack
OpenSL
Access to raw buffers

Java only

Some bugs...
Access to raw buffers

Native only

Some bugs...
With the raw PCM, the world is your oyster
Guess correct buffer sizes
Stay off the UI thread
(But handle all lifecycle events)
Video Fun
Wrap the MediaPlayer
SurfaceView
Video Tip #1
Wrap the MediaPlayer
Camera Fun
Synchronize everything
"The Android MediaPlayer is state dependent. Yet a major drawback is that, while it keeps track of that state, you don't have access to it."
Old Method
New method
Camera Tip #1
Get the sizes right
Camera tip #2
Guard against everything
Give great error notifications
(FFT)
PCM
Floats
Window
FFT
Magic
iFFT
Combine
Play/Save
TextureView
Goofy Glass
Games
Voice Changers
Augmented Reality
Colorblind Simulator
Wraps MediaPlayer

Handles common bugs

Makes things simple
(if it works)
Handles audio

No mess, no hastle

Easy peasy
Users expect it
Now work on your part
(Pure Data)
General tip #1
Don't trust the samples
Check out the docs

Understand the flow well

Read the source
Examples never synchronize

You
must
guarantee your state

Protect setup, use, and teardown.
Pulse Code Modulation
Time
Amplitude
Spawn thread in onResume

Cleanup in onPause

Make everything cancelable
Synthesization (Creating sounds)

Stream filters (Bass, vocoding, autotune)

Pitch shifting

Noise reduction (Band-pass, profiles)

Voice matching

Frequency convolutions
SurfaceView
onPreviewFrame
Convert to Bitmap
GLSurfaceView
Pass into OpenGL
Slow
Init:
Create surface texture
Give to OpenGL
Usage:
updateTextImage
Speedy & Awesome
Old Method
It still works fairly well on newer devices and may still be needed
Full transcript