1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

init copy & modify

This commit is contained in:
Derek Dai 2016-09-14 16:24:14 +08:00
parent 9cd56f3eff
commit 5f39158f45
No known key found for this signature in database
GPG key ID: E109CC97553EF009
6 changed files with 1674 additions and 0 deletions

98
src/ctl/ctl-src.h Normal file
View file

@ -0,0 +1,98 @@
/*
* MiracleCast - Wifi-Display/Miracast Implementation
*
* MiracleCast is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* MiracleCast is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with MiracleCast; If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CTL_SRC_H
#define CTL_SRC_H
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <poll.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <systemd/sd-event.h>
#include <time.h>
#include <unistd.h>
#include "ctl.h"
#include "rtsp.h"
#include "shl_macro.h"
#include "shl_util.h"
#include "wfd.h"
struct ctl_src {
sd_event *event;
char *local;
char *session;
// char *url;
// char *uibc_config;
// char *uibc_setting;
struct sockaddr_storage addr;
size_t addr_size;
int fd;
sd_event_source *fd_source;
struct rtsp *rtsp;
bool connected : 1;
bool hup : 1;
//
// uint32_t resolutions_cea;
// uint32_t resolutions_vesa;
// uint32_t resolutions_hh;
//
// int hres;
// int vres;
};
//extern int rstp_port;
//extern bool uibc;
//extern int uibc_port;
//
//struct ctl_sink {
// sd_event *event;
//
// char *target;
// char *session;
// char *url;
// char *uibc_config;
// char *uibc_setting;
// struct sockaddr_storage addr;
// size_t addr_size;
// int fd;
// sd_event_source *fd_source;
//
// struct rtsp *rtsp;
//
// bool connected : 1;
// bool hup : 1;
//
// uint32_t resolutions_cea;
// uint32_t resolutions_vesa;
// uint32_t resolutions_hh;
//
// int hres;
// int vres;
//};
#endif /* CTL_SRC_H */