Lines Matching defs:file
4 * you may not use this file except in compliance with the License.
116 std::cout << "error: fileName " << fileName.c_str() << " invalid, file length too short!" << std::endl;
119 // check file path
139 // check file suffix
224 // The method will NOT release file.
225 bool SnapShotUtils::WriteRgb888ToJpeg(FILE* file, uint32_t width, uint32_t height, const uint8_t* data)
232 if (file == nullptr) {
233 std::cout << "error: file is null" << std::endl;
257 jpeg_stdio_dest(&jpeg, file);
282 FILE *file = fopen(fileName.c_str(), "wb");
283 if (file == nullptr) {
284 std::cout << "error: open file [" << fileName.c_str() << "] error, " << errno << "!" << std::endl;
294 ret = WriteRgb888ToJpeg(file, param.width, param.height, rgb888);
303 ret = WriteRgb888ToJpeg(file, param.width, param.height, rgb888);
307 ret = WriteRgb888ToJpeg(file, param.width, param.height, param.data);
311 if (fclose(file) != 0) {
312 std::cout << "error: close file failed!" << std::endl;
326 FILE *file = fdopen(fd, "wb");
327 if (file == nullptr) {
337 ret = WriteRgb888ToJpeg(file, param.width, param.height, rgb888);
346 ret = WriteRgb888ToJpeg(file, param.width, param.height, rgb888);
350 ret = WriteRgb888ToJpeg(file, param.width, param.height, param.data);
354 if (fclose(file) != 0) {
355 std::cout << "error: close file failed!" << std::endl;
443 { "file", required_argument, nullptr, 'f' },
462 case 'f': // output file name
465 case 't': // output file type