[MPlayer-users] tv:// audio problem - works in mencoder, breaks in mplayer
Carsten Schultz
carsten at gnocchi.dialup.fu-berlin.de
Wed May 21 23:45:04 CEST 2003
Hi Bernhard!
On Wed, May 21, 2003 at 08:32:23PM +0200, Bernhard Rosenkraenzer wrote:
> immediatemode as described in the manpage doesn't exist as an option in
> current CVS unless you're using BSD, however, the video4linux driver
> checks the variable set by the immediatemode flag as well; I think this
> was overlooked, patch to restore immediatemode on Linux is attached.
>
> Now mplayer tries to get sound, but hangs before playing anything
> (I guess something is using a device in blocking mode when the device
> doesn't send any data yet).
It's probably this (I'm using a patched MPlayer myself):
The code blocks, if MPlayer tries to grab an audio frame before the
first video frame. To remedy this, I use
static double grab_audio_frame(priv_t *priv, char *buffer, int len)
{
mp_msg(MSGT_TV, MSGL_DBG2, "grab_audio_frame(priv=%p, buffer=%p, len=%d)\n",
priv, buffer, len);
/* If video grabber hasn't been started, do so, because it will start the
audio grabber. */
if (priv->first) {
pthread_create(&priv->video_grabber_thread, NULL, video_grabber, priv);
priv->first = 0;
usleep(2000000); /* HACK */
}
...
I do not understand, why the usleep is necessary, but it seems to be.
I think it would be great if you would solve this cleanly, because
using immediatemode gives you better a/v-sync.
Greetings,
Carsten
--
Carsten Schultz (2:40, 33:47), FB Mathematik, FU Berlin
http://www.math.fu-berlin.de/~cschultz/
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20030521/cbf219a7/attachment.pgp>
More information about the MPlayer-users
mailing list