Friday, July 27, 2012

Dalvik Debug Monitoring System:



DDMS is integrated into Eclipse and is also shipped in the tools/ directory of the SDK. DDMS works with both the emulator and a connected device. If both are connected and running simultaneously, DDMS defaults to the emulator.
  • From Eclipse: Click Window > Open Perspective > Other... > DDMS.
  • From the command line: Type ddms (or ./ddms on Mac/Linux) from thetools/ directory

    How DDMS Interacts with a Debugger

    When DDMS starts, it connects to adb. When a device is connected, a VM monitoring service is created between adb and DDMS, which notifies DDMS when a VM on the device is started or terminated. Once a VM is running, DDMS retrieves the the VM's process ID (pid), via adb, and opens a connection to the VM's debugger, through the adb daemon (adbd) on the device. DDMS can now talk to the VM using a custom wire protocol

    DDMS features summary:/when we will use DDMS ?
    For the following purpose, we can use DDMS.
    1.Viewing heap usage for a process
    2.Tracking memory allocation of objects
    3.Working with emulator or device's file system 
        we can copy video files/files to emulator or device with DDMS
    4.using logcat : logs can be viewed and filtered based on LOG_TAGS
    5.monitoring network traffic information






Labels:

Changes/Features in android  Icecream sandwich:

1.RTSP streaming was integrated with NuPlayer
2.Valgrind  static memory leak tool is ported to android
3.gdb is ported to android
4.OpenCV image processing library is ported to android that is why facedetection / recognition is possible in
ICS . Samsung S III ICS is having face detection functionality
5.OpenAL application layer support  [refer system/media/wilhelm folder path]
6.Subtitle support through TimedTextPlayer for video/audio playback
7.ION memmory manager support in ICS
[ ION is a generalized memory manager that Google introduced in the Android 4.0 ICS (Ice Cream Sandwich) release to address the issue of fragmented memory management interfaces across different Android devices. There are at least three, probably more, PMEM-like interfaces. On Android devices using NVIDIA Tegra, there is "NVMAP"; on Android devices using TI OMAP, there is "CMEM"; and on Android devices using Qualcomm MSM, there is "PMEM" . All three SoC vendors are in the process of switching to ION].
More about ION memory can be found : http://lwn.net/Articles/480055/
8.Framework for DRM
9.NuPlayer is introduced for HTTP live streaming in Honeycomb tablet. In ICS,  RTSP stack/streaming is removed from stagefright and integrated into NuPlayer
10. There are two ways to integrate the decoders in gingerbread
        i) Software decoder path [google decoders are integrated by deriving from MediaSource.InstantiateSoftwareDecoder() function is used within OMXCodec.
        ii) OMX path
       
  From ICS onwards, Google decoders are integrated in OMX Path and InstantiateSoftwareDecoder() is removed in stagefright




Labels: ,

How will you identify the memory leaks in android ?
1.We can use valgrind tool to find memory leaks, stack corruption, array bound overflows etc
2 Valgrind tool is ported in Icecream sandwich onwards
3.From DDMS, we can select the process and start profiling, we have to do suspected memory leak operation,some file will be created.we can use eclipse memory analyzer tool to identify the memory leaks from this file
4.We can identify the memory leak by process. By putting ps command it will list down the memory occupied by process. Same can be viewed in settings option also. 


      If we want to check whether the video playback has memory leak or not,we have to type ps command to identify the memory occupied by mediaserver process. we can run the video continuously for 100 times or 200 times. Afterwards we have to check memory again for mediaserver process in ps command. if there is a great increase in memory, then we can confirm there is a memoryleak in a video playback. 


Labels: , ,

What is missing in Android Stagefright/NuPlayer RTSP streaming ?

1.Jitter buffer handling
2.RTCP handling
3.Error correction and feedback through RTCP Sender report/receiver report

Labels: , ,

What are all the buffering mechanism available in OMX ?
   1.AllocateBuffer - Allocates buffer
   2.UseBuffer - use the buffer given by the downstream component. Example using the video renderer's memory to fill the decoded data

When the input buffer or output buffer of the component should be released?
        Once the OMX input buffer is used and ready to release,  it will return the EMPTY_BUFFER_DONE event to the stagefright or who is owning the buffer. Once the IL client received the EMPTY_BUFFER_DONE event, it can release the input buffer.
     OMX  IL client will receives the FILL_BUFFER_DONE event from OMX component once the output buffer is used and ready to release. Once IL client received the FILL_BUFFER_DONE event, IL client will frees the output buffer.

How Seek operation is executed in Stagefright ?
        Once the application is giving seek, Thru stagefright player, awesome player calls the seek() function.

How seek operation is notified to the parser or Extractor ?
     within Awesomeplayer, SeekTo() fn is called, it will sets the ReadOptions structure values as seek mode set and seek timestamp is also stored in this structure.

     Awesomeplayer while calling decoder, it will  invoke decoder as below

            mVideoSource->read(&decodedBuffer, &readOptions);

This readoptions value is passed to decoder and decoder will have the pointer to the MPEG4/MKV extractor's media source.
       Decoder will invoke read() fn of the audio/video source of the extractor by passing readOptions.

within parser's media source ->read() fn, it will checks whether the seek mode is set or not. if it is set, it will
do seek to seektimestamp through parser.


                 

         

 

     

Labels: , ,

Wednesday, July 25, 2012

what is OMX Content Pipe  ?

From OMX IL 1.1 standard, we can integrate source[3GP parsers] or Streaming source /sink [MP4 muxer].

Through content pipe, it is possible for us to integrate the source/sink components.

Content Pipe specification explains on how it open/read/write positions from storage/ from network.

Monday, July 09, 2012

யோகம்

அர்ஜுனன் கேட்கிறான்..

ஹே பரமாத்ம! யோகம் என்றால் எது, யோகியின் தன்மைகளைப் பற்றி எனக்குக் கூறுவாய்!!

பகவான் சொல்கிறார்..

அர்ஜுனா! செயல்களின் பயனை எதிர்பார்க்காமல், தான் செய்ய வேண்டிய கடமையை
யார் செய்கிறானோ அவன் தான் சந்நியாசியும், யோகியும் ஆகின்றான். அதிக
வேட்கையும் தீவிரமான செயலும் அற்றவன் அவ்வாறு அழைக்கப்படுவதில்லை.

ஹே பாண்டவ! எதை துறவு என்று கூறுகிறார்களோ அது தான் யோகம் என்று அறிந்து
கொள். எண்ணங்களைத் துறக்காத ஒருவன் யோகி ஆவதில்லை.

யோகத்தை அடையும் எண்ணம் கொண்ட ஞானிக்கு செயல் ஒரு சாதனமாகக்
கூறப்படுகிறது. அதை அடைந்தபின் அதே மனிதனுக்கு செயலற்ற நிலை தான்
சாதனமாகக் கூறப்படுகிறது.

எண்ணங்களைத் துறந்து விட்டு, புலன் உணர்வுப் பொருட்களோடும் ,
செயல்களோடும் பற்று இல்லாமல் இருப்பானானால் ஒரு மனிதன் யோக சித்தியை
அடைந்தவன் ஆகிறான்.

அர்ஜுனா! ஒருவன் தன்னைத் தானே உயர்த்திக் கொள்ள வேண்டும். தன்னைத் தானே
தாழ்த்திக் கொள்ளக் கூடாது. ஒருவனுக்கு நண்பனும் அவன் தான். பகைவனும்
அவன் தான். வேறு ஒருவரும் இல்லை.

தன்னடக்கத்துடன் அமைதியாக இருப்பவனுடைய ஆத்மாவானது குளிரிலும்,
வெப்பத்திலும், இன்பத்திலும், துன்பத்திலும், பெருமையிலும், சிறுமையிலும்
சமநிலையில் இருக்கிறது.

சாஸ்திர அறிவினாலும் , அனுபவ அறிவினாலும் ஏற்பட்ட திருப்தியினால் மனம்
நிறைந்தவனும், உறுதியான மனம் படைத்தவனும், தன்னுடைய புலன்களை வென்றவனும்,
மண் , கல், தங்கம், ஆகியவைகளைச் சமமாகக் கருதுபவனுமாகிய யோகியே யோகத்தில்
நிலை பெற்றவனாக இருக்கிறான்.

Best words copied from www.hayyram.blogspot.com