int32_t openFiles() {
if (mp4File == NULL) {
mp4File = MP4Read(mp4FilePathAndName);
}
if (mp4File == NULL) {
NL_LOGE("mp4 file read error");
return -1;
}
if (h264File == NULL) {
h264File = fopen(h264FilePathAndName, "wb+");
}
if (h264File == NULL) {
NL_LOGE("h264 file open error");
return -1;
}
return 0;
}
int32_t closeFiles() {
if (mp4File != NULL) {
MP4Close(mp4File);
mp4File = NULL;
}
if (h264File != NULL) {
fclose(h264File);
h264File = NULL;
}
return 0;
}
int demuxH264FromMp4()
if (mp4File == NULL) {
mp4File = MP4Read(mp4FilePathAndName);
}
if (mp4File == NULL) {
NL_LOGE("mp4 file read error");
return -1;
}
if (h264File == NULL) {
h264File = fopen(h264FilePathAndName, "wb+");
}
if (h264File == NULL) {
NL_LOGE("h264 file open error");
return -1;
}
return 0;
}
int32_t closeFiles() {
if (mp4File != NULL) {
MP4Close(mp4File);
mp4File = NULL;
}
if (h264File != NULL) {
fclose(h264File);
h264File = NULL;
}
return 0;
}
int demuxH264FromMp4()