Ò»¶Î»ùÓÚ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
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
Ãû³Æ : crontab
¡¡¡¡Ê¹ÓÃȨÏÞ : rootÓû§ºÍcrontabÎļþµÄËùÓÐÕß
¡¡¡¡Óï·¨ :
¡¡¡¡crontab [-e [UserName]|-l [UserName]|-r [UserName]|-v [UserName]|File ]
ÖØÆô£ºsudo /etc/init.d/cron restart
¡¡¡¡ËµÃ÷ :
¡¡¡¡crontab ÊÇÓÃÀ´ÈÃʹÓÃÕßÔڹ̶¨Ê±¼ä»ò¹Ì¶¨¼ä¸ôÖ´ÐгÌʽ֮Ó㬻»¾ä»°Ëµ£ ......
¡¡Èç¹ûÄã°®ºÃѧϰ֪ʶ£¬ÓÈÆäÊÇLinux²Ù×÷ϵͳ֪ʶ£¬Ëæ×ÅLinuxÓ¦ÓõÄÀ©Õ¹£¬Ðí¶àÅóÓÑ¿ªÊ¼½Ó´¥Linux£¬¿ÉÄã²»ÖªµÀÈ¥ÄÄÀïÕÒµ½ÕâЩ֪ʶ£¬À´ÕâÀÈÃÄã¸ü¼ÓÁ˽âLinuxѧϰ·½·¨¡£ÈÃÄãÈ«ÃæÕÆÎÕLinuxѧϰ·½·¨¡£
1£®Ñ§Ï°µÄÄ¿µÄ
¡¡¡¡Í¨¹ýLinuxµÄѧϰÕÆÎÕUNIXµÄÄ¿µÄÏë±Ø²»Óöà˵ÁË£¬ÔÚÕâ¸öÍøÂçÈ˲ÅÉí¼Û±¶ÔöµÄÄê´ú£¬Ï ......
Tar
¡¡¡¡Ó¢ÎÄÔÒ壺Tape ARchive
¡¡¡¡ÖÐÎÄÊÍÒ壺´Å´ø¹éµµ
¡¡¡¡×¢ ½â£ºUNIX/LinuxÖеÄÒ»¸öÎļþ´ò°ü¹¤¾ß£¬ÓÃÓÚ½«Ðí¶àÎļþÒ»Æð´ò°ü£¬ÐγÉÒ»¸öµµ°¸Îļþ£¬ÒÔ±ã¹éµµ¡£Ëü×î³õÉè¼ÆÓÃÓÚ´Å´ø±¸·Ý£¬ÏÖÔÚÒ²¿ÉÓÃÓÚÆäËü´æ´¢½éÖÊ¡£µ¥¶ÀʹÓÃʱ£¬Éú³É¾ßÓÐ.tarÀ©Õ¹ÃûµÄÎļþ¡£µ±ÓëGzip½áºÏÓÃÓÚÊý¾ÝѹËõʱ£¬Éú³ÉµÄÎļþÀ©Õ¹Ãû¿ÉÄÜÊÇ.tgz¡¢.t ......