From 0c3bba1a4d7b652807dfb74e1a31012802bd2987 Mon Sep 17 00:00:00 2001
From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期四, 17 八月 2017 12:26:55 +0800
Subject: [PATCH] aaaaa

---
 RtspFace/PL_H264FileFramer.cpp |   38 +++++++++++++++-----------------------
 1 files changed, 15 insertions(+), 23 deletions(-)

diff --git a/RtspFace/PL_AndroidMediaCodecFileFrame.cpp b/RtspFace/PL_H264FileFramer.cpp
similarity index 90%
rename from RtspFace/PL_AndroidMediaCodecFileFrame.cpp
rename to RtspFace/PL_H264FileFramer.cpp
index ed09a1f..abfbabc 100644
--- a/RtspFace/PL_AndroidMediaCodecFileFrame.cpp
+++ b/RtspFace/PL_H264FileFramer.cpp
@@ -1,18 +1,12 @@
-#include "PL_AndroidMediaCodecFileFrame.h"
+#include "PL_H264FileFramer.h"
 #include "MaterialBuffer.h"
 #include "logger.h"
 #include "MediaHelper.h"
-
-#include <media/NdkMediaCodec.h>
-#include <media/NdkMediaFormat.h>
-
-#include <android/bitmap.h>
 
 #include "my_timer.hpp"
 #include <stdlib.h>
 #include <fstream>
 using namespace std;
-#include <liveMedia/liveMedia.hh>
 
 #define H264_HEAD "01"
 
@@ -24,9 +18,7 @@
 	
 	size_t inputFrameCount;
 
-	PL_AndroidMediaCodecFileFrame_Config config;
-
-	AMediaCodec* codec;
+	PL_H264FileFramer_Config config;
 
 	bool payOK;
 
@@ -52,7 +44,7 @@
 		
 		inputFrameCount = 0;
 
-		PL_AndroidMediaCodecFileFrame_Config _config;
+		PL_H264FileFramer_Config _config;
 		config = _config;
 		
 		codec = nullptr;//#todo destory
@@ -64,28 +56,28 @@
 	}
 };
 
-PipeLineElem* create_PL_AndroidMediaCodecFileFrame()
+PipeLineElem* create_PL_H264FileFramer()
 {
-	return new PL_AndroidMediaCodecFileFrame;
+	return new PL_H264FileFramer;
 }
 
-PL_AndroidMediaCodecFileFrame::PL_AndroidMediaCodecFileFrame() : internal(new PL_AMCE_Internal)
+PL_H264FileFramer::PL_H264FileFramer() : internal(new PL_AMCE_Internal)
 ,m_b_loop_play(false),m_begin(-1),m_current_time(0)
 {
 }
 
-PL_AndroidMediaCodecFileFrame::~PL_AndroidMediaCodecFileFrame()
+PL_H264FileFramer::~PL_H264FileFramer()
 {
 	delete (PL_AMCE_Internal*)internal;
 	internal= nullptr;
 }
 
-bool PL_AndroidMediaCodecFileFrame::init(void* args)
+bool PL_H264FileFramer::init(void* args)
 {
 	PL_AMCE_Internal* in = (PL_AMCE_Internal*)internal;
 	in->reset();
 
-	PL_AndroidMediaCodecFileFrame_Config* config = (PL_AndroidMediaCodecFileFrame_Config*)args;
+	PL_H264FileFramer_Config* config = (PL_H264FileFramer_Config*)args;
 
     int ret = read_file(config->sz_path);
     if(1!=ret)
@@ -140,7 +132,7 @@
 	return true;
 }
 
-void PL_AndroidMediaCodecFileFrame::finit()
+void PL_H264FileFramer::finit()
 {
 	PL_AMCE_Internal* in = (PL_AMCE_Internal*)internal;
 	//todo release codec
@@ -179,7 +171,7 @@
 	return false;
 }
 
-bool PL_AndroidMediaCodecFileFrame::pay(const PipeMaterial& pm)
+bool PL_H264FileFramer::pay(const PipeMaterial& pm)
 {
 	PL_AMCE_Internal* in = (PL_AMCE_Internal*)internal;
 
@@ -190,7 +182,7 @@
 	return in->payOK;
 }
 
-bool PL_AndroidMediaCodecFileFrame::gain(PipeMaterial& pm)
+bool PL_H264FileFramer::gain(PipeMaterial& pm)
 {
 	PL_AMCE_Internal* in = (PL_AMCE_Internal*)internal;
 
@@ -342,13 +334,13 @@
 	
 	return false;
 }
-int PL_AndroidMediaCodecFileFrame::write_file(const char* p_path,const char* p_content,int nlength)
+int PL_H264FileFramer::write_file(const char* p_path,const char* p_content,int nlength)
 {
     std::fstream outfile(p_path, std::ios_base::out | std::ios_base::binary);
     outfile.write(p_content, nlength);
     outfile.close();
 }
-int PL_AndroidMediaCodecFileFrame::read_file(const char* p_path)
+int PL_H264FileFramer::read_file(const char* p_path)
 {
     std::fstream infile(p_path, std::ios_base::in | std::ios_base::binary | ios::ate);
     size_t nSize = infile.tellg();
@@ -366,7 +358,7 @@
     return 1;
 }
 
-int PL_AndroidMediaCodecFileFrame::analyse_context()
+int PL_H264FileFramer::analyse_context()
 {
     int _count = 0;
     int _begin = -1;

--
Gitblit v1.8.0