* @brief Method for seeking the memory video. It sets position according to provided arguments. * * @param new_position Requested new_position. * @param mode Chosen method of seeking. This argument changes how new_position is interpreted and * how seeking is performed. * @return int64_t actual new position in the file. */
| 42 | * @return int64_t actual new position in the file. |
| 43 | */ |
| 44 | int64_t MemoryVideoFile::Seek(int64_t new_position, int mode) { |
| 45 | switch (mode) { |
| 46 | case SEEK_SET: |
| 47 | position_ = new_position; |
| 48 | break; |
| 49 | case AVSEEK_SIZE: |
| 50 | return size_; |
| 51 | |
| 52 | default: |
| 53 | DALI_FAIL(make_string( |
| 54 | "Unsupported seeking method in FramesDecoderBase from memory file. Seeking method: ", |
| 55 | mode)); |
| 56 | } |
| 57 | |
| 58 | return position_; |
| 59 | } |
| 60 | |
| 61 | namespace detail { |
| 62 |
no test coverage detected