コード例 #1
0
ファイル: hbbtv_keycontrol.cpp プロジェクト: Kurtnoise/gpac
void on_langbuttonclicked(GtkWidget *widget, gpointer data)
{
	TRACEINFO;
	sPlayerInterface* player_interf;
	u32 current_service_id;
	HbbtvDemuxer *hbbtvdemuxer;
	GF_MediaInfo odi;
	u32 index_audio,audio_ID;	
	
	player_interf = (sPlayerInterface*)data;
	hbbtvdemuxer = ( HbbtvDemuxer *)player_interf->Demuxer;
	current_service_id = index_audio = audio_ID = 0;	
	
	/* Get the current channel struct */
	current_service_id = gf_term_get_current_service_id(player_interf->m_term);
	Channel* chan = (Channel*)ZapChannel(hbbtvdemuxer,current_service_id,0);	
	if(chan->Get_nb_chan_audio_stream() > 1){
		GF_ObjectManager *root_odm = gf_term_get_root_object(player_interf->m_term);
		if (root_odm){
			if (gf_term_get_object_info(player_interf->m_term, root_odm, &odi) == GF_OK){ 
				if (odi.od) {
					/* Increment the audio index to get the next audio stream */
					chan->Incr_audio_index(0);					
					gf_term_select_object(player_interf->m_term, gf_term_get_object(player_interf->m_term, root_odm, chan->Get_audio_ID(chan->Get_audio_index())));
				}
			}
		}
	}
}
コード例 #2
0
ファイル: FileProps.cpp プロジェクト: bigbensk/gpac
void CFileProps::WriteInlineTree(GF_ObjectManager *root_od, HTREEITEM parent)
{
	Osmo4 *gpac = GetApp();

	/*browse all ODs*/
	u32 count = gf_term_get_object_count(gpac->m_term, root_od);

	for (u32 i=0; i<count; i++) {
		GF_ObjectManager *odm = gf_term_get_object(gpac->m_term, root_od, i);
		if (!odm) return;
		HTREEITEM item = m_ODTree.InsertItem("Object Descriptor", 0, 0, parent);
		m_ODTree.SetItemData(item, (DWORD) odm);
		/*if inline propagate*/
		switch (gf_term_object_subscene_type(gpac->m_term, odm)) {
		case 1:
			m_ODTree.SetItemText(item, "Root Scene");
			WriteInlineTree(odm, item);
			break;
		case 2:
			m_ODTree.SetItemText(item, "Inline Scene");
			WriteInlineTree(odm, item);
			break;
		case 3:
			m_ODTree.SetItemText(item, "Extern Proto Lib");
			WriteInlineTree(odm, item);
			break;
		default:
			break;
		}
	}
}