|
#include "Mp4ProxySrc.h"
#define MSG_CLOSE MSG_USR_DEFINE1
#define MSG_INIT MSG_USR_DEFINE2
#define MSG_PLAY MSG_USR_DEFINE3
Mp4ProxySrc::Mp4ProxySrc()
:m_session(NULL),
m_invalid(false),
m_pts_us(0),
m_prebuf_us(0),
m_speed(1.0),
m_i_frame(false),
m_conn_fd(-1)
{
memset( m_content, 0, sizeof(m_content) );
}
Mp4ProxySrc::~Mp4ProxySrc()
{
DEL_CLIENT_OBJ(m_session);
if( GetWorkEnv() != NULL )
leave_uwe();
}
void Mp4ProxySrc::Close()
{
notify_int( GetUTOID(), MSG_CLOSE, 0 );
}
int Mp4ProxySrc::Init( const char* content )
{
ASSERT( content != NULL );
strncpy( m_content, content, sizeof(m_content)-1 );
m_invalid = false;
notify_int( GetUTOID(), MSG_INIT, 0 );
ASSERT( content != NULL );
strncpy( m_content, content, sizeof(m_content)-1 );
m_invalid = false;
notify_int( GetUTOID(), MSG_INIT, 0 );
return 0; |
|