RetroArch
netplay.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2010-2014 - Hans-Kristian Arntzen
3  * Copyright (C) 2011-2017 - Daniel De Matteis
4  * Copyright (C) 2016-2017 - Gregor Richards
5  *
6  * RetroArch is free software: you can redistribute it and/or modify it under the terms
7  * of the GNU General Public License as published by the Free Software Found-
8  * ation, either version 3 of the License, or (at your option) any later version.
9  *
10  * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  * PURPOSE. See the GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along with RetroArch.
15  * If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 
19 #ifndef __RARCH_NETPLAY_H
20 #define __RARCH_NETPLAY_H
21 
22 #include <stdint.h>
23 #include <stddef.h>
24 
25 #include <boolean.h>
26 #include <libretro.h>
27 
28 #include "../../core.h"
29 
30 typedef struct netplay netplay_t;
31 
32 typedef struct mitm_server {
33  const char *name;
34  const char *description;
36 
38  { "nyc", "New York City, USA" },
39  { "madrid", "Madrid, Spain" },
40  { "montreal", "Montreal, Canada" },
41 };
42 
44 {
65 };
66 
67 /* Preferences for sharing digital devices */
69 {
76 };
77 
78 /* Preferences for sharing analog devices */
80 {
86 };
87 
88 int16_t input_state_net(unsigned port, unsigned device,
89  unsigned idx, unsigned id);
90 
91 void video_frame_net(const void *data, unsigned width,
92  unsigned height, size_t pitch);
93 
95 
96 size_t audio_sample_batch_net(const int16_t *data, size_t frames);
97 
98 bool init_netplay_deferred(const char* server, unsigned port);
99 
112 bool init_netplay(void *direct_host, const char *server, unsigned port);
113 
114 void deinit_netplay(void);
115 
117 
118 int netplay_rooms_parse(const char *buf);
119 
120 struct netplay_room* netplay_room_get(int index);
121 
122 int netplay_rooms_get_count(void);
123 
124 void netplay_rooms_free(void);
125 
127 
128 #endif
Definition: netplay.h:50
frontend_architecture
Definition: frontend_driver.h:46
Definition: netplay.h:61
bool netplay_driver_ctl(enum rarch_netplay_ctl_state state, void *data)
Definition: netplay_frontend.c:1495
Definition: netplay.h:46
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:8418
Definition: netplay.h:57
rarch_netplay_ctl_state
Definition: netplay.h:43
static const mitm_server_t netplay_mitm_server_list[]
Definition: netplay.h:37
GLsizeiptr size
Definition: glext.h:6559
includes all by default used to find thumbnails Please choose a single playlist first Add Entry Add Folder Select Files< multiple > Please fill out all required fields RetroArch updated successfully Please restart the application for the changes to take effect Contributors Move Down Load Remove Add Pass No shader passes Reset All Passes Download thumbnail Start on Download All Thumbnails This Playlist Configured in port
Definition: msg_hash_us.h:7699
Definition: netplay.h:73
Definition: ibxm.h:9
GLdouble GLdouble right
Definition: glext.h:11766
void video_frame_net(const void *data, unsigned width, unsigned height, size_t pitch)
Definition: netplay_frontend.c:539
void netplay_rooms_free(void)
Definition: netplay_room_parse.c:373
Definition: netplay.h:53
rarch_netplay_share_analog_preference
Definition: netplay.h:79
Definition: netplay_discovery.h:66
Definition: netplay.h:56
Definition: netplay.h:47
Definition: netplay.h:84
void netplay_get_architecture(char *frontend_architecture, size_t size)
Definition: netplay_frontend.c:809
Definition: netplay.h:83
bool init_netplay_deferred(const char *server, unsigned port)
Definition: netplay_frontend.c:262
Definition: netplay.h:64
void deinit_netplay(void)
Definition: netplay_frontend.c:1388
Definition: netplay.h:60
Definition: netplay.h:52
int netplay_rooms_parse(const char *buf)
Definition: netplay_room_parse.c:399
Definition: netplay.h:51
signed short int16_t
Definition: stdint.h:122
Definition: netplay.h:72
static uint64_t state[MAX_PADS]
Definition: xenon360_input.c:33
static struct frame frames[2]
Definition: ffmpeg_core.c:162
Definition: netplay.h:75
size_t audio_sample_batch_net(const int16_t *data, size_t frames)
Definition: netplay_frontend.c:552
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 idx
Definition: pixman-arm-neon-asm.h:96
GLuint index
Definition: glext.h:6671
struct netplay_room * netplay_room_get(int index)
Definition: netplay_room_parse.c:429
Definition: netplay.h:54
bool init_netplay(void *direct_host, const char *server, unsigned port)
Definition: netplay_frontend.c:1413
Definition: netplay_private.h:383
Definition: netplay.h:85
void audio_sample_net(int16_t left, int16_t right)
Definition: netplay_frontend.c:546
static char server[64]
Definition: net_retropad_core.c:73
rarch_netplay_share_digital_preference
Definition: netplay.h:68
GLint GLint GLsizei width
Definition: glext.h:6293
Definition: netplay.h:45
Definition: netplay.h:58
Definition: netplay.h:63
int netplay_rooms_get_count(void)
Definition: netplay_room_parse.c:449
const char * description
Definition: netplay.h:34
Definition: netplay.h:55
GLint left
Definition: glext.h:8393
Definition: netplay.h:48
Definition: netplay.h:74
struct nk_device device
Definition: nk_common.c:44
int16_t input_state_net(unsigned port, unsigned device, unsigned idx, unsigned id)
Definition: netplay_frontend.c:905
Definition: netplay.h:49
const char * name
Definition: netplay.h:33
Definition: netplay.h:59
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293
Definition: netplay.h:32
struct mitm_server mitm_server_t