51#include <libavcodec/avcodec.h>
52#include <libavformat/avformat.h>
53#include <libavutil/timestamp.h>
68#define _(str) gettext(str)
74extern "C" uint8_t *
CreateJpeg(uint8_t * image,
int *size,
int quality,
75 int width,
int height)
77 return (uint8_t *) RgbToJpeg((uchar *) image, width, height, *size, quality);
80#if defined(USE_JPEG) && JPEG_LIB_VERSION >= 80
93uint8_t *
CreateJpeg(uint8_t * image,
int raw_size,
int *size,
int quality,
94 int width,
int height)
96 struct jpeg_compress_struct cinfo;
97 struct jpeg_error_mgr jerr;
101 long unsigned int outsize;
105 cinfo.err = jpeg_std_error(&jerr);
106 jpeg_create_compress(&cinfo);
107 jpeg_mem_dest(&cinfo, &outbuf, &outsize);
109 cinfo.image_width = width;
110 cinfo.image_height = height;
111 cinfo.input_components = raw_size / height / width;
112 cinfo.in_color_space = JCS_RGB;
114 jpeg_set_defaults(&cinfo);
115 jpeg_set_quality(&cinfo, quality, TRUE);
116 jpeg_start_compress(&cinfo, TRUE);
118 rowStride = width * 3;
119 while (cinfo.next_scanline < cinfo.image_height) {
120 row_ptr[0] = &image[cinfo.next_scanline * rowStride];
121 jpeg_write_scanlines(&cinfo, row_ptr, 1);
124 jpeg_finish_compress(&cinfo);
125 jpeg_destroy_compress(&cinfo);
163 LOGDEBUG(
"device: %s:", __FUNCTION__);
172 LOGDEBUG(
"device: %s", __FUNCTION__);
183 LOGDEBUG(
"device: %s", __FUNCTION__);
192 LOGDEBUG(
"device: %s:", __FUNCTION__);
205 LOGDEBUG(
"device: %s: %d", __FUNCTION__, on);
210 cDevice::MakePrimaryDevice(on);
221 LOGDEBUG(
"device: %s:", __FUNCTION__);
222 if (!IsPrimaryDevice())
247 LOGDEBUG(
"device: %s: %d", __FUNCTION__, canReplay);
264 uint64_t startStateChange = cTimeMs::Now();
265 std::lock_guard<std::mutex> lock(
m_mutex);
274 bool needsResume =
true;
276 auto invalid = [
this, &event]() {
283 [&invalid](
const PlayEvent&) { invalid(); },
285 [&invalid](
const StopEvent&) { invalid(); },
294 [&invalid](
const PipEvent&) { invalid(); },
307 [&invalid](
const StopEvent&) { invalid(); },
353 if (receivedAudio && receivedVideo) {
360 }
else if (receivedAudio) {
361 LOGDEBUG(
"device: audio only detected");
364 }
else if (receivedVideo) {
365 LOGDEBUG(
"device: video only detected");
369 LOGFATAL(
"device: buffering threshold reached and no a/v available. This is a bug.");
382 int audioBehindVideoByMs;
392 if (audioBehindVideoByMs > 0) {
401 LOGFATAL(
"device: play event in PLAY state with NONE playback mode. This is a bug.");
507 uint64_t stopStateChange = cTimeMs::Now();
508 LOGDEBUG(
"device: state change done in %d ms", (
int)(stopStateChange - startStateChange));
659 LOGDEBUG(
"device: %s: %d", __FUNCTION__, play_mode);
667 case pmAudioOnlyBlack:
672 LOGERROR(
"device: %s: playmode not supported %d", play_mode);
710 LOGDEBUG(
"device: %s: %d %s", __FUNCTION__, speed, forward ?
"forward" :
"backward");
725 LOGDEBUG(
"device: %s:", __FUNCTION__);
773 LOGDEBUG(
"device: %s:", __FUNCTION__);
787 LOGDEBUG(
"device: %s: %s %p %d", __FUNCTION__, data[0] == 0x47 ?
"ts" :
"pes", data, size);
789 if (data[0] == 0x47) {
790 cDevice::StillPicture(data, size);
808 const uchar *currentPacketStart = data;
809 while (currentPacketStart < data + size) {
810 cPesVideo pesPacket((
const uint8_t*)currentPacketStart, size - (currentPacketStart - data));
815 LOGWARNING(
"device: %s: invalid PES packet", __FUNCTION__);
845 usleep(timeoutMs * 1000);
860 LOGDEBUG(
"device: %s: timeout %d ms", __FUNCTION__, timeout);
863 usleep(timeout * 1000);
879 LOGDEBUG(
"device: %s: %d", __FUNCTION__, videoDisplayFormat);
881 cDevice::SetVideoDisplayFormat(videoDisplayFormat);
896 LOGDEBUG(
"device: %s: %d", __FUNCTION__, videoFormat16_9);
934 aspectRatio = (double)width / (
double)height;
941 aspectRatio = (double)width / (
double)height;
967 LOGDEBUG2(
L_CODEC,
"Stream: %02X%02X%02X | %02X | %02X%02X | %02X%02X%02X | %02X%02X%02X%02X %02X%02X%02X%02X %02X%02X%02X%02X %02X%02X%02X%02X",
1016 cPesAudio pesPacket((
const uint8_t*)data, size);
1052 AVPacket *copy = avpkt;
1053 av_packet_free(©);
1055 }
while (avpkt !=
nullptr);
1092 LOGDEBUG(
"device: %s: %d", __FUNCTION__, volume);
1145 cPesVideo pesPacket((
const uint8_t*)data, size);
1153 if (stream->
GetCodecId() == AV_CODEC_ID_NONE) {
1165 int payloadOffset = 0;
1205 LOGDEBUG(
"device: %s: Detected audio or video only", __FUNCTION__);
1207 }
else if (!audioHasPts || !videoHasInputPts || !videoHasOutputPts)
1218 LOGDEBUG2(
L_AV_SYNC,
"First received PTS: %s (audio), %s (video) buffer fill levels: %ldms (audio) %ldms (video)",
1221 syncedAudioBufferFillLevelMs,
1222 syncedVideoBufferFillLevelMs);
1288 LOGWARNING(
"device: %s: wait for the last grab to be finished - skip!", __FUNCTION__);
1292 if (!width || !height) {
1293 LOGERROR(
"device: %s: Width or height must be not 0!", __FUNCTION__);
1301 LOGDEBUG2(
L_GRAB,
"device: %s: %d, %d, %d, %dx%d", __FUNCTION__, size, jpeg, quality, width, height);
1319 int screenWidth = 0;
1320 int screenHeight = 0;
1321 double aspectRatio = 0.0f;
1322 GetOsdSize(screenWidth, screenHeight, aspectRatio);
1324 int screenSize = screenWidth * screenHeight * 3;
1327 int grabWidth = width > 0 ? width : screenWidth;
1328 int grabHeight = height > 0 ? height : screenHeight;
1331 int videoWidth = screenWidth;
1332 int videoHeight = screenHeight;
1333 int videoX = 0, videoY = 0;
1338 uint8_t *video = NULL;
1342 LOGDEBUG2(
L_GRAB,
"device: %s: video is NULL, create black screen!", __FUNCTION__);
1343 video = (uint8_t *)calloc(1, screenSize);
1347 int pipWidth = screenWidth;
1348 int pipHeight = screenHeight;
1349 int pipX = 0, pipY = 0;
1354 uint8_t *pip = NULL;
1363 uint8_t *osd = NULL;
1370 uint8_t *videoResult = NULL;
1372 if (videoWidth != screenWidth || videoHeight != screenHeight || videoX != 0 || videoY != 0) {
1373 videoResult = (uint8_t *)calloc(1, screenSize);
1374 ret =
BlitVideo(videoResult, video, screenWidth, screenHeight, videoX, videoY, videoWidth, videoHeight);
1382 videoResult = video;
1387 ret =
BlitVideo(videoResult, pip, screenWidth, screenHeight, pipX, pipY, pipWidth, pipHeight);
1399 result = videoResult;
1401 result = (uint8_t *)malloc(screenSize);
1402 AlphaBlend(result, osd, videoResult, screenWidth, screenHeight);
1408 int scaledSize = screenSize;
1409 uint8_t *scaledResult;
1410 if (screenWidth != grabWidth || screenHeight != grabHeight) {
1411 scaledResult =
ScaleRgb24(result, &scaledSize, screenWidth, screenHeight, grabWidth, grabHeight);
1414 scaledResult = result;
1418 uint8_t *grabbedImage;
1420 grabbedImage =
CreateJpeg(scaledResult, &size, quality, grabWidth, grabHeight);
1423 int n = snprintf(buf,
sizeof(buf),
"P6\n%d\n%d\n255\n", grabWidth, grabHeight);
1424 grabbedImage = (uint8_t *)malloc(scaledSize + n);
1425 memcpy(grabbedImage, buf, n);
1426 memcpy(grabbedImage + n, scaledResult, scaledSize);
1427 size = scaledSize + n;
1430 LOGDEBUG2(
L_GRAB,
"device: %s: finished %s image (%dx%d, quality %d) at %p (size %d)", __FUNCTION__, jpeg ?
"jpg" :
"pnm", grabWidth, grabHeight, jpeg ? quality : 0, grabbedImage, size);
1433 return grabbedImage;
1462 __FUNCTION__, rect.Width(), rect.Height(), rect.X(), rect.Y());
1473 return " -a device\taudio device (fe. alsa: hw:0,0)\n"
1474 " -p device\taudio device for pass-through (hw:0,1)\n"
1475 " -c channel\taudio mixer channel name (fe. PCM)\n"
1476 " -d resolution\tdisplay resolution (fe. 1920x1080@50)\n"
1478 " -w workaround\tenable/disable workarounds\n"
1479 "\tdisable-ogl-osd disable openGL osd\n"
1498 switch (getopt(argc, argv,
"-a:c:p:d:w:")) {
1500 switch (getopt(argc, argv,
"-a:c:p:d:")) {
1516 if (!strcasecmp(
"disable-ogl-osd", optarg)) {
1519 fprintf(stderr,
_(
"Workaround '%s' unsupported\n"),
1528 fprintf(stderr,
_(
"We need no long options\n"));
1531 fprintf(stderr,
_(
"Missing argument for option '%c'\n"), optopt);
1534 fprintf(stderr,
_(
"Unknown option '%c'\n"), optopt);
1540 while (optind < argc) {
1541 fprintf(stderr,
_(
"Unhandled argument '%s'\n"), argv[optind++]);
1571 const uint8_t * argb,
int x,
int y)
1584char cSoftHdDevice::WritePngs(
void)
1592int cSoftHdDevice::MaxSizeGPUImageCache(
void)
1594 return m_pConfig->ConfigMaxSizeGPUImageCache;
1600int cSoftHdDevice::OglOsdIsDisabled(
void)
1608void cSoftHdDevice::SetDisableOglOsd(
void)
1618void cSoftHdDevice::SetEnableOglOsd(
void)
1750 LOGDEBUG(
"device: %s: Device is replaying, stop replay first", __FUNCTION__);
1754 if (IsPrimaryDevice(
false)) {
1783 std::lock_guard<std::mutex> lock(
m_mutex);
1824 std::lock_guard<std::mutex> lock(
m_mutex);
1857 LOGDEBUG(
"pip: %s: switch main stream to %d", __FUNCTION__, channel->Number());
1858 Channels->SwitchTo(channel->Number());
1923 LOGDEBUG(
"device: %s: pip is already enabled", __FUNCTION__);
1928 LOGDEBUG(
"device: %s: pip is already disabled", __FUNCTION__);
1937 LOGDEBUG(
"device: %s: disabling pip", __FUNCTION__);
1967 const cChannel *channel;
1968 const cChannel *first;
1980 channel = direction > 0 ? Channels->Next(channel) : Channels->Prev(channel);
1981 if (!channel && Setup.ChannelsWrap)
1982 channel = direction > 0 ? Channels->First() : Channels->Last();
1984 if (channel && !channel->GroupSep() && (device = cDevice::GetDevice(channel, 0,
false,
true)) &&
1985 device->ProvidesChannel(channel, 0, &ndr) && !ndr) {
1986 NewPip(channel->Number());
1990 if (channel == first) {
1991 Skins.Message(mtError, tr(
"Channel not available!"));
2070 channelNum = CurrentChannel();
2073 const cChannel *channel;
2077 if (channelNum && (channel = Channels->GetByNumber(channelNum)) &&
2078 (device = GetDevice(channel, 0,
false,
false))) {
2080 device->SwitchChannel(channel,
false);
2082 device->AttachReceiver(receiver);
2087 LOGDEBUG(
"pip: %s: New receiver for channel (%d) %s", __FUNCTION__, channel->Number(), channel->Name());
Audio and alsa module header file.
int BlitVideo(uint8_t *dst, uint8_t *src, int dstW, int dstH, int dstX, int dstY, int srcW, int srcH)
Blit the video on black background.
void AlphaBlend(uint8_t *result, uint8_t *front, uint8_t *back, const unsigned int width, const unsigned int height)
Blend two images.
uint8_t * ScaleRgb24(uint8_t *src, int *size, int srcW, int srcH, int dstW, int dstH)
Scale an image.
Some helper functions header file.
cAudioDecoder - Audio decoder class
void FlushBuffers(void)
Flush the audio decoder.
void Decode(const AVPacket *)
Decode an audio packet.
AVCodecID GetCodecId() const
void SetPassthrough(int)
Set audio pass-through mask.
void Open(AVCodecID, AVCodecParameters *=nullptr, AVRational={ .num=1,.den=90000 })
Open and initiate the audio decoder.
void Close(void)
Close the audio decoder.
bool IsValid()
Check if the PES packet is valid.
int GetPayloadSize()
Get the size of the PES payload.
int GetPacketLength()
Get the total length of the PES packet.
const uint8_t * GetPayload()
Get a pointer to the PES payload data.
bool HasPts()
Check if the PES packet contains a Presentation Time Stamp (PTS)
int64_t GetPts()
Get the Presentation Time Stamp (PTS) from the PES header.
cPipReceiver - receiver class for pip
AVPacket * PopAvPacket() override
Pop an audio AVPacket from the reassembly buffer.
Video stream reassembly buffer.
bool HasLeadingZero(const uint8_t *, int)
Check if video data has a leading zero byte before the start code.
bool ParseCodecHeader(const uint8_t *, int)
Parse video codec header to detect codec type.
AVPacket * PopAvPacket() override
virtual void Push(const uint8_t *data, int size, int64_t pts)
void Reset()
Reset the reassembly buffer.
cSoftHdAudio - Audio class
void LazyInit(void)
Initialize audio output module.
int64_t GetInputPtsMs(void)
int64_t GetHardwareOutputPtsTimebaseUnits(void)
Get the hardware output PTS in timebase units.
void SetVolume(int)
Set mixer volume (0-1000)
void DropSamplesOlderThanPtsMs(int64_t)
Drop samples older than the given PTS.
int64_t GetOutputPtsMs(void)
Get the output PTS of the ringbuffer.
void Exit(void)
Cleanup audio output module.
void SetPaused(bool)
Set audio playback paused state.
void SetPassthrough(int)
Set audio passthrough mask.
void FlushBuffers(void)
Flush audio buffers.
int ConfigVideoAudioDelayMs
config audio delay
const char * ConfigDisplayResolution
display resolution (syntax: "1920x1080@50")
const char * ConfigAudioPCMDevice
audio PCM device
bool ConfigDisableDeint
disable deinterlacer
int ConfigAdditionalBufferLengthMs
config size ms of a/v buffer
const char * ConfigAudioMixerChannel
audio mixer channel name
const char * ConfigAudioPassthroughDevice
audio passthrough device
void SetState(State)
Sets the device into the given state.
void OsdDrawARGB(int, int, int, int, int, const uint8_t *, int, int)
Draw an OSD pixmap.
cReassemblyBufferVideo m_videoReassemblyBuffer
video pes reassembly buffer
void Stop(void)
Called by VDR when the plugin is stopped.
bool m_pipUseAlt
use alternative pip position
cReassemblyBufferVideo m_pipReassemblyBuffer
pip pes reassembly buffer
cVideoStream * m_pPipStream
pointer to pip video stream
void PipSwapPosition(void)
Swap pip between normal and alternative position.
static constexpr int MIN_BUFFER_FILL_LEVEL_THRESHOLD_MS
min buffering threshold in ms
virtual void StillPicture(const uchar *, int)
Display the given I-frame as a still picture.
void PipSetSize(void)
Set size and position for the pip window.
cSoftOsdProvider * m_pOsdProvider
pointer to cSoftOsdProvider object
cVideoStream * m_pVideoStream
pointer to main video stream
cReassemblyBufferAudio m_audioReassemblyBuffer
audio pes reassembly buffer
std::atomic< bool > m_receivedAudio
flag if audio packets have been received
void HandlePip(enum PipState)
Handle the pip event.
cDvbSpuDecoder * m_pSpuDecoder
pointer to spu decoder
void OnEnteringState(State)
Actions to be performed when entering a state.
int Start(void)
Called by VDR when the plugin is started.
virtual void GetVideoSize(int &, int &, double &)
Get the video size.
int PlayAudioPkts(AVPacket *)
Play an audio packet.
virtual void GetOsdSize(int &, int &, double &)
Returns the width, height and aspect ratio the OSD.
void GetStats(int *, int *, int *)
Get statistics from the renderer.
void ClearAudio(void)
Clear all audio data from the decoder and ringbuffer.
void ResetChannelId(void)
Reset the channel ID (restarts audio)
virtual bool CanReplay(void) const
Returns true if this device can currently start a replay session.
virtual void SetDigitalAudioDevice(bool)
void SwapPipPosition(void)
Swap pip between normal and alternative position.
std::mutex m_mutex
mutex to lock the state machine
virtual bool HasDecoder(void) const
Tells whether this device has an MPEG decoder.
virtual void Clear(void)
Clears all video and audio data from the device.
void OnEventReceived(const Event &)
Event handler for playback state transitions.
void ResetPipChannel(void)
Resets the pip channel to the current live stream channel.
void Detach(void)
Detach the device.
virtual int PlayVideo(const uchar *, int)
Play a video packet of the main videostream.
void TogglePip(void)
Toggle picture-in-picture.
uint32_t m_screenRefreshRate
std::atomic< State > m_state
current plugin state, normal plugin start sets detached state
void OnLeavingState(State)
Actions to be performed when leaving a state.
virtual bool SetPlayMode(ePlayMode)
Sets the device into the given play mode.
cAudioDecoder * m_pAudioDecoder
pointer to cAudioDecoder object
void SetAudioCodec(enum AVCodecID, AVCodecParameters *, AVRational)
Open an audio codec.
cPipReceiver * m_pPipReceiver
cReceiver for pip stream
virtual void Play(void)
Sets the device into play mode (after a previous trick mode, or pause)
bool IsBufferingThresholdReached(void)
Check if the buffering threshold has been reached.
bool m_grabActive
simple lock variable skips a new grab request if the last one is still active
void DelPip(void)
Delete the pip receiver, clear decoder and display buffers and disable rendering the pip window.
cVideoRender * m_pRender
pointer to cVideoRender object
virtual void SetAudioChannelDevice(int)
const char * CommandLineHelp(void)
Return command line help string.
cSoftHdDevice(cSoftHdConfig *)
cSoftHdDevice constructor
int PlayPipVideo(const uchar *, int)
Play a video packet of the pip videostream.
cSoftHdAudio * m_pAudio
pointer to cSoftHdAudio object
cSoftHdConfig * m_pConfig
pointer to cSoftHdConfig object
virtual cRect CanScaleVideo(const cRect &, int taCenter)
Ask the output, if it can scale video.
virtual void SetVolumeDevice(int)
Sets the audio volume on this device (Volume = 0...255).
virtual int64_t GetSTC(void)
Gets the current System Time Counter, which can be used to synchronize audio, video and subtitles.
virtual bool Flush(int=0)
Flush the device output buffers.
bool IsDetached(void) const
Returns true, if the device is detached.
virtual void TrickSpeed(int, bool)
Set trick play speed.
virtual int PlayAudio(const uchar *, int, uchar)
Play an audio packet.
void SetPipSize(void)
Set size and position for the pip window.
void PipToggle(void)
Toggle picture-in-picture.
bool PipIsEnabled(void)
Returns true, if picture-in-picture is running.
std::mutex m_sizeMutex
mutex to lock screen size (which is accessed by different threads)
std::atomic< bool > m_receivedVideo
flag if video packets have been received
virtual int GetAudioChannelDevice(void)
int PlayVideoPkts(AVPacket *)
Play a video packet.
int m_pipChannelNum
current pip channel number
int GetBufferFillLevelThresholdMs()
Returns the buffer fill level threshold in milliseconds.
void SetPassthrough(int)
Set the passthrough mask (called from setup menu or conf)
int PlayVideoInternal(cVideoStream *, cReassemblyBufferVideo *, const uchar *, int)
Play a video packet.
const cChannel * m_pPipChannel
current pip channel
void HandleStillPicture(const uchar *data, int size)
The still picture data received from VDR can contain multiple PES packets.
virtual void SetVideoDisplayFormat(eVideoDisplayFormat)
Sets the video display format.
virtual void Freeze(void)
Puts the device into "freeze frame" mode.
void ChangePipChannel(int)
Change the pip channel.
virtual ~cSoftHdDevice(void)
cSoftHdDevice destructor
int m_audioChannelID
current audio channel ID
void PipDisable(void)
Stop picture-in-picture.
virtual void SetVideoFormat(bool)
Set the video format.
void SetScreenSize(int, int, uint32_t)
Set the screen size.
virtual void MakePrimaryDevice(bool)
Informs a device that it will be the primary device.
void SetVideoCodec(enum AVCodecID, AVCodecParameters *, AVRational)
Open a video codec.
bool m_pipActive
true, if pip is active
void PipEnable(void)
Start picture-in-picture.
void SetDisableDeint(void)
Disables deinterlacer (called from setup menu or conf)
virtual uchar * GrabImage(int &, bool, int, int, int)
Grabs the currently visible screen image.
virtual cSpuDecoder * GetSpuDecoder(void)
Get the device SPU decoder.
virtual void SetAudioTrackDevice(eTrackType)
void PipChannelSwap(void)
Swap the pip channel with main live channel.
std::atomic< PlaybackMode > m_playbackMode
current playback mode
void OsdClose(void)
Close the OSD.
int64_t GetFirstAudioPtsMsToPlay()
Calculate the first audio PTS that should be played during synchronized playback.
virtual void ScaleVideo(const cRect &=cRect::Null)
Scale the currently shown video.
int64_t GetFirstVideoPtsMsToPlay()
int ProcessArgs(int, char *[])
Process the command line arguments.
void SetEnablePip(bool)
Enable/ disable picture-in-picture.
void PipChannelChange(int)
Change the pip channel.
virtual bool Poll(cPoller &, int=0)
Returns true if the device itself or any of the file handles in Poller is ready for further action.
void Attach(void)
Attach the device again.
void NewPip(int)
Create a new pip receiver and render the pip stream.
cSoftHdGrab - Grabber class
cSoftOsdProvider - SoftHdDevice plugin OSD provider class
cVideoRender - Video render class
void PushPipFrame(AVFrame *)
bool IsOutputBufferFull(void)
Check, if the main render output buffer is full.
void ConvertPipBufToRgb(void)
Convert the pip drm buffer to an rgb image.
void ConvertVideoBufToRgb(void)
Convert the video drm buffer to an rgb image.
void ResetBufferReuseStrategy()
void OsdClear(void)
Clear the OSD (draw an empty/ transparent OSD)
cSoftHdGrab * GetGrab(int *, int *, int *, int *, int *, int)
Get the grabbed image.
void ClearDecoderToDisplayQueue(void)
Clear (empty) the decoder to display queue.
void Init(void)
Initialize the renderer.
void ResetDecodingStrategy()
void Exit(void)
Exit and cleanup the renderer.
void GetStats(int *, int *, int *)
Get some rendering statistics.
void SetTrickSpeed(int, int)
Set the trickspeed parameters.
void DisplayBlackFrame(void)
void PushMainFrame(AVFrame *)
void SetVideoOutputPosition(const cRect &)
Set size and position of the video on the screen.
int64_t GetOutputPtsMs(void)
Get the output PTS in milliseconds.
void SetPipActive(bool on)
void DisplayThreadHalt(void)
void ClearPipDecoderToDisplayQueue(void)
Clear (empty) the decoder to display queue.
void ClearGrab(void)
Clear the grab drm buffers.
int TriggerGrab(void)
Trigger a screen grab.
cQueue< cDrmBuffer > * GetPipOutputBuffer(void)
void ConvertOsdBufToRgb(void)
Convert the osd drm buffer to an rgb image.
void SchedulePlaybackStartAtPtsMs(int64_t ptsMs)
int64_t GetVideoClock(void)
Wrapper to get the video clock (m_pts)
void OsdDrawARGB(int, int, int, int, int, const uint8_t *, int, int)
Draw an OSD ARGB image.
void SetScheduleAudioResume(bool resume)
void SetDisplayOneFrameThenPause(bool pause)
void SetPlaybackPaused(bool pause)
void DisplayThreadResume(void)
void ResetFrameCounter(void)
Send start condition to video thread.
cQueue< cDrmBuffer > * GetMainOutputBuffer(void)
cVideoStream - Video stream class
void GetVideoSize(int *, int *, double *)
Get video size and aspect ratio.
void SetDeinterlacerDeactivated(bool deactivate)
void Flush(void)
Flushes the video stream by finalizing any pending data.
void StartDecoder()
Start the decoder.
void DecodingThreadResume(void)
void ClearVdrCoreToDecoderQueue(void)
Clears all video stream data, which is buffered to be decoded.
size_t GetAvPacketsFilled(void)
void DisableDeint(bool disable)
void CloseDecoder(void)
Close the decoder.
void Exit(void)
Exit video stream.
void CancelFilterThread(void)
Stop filter thread.
void DecodingThreadHalt(void)
void FlushDecoder(void)
Flush the decoder.
void Open(AVCodecID, AVCodecParameters *=nullptr, AVRational={ .num=1,.den=90000 })
Open a video codec.
bool PushAvPacket(AVPacket *avpkt)
Pushes a pre-assembled AVPacket directly to the processing queue.
bool IsInputBufferFull(void)
void ResetFilterThreadNeededCheck()
int64_t GetInputPtsMs(void)
void ResetTrickSpeedFramesSentCounter(void)
enum AVCodecID GetCodecId(void)
Audio decoder header file.
Video decoder header file.
std::variant< PlayEvent, PauseEvent, StopEvent, TrickSpeedEvent, StillPictureEvent, DetachEvent, AttachEvent, BufferUnderrunEvent, BufferingThresholdReachedEvent, PipEvent > Event
Atomic wrapper macros function header file.
Logger class header file.
#define LOGFATAL
Logger macros.
Misc function header file.
static const char * Timestamp2String(int64_t ts, uint8_t divisor)
Workaround for av_err2str() not working with C++.
PES packet parser header.
Pip receiver header file.
Main plugin class header file.
#define _(str)
gettext shortcut
uint8_t * CreateJpeg(uint8_t *image, int *size, int quality, int width, int height)
Call rgb to jpeg for C Plugin.
static void PrintStreamData(const uchar *payload)
Print the start code, stream id, length, first three bytes (start code) of the payload,...
Device class header file.
const char * EventToString(const Event &e)
const char * StateToString(State s)
Softhddevice osd header file.
Rendering class header file.
Videostream class header file.
#define VIDEO_PACKET_MAX
max number of video packets held in the buffer