Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: AsciiFont GR-PEACH_video GraphicsFramework LCD_shield_config R_BSP TLV320_RBSP mbed-rtos mbed
MovFile.hpp
00001 #ifndef __MovFile__ 00002 #define __MovFile__ 00003 00004 #include <stdio.h> 00005 #include <stdint.h> 00006 #include "CppStandardHelper.hpp" 00007 00008 class MovFile { 00009 union __attribute__((packed)) Buffer { 00010 uint8_t array[4]; 00011 uint32_t value; 00012 }; 00013 static constexpr int bufSize = 32; 00014 static uint32_t frameSizes[bufSize]; 00015 static uint32_t audioSizes[bufSize]; 00016 static MovFile singleton; 00017 MovFile(); 00018 FILE *file; 00019 uint32_t numOfFrames; 00020 uint32_t *frameSizesP; 00021 uint32_t *audioSizesP; 00022 uint32_t stszAddress; 00023 uint32_t stcoAddress; 00024 uint32_t lastFrameAddress; 00025 int availableCount; 00026 void search(uint32_t pattern); 00027 void fillCaches(); 00028 00029 public: 00030 static MovFile *sharedFile() { 00031 return &singleton; 00032 } 00033 void start(FILE *f); 00034 bool read(char *videoBuf, char *audioBuf, uint32_t *audioSize); 00035 }; 00036 00037 #endif 00038
Generated on Fri Jul 15 2022 12:17:04 by
1.7.2