Changeset 10161
- Timestamp:
- 05/08/09 09:46:46 (4 years ago)
- Location:
- OpenSceneGraph/trunk/src/osgPlugins/ffmpeg
- Files:
-
- 3 modified
-
FFmpegClocks.hpp (modified) (1 diff)
-
FFmpegDecoderVideo.cpp (modified) (3 diffs)
-
FFmpegDecoderVideo.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegClocks.hpp
r9816 r10161 30 30 void audioSetDelay(double delay); 31 31 void audioDisable(); 32 bool audioDisabled() const { return m_audio_disabled; } 32 33 33 34 double videoSynchClock(const AVFrame * frame, double time_base, double pts); -
OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp
r10088 r10161 191 191 const double frame_delay = m_clocks.videoRefreshSchedule(synched_pts); 192 192 193 publishFrame(frame_delay );193 publishFrame(frame_delay, m_clocks.audioDisabled()); 194 194 } 195 195 } … … 269 269 270 270 271 void FFmpegDecoderVideo::publishFrame(const double delay )271 void FFmpegDecoderVideo::publishFrame(const double delay, bool audio_disabled) 272 272 { 273 273 // If no publishing function, just ignore the frame … … 275 275 return; 276 276 277 #if 1 278 // new code from Jean-Sebasiten Guay - needs testing as we're unclear on the best solution 279 // If the display delay is too small, we better skip the frame. 280 if (!audio_disabled && delay < -0.010) 281 return; 282 #else 283 // original solution that hung on video stream over web. 277 284 // If the display delay is too small, we better skip the frame. 278 285 if (delay < -0.010) 279 286 return; 280 287 #endif 288 281 289 AVPicture * const src = (AVPicture *) m_frame.get(); 282 290 AVPicture * const dst = (AVPicture *) m_frame_rgba.get(); -
OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp
r9960 r10161 86 86 void decodeLoop(); 87 87 void findAspectRatio(); 88 void publishFrame(double delay );88 void publishFrame(double delay, bool audio_disabled); 89 89 double synchronizeVideo(double pts); 90 90 void yuva420pToRgba(AVPicture *dst, AVPicture *src, int width, int height);
