diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-25 12:09:28 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-02-25 12:09:28 +0200 |
commit | 45049903a304a6762d5656890213c8ad5a1db3c3 (patch) | |
tree | 11335323e83e268120d69434d14298f6dadf7a2d /src/media.h | |
parent | d8b789caf6f5c2ab6ce435f51075a4a4cc83db4b (diff) |
Consolidating media handling
Diffstat (limited to 'src/media.h')
-rw-r--r-- | src/media.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/media.h b/src/media.h index ddaa2d3c..ebead352 100644 --- a/src/media.h +++ b/src/media.h | |||
@@ -30,18 +30,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | |||
30 | typedef uint16_t iMediaId; | 30 | typedef uint16_t iMediaId; |
31 | 31 | ||
32 | iDeclareType(Player) | 32 | iDeclareType(Player) |
33 | iDeclareType(GmImageInfo) | 33 | iDeclareType(GmMediaInfo) |
34 | iDeclareType(GmAudioInfo) | ||
35 | 34 | ||
36 | struct Impl_GmImageInfo { | 35 | struct Impl_GmMediaInfo { |
37 | iInt2 size; | 36 | const char *type; /* MIME */ |
38 | size_t numBytes; | 37 | size_t numBytes; |
39 | const char *mime; | ||
40 | iBool isPermanent; | ||
41 | }; | ||
42 | |||
43 | struct Impl_GmAudioInfo { | ||
44 | const char *mime; | ||
45 | iBool isPermanent; | 38 | iBool isPermanent; |
46 | }; | 39 | }; |
47 | 40 | ||
@@ -54,17 +47,20 @@ enum iMediaFlags { | |||
54 | }; | 47 | }; |
55 | 48 | ||
56 | void clear_Media (iMedia *); | 49 | void clear_Media (iMedia *); |
50 | iBool setUrl_Media (iMedia *, uint16_t linkId, const iString *url); | ||
57 | iBool setData_Media (iMedia *, uint16_t linkId, const iString *mime, const iBlock *data, int flags); | 51 | iBool setData_Media (iMedia *, uint16_t linkId, const iString *mime, const iBlock *data, int flags); |
58 | 52 | ||
59 | iMediaId findLinkImage_Media (const iMedia *, uint16_t linkId); | 53 | iMediaId findLinkImage_Media (const iMedia *, uint16_t linkId); |
60 | iBool imageInfo_Media (const iMedia *, iMediaId imageId, iGmImageInfo *info_out); | 54 | iBool imageInfo_Media (const iMedia *, iMediaId imageId, iGmMediaInfo *info_out); |
55 | iInt2 imageSize_Media (const iMedia *, iMediaId imageId); | ||
61 | SDL_Texture * imageTexture_Media (const iMedia *, iMediaId imageId); | 56 | SDL_Texture * imageTexture_Media (const iMedia *, iMediaId imageId); |
62 | 57 | ||
63 | size_t numAudio_Media (const iMedia *); | 58 | size_t numAudio_Media (const iMedia *); |
64 | iMediaId findLinkAudio_Media (const iMedia *, uint16_t linkId); | 59 | iMediaId findLinkAudio_Media (const iMedia *, uint16_t linkId); |
65 | iBool audioInfo_Media (const iMedia *, iMediaId audioId, iGmAudioInfo *info_out); | 60 | iBool audioInfo_Media (const iMedia *, iMediaId audioId, iGmMediaInfo *info_out); |
66 | iPlayer * audioPlayer_Media (const iMedia *, iMediaId audioId); | 61 | iPlayer * audioPlayer_Media (const iMedia *, iMediaId audioId); |
67 | 62 | ||
63 | iMediaId findLinkDownload_Media (const iMedia *, uint16_t linkId); | ||
68 | 64 | ||
69 | /*----------------------------------------------------------------------------------------------*/ | 65 | /*----------------------------------------------------------------------------------------------*/ |
70 | 66 | ||