Merge branch 'master' of github.com:Duckbox-Developers/libstb-hal-cst-next

This commit is contained in:
TangoCash
2017-09-12 10:07:20 +02:00
3 changed files with 19 additions and 4 deletions

View File

@@ -49,7 +49,7 @@ static uint8_t NullPMT[50]={0x9F,0x80,0x32,0x2E,0x03,0x6E,0xA7,0x37,0x00,0x00,0x
/* die Feinheiten werden ja in CA_MESSAGE verpackt */
uint32_t EVT_CA_MESSAGE = 0x80000000 + 60;
static cs_messenger cam_messenger;
static cs_messenger cam_messenger = NULL;
void cs_register_messenger(cs_messenger messenger)
{
@@ -416,7 +416,8 @@ void cCA::process_tpdu(tSlot* slot, unsigned char tpdu_tag, __u8* data, int asn_
bool cCA::SendMessage(const CA_MESSAGE *msg)
{
lt_debug("%s\n", __func__);
cam_messenger(EVT_CA_MESSAGE, (uint32_t) msg);
if(cam_messenger)
cam_messenger(EVT_CA_MESSAGE, (uint32_t) msg);
#if y_debug
printf("*******Message\n");
printf("msg: %p\n", msg);

View File

@@ -82,6 +82,7 @@ cVideo::cVideo(int, void *, void *, unsigned int)
display_aspect = DISPLAY_AR_16_9;
display_crop = DISPLAY_AR_MODE_LETTERBOX;
v_format = VIDEO_FORMAT_MPEG2;
output_h = 0;
}
cVideo::~cVideo(void)
@@ -98,7 +99,7 @@ int cVideo::setAspectRatio(int vformat, int cropping)
display_aspect = (DISPLAY_AR) vformat;
if (cropping >= 0)
display_crop = (DISPLAY_AR_MODE) cropping;
if (display_aspect < DISPLAY_AR_RAW) /* don't know what to do with this */
if (display_aspect < DISPLAY_AR_RAW && output_h > 0) /* don't know what to do with this */
glfb->setOutputFormat(aspect_ratios[display_aspect], output_h, display_crop);
return 0;
}
@@ -197,11 +198,23 @@ int cVideo::SetVideoSystem(int system, bool)
}
v_std = (VIDEO_STD) system;
output_h = h;
if (display_aspect < DISPLAY_AR_RAW) /* don't know what to do with this */
if (display_aspect < DISPLAY_AR_RAW && output_h > 0) /* don't know what to do with this */
glfb->setOutputFormat(aspect_ratios[display_aspect], output_h, display_crop);
return 0;
}
int cVideo::GetVideoSystem()
{
int current_video_system = VIDEO_STD_1080I50;
if(dec_w < 720)
current_video_system = VIDEO_STD_PAL;
else if(dec_w > 720 && dec_w <= 1280)
current_video_system = VIDEO_STD_720P50;
return 0;
}
int cVideo::getPlayState(void)
{
return VIDEO_PLAYING;

View File

@@ -177,6 +177,7 @@ class cVideo : public Thread
/* set video_system */
int SetVideoSystem(int video_system, bool remember = true);
int GetVideoSystem();
int SetStreamType(VIDEO_FORMAT type);
void SetSyncMode(AVSYNC_TYPE mode);
bool SetCECMode(VIDEO_HDMI_CEC_MODE) { return true; };