Adding the video debug api to vie test record
Review URL: https://webrtc-codereview.appspot.com/763004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2681 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
12dbcd9798
commit
954cf806d9
@ -25,6 +25,7 @@
|
|||||||
#include "video_engine/include/vie_base.h"
|
#include "video_engine/include/vie_base.h"
|
||||||
#include "video_engine/include/vie_capture.h"
|
#include "video_engine/include/vie_capture.h"
|
||||||
#include "video_engine/include/vie_codec.h"
|
#include "video_engine/include/vie_codec.h"
|
||||||
|
#include "video_engine/include/vie_file.h"
|
||||||
#include "video_engine/include/vie_network.h"
|
#include "video_engine/include/vie_network.h"
|
||||||
#include "video_engine/include/vie_render.h"
|
#include "video_engine/include/vie_render.h"
|
||||||
#include "video_engine/include/vie_rtp_rtcp.h"
|
#include "video_engine/include/vie_rtp_rtcp.h"
|
||||||
@ -40,6 +41,7 @@
|
|||||||
#define DEFAULT_VIDEO_CODEC_START_RATE 1000
|
#define DEFAULT_VIDEO_CODEC_START_RATE 1000
|
||||||
#define DEFAULT_RECORDING_FOLDER "RECORDING"
|
#define DEFAULT_RECORDING_FOLDER "RECORDING"
|
||||||
#define DEFAULT_RECORDING_AUDIO "/audio_debug.aec"
|
#define DEFAULT_RECORDING_AUDIO "/audio_debug.aec"
|
||||||
|
#define DEFAULT_RECORDING_VIDEO "/video_debug.yuv"
|
||||||
#define DEFAULT_RECORDING_AUDIO_RTP "/audio_rtpdump.rtp"
|
#define DEFAULT_RECORDING_AUDIO_RTP "/audio_rtpdump.rtp"
|
||||||
#define DEFAULT_RECORDING_VIDEO_RTP "/video_rtpdump.rtp"
|
#define DEFAULT_RECORDING_VIDEO_RTP "/video_rtpdump.rtp"
|
||||||
|
|
||||||
@ -387,6 +389,7 @@ int VideoEngineSampleRecordCode(void* window1, void* window2) {
|
|||||||
mkdir(folder_name.c_str(), 0777);
|
mkdir(folder_name.c_str(), 0777);
|
||||||
#endif
|
#endif
|
||||||
const std::string audio_filename = folder_name + DEFAULT_RECORDING_AUDIO;
|
const std::string audio_filename = folder_name + DEFAULT_RECORDING_AUDIO;
|
||||||
|
const std::string video_filename = folder_name + DEFAULT_RECORDING_VIDEO;
|
||||||
const std::string audio_rtp_filename = folder_name +
|
const std::string audio_rtp_filename = folder_name +
|
||||||
DEFAULT_RECORDING_AUDIO_RTP;
|
DEFAULT_RECORDING_AUDIO_RTP;
|
||||||
const std::string video_rtp_filename = folder_name +
|
const std::string video_rtp_filename = folder_name +
|
||||||
@ -401,7 +404,6 @@ int VideoEngineSampleRecordCode(void* window1, void* window2) {
|
|||||||
std::getline(std::cin, str);
|
std::getline(std::cin, str);
|
||||||
printf("\nRecording started\n\n");
|
printf("\nRecording started\n\n");
|
||||||
|
|
||||||
// Start record
|
|
||||||
error = ptrViEBase->StartReceive(videoChannel);
|
error = ptrViEBase->StartReceive(videoChannel);
|
||||||
if (error == -1) {
|
if (error == -1) {
|
||||||
printf("ERROR in ViENetwork::StartReceive\n");
|
printf("ERROR in ViENetwork::StartReceive\n");
|
||||||
@ -419,9 +421,12 @@ int VideoEngineSampleRecordCode(void* window1, void* window2) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get file interface (video recording)
|
||||||
|
webrtc::ViEFile* vie_file = webrtc::ViEFile::GetInterface(ptrViE);
|
||||||
// Engine started
|
// Engine started
|
||||||
|
|
||||||
voe_apm->StartDebugRecording(audio_filename.c_str());
|
voe_apm->StartDebugRecording(audio_filename.c_str());
|
||||||
|
vie_file->StartDebugRecording(videoChannel, video_filename.c_str());
|
||||||
ptrViERtpRtcp->StartRTPDump(videoChannel,
|
ptrViERtpRtcp->StartRTPDump(videoChannel,
|
||||||
video_rtp_filename.c_str(), webrtc::kRtpOutgoing);
|
video_rtp_filename.c_str(), webrtc::kRtpOutgoing);
|
||||||
ptrVoERtpRtcp->StartRTPDump(audio_channel,
|
ptrVoERtpRtcp->StartRTPDump(audio_channel,
|
||||||
@ -449,10 +454,11 @@ int VideoEngineSampleRecordCode(void* window1, void* window2) {
|
|||||||
ptrViERtpRtcp->StopRTPDump(videoChannel, webrtc::kRtpOutgoing);
|
ptrViERtpRtcp->StopRTPDump(videoChannel, webrtc::kRtpOutgoing);
|
||||||
ptrVoERtpRtcp->StopRTPDump(audio_channel, webrtc::kRtpOutgoing);
|
ptrVoERtpRtcp->StopRTPDump(audio_channel, webrtc::kRtpOutgoing);
|
||||||
voe_apm->StopDebugRecording();
|
voe_apm->StopDebugRecording();
|
||||||
|
vie_file->StopDebugRecording(videoChannel);
|
||||||
if (enable_labeling == 1)
|
if (enable_labeling == 1)
|
||||||
timing.close();
|
timing.close();
|
||||||
|
|
||||||
// Testing finished. Tear down Video Engine
|
// Recording finished. Tear down Video Engine.
|
||||||
|
|
||||||
error = ptrViEBase->StopReceive(videoChannel);
|
error = ptrViEBase->StopReceive(videoChannel);
|
||||||
if (error == -1) {
|
if (error == -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user