Convert to Util::Stream::*

This commit is contained in:
Peter Wu 2012-08-30 16:40:43 +02:00
parent 8543c1a678
commit beca2400dd
5 changed files with 12 additions and 6 deletions

View file

@ -14,6 +14,7 @@
#include <sys/time.h>
#include <mist/config.h>
#include "buffer_stream.h"
#include <mist/stream.h>
/// Holds all code unique to the Buffer.
namespace Buffer{
@ -168,7 +169,7 @@ namespace Buffer{
std::string name = conf.getString("stream_name");
SS = Socket::makeStream(name);
SS = Util::Stream::makeLive(name);
if (!SS.connected()) {
perror("Could not create stream socket");
return 1;

View file

@ -21,6 +21,7 @@
#include <mist/mp4.h>
#include <mist/config.h>
#include <sstream>
#include <mist/stream.h>
/// Holds everything unique to HTTP Dynamic Connector.
namespace Connector_HTTP{
@ -168,7 +169,7 @@ namespace Connector_HTTP{
if (ready4data){
if (!inited){
//we are ready, connect the socket!
ss = Socket::getStream(streamname);
ss = Util::Stream::getStream(streamname);
if (!ss.connected()){
#if DEBUG >= 1
fprintf(stderr, "Could not connect to server!\n");

View file

@ -17,6 +17,7 @@
#include <mist/flv_tag.h>
#include <mist/amf.h>
#include <mist/config.h>
#include <mist/stream.h>
/// Holds everything unique to HTTP Progressive Connector.
namespace Connector_HTTP{
@ -58,7 +59,7 @@ namespace Connector_HTTP{
if (ready4data){
if (!inited){
//we are ready, connect the socket!
ss = Socket::getStream(streamname);
ss = Util::Stream::getStream(streamname);
if (!ss.connected()){
#if DEBUG >= 1
fprintf(stderr, "Could not connect to server!\n");

View file

@ -5,6 +5,7 @@
#include <sstream>
#include <mist/config.h>
#include <mist/socket.h>
#include <mist/stream.h>
/// Contains the main code for the RAW connector.
/// Expects a single commandline argument telling it which stream to connect to,
@ -15,7 +16,7 @@ int main(int argc, char ** argv) {
conf.parseArgs(argc, argv);
//connect to the proper stream
Socket::Connection S = Socket::getStream(conf.getString("stream_name"));
Socket::Connection S = Util::Stream::getStream(conf.getString("stream_name"));
S.setBlocking(false);
if (!S.connected()){
std::cout << "Could not open stream " << conf.getString("stream_name") << std::endl;

View file

@ -16,6 +16,7 @@
#include <mist/flv_tag.h>
#include <mist/amf.h>
#include <mist/rtmpchunks.h>
#include <mist/stream.h>
/// Holds all functions and data unique to the RTMP Connector
namespace Connector_RTMP{
@ -76,7 +77,7 @@ int Connector_RTMP::Connector_RTMP(Socket::Connection conn){
if (ready4data){
if (!inited){
//we are ready, connect the socket!
SS = Socket::getStream(streamname);
SS = Util::Stream::getStream(streamname);
if (!SS.connected()){
#if DEBUG >= 1
fprintf(stderr, "Could not connect to server!\n");
@ -405,7 +406,8 @@ void Connector_RTMP::parseAMFCommand(AMF::Object & amfdata, int messagetype, int
if ((amfdata.getContentP(0)->StrValue() == "publish")){
if (amfdata.getContentP(3)){
streamname = amfdata.getContentP(3)->StrValue();
SS = Socket::getStream(streamname);
/// \todo implement push for MistPlayer or restrict and change to getLive
SS = Util::Stream::getStream(streamname);
if (!SS.connected()){
#if DEBUG >= 1
fprintf(stderr, "Could not connect to server!\n");