bowen liu
/
mbed-os-example-blinky
ex
Fork of mbed-os-example-mbed5-blinky by
Embed:
(wiki syntax)
Show/hide line numbers
baidu_media_file_storer.h
00001 // Copyright 2017 Baidu Inc. All Rights Reserved. 00002 // Author: Chen Xihao (chenxihao@baidu.com) 00003 // 00004 // Description: Media file storer 00005 00006 #ifndef BAIDU_TINYDU_IOT_OS_SRC_MEDIA_DATA_MANAGER_BAIDU_MEDIA_FILE_STORER_H 00007 #define BAIDU_TINYDU_IOT_OS_SRC_MEDIA_DATA_MANAGER_BAIDU_MEDIA_FILE_STORER_H 00008 00009 #include <stdio.h> 00010 00011 namespace duer { 00012 00013 class MediaFileStorer { 00014 public: 00015 static MediaFileStorer& instance(); 00016 00017 int open(int type); 00018 00019 int write(const void* buff, size_t size); 00020 00021 int close(); 00022 00023 private: 00024 MediaFileStorer(); 00025 00026 MediaFileStorer(const MediaFileStorer&); 00027 00028 MediaFileStorer& operator=(const MediaFileStorer&); 00029 00030 void initialize(); 00031 00032 static MediaFileStorer _s_instance; 00033 bool _initialized; 00034 FILE* _file; 00035 int _file_index; 00036 }; 00037 00038 } // namespace duer 00039 00040 #endif // BAIDU_TINYDU_IOT_OS_SRC_MEDIA_DATA_MANAGER_BAIDU_MEDIA_FILE_STORER_H
Generated on Tue Jul 12 2022 16:28:52 by 1.7.2