android - how to decode videofile -


in decoding of image file use bitmapfactory instead of can use video?

       public void decodefile(string filepath) {             // decode image size              bitmapfactory.options o = new bitmapfactory.options();             o.injustdecodebounds = true;             bitmapfactory.decodefile(filepath, o);              // new size want scale             //final int required_size = 1024;              // find correct scale value. should power of 2.             //int width_tmp = o.outwidth, height_tmp = o.outheight;             int scale = 1;             /*while (true) {                 if (width_tmp <required_size && height_tmp < required_size)                     break;                 width_tmp /= 2;                 height_tmp /= 2;                 scale *= 2;             }*/             //int scale = 1;             // decode insamplesize             bitmapfactory.options o2 = new bitmapfactory.options();              //o2.insamplesize = scale;             bitmap = bitmapfactory.decodefile(filepath, o2);              //imgview.setimagebitmap(bitmap);          } 

there no apis "decoding" video in android sdk, other play (e.g., mediaplayer). welcome try find third-party library offers whatever functionality seek.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -