Esempio n. 1
0
long CA_initEcmEmmPid(int m_nEcmPid, int m_nEmmPid)
{
	DVTCASTB_SetCurEcmPid((WORD)m_nEcmPid);
	DVTCASTB_SetEmmPid((WORD)m_nEmmPid);

	return 0;
}
Esempio n. 2
0
void CATPrivateDataGotCallBack( utHandle hFilter,long iTuner,utPid pid,utTid tid,utByte *data,long datasize,utContext context)
{

    if((NULL == data)  || (datasize < 3) || pid != CAT_PID)
        return;

    try
    {
        novelsuper::psisi_parse::CatSection *pcat = (novelsuper::psisi_parse::CatSection *)data;

        U8 iCatVersion = pcat->version();


        for( novelsuper::psisi_parse::CA_I q = pcat->begin<novelsuper::psisi_parse::DescCA>(); ! q.empty(); ++q )
        {
            U32 emmPid = q->ca_pid();
            //处理数码CA
            if(q->ca_system_id() == 0x4ad2)
            {
                dxreport("CATPrivateDataGotCallBack emmpid %d\n",emmPid);
                //通知CA库.
                DVTCASTB_SetEmmPid(emmPid);
                //删除filter
                StopRetrieveEMM();
            }
        }
    }
    catch(novelsuper::psisi_parse::RuntimeError &e)
    {
        dxreport("CATPrivateDataGotCallBack RuntimeError!!! %s\n",e.what());
        return;
    }
}
Esempio n. 3
0
void cas_demux_stopEMMFilter()
{
	BU32 i = 0;
	BU32 channel_id = 0;
	BU16 pid;
    BU32 reqid;

	DVTCASTB_SetEmmPid(0);
	APP_IPI_Semaphore_Wait_Demux();
	for (i = 2; i < 10; i++)
	{
		if (CAReqID[i].u8runflag && CAReqID[i].u32ChannelID != 0 && CAReqID[i].u32FilterID != 0)
		{
				channel_id = CAReqID[i].u32ChannelID;
				pid = CAReqID[i].u16tspid;
				reqid = CAReqID[i].u16reqid;
				//CA_Stop_Demux(&(CAReqID[i].u32ChannelID), &(CAReqID[i].u32FilterID));
				FYF_API_demux_disable_filter(CAReqID[i].u32ChannelID, CAReqID[i].u32FilterID);
                FYF_API_demux_destroy_filter(CAReqID[i].u32ChannelID, CAReqID[i].u32FilterID);

				CAReqID[i].u8runflag = 0;
				CAReqID[i].u16reqid = 0x1fff;
				CAReqID[i].u16tspid = 0x1fff;
				CAReqID[i].u8callbackflag = 0;
				CAReqID[i].u32tick = 0;
				CAReqID[i].u32waittime = 0;
				DVTCASTB_StreamGuardDataGot(reqid,false,pid, 0,NULL); 
		}
	}
	if (channel_id != 0)
	{
		FYF_API_demux_stop_channel(channel_id);
		FYF_API_demux_destroy_channel(channel_id);
	}
	APP_IPI_Semaphore_Release_Demux();
}
Esempio n. 4
0
void  CDCASTB_SetEmmPid( CDCA_U16 wEmmPid )
{
	dxreport("CDCASTB_SetEmmPid begin >>>\n");
   	DVTCASTB_SetEmmPid(wEmmPid);
   	dxreport("CDCASTB_SetEmmPid end >>>\n");
}
Esempio n. 5
0
/*禁用/ 启用前面板和遥控器响应 */
void JudgeSwitchChannel( void* arg ) 
{ 
	int32_t serviceIndex= 0;
	GxBusPmDataProg prog_data = {0};
	GxMsgProperty_PlayerPlay *player_play;
	char url[GX_PM_MAX_PROG_URL_SIZE]={0};
	app_msg appMsg={0};
	int g_GdSwitchChannelFre = 0;//2510000;
	uint32_t gApp_cur_pos = 0;
	 if(!g_bSwitchTask)
	 {
	 	   goto continue1;  
	 }

	GxBus_ConfigGetInt(DVT_CA_CENTER_FRE, &g_GdSwitchChannelFre, DVT_CA_CENTER_FRE_DV);
	app_prog_get_playing_pos_in_group(&gApp_cur_pos);
	if (GxBus_PmProgNumGet() > 0)	
	{
		GxBus_PmProgGetByPos(gApp_cur_pos,1,&prog_data);	
		g_SwServiceID = prog_data.service_id;
		g_TsID = prog_data.ts_id;
		
		
	}

	app_play_set_msg_pop_type(MSG_POP_COMMON_END+DVTCA_SWTICH_CHANNEL+1);//正在获取信息,请稍候......

	serviceIndex = DVTSTBCA_GetProgPosByFrequency(g_GdSwitchChannelFre);
	if (-1 != serviceIndex)
	{
	     	GxBus_PmProgGetByPos(serviceIndex,1,&prog_data);	

		memset(url, 0, GX_PM_MAX_PROG_URL_SIZE);
		GxBus_PmProgUrlGet(&prog_data, (int8_t *)url, GX_PM_MAX_PROG_URL_SIZE);	
		appMsg.msg= GxBus_MessageNew(GXMSG_PLAYER_PLAY);
		player_play = GxBus_GetMsgPropertyPtr(appMsg.msg, GxMsgProperty_PlayerPlay);


		strcat(url, "&sync:3&tsid:0");
		
		memcpy(player_play->url,url,PLAYER_URL_LONG);
		player_play->player =  PLAYER0;
		printf("************************sent start*************************\n");	

		GxBus_MessageSend(appMsg.msg);
		appMsg.msg = NULL;
		appMsg.param = NULL;			
  	}
	else
	{

	 	DVTCASTB_SwitchChannelOver(2); 
	    app_play_clear_msg_pop_type(MSG_POP_COMMON_END+DVTCA_SWTICH_CHANNEL+1);
		serviceIndex = GxBus_PmProgPosGet(g_TsID,g_SwServiceID);	
		if (-1 != serviceIndex)
		{
		     	GxBus_PmProgGetByPos(serviceIndex,1,&prog_data);	

			memset(url, 0, GX_PM_MAX_PROG_URL_SIZE);
			GxBus_PmProgUrlGet(&prog_data, (int8_t *)url, GX_PM_MAX_PROG_URL_SIZE);	
			appMsg.msg= GxBus_MessageNew(GXMSG_PLAYER_PLAY);
			player_play = GxBus_GetMsgPropertyPtr(appMsg.msg, GxMsgProperty_PlayerPlay);


			strcat(url, "&sync:3&tsid:0");
			
			memcpy(player_play->url,url,PLAYER_URL_LONG);
			player_play->player =  PLAYER0;
			printf("************************sent start*************************\n");	

			GxBus_MessageSend(appMsg.msg);
			appMsg.msg = NULL;
			appMsg.param = NULL;			
	  	}
	  	g_bSwitchTask = false; 
		
		goto continue1;  
		 
	}
	
	g_SwitchChannelTicks = s_BakChannelTicks;

	DVTCASTB_SetEmmPid(app_dvt_cas_api_get_emm_pid());  // 播台的时候已经去搜索CAT
	while( g_SwitchChannelTicks)
	{ 
		  if(g_bAreaLockOK)
		  { 
			  g_bAreaLockOK = false; 
			  goto exit; 
		  }
		  
		  g_SwitchChannelTicks--;		  
    		  GxCore_ThreadDelay(100);
		  		  
	 } 
	 
	 DVTCASTB_SwitchChannelOver(1);  

exit: 
	 g_SwitchChannelTicks = 0; 
	 app_play_clear_msg_pop_type(MSG_POP_COMMON_END+DVTCA_SWTICH_CHANNEL+1);
		serviceIndex = GxBus_PmProgPosGet(g_TsID,g_SwServiceID);	
		if (-1 != serviceIndex)
		{
		     	GxBus_PmProgGetByPos(serviceIndex,1,&prog_data);	

			memset(url, 0, GX_PM_MAX_PROG_URL_SIZE);
			GxBus_PmProgUrlGet(&prog_data, (int8_t *)url, GX_PM_MAX_PROG_URL_SIZE);	
			appMsg.msg= GxBus_MessageNew(GXMSG_PLAYER_PLAY);
			player_play = GxBus_GetMsgPropertyPtr(appMsg.msg, GxMsgProperty_PlayerPlay);

			strcat(url, "&sync:3&ts:0");
			
			memcpy(player_play->url,url,PLAYER_URL_LONG);
			player_play->player =  PLAYER0;
			printf("************************sent start*************************\n");	

			GxBus_MessageSend(appMsg.msg);
			appMsg.msg = NULL;
			appMsg.param = NULL;			
	  	}
	 g_bSwitchTask = false;

continue1:	
    		 GxCore_ThreadDelay(1000);
	 	
		
}