AV Sync

by Sukesh TM » Tue, 27 Jan 2009 02:22:56 GMT

Sponsored Links

Can some one tell me how is AV Sync acheived in AV playback? Is there any
tech notes available on AV Sync?

Warm Regards,


AV Sync

by Dave Sparks » Tue, 27 Jan 2009 03:47:12 GMT

 You'll find detailed information on A/V sync in the OpenCore

In the Android implementation, the audio sink adjusts the playback
clock to keep it in sync with the audio clock. If there is no audio,
the playback clock is driven by the system clock.


Sponsored Links

AV Sync

by Paranoia » Tue, 27 Jan 2009 10:32:54 GMT

 mediaoutputnode and audio_output_mio


AV Sync

by MMF » Tue, 27 Jan 2009 11:21:49 GMT


It would be a great help if you can explain in detail.



AV Sync

by Paranoia » Tue, 27 Jan 2009 12:11:38 GMT

 i have no code in hand.
you can find the mediaoutputnode in opencore/nodes, where the video
clock is synced with playback clock
and audio_output_mio in opencore/android, where the playback clock is
modified by audio clock.


AV Sync

by Dave Sparks » Tue, 27 Jan 2009 18:12:38 GMT

 The latency reported by the audio sink is added to the timestamp of
the buffer just processed and used to update the playback clock. There
is an upper limit on the amount of clock adjustment allowed per buffer
to prevent completely stalling the video playback if the video is too
far ahead.

The playback clock in OpenCore is monotonic, so if the playback clock
is adjusted backwards, it freezes all the passive MIO's until the
adjusted playback time is greater than or equal to the previous
playback time before it is adjusted.


AV Sync

by hanchao3c » Thu, 29 Jan 2009 15:24:12 GMT

 Hi Spark .

I find Audio sink node can be implented base on MediaOutput
( PvmiMIOControl)  or a General Node.
Do you mean Only using MediaOutput , the Audio sink node can give
feedback to AV/Sync ?


AV Sync

by rktb » Thu, 29 Jan 2009 18:01:57 GMT

 Let me try to answer...

Sync is determined by comparison the playback clock. (i) Any component
can register to be notified of the clock state by registering to
PVMFMediaClockStateObserver. (ii) To obtain the clock value itself,
the component needs to implement the PvmiClockExtensionInterface
interface (method SetClock). (iii) A MIO that implements these
interfaces and makes use of them to control AV sync is known as an
Active MIO.

Now, theoretically, any component that implements these interfaces can
control the clock, and hence the AV sync. But, practically, only the
audio/video components have the means to compare the playback clock
with another time value (duration played). So, "feedback to AV/Sync"
does not depend on PvmiMIOControl.

Also, there is really no "feedback" being given during the AV sync
control. An active MIO component can only control the clock value. The
MediaOutputNodePort has a reference of the playback clock. Before
pushing out data to the corresponding MIO, it compares the clock value
against the timestamp value of the media message being pushed out. If
the playback clock is ahead of the timestamp by a fixed margin, the
media message is dropped. And so on.



AV Sync

by hanchao3c » Sat, 31 Jan 2009 14:03:21 GMT

 Thank you very much


Other Threads

1. How to execute a application automatically after android booting?

You really should avoid persistent unless that is really what you want.  It
certainly shouldn't be used just to be launched at boot.

On Thu, Apr 30, 2009 at 5:27 AM, RajaniKanth

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

unsubscribe: android-porting+unsubscr...@googlegroups.com

2. Possible IMF issue for existing applications

The problem is that android:inputType was introduced in 1.5 and is
off-limits for application that need to retain compatibility with 1.1 during
transition in the existing user base.
My workaround was to attach the digits listener in code and not through the
XML, like so:

mPin.setKeyListener(new DigitsKeyListener.getInstance());

These also work:

mPin.setKeyListener(new DigitsKeyListener(false, false));

whereas this does not:


I didn't have time when I first posted, but I just read the source code and
the cause of the bug is probably related to work done in the TextView
constructor, in particular the suspicious looking second line below:

  mInput = DigitsKeyListener.getInstance(digits.toString());
  mInputType = inputType;

comparing that to the work done when you explicitly set a KeyListener it
looks like something's missing.


2009/4/30 Simon <simon.drab...@gmail.com>


3. Missing avds

4. Dead links to the security FA

5. Is there a way to define default attributes of a Widget as applicable the application in context

6. Limits on google map service in MapView?

7. Preventing ACTION_NEW_OUTGOING_CALL from looping?