易截截图软件、单文件、免安装、纯绿色、仅160KB

上大学时做的linux上视频传输的程序


源文来自http://blog.csdn.net/dog0138/archive/2007/03/23/1539277.aspx
C/S 架构 程序很大以部分修改自SPCAVIEW  加入了XVID编解码和JRTP传输  需要安装相应的库 另外摄像头用的中星微电子的  所以 驱动最好装那个万能驱动  在一个国外网站上下的  忘记是什么了 好像叫SPCAXX 
只要你装对了东西  这程序保证能用:-}
文件server.cpp中的程序代码
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <syslog.h>
#include <unistd.h>
#include <wait.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <linux/videodev.h>
#include <pthread.h>
 
#include "jrtplib3/rtpsession.h"
#include "jrtplib3/rtppacket.h"
#include "jrtplib3/rtpudpv4transmitter.h"
#include "jrtplib3/rtpipv4address.h"
#include "jrtplib3/rtpsessionparams.h"
#include "jrtplib3/rtperrors.h"
#include <iostream>
#include "cxvid.h"
#include "tcp.h"
 
#define OUTFRMNUMB 4
static int XDIM=320,YDIM=240;
uint8_t localip[] = { 202, 194, 26, 67 };
 
#define Packetfixlength 7000
#define frameheadfixlength 50
RTPTime delay (0.0001);
int status;
int nread;
RTPSession session;
RTPSessionParams sessionparams;
RTPUDPv4TransmissionParams transparams;
int sendpacket (unsigned char *framepointer, int framelength);
struct frame_t{
    char header[5];
    int nbframe;
    double seqtimes;
    int deltatimes;
    int w;
    int h;
    int size;
    int format;
    unsigned short bright;
    unsigned short contrast;
    unsigned short colors;
    unsigned short exposure;
    unsigned char wakeup;
&n


相关文档:

实战Linux Bluetooth编程(六) 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 ......

[转]Linux Netfilter实现机制和扩展技术


Linux Netfilter实现机制和扩展技术
 
 
级别: 初级
杨沙洲
(pubb@163.net
)国防科技大学计算机学院
2003 年 3 月 01 日
http://www.ibm.com/developerworks/cn/linux/l-ntflt/
2.4.x的内核相对于2.2.x在IP协议栈部分有比较大的改动,
Netfilter-iptables更是其一大特色,由于它功能强大,并且与 ......

在Linux中使用Java Console

The
Java Console provides information about the Java Runtime Environment
(JRE) version, user home directory, and any error message that occurs
while running an applet or application. You can enable the Java Console
for the Linux platform.









......

linux 线程编程

本章介绍 POSIX 线程的基本线程编程例程。本章介绍缺省线程(即,具有缺省属性值的线程),这是多线程编程中最常用的线程。本章还介绍如何创建和使用具有非缺省属性的线程。
本章介绍的 POSIX 例程具有与最初的 Solaris 多线程库相似的编程接口。
线程库
下面简要论述了特定任务及其相关手册页。
创建缺省线程
如果未 ......

Linux核心数据结构

Table of Contents, Show Frames, No Frames
第十五章 Linux核心数据结构
本章列出了Linux实用的主要数据结构。
block_dev_struct
此结构用于向核心登记块设备,它还被buffer cache实用。所有此类结构都位于blk_dev数组中。
struct blk_dev_struct {
void (*request_fn)(void);
struct request * curren ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号