私は一連の画像を持っています。それらを loop で実行し、ビデオ ファイルとして SD カードに保存したいと考えています。私が使用できるAndroidのデフォルトユーティリティはありますか。? 私の要件を満たすことができるライブラリ。?
10365 次
4 に答える
2
これらを作成するにはライブラリが必要です。それについての投稿がここにあります:
チュートリアル:
于 2013-01-25T12:46:28.257 に答える
0
この機能をサポートする組み込みAndroid
ライブラリはありません。このSO投稿ffmpeg
では、Javaポートを介してC / C ++で記述されたものを使用するか、を使用することを提案していAndroid NDK
ます。
于 2013-01-25T12:49:06.697 に答える
-2
View オブジェクトの背景として使用できる、一連の Drawable オブジェクトによって定義される、フレームごとのアニメーションを作成するために使用されるオブジェクト。
フレームごとのアニメーションを作成する最も簡単な方法は、res/drawable/ フォルダーに配置された XML ファイルでアニメーションを定義し、それを View オブジェクトの背景として設定することです。次に、start() を呼び出してアニメーションを実行します。
XML で定義された AnimationDrawable は、単一の要素と一連のネストされたタグで構成されます。各アイテムは、アニメーションのフレームを定義します。以下の例を参照してください。
res/drawable/ フォルダー内の spin_animation.xml ファイル:
<!-- Animation frames are wheel0.png -- wheel5.png files inside the
res/drawable/ folder -->
<animation-list android:id="@+id/selected" android:oneshot="false">
<item android:drawable="@drawable/wheel0" android:duration="50" />
<item android:drawable="@drawable/wheel1" android:duration="50" />
<item android:drawable="@drawable/wheel2" android:duration="50" />
<item android:drawable="@drawable/wheel3" android:duration="50" />
<item android:drawable="@drawable/wheel4" android:duration="50" />
<item android:drawable="@drawable/wheel5" android:duration="50" />
</animation-list>
このアニメーションを読み込んで再生するコードは次のとおりです。
// Load the ImageView that will host the animation and
// set its background to our AnimationDrawable XML resource.
ImageView img = (ImageView)findViewById(R.id.spinning_wheel_image);
img.setBackgroundResource(R.drawable.spin_animation);
// Get the background, which has been compiled to an AnimationDrawable object.
AnimationDrawable frameAnimation = (AnimationDrawable) img.getBackground();
// Start the animation (looped playback by default).
frameAnimation.start();
于 2013-01-25T12:52:44.867 に答える