Skip to content

Instantly share code, notes, and snippets.

@cfeckardt

cfeckardt/logcat Secret

Created December 18, 2013 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cfeckardt/0fc7f5e0c2e4cafd144c to your computer and use it in GitHub Desktop.
Save cfeckardt/0fc7f5e0c2e4cafd144c to your computer and use it in GitHub Desktop.
V/videolib(25599): File exists: /storage/sdcard0/DCIM/Camera/20131218_135435.mp4
V/videolib(25599): Buffer contents: h?xMh?xM
V/videolib(25599): Also managed to open file for writing!
V/videolib(25599): About to call probe
V/videolib(25599): Pointer for pd: 0x4d2ba658 Pointer av_probe_input_format: 0x5350261c
V/videolib(25599): ifmt was null
V/videolib(25599): Failed to open file: /storage/sdcard0/DCIM/Camera/20131218_135435.mp4 with error: -1 Operation not permitted
AVInputFormat * ifmt = av_probe_input_format2(pd, false,&score_ret);
if(ifmt == NULL) {
__android_log_print(ANDROID_LOG_VERBOSE, "videolib",
"ifmt was null");
} else {
__android_log_print(ANDROID_LOG_VERBOSE, "videolib",
"Name: %s %s", ifmt->name, ifmt->long_name);
}
if(int errnum = avformat_open_input(&avFormatPtr, filename, NULL, NULL) != 0) {
size_t errsz = 256;
char * errbuf = new char[errsz];
errnum = AVERROR(errnum);
av_strerror(errnum, errbuf, errsz);
const char * str = url.c_str();
__android_log_print(ANDROID_LOG_VERBOSE, "videolib", "Failed to open file: %s with error: %d %s", str, errnum, errbuf);
delete [] errbuf;
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment