From 98d2e0f7285c07aef879cd667eb54f68f7234a2b Mon Sep 17 00:00:00 2001 From: Johns Date: Sun, 22 Jan 2012 17:07:08 +0100 Subject: [PATCH] Cleanups and Codec..Del.. prototypes. --- ChangeLog | 7 +++++-- Todo | 4 +++- codec.h | 6 ++++++ softhddevice.cpp | 7 ++++--- video.c | 3 +++ 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e570655..faeecd1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,13 @@ +User johns +Date: + User Morone -Data: Sun Jan 22 16:43:23 CET 2012 +Date: Sun Jan 22 16:43:23 CET 2012 Use different alsa devices for AC3/pass-through and pcm. User johns -Data: Sun Jan 22 11:12:57 CET 2012 +Date: Sun Jan 22 11:12:57 CET 2012 Add dummy player and control for suspend mode. Buffertime compile time configurable in ms. diff --git a/Todo b/Todo index 80bd9a0..392ecd1 100644 --- a/Todo +++ b/Todo @@ -31,11 +31,13 @@ video: subtitle not cleared subtitle could be asyncron reduce warnings after channel switch + grab image with scaling support + suspendoutput didn't show logo or black pictures + (must detect video format to show image) vdpau: VdpPreemptionCallback handling (under construction) hard channel switch - suspendoutput didn't show logo or black picture. libva: hard channel switch diff --git a/codec.h b/codec.h index 6656d6b..32049fe 100644 --- a/codec.h +++ b/codec.h @@ -40,6 +40,9 @@ typedef struct _audio_decoder_ AudioDecoder; /// Allocate a new video decoder context. extern VideoDecoder *CodecVideoNewDecoder(VideoHwDecoder *); + /// Deallocate a video decoder context. +extern void CodecVideoDelDecoder(VideoDecoder *); + /// Open video codec. extern void CodecVideoOpen(VideoDecoder *, const char *, int); @@ -55,6 +58,9 @@ extern void CodecVideoFlushBuffers(VideoDecoder *); /// Allocate a new audio decoder context. extern AudioDecoder *CodecAudioNewDecoder(void); + /// Deallocate an audio decoder context. +extern void CodecAudioDelDecoder(AudioDecoder *); + /// Open audio codec. extern void CodecAudioOpen(AudioDecoder *, const char *, int); diff --git a/softhddevice.cpp b/softhddevice.cpp index f496c99..83c3b7b 100644 --- a/softhddevice.cpp +++ b/softhddevice.cpp @@ -716,7 +716,7 @@ bool cSoftHdDevice::SetPlayMode(ePlayMode play_mode) int64_t cSoftHdDevice::GetSTC(void) { - // dsyslog("[softhddev]%s:\n", __FUNCTION__); + //dsyslog("[softhddev]%s:\n", __FUNCTION__); return::VideoGetClock(); } @@ -798,7 +798,7 @@ void cSoftHdDevice::StillPicture(const uchar * data, int length) bool cSoftHdDevice::Poll( __attribute__ ((unused)) cPoller & poller, int timeout_ms) { - // dsyslog("[softhddev]%s: %d\n", __FUNCTION__, timeout_ms); + //dsyslog("[softhddev]%s: %d\n", __FUNCTION__, timeout_ms); return::Poll(timeout_ms); } @@ -1074,13 +1074,14 @@ const char *cPluginSoftHdDevice::MainMenuEntry(void) */ cOsdObject *cPluginSoftHdDevice::MainMenuAction(void) { - dsyslog("[softhddev]%s:\n", __FUNCTION__); + //dsyslog("[softhddev]%s:\n", __FUNCTION__); //MyDevice->StopReplay(); cControl::Launch(new cSoftHdControl); cControl::Attach(); Suspend(); if (ShutdownHandler.GetUserInactiveTime()) { + dsyslog("[softhddev]%s: set user inactive\n", __FUNCTION__); ShutdownHandler.SetUserInactive(); } diff --git a/video.c b/video.c index 3d01cd3..68e8581 100644 --- a/video.c +++ b/video.c @@ -5331,6 +5331,9 @@ static uint8_t *VdpauGrabOutputSurface(int *ret_size, int *ret_width, Debug(3, "video/vdpau: grab %dx%d format %d\n", width, height, rgba_format); + // FIXME: scale surface to requested size with + // VdpauOutputSurfaceRenderOutputSurface + switch (rgba_format) { case VDP_RGBA_FORMAT_B8G8R8A8: case VDP_RGBA_FORMAT_R8G8B8A8: