openCORE 1.x (cupcake) CPM plugin - trying to play a test MP3

by dandrep » Wed, 09 Sep 2009 01:36:10 GMT


Sponsored Links
 i,

I have written an openCORE 1.x CPM plugin and am having difficulties
getting a test MP3 to play.

The logs basically look like this: (I've added additional statements
for tracing)

E/PV ( 555): PVLOG:TID
(0xd530):Time=3013:PVMFCPMImpl::CommandComplete Id 40004 Cmd 40004
Status 1 Context 0 Data 0
E/PV ( 555): PVLOG:TID
(0xd530):Time=3018:PVMFCPMContainerMp3::CPMCommandCompleted
E/PV ( 555): PVLOG:TID
(0xd530):Time=3023:PVMFCPMContainerMp3::IssueCommand In 8
E/PV ( 555): PVLOG:TID
(0xd530):Time=3028:PVMFCPMContainerMp3::IssueCommand Calling
CheckUsage
E/PV ( 555): PVLOG:TID
(0xd530):Time=3033:PVMFCPMContainerMp3::IssueCommand CheckUsage
calling CheckApprovedUsage
E/PV ( 555): PVLOG:TID
(0xd530):Time=3038:PVMFCPMContainerMp3::IssueCommand CheckUsage
checking for MP3 Header
E/PV ( 555): PVLOG:TID
(0xd530):Time=3039:PVMFMP3FFParserNode::CheckForMP3HeaderAvailability
In
E/PV ( 555): PVLOG:TID
(0xd530):Time=3091:PVMFMP3FFParserNode::SetState() 6
E/PV ( 555): PVLOG:TID
(0xd530):Time=3097:PVMFMP3FFParserNode::ReportInfoEvent() Type 24 Data
6
E/PV ( 555): PVLOG:TID
(0xd530):Time=3107:PVPlayerEngine::HandleNodeInformationalEvent() In
E/PV ( 555): PVLOG:TID
(0xd530):Time=3112:PVPlayerEngine::HandleSourceNodeInfoEvent() In
E/PV ( 555): PVLOG:TID
(0xd530):Time=3116:PVPlayerEngine::HandleSourceNodeInfoEvent() Do
nothing for this event 24
E/PV ( 555): PVLOG:TID
(0xd530):Time=3122:PVPlayerEngine::HandleSourceNodeInfoEvent() Out
E/PV ( 555): PVLOG:TID
(0xd530):Time=3127:PVPlayerEngine::HandleNodeInformationalEvent() Out
E/PV ( 555): PVLOG:TID
(0xd530):Time=3132:PVMFMP3FFParserNode::ReportErrorEvent() Type -17
Data 0
E/PV ( 555): PVLOG:TID
(0xd530):Time=3135:PVPlayerEngine::HandleNodeErrorEvent() In
E/PV ( 555): PVLOG:TID
(0xd530):Time=3139:PVPlayerEngine::HandleSourceNodeErrorEvent() In
E/PV ( 555): PVLOG:TID
(0xd530):Time=3140:PVPlayerEngine::HandleSourceNodeErrorEvent()
Sending PVPlayerErrSourceMediaData for error event -17
E/PV ( 555): PVLOG:TID
(0xd530):Time=3146:PVPlayerEngine::HandleAsyncErrorBasedOnPlayerState
() In
E/PV ( 555): PVLOG:TID
(0xd530):Time=3150:PVPlayerEngine::HandleAsyncErrorBasedOnPlayerState
() Error while Initializing. Go back to idle state
E/PV ( 555): PVLOG:TID
(0xd530):Time=3155:PVPlayerEngine::SetEngineState() In Current state
2, New state 17
E/PV ( 555): PVLOG:TID
(0xd530):Time=3156:PVPlayerEngine::EngineCommandCompleted() In CmdId
2, Status -17
E/PV ( 555): PVLOG:TID
(0xd530):Time=3161:PVPlayerEngine::EngineCommandCompleted() Type=12
ID=2 APIcmd=1 Tick=3161
E/PV ( 555): PVLOG:TID
(0xd530):Time=3162:PVPlayerEngine::EngineCommandCompleted() Notifying
engine command as completed. CmdId 2 Status -17
V/PlayerDriver( 555): CommandCompleted
V/PlayerDriver( 555): Completed command PLAYER_INIT
status=PVMFErrResource
E/PlayerDriver( 555): Command PLAYER_INIT completed with an error or
info PVMFErrResource
V/MediaPlayer( 716): message received msg=100, ext1=1, ext2=-17
E/MediaPlayer( 716): error (1, -17)
V/MediaPlayer( 716): signal application thread
V/MediaPlayer( 716): prepare complete - status=1

I'm stuck looking through samples and documentation but cannot see
what I did wrong or am missing.

Thanks for any assistance.

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

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



openCORE 1.x (cupcake) CPM plugin - trying to play a test MP3

by RaviY » Wed, 09 Sep 2009 02:29:14 GMT


 id you look at the other thread?
http://groups.google.com/group/android-porting/browse_thread/thread/06c933dbd2a8f159#

On Sep 8, 12:23pm, dandrep <dandr...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

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


Sponsored Links


openCORE 1.x (cupcake) CPM plugin - trying to play a test MP3

by dandrep » Wed, 09 Sep 2009 12:19:33 GMT


 i,

Yes I did.

I am past my previous issue. My plugin is being instantiated. There
is a failure during the init process related to checking the MP3
header. After authorize and authenticate and checking permissions,
all appears to be good. The next step is checking the MP3 header but
CPM never QI'd for the stream interface. So there is a check in
CheckForMP3Header() that looks for the stream interface, but it is
null. I compared my implementation against the samples and found
little difference (only algorithmic details).

Ugh.

On Sep 8, 11:28am, RaviY <yend...@pv.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

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



openCORE 1.x (cupcake) CPM plugin - trying to play a test MP3

by RaviY » Thu, 10 Sep 2009 00:53:59 GMT


 his sounds like a bug that was fixed a while back. You can move to
OpenCORE 2.0, or try to port the fix back to OpenCORE 1.0. You can do
a diff. of the mp3 parser node to get some clues.

-Ravi

On Sep 8, 11:19pm, dandrep <dandr...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

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



openCORE 1.x (cupcake) CPM plugin - trying to play a test MP3

by dandrep » Thu, 10 Sep 2009 02:45:45 GMT


 i,

Thanks for the information. If the issue is an existing bug then I
need to verify that. My project doesn't give me a lot of options to
fix this.

My problem appears to be related to an unset value:
iDataStreamInterface. My first question is that I thought that
interface was used for streaming or download and my case is local file
playback. The value is set in
PVMFMP3FFParserNode::PassDatastreamFactory(), which from my clumsy
grepping, does not appear to be called under any circumstances. So my
second question is, if this is due to a bug, is the bug in the MP3
node, in all nodes or somewhere else where this should be called?

I'm not trying to doubt that this is a fixed bug, but I can find no
evidence of that from my code comparisons.

D'Andre

On Sep 9, 9:53am, RaviY <yend...@pv.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

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



openCORE 1.x (cupcake) CPM plugin - trying to play a test MP3

by RaviY » Thu, 10 Sep 2009 10:52:45 GMT


 ou probably shouldn't be hitting that part of the code at all. The
datastream factory would be sent down by the DownloadManager node.

Your log appears to be snipped. Can you send me the complete log of
player engine and mp3 parser node?

The bug, as I remember, was only in the mp3 parser node.

-Ravi

On Sep 9, 1:45pm, dandrep <dandr...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~

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



Other Threads

1. Clockwise landscape orientation

2010/6/21 Vytautas altenis <vytau...@unity3d.com>:

I imagine you just support landscape orientation in your app. After
all, the landscape version looks the same, no matter which landscape
side is up.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 

2. Access adbd from within Android app

Hello all,

I would like to issue a request to the adbd from within my application
so i can retrieve the framebuffer contents. I've setup a small test
which connects to 127.0.0.1:5037 and sends the "framebuffer:" command.
The response i got was "Got reply 'FAIL', diag='closed'"

public class ScreenProjector extends Activity {
    // Where to find the ADB bridge.
    final static String ADB_HOST = "127.0.0.1"; //$NON-NLS-1$
    final static int ADB_PORT = 5037;
    static final String DEFAULT_ENCODING = "ISO-8859-1"; //$NON-NLS-1$

    static InetAddress sHostAddr;
    static InetSocketAddress sSocketAddr;

        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                Thread.setDefaultUncaughtExceptionHandler(new
TopExceptionHandler(this));

                SocketChannel adbChan = null;

        try {
                        sHostAddr = InetAddress.getByName(ADB_HOST);
                        sSocketAddr = new InetSocketAddress(sHostAddr, 
ADB_PORT);

            adbChan = SocketChannel.open(sSocketAddr);
            adbChan.configureBlocking(false);

            byte[] request = formAdbRequest("framebuffer:"); //$NON-
NLS-1$
            ByteBuffer buf = ByteBuffer.wrap(request, 0,
request.length);
            adbChan.write(buf);

            byte[] reply = new byte[4];
            buf = ByteBuffer.wrap(reply, 0, reply.length);
            adbChan.read(buf);

            boolean readDiagString = true;

            while (readDiagString) {
                // length string is in next 4 bytes
                byte[] lenBuf = new byte[4];
                buf = ByteBuffer.wrap(lenBuf, 0, lenBuf.length);
                adbChan.read(buf);

                String lenStr = replyToString(lenBuf);

                int len;
                try {
                    len = Integer.parseInt(lenStr, 16);
                } catch (NumberFormatException nfe) {
                    Log.w("ddms", "Expected digits, got '" + lenStr +
"': "
                            + lenBuf[0] + " " + lenBuf[1] + " " +
lenBuf[2] + " "
                            + lenBuf[3]);
                    Log.w("ddms", "reply was " +
replyToString(reply));
                    break;
                }

                byte[] msg = new byte[len];
                buf = ByteBuffer.wrap(msg, 0, msg.length);
                adbChan.read(buf);

                String message = replyToString(msg);
                Log.v("ddms", "Got reply '" + replyToString(reply) +
"', diag='"
                        + message + "'");

                break;
            }
                } catch (Exception e) {
                        Log.e("ScreenProjector", "", e);
                }

                setContentView(R.layout.main); // This displays the content on 
the
        }

    /**
     * Create an ASCII string preceeded by four hex digits. The
opening "####"
     * is the length of the rest of the string, encoded as ASCII hex
(case
     * doesn't matter). "port" and "host" are what we want to forward
to. If
     * we're on the host side connecting into the device, "addrStr"
should be
     * null.
     */
    static byte[] formAdbRequest(String req) {
        String resultStr = String.format("%04X%s", req.length(),
req); //$NON-NLS-1$
        byte[] result;
        try {
            result = resultStr.getBytes(DEFAULT_ENCODING);
        } catch (UnsupportedEncodingException uee) {
            uee.printStackTrace(); // not expected
            return null;
        }
        assert result.length == req.length() + 4;
        return result;
    }

    /**
     * Converts an ADB reply to a string.
     */
    static String replyToString(byte[] reply) {
        String result;
        try {
            result = new String(reply, DEFAULT_ENCODING);
        } catch (UnsupportedEncodingException uee) {
            uee.printStackTrace(); // not expected
            result = "";
        }
        return result;
    }
}

-- 

3. voot WTA : id-android kapan Noban?

4. get debug flag from manifest

5. Why does booting time reduce from 2 min to 1 min after just adding a printk(..) invoking?

6. Apk LWP ikan koi

7. Finish an activity not started from the service