diff liboggplayer-src/src/imp.hpp @ 60:9c63b355c82b

Remove the audio code completely.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 06 Aug 2013 23:45:05 +0300
parents 3eacedd172ab
children
line wrap: on
line diff
--- a/liboggplayer-src/src/imp.hpp	Tue Aug 06 23:27:37 2013 +0300
+++ b/liboggplayer-src/src/imp.hpp	Tue Aug 06 23:45:05 2013 +0300
@@ -1,13 +1,7 @@
 #include <oggplayer.h>
-#ifdef VORBIS_SUPPORT
-#include "SDL_audiocvt.hpp"
-#endif
 #include <fstream>
 #include <vector>
 #include <theora/theora.h>
-#ifdef VORBIS_SUPPORT
-#include <vorbis/codec.h>
-#endif
 #include <boost/thread.hpp>
 #include <boost/bind.hpp>
 #include <boost/thread/mutex.hpp>
@@ -19,7 +13,7 @@
 struct OggPlayer::Imp {
 
 	Imp() :
-		cirbuf(0),video_lock(video_mut, boost::defer_lock){
+		video_lock(video_mut, boost::defer_lock){
 		failbit = false;
 		playing = false;
 		need_close = false;
@@ -40,9 +34,6 @@
 	bool parse_headers();
 	void open(std::string path, AudioFormat audio_format, int channels,
 			int rate, VideoFormat video_format);
-#ifdef VORBIS_SUPPORT
-	bool decode_audio();
-#endif
 	bool decode_video();
 	bool ready();
 	void play();
@@ -56,11 +47,6 @@
 
 	ogg_sync_state o_sync;
 
-#ifdef VORBIS_SUPPORT
-	vorbis_comment v_comment;
-	vorbis_info v_info;
-#endif
-
 	theora_info t_info;
 	theora_comment t_comment;
 
@@ -72,37 +58,19 @@
 
 	theora_state t_state;
 
-#ifdef VORBIS_SUPPORT
-	vorbis_dsp_state v_state;
-	vorbis_block v_block;
-#endif
-
 	int pp_level_max;
 	int pp_level;
 	int pp_inc;
 
-	char* audio_buffer;
-	boost::circular_buffer<char> cirbuf;
-	unsigned int audio_buffer_size;
-#ifdef VORBIS_SUPPORT
-	SDL_AudioCVT cvt;
-#endif
-
 	bool playing;
 
 	boost::thread play_thread;
 	boost::mutex video_mut;
 	boost::condition_variable video_ready_cond;
-#ifdef VORBIS_SUPPORT
-	boost::mutex audio_mut;
-	boost::condition_variable audio_ready_cond;
-#endif
 
 	bool videobuf_ready;
 	double videobuf_time;
 
-	bool audio_cache_ready;
-
 	// This lock should only be used from the main thread
 	boost::unique_lock<boost::mutex> video_lock;
 	// These variables are used to identify the frames (not just count them, not a debug variable)
@@ -110,12 +78,6 @@
 	int frame;
 	int last_frame_read;
 
-	int audio_bytes_played;
-	struct AudioGranulePos {
-		int pos;
-		double set_time;
-	};
-	std::deque<AudioGranulePos> audio_granule_poses;
 	double time_factor;
 
 	struct PixelFormat{