⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 translate.cpp

📁 本源码包
💻 CPP
字号:
/* *	the main file * *	copyright (c) reserved 2008-9-11 */#include	<stdio.h>#include	<iostream>#include	<string.h>#include	<ctype.h>#include	"rmff.h"#include	"sdp.h"#include	"real.h"using namespace	std;int	main(int argc, char *argv[]){	FILE	*rfile, *wfile;	char	buffer[10240];	rmff_header_t	*header;	if(argc < 3)	{		cout << "please input more parameters." << endl;		return	1;	}	if((rfile = fopen(argv[1], "r")) == NULL)	{		cout << "cannot open the file: " << argv[1] << endl;		return	1;	}	if((wfile = fopen(argv[2], "w")) == NULL)	{		cout << "cannot open the file: " << argv[2] << endl;		fclose(rfile);		return	1;	}	header = real_parse_sdp(rfile);	if(header == NULL)	{		cout << "parse real sdpplin error." << endl;		fclose(rfile);		fclose(wfile);		return	2;	}		int	length = rmff_dump_header(header, buffer, 10 * 1024);		if(length == -1)	{		cout << "the receive buffer is not enough large." << endl;		rmff_free_header(header);		fclose(rfile);		fclose(wfile);		return	1;	}	else	{		if(length == fwrite(buffer, 1, length, wfile))		{			printf("the length is: %d\n", length);			rmff_free_header(header);			fclose(rfile);			fclose(wfile);			return	0;		}		else		{			cout << "write data into file error." << endl;			return	1;		}		}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -