| 110 | |
| 111 | public: |
| 112 | TimelineSolidColorReader(int width, |
| 113 | int height, |
| 114 | int fps_num, |
| 115 | int fps_den, |
| 116 | int64_t length_frames, |
| 117 | const QColor& fill_color) |
| 118 | : color(fill_color) { |
| 119 | info.has_video = true; |
| 120 | info.has_audio = false; |
| 121 | info.width = width; |
| 122 | info.height = height; |
| 123 | info.fps = Fraction(fps_num, fps_den); |
| 124 | info.video_length = length_frames; |
| 125 | info.duration = static_cast<float>(length_frames / info.fps.ToDouble()); |
| 126 | info.sample_rate = 48000; |
| 127 | info.channels = 2; |
| 128 | info.audio_stream_index = -1; |
| 129 | } |
| 130 | |
| 131 | openshot::CacheBase* GetCache() override { return &cache; } |
| 132 | bool IsOpen() override { return is_open; } |