1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine the file stream, to file reader and writer. 0.9.142

This commit is contained in:
winlin 2014-06-29 17:05:26 +08:00
parent ed3f9f0a40
commit 1a7735182f
13 changed files with 167 additions and 121 deletions

View file

@ -121,14 +121,14 @@ int process(const char* in_flv_file, const char* out_flv_file, srs_flv_t* pic, s
srs_amf0_t amf0_data = NULL;
srs_amf0_t filepositions = NULL;
if ((ic = srs_flv_open_read(in_flv_file)) == NULL) {
if ((ic = srs_flv_open(in_flv_file)) == NULL) {
ret = 2;
trace("open input flv file failed. ret=%d", ret);
return ret;
}
*pic = ic;
if ((oc = srs_flv_open_write(out_flv_file)) == NULL) {
if ((oc = srs_flv_open(out_flv_file)) == NULL) {
ret = 2;
trace("open output flv file failed. ret=%d", ret);
return ret;

View file

@ -64,7 +64,7 @@ int main(int argc, char** argv)
trace("version: %d.%d.%d", srs_version_major(), srs_version_minor(), srs_version_revision());
trace("input: %s", in_flv_file);
if ((flv = srs_flv_open_read(in_flv_file)) == NULL) {
if ((flv = srs_flv_open(in_flv_file)) == NULL) {
ret = 2;
trace("open flv file failed. ret=%d", ret);
return ret;

View file

@ -93,7 +93,7 @@ int main(int argc, char** argv)
trace("input: %s", in_flv_file);
trace("output: %s", out_rtmp_url);
if ((flv = srs_flv_open_read(in_flv_file)) == NULL) {
if ((flv = srs_flv_open(in_flv_file)) == NULL) {
ret = 2;
trace("open flv file failed. ret=%d", ret);
return ret;