mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
Merge branch 'master' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/tuxbox
Origin commit data
------------------
Branch: ni/coolstream
Commit: a7e4be231c
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-24 (Mon, 24 Oct 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -234,7 +234,7 @@ fi
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# hack to define a short filename also for out-of-tree build
|
# hack to define a short filename also for out-of-tree build
|
||||||
if test `dirname $0` = `pwd`; then
|
if test `dirname $0` = `pwd` || test "$0" = ./configure; then
|
||||||
HWLIB_CFLAGS="$HWLIB_CFLAGS "'-D__file__=__FILE__'
|
HWLIB_CFLAGS="$HWLIB_CFLAGS "'-D__file__=__FILE__'
|
||||||
HWLIB_CFLAGS="$HWLIB_CFLAGS "'-D__path_file__=__FILE__'
|
HWLIB_CFLAGS="$HWLIB_CFLAGS "'-D__path_file__=__FILE__'
|
||||||
else
|
else
|
||||||
|
@@ -65,6 +65,37 @@
|
|||||||
#include <timerdclient/timerdclient.h>
|
#include <timerdclient/timerdclient.h>
|
||||||
#include <cs_api.h>
|
#include <cs_api.h>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include <libavformat/avformat.h>
|
||||||
|
}
|
||||||
|
|
||||||
|
class CStreamRec : public CRecordInstance, OpenThreads::Thread
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
AVFormatContext *ifcx;
|
||||||
|
AVFormatContext *ofcx;
|
||||||
|
AVBitStreamFilterContext *bsfc;
|
||||||
|
bool stopped;
|
||||||
|
bool interrupt;
|
||||||
|
time_t time_started;
|
||||||
|
int stream_index;
|
||||||
|
|
||||||
|
void GetPids(CZapitChannel * channel);
|
||||||
|
void FillMovieInfo(CZapitChannel * channel, APIDList & apid_list);
|
||||||
|
bool Start();
|
||||||
|
|
||||||
|
void Close();
|
||||||
|
bool Open(CZapitChannel * channel);
|
||||||
|
void run();
|
||||||
|
void WriteHeader(uint32_t duration);
|
||||||
|
public:
|
||||||
|
CStreamRec(const CTimerd::RecordingInfo * const eventinfo, std::string &dir, bool timeshift = false, bool stream_vtxt_pid = false, bool stream_pmt_pid = false, bool stream_subtitle_pids = false);
|
||||||
|
~CStreamRec();
|
||||||
|
record_error_msg_t Record();
|
||||||
|
bool Stop(bool remove_event = true);
|
||||||
|
static int Interrupt(void * data);
|
||||||
|
};
|
||||||
|
|
||||||
/* TODO:
|
/* TODO:
|
||||||
* nextRecording / pending recordings - needs testing
|
* nextRecording / pending recordings - needs testing
|
||||||
* check/fix askUserOnTimerConflict gui/timerlist.cpp -> getOverlappingTimers lib/timerdclient/timerdclient.cpp
|
* check/fix askUserOnTimerConflict gui/timerlist.cpp -> getOverlappingTimers lib/timerdclient/timerdclient.cpp
|
||||||
@@ -2250,7 +2281,7 @@ void CStreamRec::run()
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
AVCodecContext *codec = ifcx->streams[pkt.stream_index]->codec;
|
AVCodecContext *codec = ifcx->streams[pkt.stream_index]->codec;
|
||||||
if (bsfc && codec->codec_id == CODEC_ID_H264) {
|
if (bsfc && codec->codec_id == AV_CODEC_ID_H264) {
|
||||||
AVPacket newpkt = pkt;
|
AVPacket newpkt = pkt;
|
||||||
|
|
||||||
if (av_bitstream_filter_filter(bsfc, codec, NULL, &newpkt.data, &newpkt.size, pkt.data, pkt.size, pkt.flags & AV_PKT_FLAG_KEY) >= 0) {
|
if (av_bitstream_filter_filter(bsfc, codec, NULL, &newpkt.data, &newpkt.size, pkt.data, pkt.size, pkt.flags & AV_PKT_FLAG_KEY) >= 0) {
|
||||||
|
@@ -42,9 +42,11 @@
|
|||||||
#include <OpenThreads/Mutex>
|
#include <OpenThreads/Mutex>
|
||||||
#include <OpenThreads/Thread>
|
#include <OpenThreads/Thread>
|
||||||
|
|
||||||
|
#if 0
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <libavformat/avformat.h>
|
#include <libavformat/avformat.h>
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define REC_MAX_APIDS 10
|
#define REC_MAX_APIDS 10
|
||||||
#define FILENAMEBUFFERSIZE 1024
|
#define FILENAMEBUFFERSIZE 1024
|
||||||
@@ -244,6 +246,7 @@ class CRecordManager : public CMenuTarget /*, public CChangeObserver*/
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
class CStreamRec : public CRecordInstance, OpenThreads::Thread
|
class CStreamRec : public CRecordInstance, OpenThreads::Thread
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
@@ -270,5 +273,6 @@ class CStreamRec : public CRecordInstance, OpenThreads::Thread
|
|||||||
bool Stop(bool remove_event = true);
|
bool Stop(bool remove_event = true);
|
||||||
static int Interrupt(void * data);
|
static int Interrupt(void * data);
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -896,7 +896,7 @@ void CStreamStream::run()
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
AVCodecContext *codec = ifcx->streams[pkt.stream_index]->codec;
|
AVCodecContext *codec = ifcx->streams[pkt.stream_index]->codec;
|
||||||
if (bsfc && codec->codec_id == CODEC_ID_H264 ) {
|
if (bsfc && codec->codec_id == AV_CODEC_ID_H264 ) {
|
||||||
AVPacket newpkt = pkt;
|
AVPacket newpkt = pkt;
|
||||||
|
|
||||||
if (av_bitstream_filter_filter(bsfc, codec, NULL, &newpkt.data, &newpkt.size, pkt.data, pkt.size, pkt.flags & AV_PKT_FLAG_KEY) >= 0) {
|
if (av_bitstream_filter_filter(bsfc, codec, NULL, &newpkt.data, &newpkt.size, pkt.data, pkt.size, pkt.flags & AV_PKT_FLAG_KEY) >= 0) {
|
||||||
|
@@ -45,6 +45,7 @@
|
|||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include <global.h>
|
#include <global.h>
|
||||||
|
#include <driver/fontrenderer.h>
|
||||||
#include <system/helpers.h>
|
#include <system/helpers.h>
|
||||||
#include <gui/update_ext.h>
|
#include <gui/update_ext.h>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@@ -1253,6 +1254,7 @@ std::vector<std::string> split(const std::string &s, char delim)
|
|||||||
return vec;
|
return vec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if __cplusplus <= 201103L
|
||||||
std::string to_string(int i)
|
std::string to_string(int i)
|
||||||
{
|
{
|
||||||
std::stringstream s;
|
std::stringstream s;
|
||||||
@@ -1294,6 +1296,7 @@ std::string to_string(unsigned long long i)
|
|||||||
s << i;
|
s << i;
|
||||||
return s.str();
|
return s.str();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* C++ version 0.4 std::string style "itoa":
|
* C++ version 0.4 std::string style "itoa":
|
||||||
|
@@ -119,12 +119,17 @@ class CFileHelpers
|
|||||||
|
|
||||||
uint32_t GetWidth4FB_HW_ACC(const uint32_t _x, const uint32_t _w, const bool max=true);
|
uint32_t GetWidth4FB_HW_ACC(const uint32_t _x, const uint32_t _w, const bool max=true);
|
||||||
|
|
||||||
|
#if __cplusplus <= 201103L
|
||||||
std::string to_string(int);
|
std::string to_string(int);
|
||||||
std::string to_string(unsigned int);
|
std::string to_string(unsigned int);
|
||||||
std::string to_string(long);
|
std::string to_string(long);
|
||||||
std::string to_string(unsigned long);
|
std::string to_string(unsigned long);
|
||||||
std::string to_string(long long);
|
std::string to_string(long long);
|
||||||
std::string to_string(unsigned long long);
|
std::string to_string(unsigned long long);
|
||||||
|
#else
|
||||||
|
/* hack... */
|
||||||
|
#define to_string(x) std::to_string(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
std::string itoa(int value, int base);
|
std::string itoa(int value, int base);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user