[MPlayer-dev-eng] [PATCH] VCD support for OS/2

Diego Biurrun diego at biurrun.de
Mon Jan 12 22:49:54 CET 2009


On Tue, Jan 13, 2009 at 02:13:31AM +0900, KO Myung-Hun wrote:
> 
> This patch enables a VCD support on OS/2.
> 
> --- stream/vcd_read_os2.h   (revision 0)
> +++ stream/vcd_read_os2.h   (revision 0)
> @@ -0,0 +1,275 @@
> +#ifndef MPLAYER_VCD_READ_OS2_H
> +#define MPLAYER_VCD_READ_OS2_H

Please add our standard license header.

> +typedef struct
> +{
> +    BYTE bFrame;
> +    BYTE bSecond;
> +    BYTE bMinute;
> +    BYTE bReserved;
> +} msf_t;
> +
> +typedef struct
> +{
> +    HFILE   hcd;
> +    msf_t   msfCurrent;
> +    int     iFirstTrack;
> +    int     iLastTrack;
> +    msf_t   msfLeadOut;
> +} mp_vcd_priv_t;

The _t namespace is reserved by POSIX.  mp_vcd_priv_t is already used
elsewhere, but let's not add more violations where avoidable.

This is a new file, so please use K&R style.

> --- stream/stream_vcd.c (revision 28306)
> +++ stream/stream_vcd.c (working copy)
> @@ -108,6 +122,13 @@
>    hd = CreateFile(device, GENERIC_READ, FILE_SHARE_READ, NULL,
>       OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL);
>    f = _open_osfhandle((long)hd, _O_RDONLY);
> +#elif defined(__OS2__)
> +  device[ 0 ] = p->device[ 0 ];
> +  rc = DosOpen( device, &hcd, &ulAction, 0, FILE_NORMAL,
> +                OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW,
> +                OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE | OPEN_FLAGS_DASD,
> +                NULL );

Respect the local coding style, drop the extra space within the
parentheses.

Diego



More information about the MPlayer-dev-eng mailing list