diff options
author | ghost <andreas.monzner@multimedia-labs.de> | 2009-01-20 22:39:33 (GMT) |
---|---|---|
committer | ghost <andreas.monzner@multimedia-labs.de> | 2009-01-20 22:39:33 (GMT) |
commit | a0f0f0b446b7b0fd941194299fa4840b609df1f0 (patch) | |
tree | 47ff50cfcb121a67b5892531283e03454d7b1d37 /lib/dvb/decoder.cpp | |
parent | 9daf5d650d06aa046399b68931084d4005aab74a (diff) |
support much more audio/video codecs encapsulated in TS files (not all stb hardware can handle all codecs!!!)
Diffstat (limited to 'lib/dvb/decoder.cpp')
-rw-r--r-- | lib/dvb/decoder.cpp | 41 |
1 files changed, 36 insertions, 5 deletions
diff --git a/lib/dvb/decoder.cpp b/lib/dvb/decoder.cpp index 8bc07e6..065a49c 100644 --- a/lib/dvb/decoder.cpp +++ b/lib/dvb/decoder.cpp @@ -187,11 +187,15 @@ int eDVBAudio::startPid(int pid, int type) case aAC3: bypass = 0; break; - /* case aDTS: bypass = 2; break; - */ + case aAAC: + bypass = 8; + break; + case aAACHE: + bypass = 9; + break; } eDebugNoNewLine("AUDIO_SET_BYPASS - "); @@ -334,6 +338,10 @@ eDVBVideo::eDVBVideo(eDVBDemux *demux, int dev) // not finally values i think.. !! #define VIDEO_STREAMTYPE_MPEG2 0 #define VIDEO_STREAMTYPE_MPEG4_H264 1 +#define VIDEO_STREAMTYPE_VC1 3 +#define VIDEO_STREAMTYPE_MPEG4_Part2 4 +#define VIDEO_STREAMTYPE_VC1_SM 5 +#define VIDEO_STREAMTYPE_MPEG1 6 #if HAVE_DVB_API_VERSION < 3 int eDVBVideo::setPid(int pid) @@ -395,13 +403,36 @@ int eDVBVideo::stopPid() #else int eDVBVideo::startPid(int pid, int type) { + int streamtype = VIDEO_STREAMTYPE_MPEG2; + if ((m_fd < 0) || (m_fd_demux < 0)) return -1; dmx_pes_filter_params pes; - eDebugNoNewLine("VIDEO_SET_STREAMTYPE %d - ",type == MPEG4_H264 ? VIDEO_STREAMTYPE_MPEG4_H264 : VIDEO_STREAMTYPE_MPEG2); - if (::ioctl(m_fd, VIDEO_SET_STREAMTYPE, - type == MPEG4_H264 ? VIDEO_STREAMTYPE_MPEG4_H264 : VIDEO_STREAMTYPE_MPEG2) < 0) + switch(type) + { + default: + case MPEG2: + break; + case MPEG4_H264: + streamtype = VIDEO_STREAMTYPE_MPEG4_H264; + break; + case MPEG1: + streamtype = VIDEO_STREAMTYPE_MPEG1; + break; + case MPEG4_Part2: + streamtype = VIDEO_STREAMTYPE_MPEG4_Part2; + break; + case VC1: + streamtype = VIDEO_STREAMTYPE_VC1; + break; + case VC1_SM: + streamtype = VIDEO_STREAMTYPE_VC1_SM; + break; + } + + eDebugNoNewLine("VIDEO_SET_STREAMTYPE %d - ", streamtype); + if (::ioctl(m_fd, VIDEO_SET_STREAMTYPE, streamtype) < 0) eDebug("failed (%m)"); else eDebug("ok"); |