From 1abced42eb3997ef9ef675bfe990f7913ea73f2f Mon Sep 17 00:00:00 2001
From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期五, 23 十二月 2016 18:34:10 +0800
Subject: [PATCH] add h264 encoder and rtsp server

---
 RtspFace/main.cpp |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/RtspFace/main.cpp b/RtspFace/main.cpp
index d25eddb..b31af5c 100644
--- a/RtspFace/main.cpp
+++ b/RtspFace/main.cpp
@@ -1,6 +1,7 @@
 #include "PipeLine.h"
 #include "PL_RTSPClient.h"
 #include "PL_H264Decoder.h"
+#include "PL_H264Encoder.h"
 #include "PL_AVFrameYUV420.h"
 
 #include <iostream>
@@ -13,6 +14,7 @@
 	pipeLine.register_elem_creator("PL_RTSPClient", create_PL_RTSPClient);
 	pipeLine.register_elem_creator("PL_H264Decoder", create_PL_H264Decoder);
 	pipeLine.register_elem_creator("PL_AVFrameYUV420", create_PL_AVFrameYUV420);
+	pipeLine.register_elem_creator("PL_H264Encoder", create_PL_H264Encoder);
 	
 	PL_RTSPClient* rtspClient = (PL_RTSPClient*)pipeLine.push_elem("PL_RTSPClient");
 	RTSPConfig rtspConfig;
@@ -28,8 +30,11 @@
 	PL_H264Decoder* h264Decoder = (PL_H264Decoder*)pipeLine.push_elem("PL_H264Decoder");
 	h264Decoder->init(nullptr);
 	
-	PL_AVFrameYUV420* avFrameYUV420 = (PL_AVFrameYUV420*)pipeLine.push_elem("PL_AVFrameYUV420");
-	avFrameYUV420->init(nullptr);
+	//PL_AVFrameYUV420* avFrameYUV420 = (PL_AVFrameYUV420*)pipeLine.push_elem("PL_AVFrameYUV420");
+	//avFrameYUV420->init(nullptr);
+	
+	PL_H264Encoder* h264Encoder = (PL_H264Encoder*)pipeLine.push_elem("PL_H264Encoder");
+	h264Encoder->init(nullptr);
 	
 	while(true)
 	{

--
Gitblit v1.8.0