DtvKit_ATSC3.0
Loading...
Searching...
No Matches
atsc_core_streamer_ts2hlsmaker.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3 *
4 * This file is part of a DTVKit Software Component
5 * You are permitted to copy, modify or distribute this file subject to the terms
6 * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
7 *
8 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
9 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
10 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
11 *
12 * If you or your organisation is not a member of DTVKit then you have access
13 * to this source code outside of the terms of the licence agreement
14 * and you are expected to delete this and any associated files immediately.
15 * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
16 *******************************************************************************/
17
18#ifndef ATSC_CORE_STREAMER_TS2HLSMARKER_H_
19#define ATSC_CORE_STREAMER_TS2HLSMARKER_H_
20
21#pragma once
22
23#include <stdio.h>
24#include <string.h>
25#include <sys/time.h>
26#include <queue>
27#include <list>
28#include <thread>
29
31
32extern "C" {
33#include <libavutil/timestamp.h>
34#include <libavformat/avformat.h>
35#include <libavutil/opt.h>
36}
37
45typedef struct
46{
47 int32_t iTsPos;
48 double dDuration;
50
51
56class CTs2Hls {
57public:
65
73
80 int32_t Start(const char *pPrefix, int32_t iPort, int32_t iId);
81
88 int32_t Thread();
89
96 int32_t SetChannel(int32_t iId, int32_t iCh);
97
104 static void activex_av_log(const char *pFmt, va_list vargs);
105
112 static void av_log_output(void *pPtr, int32_t iLevel, const char *pFmt, va_list vargs);
113private:
114 bool mRunning;
115 FILE* m_file;
116 int32_t m_ts_pos;
117 int32_t m_ts_size;
118 int32_t mChannel[ATSCCORE_FRONTEND_MAX];
119 timespec m_ts_time;
120 std::thread *mThread[ATSCCORE_FRONTEND_MAX];
121 int32_t change_stream_flag[ATSCCORE_FRONTEND_MAX];
122};
123
124#endif //ATSC_CORE_STREAMER_TS2HLSMARKER_H_
125
126
Definition atsc_core_streamer_ts2hlsmaker.h:56
int32_t SetChannel(int32_t iId, int32_t iCh)
SetChannel for demod.
static void activex_av_log(const char *pFmt, va_list vargs)
activex av log for demod
int32_t Thread()
Thread for demod activity.
static void av_log_output(void *pPtr, int32_t iLevel, const char *pFmt, va_list vargs)
av log output for demod
int32_t Start(const char *pPrefix, int32_t iPort, int32_t iId)
Start demod activity.
~CTs2Hls()
Distructor of ~CTs2Hls.
CTs2Hls()
Constructor of CTs2Hls.
Definition atsc_core_streamer_ts2hlsmaker.h:46
double dDuration
Definition atsc_core_streamer_ts2hlsmaker.h:48
int32_t iTsPos
Definition atsc_core_streamer_ts2hlsmaker.h:47