mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Added the function cRecordingInfo::FrameParams(), which can be used to get a nicely formatted string with all the available frame data
This commit is contained in:
parent
f0bbf64da0
commit
cade92cda1
4
HISTORY
4
HISTORY
@ -9852,9 +9852,11 @@ Video Disk Recorder Revision History
|
|||||||
mode receiver device (thanks to Markus Ehrnsperger).
|
mode receiver device (thanks to Markus Ehrnsperger).
|
||||||
- Revised support for kernel based LIRC driver (thanks to Marko Mäkelä).
|
- Revised support for kernel based LIRC driver (thanks to Marko Mäkelä).
|
||||||
|
|
||||||
2023-12-28:
|
2023-12-29:
|
||||||
|
|
||||||
- Fixed broken video data streams on systems without output device when switching live
|
- Fixed broken video data streams on systems without output device when switching live
|
||||||
channel to a different transponder while recording (reported by Markus Ehrnsperger).
|
channel to a different transponder while recording (reported by Markus Ehrnsperger).
|
||||||
- The frame width, height, scan type and apect ratio of a recording are now stored in
|
- The frame width, height, scan type and apect ratio of a recording are now stored in
|
||||||
the 'info' file under the 'F' tag (thanks to Christoph Haubrich).
|
the 'info' file under the 'F' tag (thanks to Christoph Haubrich).
|
||||||
|
- Added the function cRecordingInfo::FrameParams(), which can be used to get a nicely
|
||||||
|
formatted string with all the available frame data.
|
||||||
|
23
recording.c
23
recording.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: recording.c 5.23 2023/12/28 21:22:42 kls Exp $
|
* $Id: recording.c 5.24 2023/12/29 10:48:25 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "recording.h"
|
#include "recording.h"
|
||||||
@ -625,6 +625,27 @@ bool cRecordingInfo::Write(void) const
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cString cRecordingInfo::FrameParams(void) const
|
||||||
|
{
|
||||||
|
cString s;
|
||||||
|
if (frameWidth && frameHeight) {
|
||||||
|
s = cString::sprintf("%dx%d", frameWidth, frameHeight);
|
||||||
|
if (framesPerSecond > 0) {
|
||||||
|
if (*s)
|
||||||
|
s.Append("/");
|
||||||
|
s.Append(dtoa(framesPerSecond, "%.2g"));
|
||||||
|
if (scanType != stUnknown)
|
||||||
|
s.Append(ScanTypeChar());
|
||||||
|
}
|
||||||
|
if (aspectRatio != arUnknown) {
|
||||||
|
if (*s)
|
||||||
|
s.Append(" ");
|
||||||
|
s.Append(AspectRatioText());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
// --- cRecording ------------------------------------------------------------
|
// --- cRecording ------------------------------------------------------------
|
||||||
|
|
||||||
#define RESUME_NOT_INITIALIZED (-2)
|
#define RESUME_NOT_INITIALIZED (-2)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: recording.h 5.6 2023/12/27 09:21:29 kls Exp $
|
* $Id: recording.h 5.7 2023/12/29 10:48:25 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __RECORDING_H
|
#ifndef __RECORDING_H
|
||||||
@ -98,6 +98,7 @@ public:
|
|||||||
char ScanTypeChar(void) const { return ScanTypeChars[scanType]; }
|
char ScanTypeChar(void) const { return ScanTypeChars[scanType]; }
|
||||||
eAspectRatio AspectRatio(void) const { return aspectRatio; }
|
eAspectRatio AspectRatio(void) const { return aspectRatio; }
|
||||||
const char *AspectRatioText(void) const { return AspectRatioTexts[aspectRatio]; }
|
const char *AspectRatioText(void) const { return AspectRatioTexts[aspectRatio]; }
|
||||||
|
cString FrameParams(void) const;
|
||||||
void SetFramesPerSecond(double FramesPerSecond);
|
void SetFramesPerSecond(double FramesPerSecond);
|
||||||
void SetFrameParams(uint16_t FrameWidth, uint16_t FrameHeight, eScanType ScanType, eAspectRatio AspectRatio);
|
void SetFrameParams(uint16_t FrameWidth, uint16_t FrameHeight, eScanType ScanType, eAspectRatio AspectRatio);
|
||||||
void SetFileName(const char *FileName);
|
void SetFileName(const char *FileName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user