This program plays QuickTime movies on GR-Peach
Dependencies: AsciiFont GR-PEACH_video GraphicsFramework LCD_shield_config R_BSP TLV320_RBSP mbed-rtos mbed
Requirements
- GR-Peach
- GR-Peach Audio Camera Shield or I²S compatible audio DAC
- GR-Peach LCD Shield
- USB memory stick
How to play movie files
- Encode movie files
encode movies with ffmpeg
$ ffmpeg -i <input -ar 44100 -acodec pcm_s16le -s 480x270 -vcodec mjpeg -q:v 3 -movflags faststart -threads 4 -vf fps=30 <output>.mov
- Copy movies to the root directory of USB memory
- Build and upload this program
- Run it
USBHost/FATFileSystem/FATDirHandle.h@1:3e638b9e91cd, 2017-03-12 (annotated)
- Committer:
- mtkrtk
- Date:
- Sun Mar 12 02:01:46 2017 +0000
- Revision:
- 1:3e638b9e91cd
- Parent:
- 0:d0f130e27d32
fixed lcd contrast pin
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mtkrtk | 0:d0f130e27d32 | 1 | /* mbed Microcontroller Library |
mtkrtk | 0:d0f130e27d32 | 2 | * Copyright (c) 2006-2012 ARM Limited |
mtkrtk | 0:d0f130e27d32 | 3 | * |
mtkrtk | 0:d0f130e27d32 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
mtkrtk | 0:d0f130e27d32 | 5 | * of this software and associated documentation files (the "Software"), to deal |
mtkrtk | 0:d0f130e27d32 | 6 | * in the Software without restriction, including without limitation the rights |
mtkrtk | 0:d0f130e27d32 | 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
mtkrtk | 0:d0f130e27d32 | 8 | * copies of the Software, and to permit persons to whom the Software is |
mtkrtk | 0:d0f130e27d32 | 9 | * furnished to do so, subject to the following conditions: |
mtkrtk | 0:d0f130e27d32 | 10 | * |
mtkrtk | 0:d0f130e27d32 | 11 | * The above copyright notice and this permission notice shall be included in |
mtkrtk | 0:d0f130e27d32 | 12 | * all copies or substantial portions of the Software. |
mtkrtk | 0:d0f130e27d32 | 13 | * |
mtkrtk | 0:d0f130e27d32 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
mtkrtk | 0:d0f130e27d32 | 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
mtkrtk | 0:d0f130e27d32 | 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
mtkrtk | 0:d0f130e27d32 | 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
mtkrtk | 0:d0f130e27d32 | 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
mtkrtk | 0:d0f130e27d32 | 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
mtkrtk | 0:d0f130e27d32 | 20 | * SOFTWARE. |
mtkrtk | 0:d0f130e27d32 | 21 | */ |
mtkrtk | 0:d0f130e27d32 | 22 | #ifndef MBED_FATDIRHANDLE_H |
mtkrtk | 0:d0f130e27d32 | 23 | #define MBED_FATDIRHANDLE_H |
mtkrtk | 0:d0f130e27d32 | 24 | |
mtkrtk | 0:d0f130e27d32 | 25 | #include "drivers/DirHandle.h" |
mtkrtk | 0:d0f130e27d32 | 26 | |
mtkrtk | 0:d0f130e27d32 | 27 | using namespace mbed; |
mtkrtk | 0:d0f130e27d32 | 28 | |
mtkrtk | 0:d0f130e27d32 | 29 | class FATDirHandle : public DirHandle { |
mtkrtk | 0:d0f130e27d32 | 30 | |
mtkrtk | 0:d0f130e27d32 | 31 | public: |
mtkrtk | 0:d0f130e27d32 | 32 | FATDirHandle(const FATFS_DIR &the_dir); |
mtkrtk | 0:d0f130e27d32 | 33 | virtual int closedir(); |
mtkrtk | 0:d0f130e27d32 | 34 | virtual struct dirent *readdir(); |
mtkrtk | 0:d0f130e27d32 | 35 | virtual void rewinddir(); |
mtkrtk | 0:d0f130e27d32 | 36 | virtual off_t telldir(); |
mtkrtk | 0:d0f130e27d32 | 37 | virtual void seekdir(off_t location); |
mtkrtk | 0:d0f130e27d32 | 38 | |
mtkrtk | 0:d0f130e27d32 | 39 | private: |
mtkrtk | 0:d0f130e27d32 | 40 | FATFS_DIR dir; |
mtkrtk | 0:d0f130e27d32 | 41 | struct dirent cur_entry; |
mtkrtk | 0:d0f130e27d32 | 42 | |
mtkrtk | 0:d0f130e27d32 | 43 | }; |
mtkrtk | 0:d0f130e27d32 | 44 | |
mtkrtk | 0:d0f130e27d32 | 45 | #endif |
mtkrtk | 0:d0f130e27d32 | 46 |