Ticket #8696: cc_nvr-r25416.patch

File cc_nvr-r25416.patch, 3.4 KB (added by gregorio.gervasio@…, 15 years ago)

fix CC608 in nuv recording

  • libs/libmythtv/NuppelVideoRecorder.cpp

    diff --git a/libs/libmythtv/NuppelVideoRecorder.cpp b/libs/libmythtv/NuppelVideoRecorder.cpp
    index 91a9ab8..74897db 100644
    a b extern "C" {  
    7070#define LOC_ERR QString("NVR(%1) Error: ").arg(videodevice)
    7171
    7272NuppelVideoRecorder::NuppelVideoRecorder(TVRec *rec, ChannelBase *channel)
    73     : RecorderBase(rec), audio_device(NULL), ccr(NULL)
     73    : RecorderBase(rec), audio_device(NULL)
    7474{
    7575    channelObj = channel;
    7676
    NuppelVideoRecorder::NuppelVideoRecorder(TVRec *rec, ChannelBase *channel)  
    180180
    181181    volume = 100;
    182182
    183     ccr.SetEnabled(true);
    184     ccd = new CC608Decoder(&ccr);
     183    ccd = new CC608Decoder(this);
    185184
    186185    go7007 = false;
    187186    resetcapture = false;
  • libs/libmythtv/NuppelVideoRecorder.h

    diff --git a/libs/libmythtv/NuppelVideoRecorder.h b/libs/libmythtv/NuppelVideoRecorder.h
    index 53aeb8e..036624f 100644
    a b class FilterManager;  
    4545class FilterChain;
    4646class AudioInput;
    4747
    48 class MPUBLIC NuppelVideoRecorder : public RecorderBase
     48class MPUBLIC NuppelVideoRecorder : public RecorderBase, public CC608Input
    4949{
    5050 public:
    5151    NuppelVideoRecorder(TVRec *rec, ChannelBase *channel);
    class MPUBLIC NuppelVideoRecorder : public RecorderBase  
    286286    int volume;
    287287
    288288    CC608Decoder *ccd;
    289     CC608Reader   ccr;
    290289
    291290    bool go7007;
    292291    bool resetcapture;
  • libs/libmythtv/cc608decoder.cpp

    diff --git a/libs/libmythtv/cc608decoder.cpp b/libs/libmythtv/cc608decoder.cpp
    index 9e59ddf..009cd57 100644
    a b using namespace std;  
    1717
    1818static void init_xds_program_type(QString xds_program_type[96]);
    1919
    20 CC608Decoder::CC608Decoder(CC608Reader *ccr)
     20CC608Decoder::CC608Decoder(CC608Input *ccr)
    2121    : reader(ccr),                  ignore_time_code(false),
    2222      rbuf(new unsigned char[sizeof(ccsubtitle)+255]),
    2323      vps_l(0),
  • libs/libmythtv/cc608decoder.h

    diff --git a/libs/libmythtv/cc608decoder.h b/libs/libmythtv/cc608decoder.h
    index d89cd2e..d027a07 100644
    a b using namespace std;  
    1313#include <QMutex>
    1414#include <QChar>
    1515
    16 #include "cc608reader.h"
    1716#include "format.h"
    1817
     18class CC608Input
     19{
     20  public:
     21    virtual ~CC608Input() { }
     22    virtual void AddTextData(unsigned char *buf, int len,
     23                             long long timecode, char type) = 0;
     24};
     25
    1926enum
    2027{
    2128    kHasMPAA       = 0x1,
    enum  
    3441class CC608Decoder
    3542{
    3643  public:
    37     CC608Decoder(CC608Reader *ccr);
     44    CC608Decoder(CC608Input *ccr);
    3845    ~CC608Decoder();
    3946
    4047    void FormatCC(int tc, int code1, int code2);
    class CC608Decoder  
    7279    void XDSPacketParse(const vector<unsigned char> &xds_buf);
    7380    bool XDSPacketCRC(const vector<unsigned char> &xds_buf);
    7481
    75     CC608Reader *reader;
     82    CC608Input *reader;
    7683
    7784    bool ignore_time_code;
    7885
  • libs/libmythtv/cc608reader.h

    diff --git a/libs/libmythtv/cc608reader.h b/libs/libmythtv/cc608reader.h
    index e52dc5d..7fb112f 100644
    a b  
    33
    44#include <QMutex>
    55
     6#include "cc608decoder.h"
     7
    68#include "mythexp.h"
    79
    810#define MAXTBUFFER 60
    class CC608Buffer  
    5153
    5254class NuppelVideoPlayer;
    5355
    54 class MPUBLIC CC608Reader
     56class MPUBLIC CC608Reader : public CC608Input
    5557{
    5658  public:
    5759    CC608Reader(NuppelVideoPlayer *parent);