Reg. MIO support / Tunneled mode support in PV opencore

by Jag Dev » Thu, 12 Feb 2009 18:34:26 GMT


Sponsored Links
 Hi,

1. Do we have support for MIO (Modular I/O library) in android?

2. For now we have support only for non-tunneled mode encoders and decoders
support in PV opencore. Is there anyway we can enable tunneled mode
operation? I tried that, but the application is not behaving properly (the
UI updates are not happening)

Thanks
Jag

--~--~---------~--~----~------------~-------~--~----~



Reg. MIO support / Tunneled mode support in PV opencore

by Dave Sparks » Fri, 13 Feb 2009 03:30:02 GMT


 Are the frames arriving in the MIO (android_surface_output.cpp)? If
so, do you have appropriate code in there to deliver the frames to
your video device?



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Reg. MIO support / Tunneled mode support in PV opencore

by Jag Dev » Sat, 14 Feb 2009 05:04:02 GMT


 Hi,

I am planning to implement tunneled mode for only audio decoders and
encoders. I see that the PVOMXAudioDecNode always expects FillBufferDones.

The behavior is that the decoding is going through fine (using the OMX
decoders), but the UI is not getting updated?

Thanks
Jagan






--~--~---------~--~----~------------~-------~--~----~



Reg. MIO support / Tunneled mode support in PV opencore

by Dave Sparks » Sat, 14 Feb 2009 18:02:37 GMT


 My understanding is that PV is working on improving support for
tunneled mode. I'm not sure when you'll see those changes in the open
source tree, perhaps a PV representative can comment.





--~--~---------~--~----~------------~-------~--~----~



Reg. MIO support / Tunneled mode support in PV opencore

by Jag Dev » Sun, 15 Feb 2009 06:16:31 GMT


 Hi Dave,

Thanks a lot for your response. Can you please suggest me if I implement my
own MIOs can I acheive tunneled decdoding and encoding for audio?

1. My understanding was MIOs are used for writing to hardware (decoded
frames) and Reading from hardware (frames to be encoded)?

2. Decoding and Encoding should still happen using PVMF nodes (PVData paths
and using PV player engine and Pv Nodes)?

Please correct me if I am wrong?

Thanks for your time.
Jagan








--~--~---------~--~----~------------~-------~--~----~



Reg. MIO support / Tunneled mode support in PV opencore

by Jag Dev » Mon, 16 Feb 2009 02:19:37 GMT


 Hi Ravi,

Can you please comment on this? If we can achieve tunneled mode encoders and
decoders using the following approach:

Can you please suggest me if I implement my own MIOs can I acheive tunneled
decdoding and encoding for audio?






--~--~---------~--~----~------------~-------~--~----~



Reg. MIO support / Tunneled mode support in PV opencore

by rktb » Mon, 16 Feb 2009 14:46:17 GMT


 i,

I don't think we have a direct support for tunneling in OpenCORE 2.0.
There may be ways to achieve it with some mods, but nothing that I
know which is straightforward.

Typically we would prefer the codecs to lie under our OMX node. This
is the regular mode of operation ... SourceNode --> OMXDecoderNode -->
MediaOutputNode. However, there could be cases where it is preferable
to remove the OMXDecoderNode and send in compressed data directly to a
MIO that can decode + render at the same time. For this, one would
probably need to write a MIO that would interface with the
MediaOutputNode using the MIOControl and MediaTransfer interfaces on
one side and on with the OMX components on the other side.

Please watch out for upcoming posts that will discuss in detail the PV
plans to support tunneling mode.

-Ravi

On Feb 15, 8:19pm, Jag Dev <devj...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



Reg. MIO support / Tunneled mode support in PV opencore

by Dave Sparks » Mon, 16 Feb 2009 16:25:28 GMT


 One way of implementing tunneling mode that I've discussed with PV in
the past is hiding the codec behind the MIO. In this case, the MIO
indicates that it supports a compressed stream on its input port. In
this case, the player engine doesn't instantiate a codec in the graph,
but sends the compressed data directly to the MIO.

This is all theoretical at this point; I'm not aware of anyone who has
tried it.







--~--~---------~--~----~------------~-------~--~----~



Reg. MIO support / Tunneled mode support in PV opencore

by Jag Dev » Mon, 16 Feb 2009 17:03:52 GMT


 i Ravi,

Thanks for your response. This is what I have in mind:

Audio Encoder:
----------------------

If the data read from the hardware is compressed (already in the required
encoded format), then the MIO can directly use this data to be written to a
file.

MIO (Compressed input) -> Composer Node -> File. In this case we dont need a
Encoder node to be instantiated.

Can you please let me know how we can specify to the MIO / Composer that the
Author is receiving a compressed data, that needs no encoding?

Audio Decoder:

Right now, as you said:

PVPlayerEngine -> DataPath -> PVOMXDecNode : Decoder Node (Decoded data) ->
MIO component -> Hardware.

Pre-requisite:
---------------------

If I support a tunnel mode OMX component:

PVPlayerEngine -> DataPath -> PVOMXDecNode : Decoder Node -> OMX Component
-> Hardware.

WIll this work? Without using the output MIO and no decoded data back to the
MIO output is it possible to acheive the app working? The only issue here is
that the Clock is not getting updated to the application. This results in
the application not updating the UI (We dont see any progress bar updation
or not even the Music playback screen).

Can you please suggest if my understanding is right? and also some pointers
if we can achieve this?

Thanks
Jagan

On Mon, Feb 16, 2009 at 6:46 AM, rktb <yend...@pv.com> wrote:


--~--~---------~--~----~------------~-------~--~----~



Reg. MIO support / Tunneled mode support in PV opencore

by rktb » Mon, 16 Feb 2009 19:40:32 GMT


 n Feb 16, 11:03am, Jag Dev <devj...@gmail.com> wrote:
The MIO that you are going to use as part of AddDataSource() should
advertize the format it can support. E.g., take a look at
android_audio_input.cpp. The call to
AndroidAudioInput::getParametersSync() for the key
OUTPUT_FORMATS_CAP_QUERY is returning the mime type "PVMF_MIME_PCM16".
Similarly, the MIO that you are going to add should advertise the
compressed format that it can support, e.g., PVMF_MIME_AMR.

I don't think this is possible. You need to pass data out through the
mediaoutputnode, by making your MIO accept compressed data.

--~--~---------~--~----~------------~-------~--~----~



Reg. MIO support / Tunneled mode support in PV opencore

by Jag Dev » Mon, 16 Feb 2009 20:53:37 GMT


 udio Encoder:

File: AndroidAudioInput::getParametersSync()
Can I also advertise more than One MIME support? I can return PVMF_PCM16 and
also PVMF_AMRNB?
Use AndroidAudioInput::serParametersSync() to set PVMF_AMRNB as the
configuration?

Once I get the Encoded data back, I can use the fileoutputnode to write the
encoded data (no encode node needed) to the file? Does this suffice?

If I will make the corresponding changes to the Audioflinger and other
modules, which will directly read AMRNB encoded data from the driver?

Thanks
Jagan
On Mon, Feb 16, 2009 at 11:40 AM, rktb <yend...@pv.com> wrote:


--~--~---------~--~----~------------~-------~--~----~



Reg. MIO support / Tunneled mode support in PV opencore

by rktb » Tue, 17 Feb 2009 02:21:13 GMT


 ou might not be able to set one uncompressed format and one
compressed format on the same input component. However, let me get
back to you on this. This could probably be addressed.

-Ravi

On Feb 16, 2:53pm, Jag Dev <devj...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



Reg. MIO support / Tunneled mode support in PV opencore

by Jag Dev » Tue, 17 Feb 2009 17:59:19 GMT


 i Ravi,

Do you have any update regarding this approach?

Thanks
Jagan

On Mon, Feb 16, 2009 at 6:20 PM, rktb <yend...@pv.com> wrote:


--~--~---------~--~----~------------~-------~--~----~



Reg. MIO support / Tunneled mode support in PV opencore

by mahamannu » Thu, 12 Mar 2009 01:36:26 GMT


 Hi Ravi



Is there an approximate timeline to get PV support for Tunnel Mode
yet.
Thanks, Manish
--~--~---------~--~----~------------~-------~--~----~



Reg. MIO support / Tunneled mode support in PV opencore

by rktb » Thu, 12 Mar 2009 03:47:50 GMT


 Not yet.



--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Bricked or Not Bricked?

Okay, so you root your G1 or HTC Magic, but then got some problem along the
way, eg. it keeps looping on the bootscreen, I can't turn on my phone, etc.
Then the question pops out.. "Is my phone bricked?" along with the sad
smiley :(So I went to xda-developers forum, to find some answer on "How
would you know if your phone got bricked or not", then I found user @*
youneek*, post something that literally answer my question :D
Here's what he said,

*How to tell if your phone is bricked:*
1.) When you try to turn it on, nothing happens?
2.) Camera+Power does nothing.
3.) Home+Power does nothing.
4.) You flashed the SPL BEFORE the radio
If you answered yes to any of the above 4, you are bricked. You probably
need a new board in the phone. Read more here:
http://forum.xda-developers.com/showthread.php?t=516440 It has been
confirmed that you WILL brick your phone if you attempt to downgrade your
radio after flashing the new SPL. Not sure why you would want to anyways...

*How to tell if you just need to re-flash:*
1.) Your phone is stuck on the g1 logo
2.) Your phone is stuck in a boot loop
3.) Home+Power boots into recovery
If you answered yes to the above then you are NOT bricked. You have the G1
Night Light. This is (usually) a very easy fix.

So if your phone encounter some problem, do some checking like so then
you'll know if your phone got bricked or just need to re-flash. Oh just some
note, if you're installing a Hero ROM, sometimes you need to be patient with
the booting screen, it took longer than other ROM (the longest I have been
through is 8 minutes) hahaha.. I cook & eat some noodles while waiting the
ROM to be fully booted up xD

Surfs here<http://forum.xda-developers.com/showpost.php?p=4341230&postcount=1>
if
you want to read some more :)

--~--~---------~--~----~------------~-------~--~----~

2. how can i pass user define object between service and activity?

I define a class Rect and a aidl file as below:

Rect.java:
package linda.test;
import android.os.Parcel;
import android.os.Parcelable;

public class Rect implements Parcelable {
    public int left;
    public int top;
    public int right;
    public int bottom;

    public static final Parcelable.Creator<Rect> CREATOR = new
Parcelable.Creator<Rect>() {
        public Rect createFromParcel(Parcel in) {
            return new Rect(in);
        }

        public Rect[] newArray(int size) {
            return new Rect[size];
        }
    };

    public Rect() {
    }

    private Rect(Parcel in) {
        readFromParcel(in);
    }

        public int getTop(){
                return top;
        }

    public void writeToParcel(Parcel out, int i) {
        out.writeInt(left);
        out.writeInt(top);
        out.writeInt(right);
        out.writeInt(bottom);
    }

    public void readFromParcel(Parcel in) {
        left = in.readInt();
        top = in.readInt();
        right = in.readInt();
        bottom = in.readInt();
    }

        public int  describeContents  (){
                return 0;
        }
}

Rect.aidl
package linda.test;
import android.os.Parcel;
import android.os.Parcelable;

parcelable Rect;

And then i create a service and aidl file as below:
MyService.java
package linda.test;

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.IBinder;
import android.util.Log;
import android.content.ContentResolver;
import android.app.Activity;
import android.content.IntentFilter;

import java.io.*;
import java.util.*;
import android.os.Parcel;
import linda.test.Rest;

public class MyService extends Service {
        public MyService(){
                mService = this;
        }

        public static void startService(final Context context){
                if (mService != null)
                        return;
                context.startService(new Intent(context, MyService.class));
                return;
        }

        public static void stopService(final Context context){
                if (mService == null)
                        return;
                context.stopService(new Intent(context, MyService.class));
                return;
        }

        @Override
        public IBinder onBind(Intent intent) {
                if (IMyService.class.getName().equals(intent.getAction())){
                        return mBinder;
                }else if (false){

                }
                return null;
        }

        /*
         * Public service interfaces
         */
        private final IMyService.Stub mBinder = new IMyService.Stub(){

                public Rect testSetRect(int a, int b, int c, int d){
                        Rect rect = new Rect();
                        rect.left = a;
                        rect.right = b;
                        rect.top = c;
                        rect.bottom = d;
                        return rect;
                }
        };

        @Override
        public void onCreate(){
                super.onCreate();
        }

        @Override
        public void onDestroy(){
                super.onDestroy();
        }
}

IMyService.aidl:
interface IMyService{
        Rect testSetRect(int a, int b, int c, int d);
}

and there is an activity "AidlTest" will call function "Rect
testSetRect(int a, int b, int c, int d); ", so i copy Rect.aidl and
IMyService.aidl file to the acitivty folder, add IMyService.aidl path
in Android.mk, then build AidlTest, the following error happens:

out/target/common/obj/APPS/AidlTest_intermediates/src/src/linda/test/
MyService.java:12: cannot find symbol
symbol  : class Rect
location: package linda.test
import linda.test.Rect;
                      ^
out/target/common/obj/APPS/AidlTest_intermediates/src/src/linda/test/
MyService.java:214: cannot find symbol
symbol  : class Rect
location: package linda.test
public linda.test.Rect testSetRect(int a, int b, int c, int d) throws
android.os.RemoteException;
                     ^
out/target/common/obj/APPS/AidlTest_intermediates/src/src/linda/test/
MyService.java:179: cannot find symbol
symbol  : class Rect
location: package linda.test
public linda.test.Rect testSetRect(int a, int b, int c, int d) throws
android.os.RemoteException
                     ^
vendor/oms/apps/aidl_test/src/bear/test/AidlTest.java:21: cannot find
symbol
symbol  : class Rect
location: package linda.test
import linda.test.Rect;
                      ^
out/target/common/obj/APPS/AidlTest_intermediates/src/src/linda/test/
MyService.java:95: cannot find symbol
symbol  : class Rect
location: package linda.test
olinda.test.Rect _result = this.testSetRect(_arg0, _arg1, _arg2,
_arg3);
              ^
out/target/common/obj/APPS/AidlTest_intermediates/src/src/linda/test/
MyService.java:183: cannot find symbol
symbol  : class Rect
location: package linda.test
linda.test.Rect _result;
              ^
out/target/common/obj/APPS/AidlTest_intermediates/src/src/linda/test/
MyService.java:193: package linda.test.Rect does not exist
_result =linda.test.Rect.CREATOR.createFromParcel(_reply);
                             ^
7 errors
make: *** [out/target/common/obj/APPS/AidlTest_intermediates/classes-
full-debug.jar] Error 41

--~--~---------~--~----~------------~-------~--~----~

3. NullPointerException with autocomplete in layout

4. ListView inside TabActivity

5. AlertDialog text input problem

6. Blank video being recorded

7. Attn Google: How about throwing a beta release of Android 2.0 SDK?