[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mtvp-sdk
Subject:    Re: extract time code, fast forward
From:       Tristan Savatier <tristan () mpegtv ! com>
Date:       1998-03-09 22:48:47
[Download RAW message or body]

Atul Sowani wrote:
> 
> Hi Tristan! I am not very clear about how the COM_GET_POS and
> COM_GET_ACTUAL_FRAMERATE work. We use g2a_send_void() with these
> commands. What happens next?

After posting a COM_GET_POS you will receive a A2G_COM_POS.
After posting a COM_GET_ACTUAL_FRAMERATE you will receive a
A2G_COM_ACTUAL_FRAMERATE.


But the messages being assynchronous, there may be other unread
messages from mtvp in the queue, so there is no guarantee that
the A2G_COM_POS will be the first message returned by a2g_read_msg()
if you call a2g_read_msg() immediately after sending a COM_GET_POS
message.

> Shall I issue a2g_read_msg() immediately?

No, you don't have to, and it would not help in any way, since the
messages are queued.

But you must always call a2g_read_msg() very frequently, because the
message queue is a pipe, and if the pipe gets full, it would cause
mtvp to stop (sleep).

By the way, COM_GET_ACTUAL_FRAMERATE is for getting the actual
framerate, not the nominal framerate.  The actual framerate
only indicates the performances of your system (i.e. how many frames
must be dropped to keep up with the normal playback speed.

> Where this info regarding the frame rate

If you want to get the NOMINAL framerate (e.g. 29.97 fps),
you should look in the PMP_DATA_VIDEO_INFOS that comes with
A2G_COM_VIDEO_INFOS messages. A message of type A2G_COM_VIDEO_INFOS
is sent to the application as soon as the first video sequence header
is decoded, or if a new video sequence header is found with different
parameters.

If you want to get the actual framerate (which changes all the time),
it is the double received with A2G_COM_ACTUAL_FRAMERATE.
You must send a COM_GET_ACTUAL_FRAMERATE to get it.
I don't think that you should use that, since it has
nothing to do with what you want to achieve (i.e. fast forward).
It is just an indicator of performances.

> and position is stored?

The position is passed as an int with the A2G_COM_POS.  To get
it you should post a COM_GET_POS command.

> I saw mtv source code to see how the return value is stored etc. Can
> you please clarify on this?

The source of mtv is a good example.  It uses all those commands.

>   BTW, since MpegTV is satisfying our primary requirement, I am
> going to talk with my project leader tomorrow, who will instruct
> our marketing division to get in touch with your sales dept. I will
> update you once the process is started.

Thanks.

-t

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic