Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Ò»¶Î»ùÓÚlinux V4LÊÓÆµ²É¼¯ÉãÏñ³ÌÐòµÄÔ´Âë

/*****************************************************************************************************
linux_m4v.c
gcc -o linux_m4v linux_m4v.c -lc -lm -lxvidcore
*******************************************************************************************************/
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <linux/videodev.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <signal.h>
#include "xvid_encode.h"
void *enc_handle = NULL;
int done = 0;
int
enc_main(unsigned char *image,
   unsigned char *bitstream,
   int *key,
   int *stats_type,
   int *stats_quant,
   int *stats_length,
   int sse[3]);
int
enc_stop();
int
enc_init(int use_assembler);
double
msecond();
#define VIDEO_PALETTE_JPEG  21
struct vdIn {
 int fd;
 char *videodevice ;
 struct video_capability videocap;
 struct video_picture videopict;
 struct video_window videowin;
 int framesizeIn ;
 int bppIn;
 int  hdrwidth;
 int  hdrheight;
 int  formatIn;
};
struct vdIn videoIn;
int init_videoIn (struct vdIn *vd, char *device, int width, int height,int format);
static int GetDepth (int format);
static int GetVideoPict (struct vdIn *vd);
static int SetVideoPict (struct vdIn *vd);
int main(int argc,char *argv[])
{
 char *device;
 
 int format = VIDEO_PALETTE_YUV420P;
 int width = 352;
   int height = 288;
 int i;
 unsigned char r_buffer[304128];
 unsigned char* mp4_buffer;
 double enctime;
 double totalenctime = 0.;
 float totalPSNR[3] = {0., 0., 0.};
 device = "/dev/video0";
 ARG_OUTPUTFILE = "test.m4v";
 int


Ïà¹ØÎĵµ£º

linux crontab¼Æ»®ÈÎÎñµÄʹÓÃ

      Ãû³Æ : crontab
¡¡¡¡Ê¹ÓÃȨÏÞ : rootÓû§ºÍcrontabÎļþµÄËùÓÐÕß
¡¡¡¡Óï·¨ :
¡¡¡¡crontab [-e [UserName]|-l [UserName]|-r [UserName]|-v [UserName]|File ]
ÖØÆô£ºsudo /etc/init.d/cron restart
¡¡¡¡ËµÃ÷ :
¡¡¡¡crontab ÊÇÓÃÀ´ÈÃʹÓÃÕßÔڹ̶¨Ê±¼ä»ò¹Ì¶¨¼ä¸ôÖ´ÐгÌʽ֮Ó㬻»¾ä»°Ëµ£ ......

LR¼à¿Øwindows¡¢linux¡¢UNIX¡¢IBM AIXϵͳ·½·¨

LR¼à¿Øwindows¡¢linux¡¢UNIX¡¢IBM AIXϵͳ·½·¨
Ò»¡¢¼à¿Øwindowsϵͳ£º
1¡¢¼àÊÓÁ¬½ÓǰµÄ×¼±¸¹¤×÷
        1£©½øÈë±»¼àÊÓwindowsϵͳ£¬¿ªÆôÒÔ϶þ¸ö·þÎñRemote Procedure Call(RPC) ºÍRemote Registry Service (¿ªÊ¼—)ÔËÐÐ ÖÐÊäÈëservices.msc£¬¿ªÆô¶ÔÓ¦·þÎñ¼´¿É)¡£
 &nbs ......

[ת]Linux: ubuntu½âѹÃüÁîÈ«ÀÀ


.tar
½â°ü£ºtar xvf FileName.tar
´ò°ü£ºtar cvf FileName.tar DirName
£¨×¢£ºtarÊÇ´ò°ü£¬²»ÊÇѹËõ£¡£©
---------------------------------------------
.gz
½âѹ1£ºgunzip FileName.gz
½âѹ2£ºgzip -d FileName.gz
ѹËõ£ºgzip FileName
.tar.gz ºÍ .tgz
½âѹ£ºtar zxvf FileName.tar.gz
ѹËõ£ºtar zcvf FileN ......

LinuxµÄ½âѹÃüÁî___±¸Íü

.tar
½â°ü£º tar xvf FileName.tar
´ò°ü£ºtar cvf FileName.tar DirName
£¨×¢£ºtarÊÇ´ò°ü£¬²»ÊÇѹËõ£¡£©
---------------------------------------------
.gz
½âѹ1£ºgunzip FileName.gz
½âѹ2£ºgzip -d FileName.gz
ѹËõ£ºgzip FileName
.tar.gz
½âѹ£ºtar zxvf FileName.tar.gz
ѹËõ£ºtar zcvf FileName.tar.g ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ