Mercurial > foo_out_sdl
comparison foosdk/sdk/foobar2000/helpers/input_stream_info_reader.h @ 1:20d02a178406 default tip
*: check in everything else
yay
| author | Paper <paper@tflc.us> |
|---|---|
| date | Mon, 05 Jan 2026 02:15:46 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 0:e9bb126753e7 | 1:20d02a178406 |
|---|---|
| 1 #pragma once | |
| 2 | |
| 3 #ifdef FOOBAR2000_DESKTOP | |
| 4 | |
| 5 template<typename input_t> | |
| 6 class input_stream_info_reader_impl : public input_stream_info_reader { | |
| 7 public: | |
| 8 input_t theInput; | |
| 9 | |
| 10 uint32_t get_stream_count() { | |
| 11 return theInput.get_stream_count(); | |
| 12 } | |
| 13 void get_stream_info(uint32_t index, file_info & out, abort_callback & a) { | |
| 14 theInput.get_stream_info(index, out, a); | |
| 15 } | |
| 16 uint32_t get_default_stream() { | |
| 17 return theInput.get_default_stream(); | |
| 18 } | |
| 19 }; | |
| 20 | |
| 21 template<typename input_t> | |
| 22 class input_stream_info_reader_entry_impl : public input_stream_info_reader_entry { | |
| 23 public: | |
| 24 input_stream_info_reader::ptr open(const char * path, file::ptr fileHint, abort_callback & abort) { | |
| 25 typedef input_stream_info_reader_impl<input_t> obj_t; | |
| 26 service_ptr_t<obj_t> p = new service_impl_t<obj_t>(); | |
| 27 p->theInput.open(fileHint, path, input_open_info_read, abort); | |
| 28 return p; | |
| 29 } | |
| 30 GUID get_guid() { | |
| 31 return input_t::g_get_guid(); | |
| 32 } | |
| 33 }; | |
| 34 | |
| 35 #endif // FOOBAR2000_DESKTOP |
