DEFINE_REF(eDVBAudio);
-eDVBAudio::eDVBAudio(eDVBDemux *demux, int dev): m_demux(demux), m_dev(dev)
+eDVBAudio::eDVBAudio(eDVBDemux *demux, int dev)
+ :m_demux(demux), m_dev(dev), m_is_freezed(0)
{
char filename[128];
#if HAVE_DVB_API_VERSION < 3
eWarning("%s: %m", filename);
}
-int eDVBAudio::startPid(int pid, int type)
+#if HAVE_DVB_API_VERSION < 3
+int eDVBAudio::setPid(int pid, int type)
{
if ((m_fd < 0) || (m_fd_demux < 0))
return -1;
+
+ int bypass = 0;
+
+ switch (type)
+ {
+ case aMPEG:
+ bypass = 1;
+ break;
+ case aAC3:
+ bypass = 0;
+ break;
+ /*
+ case aDTS:
+ bypass = 2;
+ break;
+ */
+ }
+
+ if (::ioctl(m_fd, AUDIO_SET_BYPASS_MODE, bypass) < 0)
+ eDebug("failed (%m)");
+
dmx_pes_filter_params pes;
pes.pid = pid;
pes.output = DMX_OUT_DECODER;
pes.pes_type = m_dev ? DMX_PES_AUDIO1 : DMX_PES_AUDIO0; /* FIXME */
pes.flags = 0;
+ eDebugNoNewLine("DMX_SET_PES_FILTER(0x%02x) - audio - ", pid);
if (::ioctl(m_fd_demux, DMX_SET_PES_FILTER, &pes) < 0)
{
- eWarning("audio: DMX_SET_PES_FILTER: %m");
+ eDebug("failed (%m)");
return -errno;
}
+ eDebug("ok");
+
+ return 0;
+}
+
+int eDVBAudio::startPid()
+{
+ eDebugNoNewLine("DEMUX_START - audio - ");
if (::ioctl(m_fd_demux, DMX_START) < 0)
{
- eWarning("audio: DMX_START: %m");
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");
+ return 0;
+}
+
+int eDVBAudio::start()
+{
+ eDebugNoNewLine("AUDIO_PLAY - ");
+ if (::ioctl(m_fd, AUDIO_PLAY) < 0)
+ {
+ eDebug("failed (%m)");
return -errno;
}
+ eDebug("ok");
+ return 0;
+}
+
+int eDVBAudio::stopPid()
+{
+ eDebugNoNewLine("DEMUX_STOP - audio - ");
+ if (::ioctl(m_fd_demux, DMX_STOP) < 0)
+ {
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");
+ return 0;
+}
+
+int eDVBAudio::setAVSync(int val)
+{
+ eDebugNoNewLine("AUDIO_SET_AV_SYNC - ");
+ if (::ioctl(m_fd, AUDIO_SET_AV_SYNC, val) < 0)
+ {
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");
+ return 0;
+}
+#else
+int eDVBAudio::startPid(int pid, int type)
+{
+ if ((m_fd < 0) || (m_fd_demux < 0))
+ return -1;
+ dmx_pes_filter_params pes;
+ pes.pid = pid;
+ pes.input = DMX_IN_FRONTEND;
+ pes.output = DMX_OUT_DECODER;
+ pes.pes_type = m_dev ? DMX_PES_AUDIO1 : DMX_PES_AUDIO0; /* FIXME */
+ pes.flags = 0;
+ eDebugNoNewLine("DMX_SET_PES_FILTER(0x%02x) - audio - ", pid);
+ if (::ioctl(m_fd_demux, DMX_SET_PES_FILTER, &pes) < 0)
+ {
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");
+ eDebugNoNewLine("DEMUX_START - audio - ");
+ if (::ioctl(m_fd_demux, DMX_START) < 0)
+ {
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");
int bypass = 0;
switch (type)
*/
}
+ eDebugNoNewLine("AUDIO_SET_BYPASS - ");
if (::ioctl(m_fd, AUDIO_SET_BYPASS_MODE, bypass) < 0)
- eWarning("audio: AUDIO_SET_BYPASS_MODE: %m");
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
+ freeze();
+ eDebugNoNewLine("AUDIO_PLAY - ");
if (::ioctl(m_fd, AUDIO_PLAY) < 0)
- eWarning("audio: AUDIO_PLAY: %m");
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
return 0;
}
+#endif
void eDVBAudio::stop()
{
+#if HAVE_DVB_API_VERSION > 2
+ flush();
+#endif
+ eDebugNoNewLine("AUDIO_STOP - ");
if (::ioctl(m_fd, AUDIO_STOP) < 0)
- eWarning("audio: AUDIO_STOP: %m");
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
#if HAVE_DVB_API_VERSION > 2
+ eDebugNoNewLine("DEMUX_STOP - audio - ");
if (::ioctl(m_fd_demux, DMX_STOP) < 0)
- eWarning("audio: DMX_STOP: %m");
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
#endif
}
-#if HAVE_DVB_API_VERSION < 3
-void eDVBAudio::stopPid()
-{
- if (::ioctl(m_fd_demux, DMX_STOP) < 0)
- eWarning("audio: DMX_STOP: %m");
-}
-#endif
-
void eDVBAudio::flush()
{
+ eDebugNoNewLine("AUDIO_CLEAR_BUFFER - ");
if (::ioctl(m_fd, AUDIO_CLEAR_BUFFER) < 0)
- eDebug("audio: AUDIO_CLEAR_BUFFER: %m");
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
}
void eDVBAudio::freeze()
{
- if (::ioctl(m_fd, AUDIO_PAUSE) < 0)
- eDebug("video: AUDIO_PAUSE: %m");
+ if (!m_is_freezed)
+ {
+ eDebugNoNewLine("AUDIO_PAUSE - ");
+ if (::ioctl(m_fd, AUDIO_PAUSE) < 0)
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
+ m_is_freezed=1;
+ }
}
void eDVBAudio::unfreeze()
{
- if (::ioctl(m_fd, AUDIO_CONTINUE) < 0)
- eDebug("video: AUDIO_CONTINUE: %m");
+ if (m_is_freezed)
+ {
+ eDebugNoNewLine("AUDIO_CONTINUE - ");
+ if (::ioctl(m_fd, AUDIO_CONTINUE) < 0)
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
+ m_is_freezed=0;
+ }
}
void eDVBAudio::setChannel(int channel)
case aMonoRight: val = AUDIO_MONO_RIGHT; break;
default: break;
}
+ eDebugNoNewLine("AUDIO_CHANNEL_SELECT(%d) - ", val);
if (::ioctl(m_fd, AUDIO_CHANNEL_SELECT, val) < 0)
- eDebug("video: AUDIO_CHANNEL_SELECT: %m");
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
}
int eDVBAudio::getPTS(pts_t &now)
{
- return ::ioctl(m_fd, AUDIO_GET_PTS, &now);
+ eDebugNoNewLine("AUDIO_GET_PTS - ");
+ if (::ioctl(m_fd, AUDIO_GET_PTS, &now) < 0)
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
+ return 0;
}
eDVBAudio::~eDVBAudio()
{
+ unfreeze();
if (m_fd >= 0)
::close(m_fd);
if (m_fd_demux >= 0)
DEFINE_REF(eDVBVideo);
-eDVBVideo::eDVBVideo(eDVBDemux *demux, int dev): m_demux(demux), m_dev(dev)
+eDVBVideo::eDVBVideo(eDVBDemux *demux, int dev)
+ :m_demux(demux), m_dev(dev), m_is_slow_motion(0), m_is_fast_forward(0), m_is_freezed(0)
{
char filename[128];
#if HAVE_DVB_API_VERSION < 3
sprintf(filename, "/dev/dvb/card%d/video%d", demux->adapter, dev);
+ m_fd_video = ::open("/dev/video", O_RDWR);
+ if (m_fd_video < 0)
+ eWarning("/dev/video: %m");
#else
sprintf(filename, "/dev/dvb/adapter%d/video%d", demux->adapter, dev);
#endif
#define VIDEO_STREAMTYPE_MPEG2 0
#define VIDEO_STREAMTYPE_MPEG4_H264 1
+#if HAVE_DVB_API_VERSION < 3
+int eDVBVideo::setPid(int pid)
+{
+ if ((m_fd < 0) || (m_fd_demux < 0))
+ return -1;
+ dmx_pes_filter_params pes;
+
+ pes.pid = pid;
+ pes.input = DMX_IN_FRONTEND;
+ pes.output = DMX_OUT_DECODER;
+ pes.pes_type = m_dev ? DMX_PES_VIDEO1 : DMX_PES_VIDEO0; /* FIXME */
+ pes.flags = 0;
+ eDebugNoNewLine("DMX_SET_PES_FILTER(0x%02x) - video - ", pid);
+ if (::ioctl(m_fd_demux, DMX_SET_PES_FILTER, &pes) < 0)
+ {
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");
+ return 0;
+}
+
+int eDVBVideo::startPid()
+{
+ eDebugNoNewLine("DEMUX_START - video - ");
+ if (::ioctl(m_fd_demux, DMX_START) < 0)
+ {
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");
+ return 0;
+}
+
+int eDVBVideo::start()
+{
+ eDebugNoNewLine("VIDEO_PLAY - ");
+ if (::ioctl(m_fd, VIDEO_PLAY) < 0)
+ {
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");
+ return 0;
+}
+
+int eDVBVideo::stopPid()
+{
+ eDebugNoNewLine("DEMUX_STOP - video - ");
+ if (::ioctl(m_fd_demux, DMX_STOP) < 0)
+ {
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");
+ return 0;
+}
+#else
int eDVBVideo::startPid(int pid, int type)
{
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)
- eWarning("video: VIDEO_SET_STREAMTYPE: %m");
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
pes.pid = pid;
pes.input = DMX_IN_FRONTEND;
pes.output = DMX_OUT_DECODER;
pes.pes_type = m_dev ? DMX_PES_VIDEO1 : DMX_PES_VIDEO0; /* FIXME */
pes.flags = 0;
+ eDebugNoNewLine("DMX_SET_PES_FILTER(0x%02x) - video - ", pid);
if (::ioctl(m_fd_demux, DMX_SET_PES_FILTER, &pes) < 0)
{
- eWarning("video: DMX_SET_PES_FILTER: %m");
+ eDebug("failed (%m)");
return -errno;
}
+ eDebug("ok");
+ eDebugNoNewLine("DEMUX_START - video - ");
if (::ioctl(m_fd_demux, DMX_START) < 0)
{
- eWarning("video: DMX_START: %m");
+ eDebug("failed (%m)");
return -errno;
}
+ eDebug("ok");
+ freeze();
+ eDebugNoNewLine("VIDEO_PLAY - ");
if (::ioctl(m_fd, VIDEO_PLAY) < 0)
- eWarning("video: VIDEO_PLAY: %m");
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
return 0;
}
+#endif
void eDVBVideo::stop()
{
#if HAVE_DVB_API_VERSION > 2
+ eDebugNoNewLine("DEMUX_STOP - video - ");
if (::ioctl(m_fd_demux, DMX_STOP) < 0)
- eWarning("video: DMX_STOP: %m");
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
#endif
- eDebug("VIDEO_STOP");
+ eDebugNoNewLine("VIDEO_STOP - ");
if (::ioctl(m_fd, VIDEO_STOP, 1) < 0)
- eWarning("video: VIDEO_STOP: %m");
-}
-
-#if HAVE_DVB_API_VERSION < 3
-void eDVBVideo::stopPid()
-{
- if (::ioctl(m_fd_demux, DMX_STOP) < 0)
- eWarning("video: DMX_STOP: %m");
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
}
-#endif
void eDVBVideo::flush()
{
+ eDebugNoNewLine("VIDEO_CLEAR_BUFFER - ");
if (::ioctl(m_fd, VIDEO_CLEAR_BUFFER) < 0)
- eDebug("video: VIDEO_CLEAR_BUFFER: %m");
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
}
void eDVBVideo::freeze()
{
- if (::ioctl(m_fd, VIDEO_FREEZE) < 0)
- eDebug("video: VIDEO_FREEZE: %m");
+ if (!m_is_freezed)
+ {
+ eDebugNoNewLine("VIDEO_FREEZE - ");
+ if (::ioctl(m_fd, VIDEO_FREEZE) < 0)
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
+ m_is_freezed=1;
+ }
}
void eDVBVideo::unfreeze()
{
- if (::ioctl(m_fd, VIDEO_CONTINUE) < 0)
- eDebug("video: VIDEO_CONTINUE: %m");
+ if (m_is_freezed)
+ {
+ eDebugNoNewLine("VIDEO_CONTINUE - ");
+ if (::ioctl(m_fd, VIDEO_CONTINUE) < 0)
+ eDebug("failed (%m)");
+ else
+ eDebug("ok");
+ m_is_freezed=0;
+ }
}
int eDVBVideo::setSlowMotion(int repeat)
{
+ eDebugNoNewLine("VIDEO_SLOWMOTION - ");
m_is_slow_motion = repeat;
- return ::ioctl(m_fd, VIDEO_SLOWMOTION, repeat);
+ int ret = ::ioctl(m_fd, VIDEO_SLOWMOTION, repeat);
+ if (ret < 0)
+ eDebug("failed(%m)");
+ else
+ eDebug("ok");
+ return ret;
}
int eDVBVideo::setFastForward(int skip)
{
+ eDebugNoNewLine("VIDEO_FAST_FORWARD - ");
m_is_fast_forward = skip;
- return ::ioctl(m_fd, VIDEO_FAST_FORWARD, skip);
+ int ret = ::ioctl(m_fd, VIDEO_FAST_FORWARD, skip);
+ if (ret < 0)
+ eDebug("failed(%m)");
+ else
+ eDebug("ok");
+ return ret;
}
int eDVBVideo::getPTS(pts_t &now)
{
- return ::ioctl(m_fd, VIDEO_GET_PTS, &now);
+#if HAVE_DVB_API_VERSION < 3
+ #define VIDEO_GET_PTS_OLD _IOR('o', 1, unsigned int*)
+ unsigned int pts;
+ int ret = ::ioctl(m_fd_video, VIDEO_GET_PTS_OLD, &pts);
+ now = pts;
+ now *= 2;
+#else
+ int ret = ::ioctl(m_fd, VIDEO_GET_PTS, &now);
+#endif
+ if (ret < 0)
+ eDebug("VIDEO_GET_PTS failed(%m)");
+ return ret;
}
eDVBVideo::~eDVBVideo()
setSlowMotion(0);
if (m_is_fast_forward)
setFastForward(0);
+ unfreeze();
if (m_fd >= 0)
::close(m_fd);
if (m_fd_demux >= 0)
::close(m_fd_demux);
+#if HAVE_DVB_API_VERSION < 3
+ if (m_fd_video >= 0)
+ ::close(m_fd_video);
+#endif
}
void eDVBVideo::video_event(int)
{
#if HAVE_DVB_API_VERSION >= 3
struct video_event evt;
+ eDebugNoNewLine("VIDEO_GET_EVENT - ");
if (::ioctl(m_fd, VIDEO_GET_EVENT, &evt) < 0)
- eDebug("VIDEO_GET_EVENT failed(%m)");
+ eDebug("failed (%m)");
else
{
+ eDebug("ok");
if (evt.type == VIDEO_EVENT_SIZE_CHANGED)
{
struct iTSMPEGDecoder::videoEvent event;
eWarning("%s: %m", filename);
}
+#if HAVE_DVB_API_VERSION < 3
+int eDVBPCR::setPid(int pid)
+{
+ if (m_fd_demux < 0)
+ return -1;
+ dmx_pes_filter_params pes;
+
+ pes.pid = pid;
+ pes.input = DMX_IN_FRONTEND;
+ pes.output = DMX_OUT_DECODER;
+ pes.pes_type = DMX_PES_PCR;
+ pes.flags = 0;
+
+ eDebugNoNewLine("DMX_SET_PES_FILTER(0x%02x) - pcr - ", pid);
+ if (::ioctl(m_fd_demux, DMX_SET_PES_FILTER, &pes) < 0)
+ {
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");
+ return 0;
+}
+
+int eDVBPCR::startPid()
+{
+ if (m_fd_demux < 0)
+ return -1;
+ eDebugNoNewLine("DEMUX_START - pcr - ");
+ if (::ioctl(m_fd_demux, DMX_START) < 0)
+ {
+ eDebug("failed (%m)");
+ return -errno;
+ }
+ eDebug("ok");
+ return 0;
+}
+#else
int eDVBPCR::startPid(int pid)
{
if (m_fd_demux < 0)
pes.output = DMX_OUT_DECODER;
pes.pes_type = DMX_PES_PCR;
pes.flags = 0;
+ eDebugNoNewLine("DMX_SET_PES_FILTER(0x%02x) - pcr - ", pid);
if (::ioctl(m_fd_demux, DMX_SET_PES_FILTER, &pes) < 0)
{
- eWarning("video: DMX_SET_PES_FILTER: %m");
+ eDebug("failed (%m)");
return -errno;
}
+ eDebug("ok");
+ eDebugNoNewLine("DEMUX_START - pcr - ");
if (::ioctl(m_fd_demux, DMX_START) < 0)
{
- eWarning("video: DMX_START: %m");
+ eDebug("failed (%m)");
return -errno;
}
+ eDebug("ok");
return 0;
}
+#endif
void eDVBPCR::stop()
{
+ eDebugNoNewLine("DEMUX_STOP - pcr - ");
if (::ioctl(m_fd_demux, DMX_STOP) < 0)
- eWarning("video: DMX_STOP: %m");
+ eDebug("failed(%m)");
+ else
+ eDebug("ok");
}
eDVBPCR::~eDVBPCR()
pes.output = DMX_OUT_DECODER;
pes.pes_type = DMX_PES_TELETEXT;
pes.flags = 0;
+
+ eDebugNoNewLine("DMX_SET_PES_FILTER(0x%02x) - ttx - ", pid);
if (::ioctl(m_fd_demux, DMX_SET_PES_FILTER, &pes) < 0)
{
- eWarning("video: DMX_SET_PES_FILTER: %m");
+ eDebug("failed(%m)");
return -errno;
}
+ eDebug("ok");
+ eDebugNoNewLine("DEMUX_START - pcr - ");
if (::ioctl(m_fd_demux, DMX_START) < 0)
{
- eWarning("video: DMX_START: %m");
+ eDebug("failed(%m)");
return -errno;
}
+ eDebug("ok");
return 0;
}
void eDVBTText::stop()
{
+ eDebugNoNewLine("DEMUX_STOP - ttx - ");
if (::ioctl(m_fd_demux, DMX_STOP) < 0)
- eWarning("video: DMX_STOP: %m");
+ eDebug("failed(%m)");
+ else
+ eDebug("ok");
}
eDVBTText::~eDVBTText()
bool changed = !!m_changed;
#if HAVE_DVB_API_VERSION < 3
+ bool checkAVSync = m_changed & (changeAudio|changeVideo|changePCR);
if (m_changed & changeAudio && m_audio)
m_audio->stopPid();
if (m_changed & changeVideo && m_video)
{
m_pcr->stop();
m_pcr=0;
+ if (!(m_pcrpid >= 0 && m_pcrpid < 0x1ff))
+ m_changed &= ~changePCR;
}
if (m_changed & changeAudio && m_audio)
{
m_audio->stop();
m_audio=0;
+ if (!(m_apid >= 0 && m_apid < 0x1ff))
+ m_changed &= ~changeAudio;
}
if (m_changed & changeVideo && m_video)
{
m_video->stop();
m_video=0;
m_video_event_conn=0;
+ if (!(m_vpid >= 0 && m_vpid < 0x1ff))
+ m_changed &= ~changeVideo;
+ }
+ if (m_changed & changeVideo)
+ {
+ m_video = new eDVBVideo(m_demux, m_decoder);
+ m_video->connectEvent(slot(*this, &eTSMPEGDecoder::video_event), m_video_event_conn);
+ if (m_video->setPid(m_vpid))
+ res -1;
}
if (m_changed & changePCR)
{
m_pcr = new eDVBPCR(m_demux);
- if (m_pcr->startPid(m_pcrpid))
- {
- eWarning("pcr: startpid failed!");
+ if (m_pcr->setPid(m_pcrpid))
+ res = -1;
+ }
+ if (m_changed & changeAudio)
+ {
+ m_audio = new eDVBAudio(m_demux, m_decoder);
+ if (m_audio->setPid(m_apid, m_atype))
+ res = -1;
+ }
+ if (m_changed & changePCR)
+ {
+ if (m_pcr->startPid())
res = -1;
- }
m_changed &= ~changePCR;
}
+ else if (checkAVSync && m_audio && m_video)
+ {
+ if (m_audio->setAVSync(1))
+ res = -1;
+ }
if (m_changed & changeVideo)
{
- m_video = new eDVBVideo(m_demux, m_decoder);
- m_video->connectEvent(slot(*this, &eTSMPEGDecoder::video_event), m_video_event_conn);
- if (m_video->startPid(m_vpid))
- {
- eWarning("video: startpid failed!");
+ if (m_video->startPid() || m_video->start())
res = -1;
- }
m_changed &= ~changeVideo;
}
if (m_changed & changeAudio)
{
- m_audio = new eDVBAudio(m_demux, m_decoder);
- if (m_audio->startPid(m_apid, m_atype))
- {
- eWarning("audio: startpid failed!");
+ if (m_audio->start() || m_audio->startPid())
res = -1;
- }
m_changed &= ~changeAudio;
}
#else
{
m_pcr = new eDVBPCR(m_demux);
if (m_pcr->startPid(m_pcrpid))
- {
- eWarning("pcr: startpid failed!");
res = -1;
- }
}
m_changed &= ~changePCR;
}
eDebug("VIDEO CHANGED (to %04x)", m_vpid);
if (m_video)
{
- eDebug("STOP");
m_video->stop();
m_video = 0;
m_video_event_conn = 0;
}
if ((m_vpid >= 0) && (m_vpid < 0x1FFF))
{
- eDebug("new video");
m_video = new eDVBVideo(m_demux, m_decoder);
m_video->connectEvent(slot(*this, &eTSMPEGDecoder::video_event), m_video_event_conn);
if (m_video->startPid(m_vpid, m_vtype))
- {
- eWarning("video: startpid failed!");
res = -1;
- }
}
m_changed &= ~changeVideo;
}
{
m_audio = new eDVBAudio(m_demux, m_decoder);
if (m_audio->startPid(m_apid, m_atype))
- {
- eWarning("audio: startpid failed!");
res = -1;
- }
}
m_changed &= ~changeAudio;
}
{
m_text = new eDVBTText(m_demux);
if (m_text->startPid(m_textpid))
- {
- eWarning("text: startpid failed!");
res = -1;
- }
}
m_changed &= ~changeText;
}
}
RESULT eTSMPEGDecoder::start()
+{
+ RESULT r;
+ r = setState();
+ if (r)
+ return r;
+ return unfreeze();
+}
+
+ /* preroll is start in freezed mode. */
+RESULT eTSMPEGDecoder::preroll()
{
return setState();
}
eDebug("VIDEO_SELECT_SOURCE MEMORY failed (%m)");
if (ioctl(vfd, VIDEO_PLAY) < 0)
eDebug("VIDEO_PLAY failed (%m)");
+ if (::ioctl(vfd, VIDEO_CONTINUE) < 0)
+ eDebug("video: VIDEO_CONTINUE: %m");
int cnt=0;
int pos=0;
while(cnt<2)