view fibmap_mplayer.c @ 2336:b2e0b131c1a7

Again changed logic: -screenw, -screenh - force user video mode -x, -y - force userdefined prescaling -bpp - forces userdefined bpp -zoom - enables prescaling (-x, -y) -fs - scales image to fullscreen (same as ATI's divx/dvd player) -zoom -fs - (together) scales userdefined prescaling to fullscreen So full command line should be: mplayer -vo vesa -screenw WWW -screenh HHH -bpp BPP -x XXX -y YYY -zoom -fs filename And you will be able to watch movies in 16:9 format with bold black border at top and bottom of screen.
author nick
date Sun, 21 Oct 2001 14:30:36 +0000
parents 5216f108cb4f
children 04b2227ab75a
line wrap: on
line source

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>

#ifndef FIBMAP
#define FIBMAP 1
#endif

int main ( int argc , char ** argv )
{
	int fd,lba=0;
	if (argc!=2) {
	    fprintf(stderr,"Bad usage.\n");
	    return 1;
	}
	if ((fd = open(argv[1], O_RDONLY)) == -1) {
    	    fprintf(stderr,"Cannot open file %s: %s\n",
	    argv[1] ? argv[1] : "(NULL)", strerror(errno));
    	    return 1;
	}
        if (ioctl(fd, FIBMAP, &lba) != 0) {
	    fprintf(stderr,"fibmap ioctl: %s (Hint: %s is not suid root?)\n",strerror(errno),argv[0]);
            close(fd);
            return 1;
        }
	close(fd);
	fprintf(stderr,"%d\n",lba);
	return 0;
}