OSDN Git Service

FLV配信用パッチをマージ。(github:niwakazoider/peercast@21998fef7e24f437ef8d50e17562ba95eb5c1843)
[peercast-im/PeerCastIM.git] / core / common / channel.cpp
index 970ac9a..7168616 100644 (file)
@@ -39,6 +39,7 @@
 #include "ogg.h"
 #include "mms.h"
 #include "nsv.h"
+#include "flv.h"
 
 #include "icy.h"
 #include "url.h"
@@ -1374,6 +1375,10 @@ ChannelStream *Channel::createSource()
                                LOG_CHANNEL("Channel is OGG");
                                source = new OGGStream();
                                break;
+                       case ChanInfo::T_FLV:
+                               LOG_CHANNEL("Channel is FLV");
+                               source = new FLVStream();
+                               break;
                        default:
                                LOG_CHANNEL("Channel is Raw");
                                source = new RawStream();
@@ -2363,7 +2368,6 @@ Channel *ChanMgr::findAndRelay(ChanInfo &info)
                        return NULL;
                }
 
-               
                if (c->isPlaying() && (c->info.contentType!=ChanInfo::T_UNKNOWN))
                        break;
 
@@ -3997,6 +4001,7 @@ const char *ChanInfo::getTypeStr(TYPE t)
                case T_MPG: return "MPG";
                case T_NSV: return "NSV";
                case T_WMV: return "WMV";
+               case T_FLV:     return "FLV";
 
                case T_PLS: return "PLS";
                case T_ASX: return "ASX";
@@ -4052,6 +4057,8 @@ const char *ChanInfo::getTypeExt(TYPE t)
                        return ".wmv";
                case ChanInfo::T_WMA:
                        return ".wma";
+               case ChanInfo::T_FLV:
+                       return ".flv";
                default:
                        return "";
        }
@@ -4100,6 +4107,8 @@ ChanInfo::TYPE ChanInfo::getTypeFromStr(const char *str)
                return T_WMA;
        else if (stricmp(str,"WMV")==0)
                return T_WMV;
+       else if (stricmp(str,"FLV")==0)
+               return T_FLV;
        else if (stricmp(str,"PLS")==0)
                return T_PLS;
        else if (stricmp(str,"M3U")==0)