Functions

rtmpget.cpp File Reference

#include "RTMP.h"
#include <string>
#include "log.h"
#include "arg_parser.h"
#include "SimpleBuffer.h"
#include "AMF.h"
#include "GnashAlgorithm.h"
#include "GnashSleep.h"
#include "URL.h"
#include <boost/cstdint.hpp>
#include <iomanip>
#include <map>
#include <algorithm>
#include <iterator>
#include <fstream>

Functions

void writeFLVHeader (std::ostream &o)
bool handleInvoke (rtmp::RTMP &r, FakeNC &nc, const boost::uint8_t *payload, const boost::uint8_t *end)
void sendConnectPacket (rtmp::RTMP &r, FakeNC &nc, const std::string &app, const std::string &ver, const std::string &swfurl, const std::string &tcurl, const std::string &pageurl)
void sendCheckBW (rtmp::RTMP &r, FakeNC &nc)
void replyBWCheck (rtmp::RTMP &r, FakeNC &, double txn)
void sendPausePacket (rtmp::RTMP &r, FakeNC &nc, bool flag, double time)
void sendPlayPacket (rtmp::RTMP &r, FakeNC &nc)
void sendCreateStream (rtmp::RTMP &r, FakeNC &nc)
void sendDeleteStream (rtmp::RTMP &r, FakeNC &nc, double id)
void sendFCSubscribe (rtmp::RTMP &r, FakeNC &nc, const std::string &subscribepath)
int main (int argc, char **argv)
 Some URLs to try are:

Function Documentation

bool handleInvoke ( rtmp::RTMP r,
FakeNC &  nc,
const boost::uint8_t *  payload,
const boost::uint8_t *  end 
)

_result means it's the answer to a remote method call initiated by us.

Issue NetStream.play command.

Allows quick downloading.

These are remote function calls initiated by the server .

This must return a value. It can be anything.

If the server sends this, we reply (the call should contain a callback object!).

Don't know when it sends this.

Or this.

References __FUNCTION__, gnash::rtmp::RTMP::close(), gnash::key::e, EXIT_SUCCESS, gnash::hexify(), gnash::amf::NULL_AMF0, gnash::amf::NUMBER_AMF0, gnash::amf::OBJECT_AMF0, gnash::amf::OBJECT_END_AMF0, gnash::amf::readNumber(), gnash::amf::readString(), replyBWCheck(), sendCreateStream(), sendPlayPacket(), gnash::rtmp::RTMP::setBufferTime(), gnash::amf::STRING_AMF0, and test::v.

Referenced by main().

int main ( int  argc,
char **  argv 
)
void replyBWCheck ( rtmp::RTMP r,
FakeNC &  ,
double  txn 
)
void sendCheckBW ( rtmp::RTMP r,
FakeNC &  nc 
)
void sendConnectPacket ( rtmp::RTMP r,
FakeNC &  nc,
const std::string &  app,
const std::string &  ver,
const std::string &  swfurl,
const std::string &  tcurl,
const std::string &  pageurl 
)

These functions create an RTMP call buffer and send it. They mimic NetConnection.call() methods and replies to server calls. If a call is initiated by us, we send our own call number. If we are replying to a server call, we send the server's call number back.

Call number?

References gnash::SimpleBuffer::appendByte(), gnash::rtmp::RTMP::call(), gnash::amf::OBJECT_AMF0, gnash::amf::OBJECT_END_AMF0, gnash::amf::write(), and gnash::amf::writeProperty().

Referenced by main().

void sendCreateStream ( rtmp::RTMP r,
FakeNC &  nc 
)
void sendDeleteStream ( rtmp::RTMP r,
FakeNC &  nc,
double  id 
)
void sendFCSubscribe ( rtmp::RTMP r,
FakeNC &  nc,
const std::string &  subscribepath 
)
void sendPausePacket ( rtmp::RTMP r,
FakeNC &  nc,
bool  flag,
double  time 
)
void sendPlayPacket ( rtmp::RTMP r,
FakeNC &  nc 
)
void writeFLVHeader ( std::ostream &  o  ) 

References gnash::arraySize().

Referenced by main().