Open Broadcaster Software
Free, open source software for live streaming and recording
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
image-file.h
Go to the documentation of this file.
1 /******************************************************************************
2  Copyright (C) 2016 by Hugh Bailey <obs.jim@gmail.com>
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 ******************************************************************************/
17 
18 #pragma once
19 
20 #include "graphics.h"
21 #include "libnsgif/libnsgif.h"
22 
23 struct gs_image_file {
30  bool loaded;
31 
37  int cur_frame;
38  int cur_loop;
40 
43 };
44 
46 
47 EXPORT void gs_image_file_init(gs_image_file_t *image, const char *file);
49 
52  uint64_t elapsed_time_ns);
uint8_t ** animation_frame_cache
Definition: image-file.h:34
gs_texture_t * texture
Definition: image-file.h:24
gif_bitmap_callback_vt bitmap_callbacks
Definition: image-file.h:42
unsigned uint32_t
Definition: vc_stdint.h:31
bool loaded
Definition: image-file.h:30
unsigned __int64 uint64_t
Definition: vc_stdint.h:33
gs_color_format
Definition: graphics.h:56
unsigned char uint8_t
Definition: vc_stdint.h:27
uint8_t * gif_data
Definition: image-file.h:33
int cur_frame
Definition: image-file.h:37
uint64_t cur_time
Definition: image-file.h:36
gif_animation gif
Definition: image-file.h:32
uint32_t cx
Definition: image-file.h:26
EXPORT void gs_image_file_update_texture(gs_image_file_t *image)
#define EXPORT
Definition: c99defs.h:49
uint8_t * animation_frame_data
Definition: image-file.h:35
Definition: image-file.h:23
int cur_loop
Definition: image-file.h:38
EXPORT bool gs_image_file_tick(gs_image_file_t *image, uint64_t elapsed_time_ns)
int last_decoded_frame
Definition: image-file.h:39
EXPORT void gs_image_file_free(gs_image_file_t *image)
struct gs_texture gs_texture_t
Definition: graphics.h:258
EXPORT void gs_image_file_init(gs_image_file_t *image, const char *file)
uint32_t cy
Definition: image-file.h:27
bool is_animated_gif
Definition: image-file.h:28
Definition: libnsgif.h:86
Definition: libnsgif.h:73
bool frame_updated
Definition: image-file.h:29
EXPORT void gs_image_file_init_texture(gs_image_file_t *image)
enum gs_color_format format
Definition: image-file.h:25
uint8_t * texture_data
Definition: image-file.h:41