/* 
*/
#ifndef Phonon_GST_VIDEODATAOUTPUT_H
#define Phonon_GST_VIDEODATAOUTPUT_H

#include "abstractvideooutput.h"
#include <phonon/videoframe.h>
#include <QVector>
#include <QByteArray>
#include <QObject>
#include <QSize>

namespace Phonon
{
namespace Gst
{
	class VideoDataOutput : public QObject, public AbstractVideoOutput
	{
		Q_OBJECT
		Q_INTERFACES( Phonon::Gst::AbstractVideoOutput )
		public:
			VideoDataOutput( QObject* parent );
			~VideoDataOutput();

		public Q_SLOTS:
			int frameRate() const;
			void setFrameRate( int frameRate );

			QSize naturalFrameSize() const;
			QSize frameSize() const;
			void setFrameSize( const QSize& frameSize );

			quint32 format() const;
			void setFormat( quint32 fourcc );

			//int displayLatency() const;
			//void setDisplayLatency( int milliseconds );

		public:
			virtual void* internal1( void* = 0 ) { return static_cast<Phonon::Gst::AbstractVideoOutput*>( this ); }

			// Fake specific:
			virtual void processFrame( Phonon::VideoFrame& frame );

		signals:
			void frameReady( const Phonon::VideoFrame& frame );
			void endOfMedia();

		private:
			quint32 m_fourcc;
			QByteArray m_pendingData;
			//int m_latency;
			int m_frameRate;
			QSize m_frameSize;
	};
}} //namespace Phonon::Gst

// vim: sw=4 ts=4 tw=80
#endif // Phonon_GST_VIDEODATAOUTPUT_H
