|
Gnash
0.8.11dev
|
#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 <cstdint>#include <iomanip>#include <map>#include <algorithm>#include <iterator>#include <fstream>#include <iostream>Functions | |
| void | writeFLVHeader (std::ostream &o) |
| bool | handleInvoke (rtmp::RTMP &r, FakeNC &nc, const std::uint8_t *payload, const std::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: More... | |
| bool handleInvoke | ( | rtmp::RTMP & | r, |
| FakeNC & | nc, | ||
| const std::uint8_t * | payload, | ||
| const std::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, gnash::hexify(), gnash::log_debug(), gnash::log_error(), 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 writeFLVHeader().
| int main | ( | int argc | , |
| char ** | argv | ||
| ) |
Some URLs to try are:
-u rtmp://tagesschau.fcod.llnwd.net:1935/a3705/d1 with -p 2010/0216/TV-20100216-0911-2401.hi or -p 2010/0216/TV-20100216-0911-2401.lo -u rtmp://ndr.fc.llnwd.net:1935/ndr/_definst_ with -p ndr_fs_nds_hi_flv and -s -1 (live stream)
Retrieve messages.
Retrieve video packets.
References Arg_parser::arguments(), Arg_parser::code(), Arg_parser::error(), gnash::LogFile::getDefaultInstance(), gnash::key::i, gnash::key::l, Arg_parser::no, url, and Arg_parser::yes.
| void replyBWCheck | ( | rtmp::RTMP & | r, |
| FakeNC & | , | ||
| double | txn | ||
| ) |
References gnash::SimpleBuffer::appendByte(), gnash::rtmp::RTMP::call(), gnash::amf::NULL_AMF0, and gnash::amf::write().
Referenced by handleInvoke().
| 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::log_debug(), gnash::amf::OBJECT_AMF0, gnash::amf::OBJECT_END_AMF0, gnash::amf::write(), and gnash::amf::writeProperty().
| void sendCreateStream | ( | rtmp::RTMP & | r, |
| FakeNC & | nc | ||
| ) |
References gnash::SimpleBuffer::appendByte(), gnash::rtmp::RTMP::call(), gnash::amf::NULL_AMF0, and gnash::amf::write().
Referenced by handleInvoke().
| 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 | ||
| ) |
References length, gnash::log_debug(), gnash::amf::NULL_AMF0, gnash::rtmp::RTMP::play(), and gnash::amf::write().
Referenced by handleInvoke().
| void writeFLVHeader | ( | std::ostream & | o | ) |
References gnash::arraySize(), gnash::image::end(), handleInvoke(), and gnash::key::r.
1.8.12