libspark: implement cVideo::GetVideoSystemFormatName()

Origin commit data
------------------
Branch: master
Commit: 57f9165852
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-08-26 (Sat, 26 Aug 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2017-08-26 12:57:40 +02:00
committed by max_10
parent c09be3fea5
commit 8ecc78a264
3 changed files with 245 additions and 2 deletions

View File

@@ -380,6 +380,17 @@ int cVideo::GetVideoSystem(void)
return VIDEO_STD_720P50;
}
void cVideo::GetVideoSystemFormatName(cs_vs_format_t *format, int system)
{
if (system == -1)
system = GetVideoSystem();
if (system < 0 || system > VIDEO_STD_1080P50) {
lt_info("%s: invalid system %d\n", __func__, system);
strcpy(format->format, "invalid");
} else
strcpy(format->format, vid_modes[system]);
}
int cVideo::getPlayState(void)
{
return playstate;

View File

@@ -5,6 +5,11 @@
#include "../common/cs_types.h"
#include "dmx_lib.h"
typedef struct cs_vs_format_t
{
char format[16];
} cs_vs_format_struct_t;
typedef enum {
ANALOG_SD_RGB_CINCH = 0x00,
ANALOG_SD_YPRPB_CINCH,
@@ -108,7 +113,7 @@ typedef enum {
/* not used, for dummy functions */
typedef enum {
VIDEO_HDMI_CEC_MODE_OFF = 0,
VIDEO_HDMI_CEC_MODE_OFF = 0,
VIDEO_HDMI_CEC_MODE_TUNER,
VIDEO_HDMI_CEC_MODE_RECORDER
} VIDEO_HDMI_CEC_MODE;
@@ -126,8 +131,8 @@ typedef enum
class cVideo
{
friend class cDemux;
friend class cPlayback;
friend class cDemux;
private:
/* video device */
int fd;
@@ -182,6 +187,11 @@ class cVideo
int Stop(bool blank = true);
bool Pause(void);
/* get video system infos */
int GetVideoSystem(void);
/* when system = -1 then use current video system */
void GetVideoSystemFormatName(cs_vs_format_t* format, int system = -1);
/* set video_system */
int SetVideoSystem(int video_system, bool remember = true);
int SetStreamType(VIDEO_FORMAT type);