2020-03-06 13:00:06 +08:00
|
|
|
|
/*
|
2020-04-04 20:30:09 +08:00
|
|
|
|
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
|
2020-03-06 13:00:06 +08:00
|
|
|
|
*
|
|
|
|
|
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
|
|
|
|
|
*
|
2020-04-04 20:30:09 +08:00
|
|
|
|
* Use of this source code is governed by MIT license that can be found in the
|
|
|
|
|
* LICENSE file in the root of the source tree. All contributing project authors
|
|
|
|
|
* may be found in the AUTHORS file in the root of the source tree.
|
2020-03-06 13:00:06 +08:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#if defined(ENABLE_RTPPROXY)
|
|
|
|
|
#include "Decoder.h"
|
|
|
|
|
#include "PSDecoder.h"
|
|
|
|
|
#include "TSDecoder.h"
|
|
|
|
|
namespace mediakit {
|
|
|
|
|
Decoder::Ptr Decoder::createDecoder(Decoder::Type type) {
|
|
|
|
|
switch (type){
|
|
|
|
|
case decoder_ps : return std::make_shared<PSDecoder>();
|
|
|
|
|
case decoder_ts : return std::make_shared<TSDecoder>();
|
|
|
|
|
default : return nullptr;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}//namespace mediakit
|
|
|
|
|
#endif//defined(ENABLE_RTPPROXY)
|