Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vpp support fixes #6

Merged
merged 8 commits into from
Sep 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
User johns
Date:

Fix bug: EnableDPMSatBlackScreen only available with USE_SCREENSAVER.
- H264_EOS_TRICKSPEED and USE_MPEG_COMPLETE enabled as default.

User master_red
Date: Mon Aug 10 15:29:33 CEST 2015

Configurable enable DPMS, while black screen is displayed.

User johns
Date: Tue Jun 30 10:12:09 CET 2015

Fix bug: wrong and crash, if vdr draws pixmaps outside OSD.
Fix bug: wrong version number check for av_frame_alloc(), ...
Workaround for ffmpeg 2.6 artifacts.
Fix bug: brightness and .. are calculated wrong.
Add automatic frame rate detection for older ffmpeg versions.
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ endif
# use libav/ffmpeg filters
AVFILTER ?= $(shell pkg-config --exists libavfilter && echo 1)

CONFIG := -DDEBUG #-DOSD_DEBUG # enable debug output+functions
#CONFIG := -DDEBUG #-DOSD_DEBUG # enable debug output+functions
#CONFIG += -DSTILL_DEBUG=2 # still picture debug verbose level

CONFIG += -DAV_INFO -DAV_INFO_TIME=3000 # info/debug a/v sync
#CONFIG += -DUSE_PIP # PIP support
CONFIG += -DHAVE_PTHREAD_NAME # supports new pthread_setname_np
#CONFIG += -DNO_TS_AUDIO # disable ts audio parser
#CONFIG += -DUSE_TS_VIDEO # build new ts video parser
#CONFIG += -DUSE_MPEG_COMPLETE # support only complete mpeg packets
#CONFIG += -DH264_EOS_TRICKSPEED # insert seq end packets for trickspeed
CONFIG += -DUSE_MPEG_COMPLETE # support only complete mpeg packets
CONFIG += -DH264_EOS_TRICKSPEED # insert seq end packets for trickspeed
#CONDIF += -DDUMP_TRICKSPEED # dump trickspeed packets
#CONFIG += -DUSE_BITMAP # VDPAU, use bitmap surface for OSD
CONFIG += -DUSE_VDR_SPU # use VDR SPU decoder.
Expand Down
26 changes: 15 additions & 11 deletions codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,13 +635,13 @@ void CodecVideoDecode(VideoDecoder * decoder, const AVPacket * avpkt)
decoder->FirstKeyFrame++;
if (frame->key_frame) {
Debug(3, "codec: key frame after %d frames\n",
decoder->FirstKeyFrame);
decoder->FirstKeyFrame = 0;
}
} else {
//DisplayPts(video_ctx, frame);
VideoRenderFrame(decoder->HwDecoder, video_ctx, frame);
decoder->FirstKeyFrame);
decoder->FirstKeyFrame = 0;
}
} else {
//DisplayPts(video_ctx, frame);
VideoRenderFrame(decoder->HwDecoder, video_ctx, frame);
}
#else
//DisplayPts(video_ctx, frame);
VideoRenderFrame(decoder->HwDecoder, video_ctx, frame);
Expand Down Expand Up @@ -714,7 +714,7 @@ struct _audio_decoder_
int HwSampleRate; ///< hw sample rate
int HwChannels; ///< hw channels

#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(58,28,1)
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56,28,1)
AVFrame *Frame; ///< decoded audio frame buffer
#endif

Expand Down Expand Up @@ -794,7 +794,7 @@ AudioDecoder *CodecAudioNewDecoder(void)
if (!(audio_decoder = calloc(1, sizeof(*audio_decoder)))) {
Fatal(_("codec: can't allocate audio decoder\n"));
}
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(58,28,1)
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56,28,1)
if (!(audio_decoder->Frame = av_frame_alloc())) {
Fatal(_("codec: can't allocate audio decoder frame buffer\n"));
}
Expand All @@ -810,7 +810,7 @@ AudioDecoder *CodecAudioNewDecoder(void)
*/
void CodecAudioDelDecoder(AudioDecoder * decoder)
{
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(58,28,1)
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56,28,1)
av_frame_free(&decoder->Frame); // callee does checks
#endif
free(decoder);
Expand Down Expand Up @@ -1637,6 +1637,7 @@ void CodecAudioDecode(AudioDecoder * audio_decoder, const AVPacket * avpkt)
*/
static void CodecAudioSetClock(AudioDecoder * audio_decoder, int64_t pts)
{
#ifdef USE_AUDIO_DRIFT_CORRECTION
struct timespec nowtime;
int64_t delay;
int64_t tim_diff;
Expand Down Expand Up @@ -1751,6 +1752,9 @@ static void CodecAudioSetClock(AudioDecoder * audio_decoder, int64_t pts)
audio_decoder->DriftCorr, drift * 1000 / 90, corr);
}
}
#else
AudioSetClock(pts);
#endif
}

/**
Expand Down Expand Up @@ -1836,7 +1840,7 @@ void CodecAudioDecode(AudioDecoder * audio_decoder, const AVPacket * avpkt)
{
AVCodecContext *audio_ctx;

#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,28,1)
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,28,1)
AVFrame frame[1];
#else
AVFrame *frame;
Expand All @@ -1849,7 +1853,7 @@ void CodecAudioDecode(AudioDecoder * audio_decoder, const AVPacket * avpkt)
// FIXME: don't need to decode pass-through codecs

// new AVFrame API
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,28,1)
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,28,1)
avcodec_get_frame_defaults(frame);
#else
frame = audio_decoder->Frame;
Expand Down
5 changes: 4 additions & 1 deletion po/de_DE.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR \n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-10-31 12:36+0100\n"
"POT-Creation-Date: 2015-06-10 21:21+0200\n"
"PO-Revision-Date: blabla\n"
"Last-Translator: blabla\n"
"Language-Team: blabla\n"
Expand Down Expand Up @@ -513,6 +513,9 @@ msgstr "Unterbrechen stoppt X11"
msgid "Video"
msgstr "Video"

msgid "Enable Screensaver(DPMS) at black screen"
msgstr "Bildschirmschoner(DPMS) bei schwarzen Bild aktivieren"

msgid "Video background color (RGB)"
msgstr "Video Hintergrundfrabe (RGB)"

Expand Down
14 changes: 9 additions & 5 deletions softhddev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2866,17 +2866,21 @@ void OsdClose(void)
/**
** Draw an OSD pixmap.
**
** @param xi x-coordinate in argb image
** @param yi y-coordinate in argb image
** @paran height height in pixel in argb image
** @paran width width in pixel in argb image
** @param pitch pitch of argb image
** @param argb 32bit ARGB image data
** @param x x-coordinate on screen of argb image
** @param y y-coordinate on screen of argb image
** @paran height height in pixel of argb image
** @paran width width in pixel of argb image
** @param argb height * width 32bit ARGB image data
*/
void OsdDrawARGB(int x, int y, int height, int width, const uint8_t * argb)
void OsdDrawARGB(int xi, int yi, int height, int width, int pitch,
const uint8_t * argb, int x, int y)
{
// wakeup display for showing remote learning dialog
VideoDisplayWakeup();
VideoOsdDrawARGB(x, y, height, width, argb);
VideoOsdDrawARGB(xi, yi, height, width, pitch, argb, x, y);
}

//////////////////////////////////////////////////////////////////////////////
Expand Down
5 changes: 3 additions & 2 deletions softhddev.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
///
/// @file softhddev.h @brief software HD device plugin header file.
///
/// Copyright (c) 2011 - 2014 by Johns. All Rights Reserved.
/// Copyright (c) 2011 - 2015 by Johns. All Rights Reserved.
///
/// Contributor(s):
///
Expand Down Expand Up @@ -34,7 +34,8 @@ extern "C"
/// C plugin close osd
extern void OsdClose(void);
/// C plugin draw osd pixmap
extern void OsdDrawARGB(int, int, int, int, const uint8_t *);
extern void OsdDrawARGB(int, int, int, int, int, const uint8_t *, int,
int);

/// C plugin play audio packet
extern int PlayAudio(const uint8_t *, int, uint8_t);
Expand Down
Loading