mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Add function ResetStart to the video output module.
This commit is contained in:
parent
11121b5bdd
commit
5265e68aa9
@ -1,6 +1,7 @@
|
|||||||
User johns
|
User johns
|
||||||
Date:
|
Date:
|
||||||
|
|
||||||
|
Add function ResetStart to the video output module.
|
||||||
Add function SetClosing to the video output module.
|
Add function SetClosing to the video output module.
|
||||||
Generalize GetVaapiContext to GetHwAccelContext.
|
Generalize GetVaapiContext to GetHwAccelContext.
|
||||||
Add compile time configurable trickspeed packets dump.
|
Add compile time configurable trickspeed packets dump.
|
||||||
|
40
video.c
40
video.c
@ -264,6 +264,7 @@ typedef struct _video_module_
|
|||||||
void (*const SetClock) (VideoHwDecoder *, int64_t);
|
void (*const SetClock) (VideoHwDecoder *, int64_t);
|
||||||
int64_t(*const GetClock) (const VideoHwDecoder *);
|
int64_t(*const GetClock) (const VideoHwDecoder *);
|
||||||
void (*const SetClosing) (const VideoHwDecoder *);
|
void (*const SetClosing) (const VideoHwDecoder *);
|
||||||
|
void (*const ResetStart) (const VideoHwDecoder *);
|
||||||
void (*const SetTrickSpeed) (const VideoHwDecoder *, int);
|
void (*const SetTrickSpeed) (const VideoHwDecoder *, int);
|
||||||
uint8_t *(*const GrabOutput)(int *, int *, int *);
|
uint8_t *(*const GrabOutput)(int *, int *, int *);
|
||||||
void (*const SetBackground) (uint32_t);
|
void (*const SetBackground) (uint32_t);
|
||||||
@ -4817,6 +4818,16 @@ static void VaapiSetClosing(VaapiDecoder * decoder)
|
|||||||
decoder->Closing = 1;
|
decoder->Closing = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Reset start of frame counter.
|
||||||
|
///
|
||||||
|
/// @param decoder VA-API decoder
|
||||||
|
///
|
||||||
|
static void VaapiResetStart(VaapiDecoder * decoder)
|
||||||
|
{
|
||||||
|
decoder->StartCounter = 0;
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Set trick play speed.
|
/// Set trick play speed.
|
||||||
///
|
///
|
||||||
@ -5390,6 +5401,7 @@ static const VideoModule VaapiModule = {
|
|||||||
.SetClock = (void (*const) (VideoHwDecoder *, int64_t))VaapiSetClock,
|
.SetClock = (void (*const) (VideoHwDecoder *, int64_t))VaapiSetClock,
|
||||||
.GetClock = (int64_t(*const) (const VideoHwDecoder *))VaapiGetClock,
|
.GetClock = (int64_t(*const) (const VideoHwDecoder *))VaapiGetClock,
|
||||||
.SetClosing = (void (*const) (const VideoHwDecoder *))VaapiSetClosing,
|
.SetClosing = (void (*const) (const VideoHwDecoder *))VaapiSetClosing,
|
||||||
|
.ResetStart = (void (*const) (const VideoHwDecoder *))VaapiResetStart,
|
||||||
.SetTrickSpeed =
|
.SetTrickSpeed =
|
||||||
(void (*const) (const VideoHwDecoder *, int))VaapiSetTrickSpeed,
|
(void (*const) (const VideoHwDecoder *, int))VaapiSetTrickSpeed,
|
||||||
.GrabOutput = NULL,
|
.GrabOutput = NULL,
|
||||||
@ -5429,6 +5441,7 @@ static const VideoModule VaapiGlxModule = {
|
|||||||
.SetClock = (void (*const) (VideoHwDecoder *, int64_t))VaapiSetClock,
|
.SetClock = (void (*const) (VideoHwDecoder *, int64_t))VaapiSetClock,
|
||||||
.GetClock = (int64_t(*const) (const VideoHwDecoder *))VaapiGetClock,
|
.GetClock = (int64_t(*const) (const VideoHwDecoder *))VaapiGetClock,
|
||||||
.SetClosing = (void (*const) (const VideoHwDecoder *))VaapiSetClosing,
|
.SetClosing = (void (*const) (const VideoHwDecoder *))VaapiSetClosing,
|
||||||
|
.ResetStart = (void (*const) (const VideoHwDecoder *))VaapiResetStart,
|
||||||
.SetTrickSpeed =
|
.SetTrickSpeed =
|
||||||
(void (*const) (const VideoHwDecoder *, int))VaapiSetTrickSpeed,
|
(void (*const) (const VideoHwDecoder *, int))VaapiSetTrickSpeed,
|
||||||
.GrabOutput = NULL,
|
.GrabOutput = NULL,
|
||||||
@ -8403,6 +8416,16 @@ static void VdpauSetClosing(VdpauDecoder * decoder)
|
|||||||
decoder->Closing = 1;
|
decoder->Closing = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Reset start of frame counter.
|
||||||
|
///
|
||||||
|
/// @param decoder VDPAU decoder
|
||||||
|
///
|
||||||
|
static void VdpauResetStart(VdpauDecoder * decoder)
|
||||||
|
{
|
||||||
|
decoder->StartCounter = 0;
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Set trick play speed.
|
/// Set trick play speed.
|
||||||
///
|
///
|
||||||
@ -9121,6 +9144,7 @@ static const VideoModule VdpauModule = {
|
|||||||
.SetClock = (void (*const) (VideoHwDecoder *, int64_t))VdpauSetClock,
|
.SetClock = (void (*const) (VideoHwDecoder *, int64_t))VdpauSetClock,
|
||||||
.GetClock = (int64_t(*const) (const VideoHwDecoder *))VdpauGetClock,
|
.GetClock = (int64_t(*const) (const VideoHwDecoder *))VdpauGetClock,
|
||||||
.SetClosing = (void (*const) (const VideoHwDecoder *))VdpauSetClosing,
|
.SetClosing = (void (*const) (const VideoHwDecoder *))VdpauSetClosing,
|
||||||
|
.ResetStart = (void (*const) (const VideoHwDecoder *))VdpauResetStart,
|
||||||
.SetTrickSpeed =
|
.SetTrickSpeed =
|
||||||
(void (*const) (const VideoHwDecoder *, int))VdpauSetTrickSpeed,
|
(void (*const) (const VideoHwDecoder *, int))VdpauSetTrickSpeed,
|
||||||
.GrabOutput = VdpauGrabOutputSurface,
|
.GrabOutput = VdpauGrabOutputSurface,
|
||||||
@ -9279,6 +9303,7 @@ static const VideoModule NoopModule = {
|
|||||||
.SetClock = (void (*const) (VideoHwDecoder *, int64_t))NoopSetClock,
|
.SetClock = (void (*const) (VideoHwDecoder *, int64_t))NoopSetClock,
|
||||||
.GetClock = (int64_t(*const) (const VideoHwDecoder *))NoopGetClock,
|
.GetClock = (int64_t(*const) (const VideoHwDecoder *))NoopGetClock,
|
||||||
.SetClosing = (void (*const) (const VideoHwDecoder *))NoopSetClosing,
|
.SetClosing = (void (*const) (const VideoHwDecoder *))NoopSetClosing,
|
||||||
|
.ResetStart = (void (*const) (const VideoHwDecoder *))NoopResetStart,
|
||||||
.SetTrickSpeed =
|
.SetTrickSpeed =
|
||||||
(void (*const) (const VideoHwDecoder *, int))NoopSetTrickSpeed,
|
(void (*const) (const VideoHwDecoder *, int))NoopSetTrickSpeed,
|
||||||
.GrabOutput = NoopGrabOutputSurface,
|
.GrabOutput = NoopGrabOutputSurface,
|
||||||
@ -9999,17 +10024,7 @@ void VideoSetClosing(VideoHwDecoder * hw_decoder)
|
|||||||
void VideoResetStart(VideoHwDecoder * hw_decoder)
|
void VideoResetStart(VideoHwDecoder * hw_decoder)
|
||||||
{
|
{
|
||||||
Debug(3, "video: reset start\n");
|
Debug(3, "video: reset start\n");
|
||||||
// FIXME: test to check if working, than make module function
|
VideoUsedModule->ResetStart(hw_decoder);
|
||||||
#ifdef USE_VDPAU
|
|
||||||
if (VideoUsedModule == &VdpauModule) {
|
|
||||||
hw_decoder->Vdpau.StartCounter = 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#ifdef USE_VAAPI
|
|
||||||
if (VideoUsedModule == &VaapiModule) {
|
|
||||||
hw_decoder->Vaapi.StartCounter = 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
// clear clock to trigger new video stream
|
// clear clock to trigger new video stream
|
||||||
VideoSetClock(hw_decoder, AV_NOPTS_VALUE);
|
VideoSetClock(hw_decoder, AV_NOPTS_VALUE);
|
||||||
}
|
}
|
||||||
@ -10022,7 +10037,8 @@ void VideoResetStart(VideoHwDecoder * hw_decoder)
|
|||||||
///
|
///
|
||||||
void VideoSetTrickSpeed(VideoHwDecoder * hw_decoder, int speed)
|
void VideoSetTrickSpeed(VideoHwDecoder * hw_decoder, int speed)
|
||||||
{
|
{
|
||||||
return VideoUsedModule->SetTrickSpeed(hw_decoder, speed);
|
Debug(3, "video: set trick-speed %d\n", speed);
|
||||||
|
VideoUsedModule->SetTrickSpeed(hw_decoder, speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user