#include <rtp_stream.h>
Inherited by Audio, and Video.
Inheritance diagram for RTP_Stream:


Public Member Functions | |
| RTP_Stream (void) | |
| virtual | ~RTP_Stream () |
| int | ptype (void) |
| virtual void | Start (string ip, int port) |
| virtual void | Stop (void) |
Protected Member Functions | |
| void | init_pthread (void *__this) |
| void * | thread (void) |
| Thread that invokes the video (and audio too) frame acquisition/ transmission In the current implementation video process() is blocking, but may be made non-blocking again later (through poll()). In addition to bool result (false if no frames are available, there are now long process(), with additional <0 result for the video frame change/stream shut down detected in Video class. | |
| virtual long | process (void)=0 |
| void | rtcp (void) |
| void | rtcp_send_sr (void) |
| void | rtcp_send_sdes (void) |
Static Protected Member Functions | |
| static void * | pthread_f (void *_this) |
Protected Attributes | |
| pthread_t | pth |
| int | pth_id |
| pthread_mutex_t | pthm_flow |
| int | _ptype |
| bool | _play |
| Socket * | rtp_socket |
| Socket * | rtcp_socket |
| unsigned short | packet_num |
| unsigned long | SSRC |
| timeval | f_tv |
| timeval | rtcp_tv |
| long | rtcp_delay |
| unsigned long | timestamp |
| unsigned long | rtp_packets |
| unsigned long | rtp_octets |
| unsigned long | rtcp_c |
| string | stream_name |
Static Protected Attributes | |
| static int | _fd |
Definition at line 13 of file rtp_stream.h.
| RTP_Stream::RTP_Stream | ( | void | ) |
| virtual RTP_Stream::~RTP_Stream | ( | ) | [inline, virtual] |
Definition at line 16 of file rtp_stream.h.
| int RTP_Stream::ptype | ( | void | ) | [inline] |
Definition at line 18 of file rtp_stream.h.
References _ptype.
Referenced by Streamer::handler(), and Streamer::Main().
| void RTP_Stream::Start | ( | string | ip, | |
| int | port | |||
| ) | [virtual] |
Definition at line 37 of file rtp_stream.cpp.
References _play, D, rtcp_delay, rtcp_socket, rtcp_tv, rtp_octets, rtp_packets, rtp_socket, stream_name, and Socket::TYPE_UDP.
Referenced by Video::Start(), and Audio::Start().
| void RTP_Stream::Stop | ( | void | ) | [virtual] |
Reimplemented in Audio, and Video.
Definition at line 49 of file rtp_stream.cpp.
References _play, D, pthm_flow, and rtp_socket.
Referenced by Video::Stop(), Audio::Stop(), and thread().
| void RTP_Stream::init_pthread | ( | void * | __this | ) | [protected] |
Definition at line 28 of file rtp_stream.cpp.
References pth, pth_id, and pthread_f().
Referenced by Audio::Audio(), and Video::Video().
| void * RTP_Stream::pthread_f | ( | void * | _this | ) | [static, protected] |
| void * RTP_Stream::thread | ( | void | ) | [protected] |
Thread that invokes the video (and audio too) frame acquisition/ transmission In the current implementation video process() is blocking, but may be made non-blocking again later (through poll()). In addition to bool result (false if no frames are available, there are now long process(), with additional <0 result for the video frame change/stream shut down detected in Video class.
TODO: add stream restart
Definition at line 67 of file rtp_stream.cpp.
References _play, D, f, process(), pthm_flow, rtcp(), and Stop().
Referenced by pthread_f().
| virtual long RTP_Stream::process | ( | void | ) | [protected, pure virtual] |
| void RTP_Stream::rtcp | ( | void | ) | [protected] |
Definition at line 90 of file rtp_stream.cpp.
References f_tv, rtcp_delay, rtcp_send_sdes(), rtcp_send_sr(), rtcp_tv, and time_delta_us().
Referenced by thread().
| void RTP_Stream::rtcp_send_sr | ( | void | ) | [protected] |
Definition at line 106 of file rtp_stream.cpp.
References buf, f_tv, memcpy(), rtcp_socket, rtp_octets, rtp_packets, Socket::send(), SSRC, and timestamp.
Referenced by rtcp().
| void RTP_Stream::rtcp_send_sdes | ( | void | ) | [protected] |
Definition at line 138 of file rtp_stream.cpp.
References CNAME, memcpy(), rtcp_socket, Socket::send(), and SSRC.
Referenced by rtcp().
pthread_t RTP_Stream::pth [protected] |
int RTP_Stream::pth_id [protected] |
pthread_mutex_t RTP_Stream::pthm_flow [protected] |
int RTP_Stream::_ptype [protected] |
Definition at line 31 of file rtp_stream.h.
Referenced by Audio::Audio(), Video::process(), Audio::process(), ptype(), and Video::Video().
bool RTP_Stream::_play [protected] |
Definition at line 32 of file rtp_stream.h.
Referenced by Audio::Audio(), Video::process(), RTP_Stream(), Video::Start(), Start(), Video::Stop(), Stop(), thread(), and Video::Video().
Socket* RTP_Stream::rtp_socket [protected] |
Definition at line 33 of file rtp_stream.h.
Referenced by Video::process(), Audio::process(), Start(), Stop(), and Video::Video().
Socket* RTP_Stream::rtcp_socket [protected] |
Definition at line 34 of file rtp_stream.h.
Referenced by rtcp_send_sdes(), rtcp_send_sr(), Start(), and Video::Video().
unsigned short RTP_Stream::packet_num [protected] |
unsigned long RTP_Stream::SSRC [protected] |
Definition at line 37 of file rtp_stream.h.
Referenced by Audio::Audio(), Video::process(), Audio::process(), rtcp_send_sdes(), rtcp_send_sr(), and Video::Video().
struct timeval RTP_Stream::f_tv [protected] |
Definition at line 39 of file rtp_stream.h.
Referenced by Video::capture(), Audio::capture(), Video::process(), Audio::process(), rtcp(), rtcp_send_sr(), Audio::Start(), and Audio::Stop().
struct timeval RTP_Stream::rtcp_tv [protected] |
long RTP_Stream::rtcp_delay [protected] |
unsigned long RTP_Stream::timestamp [protected] |
Definition at line 42 of file rtp_stream.h.
Referenced by Video::process(), Audio::process(), and rtcp_send_sr().
unsigned long RTP_Stream::rtp_packets [protected] |
Definition at line 44 of file rtp_stream.h.
Referenced by Video::process(), Audio::process(), rtcp_send_sr(), and Start().
unsigned long RTP_Stream::rtp_octets [protected] |
Definition at line 45 of file rtp_stream.h.
Referenced by Video::process(), Audio::process(), rtcp_send_sr(), and Start().
unsigned long RTP_Stream::rtcp_c [protected] |
Definition at line 46 of file rtp_stream.h.
string RTP_Stream::stream_name [protected] |
Definition at line 52 of file rtp_stream.h.
Referenced by Audio::Audio(), RTP_Stream(), Start(), and Video::Video().
int RTP_Stream::_fd [static, protected] |
1.5.1