Commit 90a952d3a3af54841a3546bc4db65eb2646a886f
1 parent
8f9ddb94
--no commit message
Showing
1 changed file
with
9 additions
and
0 deletions
src/com/upc/pbe/upcnews/VideoActivity.java
1 | package com.upc.pbe.upcnews; | 1 | package com.upc.pbe.upcnews; |
2 | 2 | ||
3 | +import com.xuggle.mediatool.IMediaReader; | ||
4 | +import com.xuggle.mediatool.ToolFactory; | ||
5 | + | ||
3 | import android.net.Uri; | 6 | import android.net.Uri; |
4 | import android.os.Bundle; | 7 | import android.os.Bundle; |
5 | import android.app.Activity; | 8 | import android.app.Activity; |
@@ -11,6 +14,8 @@ public class VideoActivity extends Activity { | @@ -11,6 +14,8 @@ public class VideoActivity extends Activity { | ||
11 | 14 | ||
12 | VideoView video; | 15 | VideoView video; |
13 | String url; | 16 | String url; |
17 | + IMediaReader reader; | ||
18 | + | ||
14 | 19 | ||
15 | @Override | 20 | @Override |
16 | public void onCreate(Bundle savedInstanceState) { | 21 | public void onCreate(Bundle savedInstanceState) { |
@@ -19,6 +24,10 @@ public class VideoActivity extends Activity { | @@ -19,6 +24,10 @@ public class VideoActivity extends Activity { | ||
19 | url = "http://imanolbarba.myftp.biz/video.mp4"; | 24 | url = "http://imanolbarba.myftp.biz/video.mp4"; |
20 | //url = ((UpcApp) getApplication()).getDesc(); | 25 | //url = ((UpcApp) getApplication()).getDesc(); |
21 | 26 | ||
27 | + reader = ToolFactory.makeReader("input.flv"); | ||
28 | + reader.addListener(ToolFactory.makeWriter("output.mov", reader)); | ||
29 | + while(reader.readPacket() == null); | ||
30 | + | ||
22 | //Creacio del VideoPlayer associat a una URL | 31 | //Creacio del VideoPlayer associat a una URL |
23 | video = (VideoView) findViewById(R.id.videoView1); | 32 | video = (VideoView) findViewById(R.id.videoView1); |
24 | video.setVideoURI(Uri.parse(url)); | 33 | video.setVideoURI(Uri.parse(url)); |