Origin commit data
------------------
Branch: master
Commit: 85f14cfaa7
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-10-31 (Tue, 31 Oct 2017)


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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-10-31 23:35:38 +01:00
6 changed files with 48 additions and 33 deletions

View File

@@ -863,7 +863,7 @@ bool cCA::SendCAPMT(u64 tpid, u8 source, u8 camask, const unsigned char * cabuf,
if ((*It)->multi && (*It)->TP == TP && (*It)->source == source && !sid_found && (*It)->ci_use_count < CI_MAX_MULTI)
{
int pos = 3;
(*It)->SID[(*It)->ci_use_count] = SID;
(*It)->ci_use_count++;

View File

@@ -14,7 +14,8 @@ AM_LDFLAGS = \
@AVCODEC_LIBS@ \
@SWRESAMPLE_LIBS@ \
-lpthread -lasound -lrt \
-lgstreamer-1.0
-lgstreamer-1.0 \
-lgsttag-1.0
libarmbox_la_SOURCES = \
hardware_caps.c \

View File

@@ -10,6 +10,7 @@
#include <unistd.h>
#include "pwrmngr.h"
#include <proc_tools.h>
#include "lt_debug.h"
#define lt_debug(args...) _lt_debug(TRIPLE_DEBUG_INIT, NULL, args)
@@ -26,6 +27,16 @@ void init_td_api()
{
cCpuFreqManager f;
f.SetCpuFreq(0); /* CPUFREQ == 0 is the trigger for leaving standby */
char buffer[64];
sprintf(buffer, "%x", 0);
proc_put("/proc/stb/fb/dst_top", buffer, strlen(buffer));
proc_put("/proc/stb/fb/dst_left", buffer, strlen(buffer));
sprintf(buffer, "%x", 576);
proc_put("/proc/stb/fb/dst_height", buffer, strlen(buffer));
sprintf(buffer, "%x", 720);
proc_put("/proc/stb/fb/dst_width", buffer, strlen(buffer));
sprintf(buffer, "%x", 1);
proc_put("/proc/stb/fb/dst_apply", buffer, strlen(buffer));
}
initialized = true;
lt_info("%s end\n", __FUNCTION__);

View File

@@ -49,6 +49,7 @@ extern cDemux * audioDemux;
extern cDemux * videoDemux;
#include <gst/gst.h>
#include <gst/tag/tag.h>
#include <gst/pbutils/missing-plugins.h>
typedef enum
@@ -839,15 +840,16 @@ void cPlayback::FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *nu
if(m_gst_playbin)
{
gint i, n_audio = 0;
//GstStructure * structure = NULL;
// get audio
g_object_get (m_gst_playbin, "n-audio", &n_audio, NULL);
printf("%s: %d audio\n", __FUNCTION__, n_audio);
lt_info("%s: %d audio\n", __FUNCTION__, n_audio);
if(n_audio == 0)
return;
language->clear();
for (i = 0; i < n_audio; i++)
{
// apids
@@ -855,16 +857,17 @@ void cPlayback::FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *nu
GstPad * pad = 0;
g_signal_emit_by_name (m_gst_playbin, "get-audio-pad", i, &pad);
GstCaps * caps = gst_pad_get_current_caps(pad);
gst_object_unref(pad);
if (!caps)
continue;
GstStructure * structure = gst_caps_get_structure(caps, 0);
//const gchar *g_type = gst_structure_get_name(structure);
//if (!structure)
//return atUnknown;
//ac3flags[0] = 0;
GstTagList * tags = NULL;
gchar * g_lang = NULL;
gchar * g_codec = NULL;
// ac3flags
if ( gst_structure_has_name (structure, "audio/mpeg"))
@@ -872,23 +875,11 @@ void cPlayback::FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *nu
gint mpegversion, layer = -1;
if (!gst_structure_get_int (structure, "mpegversion", &mpegversion))
//return atUnknown;
ac3flags[i] = 0;
switch (mpegversion)
{
case 1:
/*
{
gst_structure_get_int (structure, "layer", &layer);
if ( layer == 3 )
return atMP3;
else
return atMPEG;
ac3flags[0] = 4;
break;
}
*/
ac3flags[i] = 4;
case 2:
//return atAAC;
@@ -912,9 +903,21 @@ void cPlayback::FindAllPids(int *apids, unsigned int *ac3flags, unsigned int *nu
ac3flags[i] = 0;
gst_caps_unref(caps);
}
// numpids
//(ac3flags[i] > 2) ? ac3flags[i] = 1 : ac3flags[i] = 0;
g_signal_emit_by_name (m_gst_playbin, "get-audio-tags", i, &tags);
if (tags && GST_IS_TAG_LIST(tags))
{
if (gst_tag_list_get_string(tags, GST_TAG_LANGUAGE_CODE, &g_lang))
{
language[i] = std::string(gst_tag_get_language_name(g_lang)).c_str();
lt_info("%s: language:%s\n", __FUNCTION__, language[i].c_str());
g_free(g_lang);
}
gst_tag_list_free(tags);
}
}
*numpida=i;
}
}

View File

@@ -82,11 +82,11 @@ int eDVBCIApplicationManagerSession::doAction()
return 1;
}
case stateFinal:
printf("[CI AM] in final state.");
printf("[CI AM] in final state.\n");
wantmenu = 0;
if (wantmenu)
{
printf("[CI AM] wantmenu: sending Tenter_menu");
printf("[CI AM] wantmenu: sending Tenter_menu\n");
const unsigned char tag[3] = {0x9F, 0x80, 0x22}; // Tenter_menu
sendAPDU(tag);
wantmenu = 0;
@@ -101,7 +101,7 @@ int eDVBCIApplicationManagerSession::doAction()
int eDVBCIApplicationManagerSession::startMMI()
{
printf("[CI AM] in appmanager -> startmmi()");
printf("[CI AM] in appmanager -> startmmi()\n");
const unsigned char tag[3] = {0x9F, 0x80, 0x22}; // Tenter_menu
sendAPDU(tag);
slot->mmiOpened = true;

View File

@@ -36,7 +36,7 @@ int eDVBCISession::buildLengthField(unsigned char *pkt, int len)
}
else
{
printf("too big length\n");
printf("[CI SESS] too big length\n");
exit(0);
}
}
@@ -97,7 +97,7 @@ void eDVBCISession::sendOpenSessionResponse(eDVBCISlot *slot, unsigned char sess
{
char pkt[6];
pkt[0] = session_status;
printf("[CI SESS] sendOpenSessionResponse");
printf("[CI SESS] sendOpenSessionResponse\n");
memcpy(pkt + 1, resource_identifier, 4);
sendSPDU(slot, 0x92, pkt, 5, session_nb);
}
@@ -148,7 +148,7 @@ eDVBCISession* eDVBCISession::createSession(eDVBCISlot *slot, const unsigned cha
tag |= resource_identifier[2] << 8;
tag |= resource_identifier[3];
printf("[CI SESS] Tag: %08lx > ", tag);
printf("[CI SESS] Tag: %08lx >\n", tag);
switch (tag)
{
@@ -211,7 +211,7 @@ eDVBCISession* eDVBCISession::createSession(eDVBCISlot *slot, const unsigned cha
void eDVBCISession::handleClose()
{
printf("%s\n", __FUNCTION__);
printf("[CI SESS] %s\n", __FUNCTION__);
unsigned char data[1] = {0x00};
sendSPDU(0x96, data, 1, 0, 0);
@@ -253,13 +253,13 @@ void eDVBCISession::receiveData(eDVBCISlot *slot, const unsigned char *ptr, size
unsigned char tag = *pkt++;
int llen, hlen;
printf("[CI SESS] slot: %p",slot);
printf("[CI SESS] receiveData slot: %p > ",slot);
#if 0
for(unsigned int i = 0; i < len; i++)
printf("%02x ", ptr[i]);
printf("\n");
#endif
printf("\n");
llen = parseLengthField(pkt, hlen);
pkt += llen;
@@ -307,7 +307,7 @@ void eDVBCISession::receiveData(eDVBCISlot *slot, const unsigned char *ptr, size
session->recvCreateSessionResponse(pkt);
break;
case 0x95:
printf("[CI SESS] recvCloseSessionRequest");
printf("[CI SESS] recvCloseSessionRequest\n");
session->recvCloseSessionRequest(pkt);
break;
default: