From 1aeaaa077a2abb9e4df8c45ba42fb5889bed3fca Mon Sep 17 00:00:00 2001 From: Equip de Desenvolupadors de PBE Date: Wed, 5 Dec 2012 15:38:33 +0000 Subject: [PATCH] --- src/com/upc/pbe/upcnews/Directoris.java | 6 +++++- src/com/upc/pbe/upcnews/HLS.java | 28 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 src/com/upc/pbe/upcnews/HLS.java diff --git a/src/com/upc/pbe/upcnews/Directoris.java b/src/com/upc/pbe/upcnews/Directoris.java index fc7023c..8687523 100644 --- a/src/com/upc/pbe/upcnews/Directoris.java +++ b/src/com/upc/pbe/upcnews/Directoris.java @@ -122,7 +122,8 @@ public class Directoris extends Activity implements OnClickListener { try { ArrayList m3u8parsed = p.parseFile(m3u8); Log.d(TAG, "parsed completed"); - + HLS h = new HLS(m3u8parsed); + h.start(); } catch (ErrorException e) { Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show(); @@ -134,8 +135,11 @@ public class Directoris extends Activity implements OnClickListener { Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show(); Log.d(TAG, e.getMessage()); } + } + + //VideoPlayer /* String urlvid = null; diff --git a/src/com/upc/pbe/upcnews/HLS.java b/src/com/upc/pbe/upcnews/HLS.java new file mode 100644 index 0000000..a3f0d65 --- /dev/null +++ b/src/com/upc/pbe/upcnews/HLS.java @@ -0,0 +1,28 @@ +package com.upc.pbe.upcnews; + +import java.util.ArrayList; + +public class HLS { + + static final String TAG = "HLS"; + + ArrayList ppls; + int numvideo; + int quality; //0 és la més alta + + public HLS(ArrayList parsed) + { + this.ppls = parsed; + numvideo = 0; + quality = 0; + } + + public void start(){ + + //Primer vídeo que hi hagi, amb la millor qualitat possible + for(int i = 0 ; i < ppls.get(numvideo).getLists().get(quality).getSegments().size() ; i++){ + + } + } + +} -- libgit2 0.22.2