decoder.cpp/servicedvb.cpp: fix radio stillpicture displaying
authorghost <andreas.monzner@multimedia-labs.de>
Thu, 2 Apr 2009 19:03:48 +0000 (21:03 +0200)
committerghost <andreas.monzner@multimedia-labs.de>
Thu, 2 Apr 2009 19:03:48 +0000 (21:03 +0200)
lib/dvb/decoder.cpp
lib/service/servicedvb.cpp

index edefd7644871b461725e03eaa9cc84bf2272ff8e..ebe3ce24fe90d75f89c42eb60a5458b59e232a31 100644 (file)
@@ -1290,15 +1290,18 @@ RESULT eTSMPEGDecoder::showSinglePic(const char *filename)
                                unsigned char seq_end[] = { 0x00, 0x00, 0x01, 0xB7 };
                                unsigned char iframe[s.st_size];
                                unsigned char stuffing[8192];
                                unsigned char seq_end[] = { 0x00, 0x00, 0x01, 0xB7 };
                                unsigned char iframe[s.st_size];
                                unsigned char stuffing[8192];
+                               int streamtype = VIDEO_STREAMTYPE_MPEG2;
                                memset(stuffing, 0, 8192);
                                read(f, iframe, s.st_size);
                                if (ioctl(m_video_clip_fd, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_MEMORY) < 0)
                                        eDebug("VIDEO_SELECT_SOURCE MEMORY failed (%m)");
                                memset(stuffing, 0, 8192);
                                read(f, iframe, s.st_size);
                                if (ioctl(m_video_clip_fd, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_MEMORY) < 0)
                                        eDebug("VIDEO_SELECT_SOURCE MEMORY failed (%m)");
+                               if (ioctl(m_video_clip_fd, VIDEO_SET_STREAMTYPE, streamtype) < 0)
+                                       eDebug("VIDEO_SET_STREAMTYPE failed(%m)");
                                if (ioctl(m_video_clip_fd, VIDEO_PLAY) < 0)
                                        eDebug("VIDEO_PLAY failed (%m)");
                                if (ioctl(m_video_clip_fd, VIDEO_PLAY) < 0)
                                        eDebug("VIDEO_PLAY failed (%m)");
-                               if (::ioctl(m_video_clip_fd, VIDEO_CONTINUE) < 0)
+                               if (ioctl(m_video_clip_fd, VIDEO_CONTINUE) < 0)
                                        eDebug("video: VIDEO_CONTINUE: %m");
                                        eDebug("video: VIDEO_CONTINUE: %m");
-                               if (::ioctl(m_video_clip_fd, VIDEO_CLEAR_BUFFER) < 0)
+                               if (ioctl(m_video_clip_fd, VIDEO_CLEAR_BUFFER) < 0)
                                        eDebug("video: VIDEO_CLEAR_BUFFER: %m");
                                while(pos <= (s.st_size-4) && !(seq_end_avail = (!iframe[pos] && !iframe[pos+1] && iframe[pos+2] == 1 && iframe[pos+3] == 0xB7)))
                                        ++pos;
                                        eDebug("video: VIDEO_CLEAR_BUFFER: %m");
                                while(pos <= (s.st_size-4) && !(seq_end_avail = (!iframe[pos] && !iframe[pos+1] && iframe[pos+2] == 1 && iframe[pos+3] == 0xB7)))
                                        ++pos;
index 7292e6dfeb76a6be043bc5bf7d74c22027ff3fc7..b92965da5a78c6d5d61199b8e5cdd1d25b6abccb 100644 (file)
@@ -2316,13 +2316,6 @@ void eDVBServicePlay::updateDecoder()
 
                m_teletext_parser->start(program.textPid);
 
 
                m_teletext_parser->start(program.textPid);
 
-/*             if (!m_is_primary)
-                       m_decoder->setTrickmode();
-               else */ if (m_is_paused)
-                       m_decoder->pause();
-               else
-                       m_decoder->play();
-
                if (vpid > 0 && vpid < 0x2000)
                        ;
                else
                if (vpid > 0 && vpid < 0x2000)
                        ;
                else
@@ -2332,6 +2325,13 @@ void eDVBServicePlay::updateDecoder()
                                m_decoder->setRadioPic(radio_pic);
                }
 
                                m_decoder->setRadioPic(radio_pic);
                }
 
+/*             if (!m_is_primary)
+                       m_decoder->setTrickmode();
+               else */ if (m_is_paused)
+                       m_decoder->pause();
+               else
+                       m_decoder->play();
+
                m_decoder->setAudioChannel(achannel);
 
                /* don't worry about non-existing services, nor pvr services */
                m_decoder->setAudioChannel(achannel);
 
                /* don't worry about non-existing services, nor pvr services */