[MPlayer-dev-eng] Proposed patch: DVB API 5 support for DVB-S / DVB-S2

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Mar 31 18:32:22 CEST 2009


On Tue, Mar 31, 2009 at 02:54:46PM +0400, Konstantin wrote:
> +#if DVB_API_VERSION >= 5 // {
> +#endif // }

I at least have to wonder where you got the idea for those comments...
First, they seem completely useless, they provide no additional
information at all (contrary to the usual comments in MPlayer that
repeat the condition for #else and #endif), but also IIRC // comments
are not allowed on preprocessor lines, only /* */ comments are.

> @@ -725,6 +781,21 @@
>    }
>    usleep(100000);
>  
> +#if DVB_API_VERSION >= 5 // {
> +	/* discard stale QPSK events */
> +	while (1) {
> +		struct dvb_frontend_event ev;
> +		if (ioctl(fd_frontend, FE_GET_EVENT, &ev) == -1)
> +		break;
> +	}
> +
> +	// FIXME: cmdseq_tune is prepared for DVB-S / DVB-S2 only !
> +	// Code for other frontend types should be written above
> +	if ((ioctl(fd_frontend, FE_SET_PROPERTY, &cmdseq_tune)) == -1) {
> +		perror("FE_SET_PROPERTY failed");
> +		return -1;
> +	}
> +#else // } {
>  #ifndef CONFIG_DVB_HEAD
>    if (fd_sec) SecGetStatus(fd_sec, &sec_state);
>    while(1)
> @@ -739,6 +810,7 @@
>      mp_msg(MSGT_DEMUX, MSGL_ERR, "ERROR tuning channel\n");
>      return -1;
>    }
> +#endif // }

This seems wrong, with DVB_API_VERSION >= 5 feparams is calculated but
never used.



More information about the MPlayer-dev-eng mailing list