Opened 7 years ago

Closed 7 years ago

#11317 closed Bug Report - General (Duplicate)

change to ./configure to detect libcec >=2

Reported by: scox_nz@… Owned by: stuartm
Priority: minor Milestone: 0.25.4
Component: MythTV - User Interface Library Version: 0.25
Severity: low Keywords: libcec
Cc: Ticket locked: no

Description

Currently the ./configure script cannot detect a version 2 libcec library

The code below (when included in the ./configure script) will compile against the version 2 library

#include <libcec/cec.h> #include <iostream> #include <cstdio> using namespace std; using namespace CEC; #include <libcec/cecloader.h> #define CEC_CONFIG_VERSION CEC_CLIENT_VERSION_CURRENT;

libcec_configuration g_config; int main(void) {

if (CEC_LIB_VERSION_MAJOR < 1
(CEC_LIB_VERSION_MAJOR == 1 &&

CEC_LIB_VERSION_MINOR < 5))

return 0;

g_config.Clear(); snprintf(g_config.strDeviceName, 13, "CECTester"); g_config.clientVersion = CEC_CONFIG_VERSION; g_config.bActivateSource = 0;

ICECAdapter *parser = LibCecInitialise?(&g_config);

return (long) parser; }

Attachments (1)

cecadapter.cpp (42.0 KB) - added by scox_nz@… 7 years ago.
rough and ready update to support the latest firmware/libccec - note currently has hard coded logical/physical addresses

Download all attachments as: .zip

Change History (5)

comment:1 Changed 7 years ago by scox_nz@…

#include <libcec/cec.h>
#include <iostream>
#include <cstdio>
using namespace std;
using namespace CEC;
#include <libcec/cecloader.h>
#define CEC_CONFIG_VERSION CEC_CLIENT_VERSION_CURRENT;
libcec_configuration g_config;
int main(void) {
    if (CEC_LIB_VERSION_MAJOR < 1 || (CEC_LIB_VERSION_MAJOR == 1 &&
                                      CEC_LIB_VERSION_MINOR < 5))
        return 0;

  g_config.Clear();
  snprintf(g_config.strDeviceName, 13, "CECTester");
  g_config.clientVersion       = CEC_CONFIG_VERSION;
  g_config.bActivateSource     = 0;

  ICECAdapter *parser = LibCecInitialise(&g_config);
return (long)  parser;
}

comment:2 Changed 7 years ago by macarno@…

CEC_CLIENT_VERSION_CURRENT was added in version 2.0.4, therefore this code will not detect any libcec version before 2.0.4.

Not sure if this is what we want?

Changed 7 years ago by scox_nz@…

Attachment: cecadapter.cpp added

rough and ready update to support the latest firmware/libccec - note currently has hard coded logical/physical addresses

comment:3 Changed 7 years ago by mythtv@…

#11338 offers a more complete patch implementing more changes for CEC 2.x

comment:4 Changed 7 years ago by stuartm

Resolution: Duplicate
Status: newclosed

Duplicate of #11338

Note: See TracTickets for help on using tickets.