2006-04-14 23:47:33 +00:00
|
|
|
#ifndef foortphfoo
|
|
|
|
|
#define foortphfoo
|
|
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
|
|
/***
|
2006-06-19 21:53:48 +00:00
|
|
|
This file is part of PulseAudio.
|
2007-02-13 15:35:19 +00:00
|
|
|
|
|
|
|
|
Copyright 2006 Lennart Poettering
|
2006-04-14 23:47:33 +00:00
|
|
|
|
2006-06-19 21:53:48 +00:00
|
|
|
PulseAudio is free software; you can redistribute it and/or modify
|
2006-04-14 23:47:33 +00:00
|
|
|
it under the terms of the GNU Lesser General Public License as published
|
|
|
|
|
by the Free Software Foundation; either version 2 of the License,
|
|
|
|
|
or (at your option) any later version.
|
|
|
|
|
|
2006-06-19 21:53:48 +00:00
|
|
|
PulseAudio is distributed in the hope that it will be useful, but
|
2006-04-14 23:47:33 +00:00
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
2006-06-19 21:53:48 +00:00
|
|
|
along with PulseAudio; if not, write to the Free Software
|
2006-04-14 23:47:33 +00:00
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
|
USA.
|
|
|
|
|
***/
|
|
|
|
|
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
#include <sys/socket.h>
|
|
|
|
|
#include <sys/types.h>
|
2006-06-19 21:53:48 +00:00
|
|
|
#include <pulsecore/memblockq.h>
|
|
|
|
|
#include <pulsecore/memchunk.h>
|
2006-04-14 23:47:33 +00:00
|
|
|
|
|
|
|
|
typedef struct pa_rtp_context {
|
|
|
|
|
int fd;
|
|
|
|
|
uint16_t sequence;
|
|
|
|
|
uint32_t timestamp;
|
|
|
|
|
uint32_t ssrc;
|
|
|
|
|
uint8_t payload;
|
2006-04-15 15:26:42 +00:00
|
|
|
size_t frame_size;
|
2006-04-14 23:47:33 +00:00
|
|
|
} pa_rtp_context;
|
|
|
|
|
|
2006-04-15 15:26:42 +00:00
|
|
|
pa_rtp_context* pa_rtp_context_init_send(pa_rtp_context *c, int fd, uint32_t ssrc, uint8_t payload, size_t frame_size);
|
2006-04-14 23:47:33 +00:00
|
|
|
int pa_rtp_send(pa_rtp_context *c, size_t size, pa_memblockq *q);
|
|
|
|
|
|
2006-04-16 00:16:53 +00:00
|
|
|
pa_rtp_context* pa_rtp_context_init_recv(pa_rtp_context *c, int fd, size_t frame_size);
|
2006-08-18 19:55:18 +00:00
|
|
|
int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool);
|
2006-04-16 00:16:53 +00:00
|
|
|
|
|
|
|
|
void pa_rtp_context_destroy(pa_rtp_context *c);
|
2006-04-14 23:47:33 +00:00
|
|
|
|
|
|
|
|
pa_sample_spec* pa_rtp_sample_spec_fixup(pa_sample_spec *ss);
|
|
|
|
|
int pa_rtp_sample_spec_valid(const pa_sample_spec *ss);
|
|
|
|
|
|
2006-04-16 00:16:53 +00:00
|
|
|
uint8_t pa_rtp_payload_from_sample_spec(const pa_sample_spec *ss);
|
|
|
|
|
pa_sample_spec *pa_rtp_sample_spec_from_payload(uint8_t payload, pa_sample_spec *ss);
|
|
|
|
|
|
|
|
|
|
const char* pa_rtp_format_to_string(pa_sample_format_t f);
|
|
|
|
|
pa_sample_format_t pa_rtp_string_to_format(const char *s);
|
2006-04-14 23:47:33 +00:00
|
|
|
|
|
|
|
|
#endif
|