playing YUV files from generated by the PVplayer test

by George C » Wed, 21 Apr 2010 06:30:50 GMT

Sponsored Links

I am trying  to visualize the out put of PVPlayer unit tests.
I ran the PVPlayer  Test Case 1. It looks that it ran successfully.
Then I tried to play/visualize  the output file generated by this test
i.e. "test_player_openplaystop_test_mp4_video.dat". My understanding
is that  the output is a YUV 420 file, however the tools I used
( YUVPlayer Deluxe and YUVTools3.0 ) cannot play it or more precisely
the output displayed is bogus (nothing to do with the input test file
test.mp4, just a bunch of distorted colors). The same happened when I
ran other tests (for instance Test 54). Any suggestion why these files
cannot be played/visualized?




Other Threads

1. starting the same activity....

I have a weird issue, and I'll describe it in somewhat abstract terms
in the hopes that someone can see something I'm obviously doing wrong.

I have an activity with some data on it (call it Activity A1).  The
user hits a button and I launch another instance of that same
activity, but with different data (call that Activity A2).  Now, I hit
the "back" button (hardware) and instead of showing the data from A1,
it shows the data from A2.  If I force an orientation change, it shows
the data from A1 correctly.

I am not using static data anywhere and I am using the default onPause
and onResume.  It's almost as if Android is reusing the GUI controls
even though it's a different instance of the activity.




2. Calling function from Receiver class not working.

I have a SMSReceiver class that needs to pass the phone number and
message to another class.  Which works but when I call that class I
need the function to read preference to compare if it needs to execute
another function.  So here is the code.


public void onReceive(Context context, Intent intent) {
                // TODO Auto-generated method stub

                //--get the SMS message passed in --
                Bundle bundle = intent.getExtras();
                SmsMessage[] msgs = null;
                String str = "";
                String from;
                String mymsg;

                if (bundle != null)
                        //---retrieve the sms message received--
                        Object[] pdus = (Object[]) bundle.get("pdus");
                        msgs = new SmsMessage[pdus.length];
                        for (int i=0; i<msgs.length; i++){
                                msgs[i] = 
                                str += "Sms from " + 
                                from = msgs[i].getOriginatingAddress();
                                str += " :";
                                str += msgs[i].getMessageBody().toString();
                                mymsg = msgs[i].getMessageBody().toString();
                                str += "\n";

                                Log.d("SMSReceiver from", from);
                                Log.d("SMSReceiver mymsg", mymsg);

                                //calling the class
                                caralarm ca = new caralarm();
                                ca.texttest(from, mymsg);

                        //display the new sms message
                        Toast.makeText(context, str, Toast.LENGTH_SHORT).show();



public void texttest(String number, String message){

        //These cause nullpointer exceptions
    //SharedPreferences SPNumber = getSharedPreferences("Number",
    //SharedPreferences SPPassword = getSharedPreferences("Password",
    //SharedPreferences SPOften = getSharedPreferences("Often",

        //Number = SPNumber.getString("Number", "NullNumber");
    //Password = SPPassword.getString("Password", "NullPassword");
    //Often = SPOften.getString("Often", "NullOften");

        //need to read number from preferences
        //these only work if Settings2 was loaded before this is called
        Number = Settings2.Number;
        Password = Settings2.Password;
        Often = Settings2.Often;

        String brokenmsg[];
        brokenmsg = message.split(";");
        int brokenmsglength = brokenmsg.length;

          if (number == Number){
                  Log.d ("texttest", "good number");
          Log.d ("texttest", "bad number");

          //not firing off even if it is the same
          if (message.toString() == "Alert"){
                  Log.d ("message", "YAY!! in Alert");
                  String ns = Context.NOTIFICATION_SERVICE;
                  NotificationManager mNotificationManager = 

                  int icon = R.drawable.caralarmicon;
              CharSequence tickerText = "Car Alarm";
              long when = System.currentTimeMillis();

              Notification notification = new Notification(icon, tickerText,

              long[] vibrate = {0,100,200,300};
              notification.vibrate = vibrate;

              notification.ledARGB = 0xffffffff;
              notification.ledOnMS = 300;
              notification.ledOffMS = 1000;
              notification.flags |= Notification.FLAG_SHOW_LIGHTS;

            Context context = getApplicationContext();
                CharSequence contentTitle = "Car Alarm";
                CharSequence contentText = "Alarm";
                Intent notificationIntent = new Intent(this, caralarm.class);
                PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
notificationIntent, 0);

                notification.setLatestEventInfo(context, contentTitle,
contentText, contentIntent);
                final int HELLO_ID = 1;

                mNotificationManager.notify(HELLO_ID, notification);


3. Method to make a call when clicked

4. How to connect to ms Exchange?

5. Removing value from TextView InputType

6. Subdirectories under Drawable

7. How to add CheckBox to any ListView item?