[MPlayer-users] dirty HACK: cannot change volume in -tv mode

Carsten Schultz carsten at gnocchi.dialup.fu-berlin.de
Fri Feb 7 20:20:02 CET 2003


Hi Artwine!

On Fri, Feb 07, 2003 at 04:59:35PM +0100, Artwine wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> or better input from *TV-card* directly thru btaudio (like MEncoder)
> and output to soundcard - would be nice:-)

Ok, if you are ready for a dirty hack, here is, how to do this.  You
can use it with either btaudio or (depending on the sound card, I
guess) your sound card.

Since it is such a hack, I didn't bother making a proper patch.

In mplayer.c comment out

  tv_param_immediate = 1;

In tvi_v4l.c (assuming you are using v4l), make the beginning of
grab_audio() frame look like

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 */
    }

    // compensate for dropped audio frames


This should be enough for playing around with it.  I do not yet
understand some of the problems I encountered (delete the line marked
`HACK' to see what I mean), so it may produce unexpected results.
Your comments are welcome.

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/20030207/839e6707/attachment.pgp>


More information about the MPlayer-users mailing list