my FileDescriptor doesn't work with mediaplayer (plz help)

by zeeshan » Fri, 26 Feb 2010 18:34:23 GMT


Sponsored Links
 Hi Experts,

i have a filedescriptor through a script like this
------------------------------------------------------------
Class<?> execClass = Class.forName("android.os.Exec");
                    Method createSubprocess =
execClass.getMethod("createSubprocess",
                            String.class, String.class, String.class,
int[].class);
                    Method waitFor = execClass.getMethod("waitFor",
int.class);

                    // Executes the command.
                    // NOTE: createSubprocess() is asynchronous.
                    int[] pid = new int[1];
                  FileDescriptor   fd =
(FileDescriptor)createSubprocess.invoke(
                            null, "/system/bin/cat", "/sdcard/chunk.3gp",
null, pid);
------------------------------------------------------------

i can read bytes from fd and it seems working fine but when i pass it
to the mediaplayer as datasource.
it doesn't show anything. (this is just 1 sec video)
same video works fine with direct path but i need to decrypt the file
bytes by bytes while its playing.
i thought this solution might help me but no luck so far.
can anybody guide me to the right direction how can i decrypt the file
while playing ?
or do i need to change in native code and build the opencore (pv
player ) separately and any change in there?

please help

--



my FileDescriptor doesn't work with mediaplayer (plz help)

by genxsol » Fri, 26 Feb 2010 18:34:28 GMT


 Hi Experts,

i have a filedescriptor through a script like this
------------------------------------------------------------
Class<?> execClass = Class.forName("android.os.Exec");
                    Method createSubprocess =
execClass.getMethod("createSubprocess",
                            String.class, String.class, String.class,
int[].class);
                    Method waitFor = execClass.getMethod("waitFor",
int.class);

                    // Executes the command.
                    // NOTE: createSubprocess() is asynchronous.
                    int[] pid = new int[1];
                  FileDescriptor   fd =
(FileDescriptor)createSubprocess.invoke(
                            null, "/system/bin/cat", "/sdcard/chunk.3gp",
null, pid);
------------------------------------------------------------

i can read bytes from fd and it seems working fine but when i pass it
to the mediaplayer as datasource.
it doesn't show anything. (this is just 1 sec video)
same video works fine with direct path but i need to decrypt the file
bytes by bytes while its playing.
i thought this solution might help me but no luck so far.
can anybody guide me to the right direction how can i decrypt the file
while playing ?
or do i need to change in native code and build the opencore (pv
player ) separately and any change in there?

please help

--


Sponsored Links


Other Threads

1. MMS receiving/sending

Is there an API to send and receive MMS from an application?

Similar to that of SMS? In SMS one can send SMSs by using
SMSManager.sendTextMessage() and receive them by registering for the
broadcast message.

-- 

2. Join Thailand Forums Thailand Message Boards Living, Work and Play in Thailand ...X.

Join Thailand Forums
Thailand Message Boards Living, Work and Play in Thailand 
http://www.poetak.blogspot.com


-- 

3. Join Thailand Forums Thailand Message Boards Living, Work and Play in Thailand ...W.

4. AutoText di Android (bahasa Indonesia)

5. Dev Phone 1 suddenly died -- will not charge, completely dark

6. TEST from my 1st N1

7. OOT Nx1 2nd