Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android video editor classes

I am trying to create an Android video editing application. I noticed in the SDK sources there are a number of classes in the package 'android.media.videoeditor' that appear to do what I need; however, when I try and import them into my Java project, I can't because according to Eclipse they don't exist! I checked the contents of 'android.jar' and sure enough, the classes are missing.

One of the classes in that package - MediaArtistNativeHelper.java - uses JNI to call out to whatever native methods it needs to, which are implemented in C++ from what I can tell (does this mean I need to build them separately?)

My question is, how can I use these classes in my project?

I am developing the app using Eclipse on a Mac.

like image 565
Simon Avatar asked Jan 07 '13 14:01

Simon


1 Answers

The android.media.videoeditor package is an internal/hidden package, because the Javadoc above it's classes/interfaces contain the {@hide} or @hide annotation.

You are not allowed to use it from within your application and as you saw the API is not present in android.jar which contains the public API's available. FYI the package's javadoc can be seen here.

For adding media functionality to your application use the android.media package instead, which:

Provides classes that manage various media interfaces in audio and video.

The Media APIs are used to play and, in some cases, record media files. This includes audio (e.g., play MP3s or other music files, ringtones, game sound effects, or DTMF tones) and video (e.g., play a video streamed over the web or from local storage).

Other special classes in the package offer the ability to detect the faces of people in Bitmaps (FaceDetector), control audio routing (to the device or a headset) and control alerts such as ringtones and phone vibrations (AudioManager).

The contents of the android.jar showing what the android.media package contains:

(Taken from adt-bundle-linux/sdk/platforms/android-17/android.jar)

enter image description here

like image 87
Alex Bitek Avatar answered Sep 22 '22 20:09

Alex Bitek