随笔分类 - live555直播
摘要:加入 摄像头采集和264编码,再使用live555直播1、摄像头采集和264编码 将x264改成编码一帧的接口,码流不写入文件而是直接写入内存中(int Encode_frame 函数中)。/* * Filename: encodeapp.h * Auther: mlj * Create date: 2013/ 1/20 */#ifndef _ENCODEAPP_H_#define _ENCODEAPP_H_#include "x264.h"#include <stdint.h>#define WRITEOUT_RECONSTRUCTION 1typedef i
阅读全文
摘要:参看有关live5551.首先需要修改live555,定义从 内存中直接获取source而不是从文件读取source的类。自己实现的类命名为H264FramedLiveSourceH264FramedLiveSource.hh/* * Filename: H264FramedLiveSource.hh * Auther: chenbin * Create date: 2013/ 1/22 */#ifndef _H264FRAMEDLIVESOURCE_HH#define _H264FRAMEDLIVESOURCE_HH#include <FramedSource.hh>class
阅读全文
摘要:Source和Sink:可以把source理解为发送端的流,sink理解为接受端。MediaSink是各种类型的Sink的基类,MediaSource是各种类型Source的基类,各种类型的流媒体格式和编码的支持即是通过对这两个类的派生实现的。Source和Sink通过RTP子会话(MediaSubSession)联系在一起。 FramedSource 派生自MediaSource, 一帧码流的实现。私有unsigned char* fTo; // in 是指向发送的码流的指针。重要的函数有getNextFramevoid FramedSource::getNextFrame(unsigne.
阅读全文
摘要:读test.264码流文件,客户端可以通过ffplay.exe rtsp: xxx播放出来。直接使用编译好的库,改自testOnDemandRTSPServer.cpp#include "liveMedia.hh"#include "BasicUsageEnvironment.hh" #pragma comment (lib, "Ws2_32.lib") #pragma comment (lib, "BasicUsageEnvironment.lib")#pragma comment (lib, "gro
阅读全文