Open Broadcaster Software
Free, open source software for live streaming and recording
obs-scene.h
Go to the documentation of this file.
1 /******************************************************************************
2  Copyright (C) 2013 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 "obs.h"
21 #include "obs-internal.h"
22 #include "graphics/matrix4.h"
23 
24 /* how obs scene! */
25 
26 struct item_action {
27  bool visible;
29 };
30 
32  volatile long ref;
33  volatile bool removed;
34 
35  struct obs_scene *parent;
36  struct obs_source *source;
37  volatile long active_refs;
38  volatile long defer_update;
40  bool visible;
41  bool selected;
42 
44  struct obs_sceneitem_crop crop;
45 
46  struct vec2 pos;
47  struct vec2 scale;
48  float rot;
50 
51  /* last width/height of the source, this is used to check whether
52  * ths transform needs updating */
55 
56  struct vec2 output_scale;
57  enum obs_scale_type scale_filter;
58 
59  struct matrix4 box_transform;
60  struct matrix4 draw_transform;
61 
62  enum obs_bounds_type bounds_type;
64  struct vec2 bounds;
65 
67 
68  pthread_mutex_t actions_mutex;
69  DARRAY(struct item_action) audio_actions;
70 
71  /* would do **prev_next, but not really great for reordering */
74 };
75 
76 struct obs_scene {
77  struct obs_source *source;
78 
79  pthread_mutex_t video_mutex;
80  pthread_mutex_t audio_mutex;
82 };
bool visible
Definition: obs-scene.h:40
Definition: obs-scene.h:76
bool user_visible
Definition: obs-scene.h:39
pthread_mutex_t audio_mutex
Definition: obs-scene.h:80
gs_texrender_t * item_render
Definition: obs-scene.h:43
volatile long active_refs
Definition: obs-scene.h:37
unsigned uint32_t
Definition: vc_stdint.h:31
uint32_t align
Definition: obs-scene.h:49
Definition: obs-internal.h:519
uint32_t last_height
Definition: obs-scene.h:54
typedef DARRAY(profiler_time_entry_t) profiler_time_entries_t
Definition: vec2.h:27
Definition: obs-scene.h:26
struct obs_scene_item * prev
Definition: obs-scene.h:72
unsigned __int64 uint64_t
Definition: vc_stdint.h:33
uint32_t bounds_align
Definition: obs-scene.h:63
bool selected
Definition: obs-scene.h:41
obs_bounds_type
Definition: obs.h:127
volatile long ref
Definition: obs-scene.h:32
obs_hotkey_pair_id toggle_visibility
Definition: obs-scene.h:66
volatile long defer_update
Definition: obs-scene.h:38
obs_scale_type
Definition: obs.h:114
bool visible
Definition: obs-scene.h:27
Definition: matrix4.h:32
struct obs_scene_item * first_item
Definition: obs-scene.h:81
size_t obs_hotkey_pair_id
Definition: obs-hotkey.h:26
pthread_mutex_t video_mutex
Definition: obs-scene.h:79
float rot
Definition: obs-scene.h:48
Definition: bounds.h:39
struct obs_source * source
Definition: obs-scene.h:36
struct obs_source * source
Definition: obs-scene.h:77
pthread_mutex_t actions_mutex
Definition: obs-scene.h:68
uint32_t last_width
Definition: obs-scene.h:53
Definition: obs-scene.h:31
uint64_t timestamp
Definition: obs-scene.h:28
struct obs_scene * parent
Definition: obs-scene.h:35
Main libobs header used by applications.
Definition: obs.h:1271
struct gs_texture_render gs_texrender_t
Definition: graphics.h:265
volatile bool removed
Definition: obs-scene.h:33
struct obs_scene_item * next
Definition: obs-scene.h:73