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) if ((*It)->multi && (*It)->TP == TP && (*It)->source == source && !sid_found && (*It)->ci_use_count < CI_MAX_MULTI)
{ {
int pos = 3; int pos = 3;
(*It)->SID[(*It)->ci_use_count] = SID; (*It)->SID[(*It)->ci_use_count] = SID;
(*It)->ci_use_count++; (*It)->ci_use_count++;

View File

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

View File

@@ -10,6 +10,7 @@
#include <unistd.h> #include <unistd.h>
#include "pwrmngr.h" #include "pwrmngr.h"
#include <proc_tools.h>
#include "lt_debug.h" #include "lt_debug.h"
#define lt_debug(args...) _lt_debug(TRIPLE_DEBUG_INIT, NULL, args) #define lt_debug(args...) _lt_debug(TRIPLE_DEBUG_INIT, NULL, args)
@@ -26,6 +27,16 @@ void init_td_api()
{ {
cCpuFreqManager f; cCpuFreqManager f;
f.SetCpuFreq(0); /* CPUFREQ == 0 is the trigger for leaving standby */ 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; initialized = true;
lt_info("%s end\n", __FUNCTION__); lt_info("%s end\n", __FUNCTION__);

View File

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

View File

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

View File

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