diff options
Diffstat (limited to 'xrdpvr/xrdpvr_internal.h')
| -rw-r--r-- | xrdpvr/xrdpvr_internal.h | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/xrdpvr/xrdpvr_internal.h b/xrdpvr/xrdpvr_internal.h index 7efde4ee..995306c3 100644 --- a/xrdpvr/xrdpvr_internal.h +++ b/xrdpvr/xrdpvr_internal.h @@ -38,6 +38,7 @@ #define CMD_CLOSE_META_DATA_FILE 6 #define CMD_WRITE_META_DATA 7 #define CMD_DEINIT_XRDPVR 8 +#define CMD_SET_GEOMETRY 9 /* max number of bytes we can send in one pkt */ #define MAX_PDU_SIZE 1600 @@ -60,7 +61,7 @@ typedef struct stream * @param _s stream to create and init * @param _len number of bytes to store in stream ******************************************************************************/ -#define stream_new(_s, _len) \ +#define stream_new(_s, _len) \ do \ { \ (_s) = (STREAM *) calloc(1, sizeof(STREAM)); \ @@ -73,7 +74,7 @@ typedef struct stream /** * create a stream from an existing buffer ******************************************************************************/ -#define stream_from_buffer(_s, _buf, _buf_len) \ +#define stream_from_buffer(_s, _buf, _buf_len) \ do \ { \ (_s) = (STREAM *) calloc(1, sizeof(STREAM)); \ @@ -89,7 +90,7 @@ typedef struct stream * * @param _s the stream whose resources are to be released ******************************************************************************/ -#define stream_free(_s) \ +#define stream_free(_s) \ do \ { \ if (!(_s)->from_buf) \ @@ -104,14 +105,14 @@ typedef struct stream #define stream_length(_s) (int) ((_s)->p - (_s)->data) /** insert a 8 bit value into stream */ -#define stream_ins_u8(_s, _val) \ +#define stream_ins_u8(_s, _val) \ do \ { \ *(_s)->p++ = (unsigned char) (_val); \ } while(0) /** insert a 16 bit value into stream */ -#define stream_ins_u16_le(_s, _val) \ +#define stream_ins_u16_le(_s, _val) \ do \ { \ *(_s)->p++ = (unsigned char) ((_val) >> 0); \ @@ -119,7 +120,7 @@ typedef struct stream } while (0) /** insert a 32 bit value into stream */ -#define stream_ins_u32_le(_s, _val) \ +#define stream_ins_u32_le(_s, _val) \ do \ { \ *(_s)->p++ = (unsigned char) ((_val) >> 0); \ @@ -129,7 +130,7 @@ typedef struct stream } while (0) /** insert a 64 bit value into stream */ -#define stream_ins_u64_le(_s, _val) \ +#define stream_ins_u64_le(_s, _val) \ do \ { \ *(_s)->p++ = (unsigned char) ((_val) >> 0); \ @@ -143,7 +144,7 @@ typedef struct stream } while (0) /** insert array of chars into stream */ -#define stream_ins_byte_array(_s, _ba, _count) \ +#define stream_ins_byte_array(_s, _ba, _count) \ do \ { \ memcpy((_s)->p, (_ba), (_count)); \ @@ -151,14 +152,14 @@ typedef struct stream } while (0) /** extract a 8 bit value from stream */ -#define stream_ext_u8(_s, _v) \ +#define stream_ext_u8(_s, _v) \ do \ { \ (_v) = (u8) *(_s)->p++; \ } while (0) /** extract a 16 bit value from stream */ -#define stream_ext_u16_le(_s, _v) \ +#define stream_ext_u16_le(_s, _v) \ do \ { \ (_v) = (u16) ((_s)->p[1] << 8 | (_s)->p[0]); \ @@ -166,7 +167,7 @@ typedef struct stream } while (0) /** extract a 32 bit value from stream */ -#define stream_ext_u32_le(_s, _v) \ +#define stream_ext_u32_le(_s, _v) \ do \ { \ (_v) = (u32) ((_s)->p[3] << 24 | \ @@ -193,11 +194,6 @@ typedef struct _player_state_info } PLAYER_STATE_INFO; -static int xrdpvr_set_video_format(void *channel, uint32_t stream_id); -static int xrdpvr_set_audio_format(void *channel, uint32_t stream_id); -static int xrdpvr_send_video_data(void *channel, uint32_t stream_id, uint32_t data_len, uint8_t *data); -static int xrdpvr_send_audio_data(void *channel, uint32_t stream_id, uint32_t data_len, uint8_t *data); -static int xrdpvr_create_metadata_file(void *channel, char *filename); static int xrdpvr_write_to_client(void *channel, STREAM *s); #endif /* __XRDPVR_INTERNAL_H__ */ |
