mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-03 00:47:34 +08:00
Unified code style (#2137)
This commit is contained in:
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
class MediaSinkInterface : public FrameWriterInterface, public TrackListener {
|
||||
public:
|
||||
typedef std::shared_ptr<MediaSinkInterface> Ptr;
|
||||
using Ptr = std::shared_ptr<MediaSinkInterface>;
|
||||
|
||||
MediaSinkInterface() = default;
|
||||
~MediaSinkInterface() override = default;
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
*/
|
||||
class MuteAudioMaker : public FrameDispatcher {
|
||||
public:
|
||||
typedef std::shared_ptr<MuteAudioMaker> Ptr;
|
||||
using Ptr = std::shared_ptr<MuteAudioMaker>;
|
||||
MuteAudioMaker() = default;
|
||||
~MuteAudioMaker() override = default;
|
||||
bool inputFrame(const Frame::Ptr &frame) override;
|
||||
@@ -70,7 +70,7 @@ private:
|
||||
*/
|
||||
class MediaSink : public MediaSinkInterface, public TrackSource{
|
||||
public:
|
||||
typedef std::shared_ptr<MediaSink> Ptr;
|
||||
using Ptr = std::shared_ptr<MediaSink>;
|
||||
MediaSink() = default;
|
||||
~MediaSink() override = default;
|
||||
|
||||
|
||||
@@ -11,13 +11,6 @@
|
||||
#include <math.h>
|
||||
#include "Common/config.h"
|
||||
#include "MultiMediaSourceMuxer.h"
|
||||
#include "Rtp/RtpSender.h"
|
||||
#include "Record/HlsRecorder.h"
|
||||
#include "Record/HlsMediaSource.h"
|
||||
#include "Rtsp/RtspMediaSourceMuxer.h"
|
||||
#include "Rtmp/RtmpMediaSourceMuxer.h"
|
||||
#include "TS/TSMediaSourceMuxer.h"
|
||||
#include "FMP4/FMP4MediaSourceMuxer.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace toolkit;
|
||||
|
||||
@@ -15,18 +15,19 @@
|
||||
#include "Common/MediaSource.h"
|
||||
#include "Common/MediaSink.h"
|
||||
#include "Record/Recorder.h"
|
||||
namespace mediakit {
|
||||
class HlsRecorder;
|
||||
class RtspMediaSourceMuxer;
|
||||
class RtmpMediaSourceMuxer;
|
||||
class TSMediaSourceMuxer;
|
||||
class FMP4MediaSourceMuxer;
|
||||
class RtpSender;
|
||||
#include "Rtp/RtpSender.h"
|
||||
#include "Record/HlsRecorder.h"
|
||||
#include "Record/HlsMediaSource.h"
|
||||
#include "Rtsp/RtspMediaSourceMuxer.h"
|
||||
#include "Rtmp/RtmpMediaSourceMuxer.h"
|
||||
#include "TS/TSMediaSourceMuxer.h"
|
||||
#include "FMP4/FMP4MediaSourceMuxer.h"
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
class MultiMediaSourceMuxer : public MediaSourceEventInterceptor, public MediaSink, public std::enable_shared_from_this<MultiMediaSourceMuxer>{
|
||||
public:
|
||||
typedef std::shared_ptr<MultiMediaSourceMuxer> Ptr;
|
||||
using Ptr = std::shared_ptr<MultiMediaSourceMuxer>;
|
||||
|
||||
class Listener {
|
||||
public:
|
||||
@@ -161,17 +162,17 @@ private:
|
||||
Stamp _stamp[2];
|
||||
std::weak_ptr<Listener> _track_listener;
|
||||
#if defined(ENABLE_RTPPROXY)
|
||||
std::unordered_map<std::string, std::shared_ptr<RtpSender>> _rtp_sender;
|
||||
std::unordered_map<std::string, RtpSender::Ptr> _rtp_sender;
|
||||
#endif //ENABLE_RTPPROXY
|
||||
|
||||
#if defined(ENABLE_MP4)
|
||||
std::shared_ptr<FMP4MediaSourceMuxer> _fmp4;
|
||||
FMP4MediaSourceMuxer::Ptr _fmp4;
|
||||
#endif
|
||||
std::shared_ptr<RtmpMediaSourceMuxer> _rtmp;
|
||||
std::shared_ptr<RtspMediaSourceMuxer> _rtsp;
|
||||
std::shared_ptr<TSMediaSourceMuxer> _ts;
|
||||
RtmpMediaSourceMuxer::Ptr _rtmp;
|
||||
RtspMediaSourceMuxer::Ptr _rtsp;
|
||||
TSMediaSourceMuxer::Ptr _ts;
|
||||
MediaSinkInterface::Ptr _mp4;
|
||||
std::shared_ptr<HlsRecorder> _hls;
|
||||
HlsRecorder::Ptr _hls;
|
||||
toolkit::EventPoller::Ptr _poller;
|
||||
|
||||
//对象个数统计
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
#ifndef _SRC_PACKET_CACHE_H_
|
||||
#define _SRC_PACKET_CACHE_H_
|
||||
/*
|
||||
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
|
||||
*
|
||||
* This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ZLMEDIAKIT_PACKET_CACHE_H_
|
||||
#define ZLMEDIAKIT_PACKET_CACHE_H_
|
||||
|
||||
#include "Common/config.h"
|
||||
#include "Util/List.h"
|
||||
|
||||
#pragma once
|
||||
namespace mediakit {
|
||||
/// 缓存刷新策略类
|
||||
class FlushPolicy {
|
||||
@@ -84,4 +94,5 @@ private:
|
||||
std::shared_ptr<packet_list> _cache;
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //ZLMEDIAKIT_PACKET_CACHE_H_
|
||||
|
||||
Reference in New Issue
Block a user