[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp serv...
From: |
Tomas Groth |
Subject: |
[Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp serv... |
Date: |
Tue, 15 May 2007 13:01:28 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Tomas Groth <tgc> 07/05/15 13:01:28
Modified files:
. : ChangeLog
server/asobj : NetStream.cpp NetStream.h NetStreamFfmpeg.cpp
NetStreamFfmpeg.h NetStreamGst.cpp
NetStreamGst.h
Log message:
* server/asobj/NetStream.{cpp.h},
server/asobj/NetStreamFfmpeg.{cpp,h},
server/asobj/NetStreamGst.{cpp,h}: Moved shared code from
NetStreamFfmpeg and NetStreamGst to the NetStream base class.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3225&r2=1.3226
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStream.cpp?cvsroot=gnash&r1=1.44&r2=1.45
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStream.h?cvsroot=gnash&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.cpp?cvsroot=gnash&r1=1.49&r2=1.50
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.h?cvsroot=gnash&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.cpp?cvsroot=gnash&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.h?cvsroot=gnash&r1=1.16&r2=1.17
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3225
retrieving revision 1.3226
diff -u -b -r1.3225 -r1.3226
--- ChangeLog 15 May 2007 12:46:14 -0000 1.3225
+++ ChangeLog 15 May 2007 13:01:27 -0000 1.3226
@@ -1,3 +1,9 @@
+2007-05-15 Tomas Groth Christensen <address@hidden>
+
+ * server/asobj/NetStream.{cpp.h}, server/asobj/NetStreamFfmpeg.{cpp,h},
+ server/asobj/NetStreamGst.{cpp,h}: Moved shared code from
+ NetStreamFfmpeg and NetStreamGst to the NetStream base class.
+
2007-05-15 Sandro Santilli <address@hidden>
* libbase/jpeg.{cpp,h}: cleanups and robustness (first pass).
Index: server/asobj/NetStream.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStream.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- server/asobj/NetStream.cpp 8 May 2007 06:46:24 -0000 1.44
+++ server/asobj/NetStream.cpp 15 May 2007 13:01:27 -0000 1.45
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: NetStream.cpp,v 1.44 2007/05/08 06:46:24 strk Exp $ */
+/* $Id: NetStream.cpp,v 1.45 2007/05/15 13:01:27 tgc Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -36,6 +36,7 @@
#include "GnashException.h"
#include "NetConnection.h"
#include "action.h" // for call_method
+#include "render.h" // for gnash::render::videoFrameFormat()
#include "movie_root.h"
@@ -64,6 +65,15 @@
_netCon(NULL),
m_env(NULL),
m_bufferTime(100),
+ m_videoFrameFormat(gnash::render::videoFrameFormat()),
+ m_newFrameReady(false),
+ m_go(false),
+ m_imageframe(NULL),
+ m_pause(false),
+ m_parser(NULL),
+ m_isFLV(false),
+ m_start_onbuffer(false),
+ inputPos(0),
_lastStatus(invalidStatus)
{
}
@@ -418,7 +428,7 @@
as_value status;
if ( get_member("onStatus", &status) && status.is_function())
{
- log_debug("Processing %d status notifications",
_statusQueue.size());
+ log_debug("Processing "SIZET_FMT" status notifications",
_statusQueue.size());
for (StatusQueue::iterator it=_statusQueue.begin(),
itE=_statusQueue.end(); it!=itE; ++it)
{
@@ -466,6 +476,50 @@
return (m_bufferTime/1000);
}
+long
+NetStream::bytesLoaded()
+{
+ if (_netCon == NULL) return 0;
+ return _netCon->getBytesLoaded();
+}
+
+long
+NetStream::bytesTotal()
+{
+ if (_netCon == NULL) return 0;
+ return _netCon->getBytesTotal();
+}
+
+bool
+NetStream::newFrameReady()
+{
+ if (m_newFrameReady) {
+ m_newFrameReady = false;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+image::image_base* NetStream::get_video()
+{
+ boost::mutex::scoped_lock lock(image_mutex);
+
+ if (!m_imageframe) return NULL;
+
+ image::image_base* ret_image;
+ if (m_videoFrameFormat == render::YUV) {
+ ret_image = new image::yuv(m_imageframe->m_width,
m_imageframe->m_height);
+ } else if (m_videoFrameFormat == render::RGB) {
+ ret_image = new image::rgb(m_imageframe->m_width,
m_imageframe->m_height);
+ } else {
+ return NULL;
+ }
+
+ ret_image->update(m_imageframe->m_data);
+ return ret_image;
+}
+
std::pair<const char*, const char*>
NetStream::getStatusCodeInfo(StatusCode code)
{
Index: server/asobj/NetStream.h
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStream.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- server/asobj/NetStream.h 7 May 2007 23:15:44 -0000 1.30
+++ server/asobj/NetStream.h 15 May 2007 13:01:27 -0000 1.31
@@ -18,7 +18,7 @@
//
//
-/* $Id: NetStream.h,v 1.30 2007/05/07 23:15:44 tgc Exp $ */
+/* $Id: NetStream.h,v 1.31 2007/05/15 13:01:27 tgc Exp $ */
#ifndef __NETSTREAM_H__
#define __NETSTREAM_H__
@@ -34,6 +34,7 @@
#include "impl.h"
#include "video_stream_instance.h"
#include "NetConnection.h"
+#include "FLVParser.h"
// Forward declarations
namespace gnash {
@@ -110,6 +111,42 @@
// The size of the buffer in milliseconds
uint32_t m_bufferTime;
+ // The video outputformat
+ int m_videoFrameFormat;
+
+ // Are a new frame ready to be returned?
+ volatile bool m_newFrameReady;
+
+ // Mutex to insure we don't corrupt the image
+ boost::mutex image_mutex;
+
+ // Are the playing loop running or not
+ volatile bool m_go;
+
+ // The image/videoframe which is given to the renderer
+ image::image_base* m_imageframe;
+
+ // paused or not
+ volatile bool m_pause;
+
+ // The video URL
+ std::string url;
+
+ // The homegrown parser we use for FLV
+ FLVParser* m_parser;
+
+ // Are we playing a FLV?
+ bool m_isFLV;
+
+ // The handler which is invoked on status change
+ boost::intrusive_ptr<as_function> m_statusHandler;
+
+ // should we start when buffer is full?
+ bool m_start_onbuffer;
+
+ // The position in the inputfile, only used when not playing a FLV
+ long inputPos;
+
public:
NetStream();
@@ -120,42 +157,42 @@
virtual void pause(int /*mode*/){}
- virtual int play(const std::string& /*source*/){ log_error("FFMPEG or
Gstreamer is needed to play video"); return 0; }
+ virtual int play(const std::string& /*source*/){ log_error(_("FFMPEG or
Gstreamer is needed to play video")); return 0; }
virtual void seek(double /*pos*/){}
- virtual void setNetCon(boost::intrusive_ptr<NetConnection> nc)
- {
- _netCon = nc;
- }
-
- virtual image::image_base* get_video(){ return NULL; }
-
virtual int64_t time() { return 0; }
- virtual long bytesLoaded() { return 0; }
-
- virtual long bytesTotal() { return 0; }
+ virtual void advance(){}
- virtual bool playing()
+ void setNetCon(boost::intrusive_ptr<NetConnection> nc)
{
- return false;
+ _netCon = nc;
}
- virtual void advance(){}
-
- virtual bool newFrameReady() { return false; }
-
void setEnvironment(as_environment* env)
{
assert(env);
m_env = env;
}
+ inline bool playing()
+ {
+ return m_go;
+ }
+
void setBufferTime(double time);
uint32_t bufferTime();
+ long bytesLoaded();
+
+ long bytesTotal();
+
+ bool newFrameReady();
+
+ image::image_base* get_video();
+
private:
typedef std::vector<StatusCode> StatusQueue;
Index: server/asobj/NetStreamFfmpeg.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -b -r1.49 -r1.50
--- server/asobj/NetStreamFfmpeg.cpp 7 May 2007 23:15:44 -0000 1.49
+++ server/asobj/NetStreamFfmpeg.cpp 15 May 2007 13:01:27 -0000 1.50
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: NetStreamFfmpeg.cpp,v 1.49 2007/05/07 23:15:44 tgc Exp $ */
+/* $Id: NetStreamFfmpeg.cpp,v 1.50 2007/05/15 13:01:27 tgc Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -63,16 +63,8 @@
_decodeThread(NULL),
- m_go(false),
- m_imageframe(NULL),
m_video_clock(0),
- m_pause(false),
- m_unqueued_data(NULL),
- inputPos(0),
- m_parser(NULL),
- m_isFLV(false),
- m_newFrameReady(false),
- m_start_onbuffer(false)
+ m_unqueued_data(NULL)
{
ByteIOCxt.buffer = NULL;
@@ -530,11 +522,9 @@
ns->m_Frame = avcodec_alloc_frame();
// Determine required buffer size and allocate buffer
- int videoFrameFormat = gnash::render::videoFrameFormat();
-
- if (videoFrameFormat == render::YUV) {
+ if (ns->m_videoFrameFormat == render::YUV) {
ns->m_imageframe = new image::yuv(ns->m_VCodecCtx->width,
ns->m_VCodecCtx->height);
- } else if (videoFrameFormat == render::RGB) {
+ } else if (ns->m_videoFrameFormat == render::RGB) {
ns->m_imageframe = new image::rgb(ns->m_VCodecCtx->width,
ns->m_VCodecCtx->height);
}
@@ -646,11 +636,10 @@
if (clock >= video_clock)
{
boost::mutex::scoped_lock lock(ns->image_mutex);
- int videoFrameFormat =
gnash::render::videoFrameFormat();
- if (videoFrameFormat == render::YUV) {
+ if (ns->m_videoFrameFormat == render::YUV) {
// XXX m_imageframe might be a byte
aligned buffer, while video is not!
static_cast<image::yuv*>(ns->m_imageframe)->update(video->m_data);
- } else if (videoFrameFormat == render::RGB) {
+ } else if (ns->m_videoFrameFormat ==
render::RGB) {
image::rgb* imgframe =
static_cast<image::rgb*>(ns->m_imageframe);
rgbcopy(imgframe, video,
ns->m_VCodecCtx->width * 3);
@@ -820,24 +809,23 @@
if (got) {
boost::scoped_array<uint8_t> buffer;
- int videoFrameFormat =
gnash::render::videoFrameFormat();
if (m_imageframe == NULL) {
- if (videoFrameFormat == render::YUV) {
+ if (m_videoFrameFormat == render::YUV) {
m_imageframe = new
image::yuv(m_VCodecCtx->width, m_VCodecCtx->height);
- } else if (videoFrameFormat ==
render::RGB) {
+ } else if (m_videoFrameFormat ==
render::RGB) {
m_imageframe = new
image::rgb(m_VCodecCtx->width, m_VCodecCtx->height);
}
}
- if (videoFrameFormat == render::NONE) { //
NullGui?
+ if (m_videoFrameFormat == render::NONE) { //
NullGui?
av_free_packet(&packet);
return false;
- } else if (videoFrameFormat == render::YUV &&
m_VCodecCtx->pix_fmt != PIX_FMT_YUV420P) {
+ } else if (m_videoFrameFormat == render::YUV &&
m_VCodecCtx->pix_fmt != PIX_FMT_YUV420P) {
assert(0); // TODO
//img_convert((AVPicture*) pFrameYUV,
PIX_FMT_YUV420P, (AVPicture*) pFrame, pCodecCtx->pix_fmt, pCodecCtx->width,
pCodecCtx->height);
- } else if (videoFrameFormat == render::RGB &&
m_VCodecCtx->pix_fmt != PIX_FMT_RGB24) {
+ } else if (m_videoFrameFormat == render::RGB &&
m_VCodecCtx->pix_fmt != PIX_FMT_RGB24) {
AVFrame* frameRGB =
avcodec_alloc_frame();
unsigned int numBytes =
avpicture_get_size(PIX_FMT_RGB24, m_VCodecCtx->width, m_VCodecCtx->height);
buffer.reset(new uint8_t[numBytes]);
@@ -848,9 +836,9 @@
}
raw_videodata_t* video = new raw_videodata_t;
- if (videoFrameFormat == render::YUV) {
+ if (m_videoFrameFormat == render::YUV) {
video->m_data = new
uint8_t[static_cast<image::yuv*>(m_imageframe)->size()];
- } else if (videoFrameFormat == render::RGB) {
+ } else if (m_videoFrameFormat == render::RGB) {
image::rgb* tmp =
static_cast<image::rgb*>(m_imageframe);
video->m_data = new
uint8_t[tmp->m_pitch * tmp->m_height];
}
@@ -886,7 +874,7 @@
m_video_clock += frame_delay;
- if (videoFrameFormat == render::YUV) {
+ if (m_videoFrameFormat == render::YUV) {
image::yuv* yuvframe =
static_cast<image::yuv*>(m_imageframe);
int copied = 0;
uint8_t* ptr = video->m_data;
@@ -906,7 +894,7 @@
}
}
video->m_size = copied;
- } else if (videoFrameFormat == render::RGB) {
+ } else if (m_videoFrameFormat == render::RGB) {
uint8_t* srcptr = m_Frame->data[0];
uint8_t* srcend = m_Frame->data[0] +
m_Frame->linesize[0] * m_VCodecCtx->height;
@@ -938,26 +926,6 @@
return true;
}
-image::image_base* NetStreamFfmpeg::get_video()
-{
- boost::mutex::scoped_lock lock(image_mutex);
-
- if (!m_imageframe) return NULL;
-
- image::image_base* ret_image;
- int videoFrameFormat = gnash::render::videoFrameFormat();
- if (videoFrameFormat == render::YUV) {
- ret_image = new image::yuv(m_imageframe->m_width,
m_imageframe->m_height);
- } else if (videoFrameFormat == render::RGB) {
- ret_image = new image::rgb(m_imageframe->m_width,
m_imageframe->m_height);
- } else {
- return NULL;
- }
-
- ret_image->update(m_imageframe->m_data);
- return ret_image;
-}
-
void
NetStreamFfmpeg::seek(double pos)
{
@@ -1057,31 +1025,6 @@
}
}
-long
-NetStreamFfmpeg::bytesLoaded()
-{
- if (_netCon == NULL) return 0;
- return _netCon->getBytesLoaded();
-}
-
-long
-NetStreamFfmpeg::bytesTotal()
-{
- if (_netCon == NULL) return 0;
- return _netCon->getBytesTotal();
-}
-
-bool
-NetStreamFfmpeg::newFrameReady()
-{
- if (m_newFrameReady) {
- m_newFrameReady = false;
- return true;
- } else {
- return false;
- }
-}
-
} // gnash namespcae
#endif // USE_FFMPEG
Index: server/asobj/NetStreamFfmpeg.h
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- server/asobj/NetStreamFfmpeg.h 7 May 2007 23:15:44 -0000 1.26
+++ server/asobj/NetStreamFfmpeg.h 15 May 2007 13:01:28 -0000 1.27
@@ -14,7 +14,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-/* $Id: NetStreamFfmpeg.h,v 1.26 2007/05/07 23:15:44 tgc Exp $ */
+/* $Id: NetStreamFfmpeg.h,v 1.27 2007/05/15 13:01:28 tgc Exp $ */
#ifndef __NETSTREAMFFMPEG_H__
#define __NETSTREAMFFMPEG_H__
@@ -182,10 +182,7 @@
int play(const std::string& source);
void seek(double pos);
int64_t time();
- long bytesLoaded();
- long bytesTotal();
void advance();
- bool newFrameReady();
// Used for ffmpeg data read and seek callbacks
static int readPacket(void* opaque, uint8_t* buf, int buf_size);
@@ -193,13 +190,6 @@
bool read_frame();
- image::image_base* get_video();
-
- bool playing()
- {
- return m_go;
- }
-
inline double as_double(AVRational time)
{
return time.num / (double) time.den;
@@ -211,14 +201,6 @@
private:
- bool _bufferLength;
- bool _bufferTime;
- bool _bytesLoaded;
- bool _bytesTotal;
- bool _currentFps;
- bool _onStatus;
- bool _time;
-
int m_video_index;
int m_audio_index;
@@ -240,15 +222,9 @@
boost::thread* _decodeThread;
boost::mutex decoding_mutex;
- boost::mutex image_mutex;
- // Are the playing loop running or not
- volatile bool m_go;
unsigned int runtime;
- // The image/videoframe which is given to the renderer
- image::image_base* m_imageframe;
-
// The current time-position of the video
double m_video_clock;
@@ -256,35 +232,12 @@
multithread_queue <raw_videodata_t*> m_qaudio;
multithread_queue <raw_videodata_t*> m_qvideo;
- // paused or not
- volatile bool m_pause;
-
// The time ws started playing
double m_start_clock;
raw_videodata_t* m_unqueued_data;
ByteIOContext ByteIOCxt;
- // The position in the inputfile, only used when not playing a FLV
- long inputPos;
-
- std::string url;
-
- // The homegrown parser we use for FLV
- FLVParser* m_parser;
-
- // Are we playing a FLV?
- bool m_isFLV;
-
- // Are a new frame ready to be returned?
- volatile bool m_newFrameReady;
-
- // The handler which is invoked on status change
- boost::intrusive_ptr<as_function> m_statusHandler;
-
- // should we start when buffer is full?
- bool m_start_onbuffer;
-
};
} // gnash namespace
Index: server/asobj/NetStreamGst.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- server/asobj/NetStreamGst.cpp 8 May 2007 06:43:42 -0000 1.36
+++ server/asobj/NetStreamGst.cpp 15 May 2007 13:01:28 -0000 1.37
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: NetStreamGst.cpp,v 1.36 2007/05/08 06:43:42 strk Exp $ */
+/* $Id: NetStreamGst.cpp,v 1.37 2007/05/15 13:01:28 tgc Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -82,20 +82,13 @@
videoinputcaps(NULL),
audioinputcaps(NULL),
- m_go(false),
- m_imageframe(NULL),
#ifndef DISABLE_START_THREAD
startThread(NULL),
#endif
- m_pause(false),
- inputPos(0),
videowidth(0),
videoheight(0),
- m_newFrameReady(false),
m_clock_offset(0),
- m_parser(NULL),
- m_pausePlayback(false),
- m_start_onbuffer(false)
+ m_pausePlayback(false)
{
gst_init (NULL, NULL);
}
@@ -250,17 +243,16 @@
ret = gst_structure_get_fraction (str, "framerate",
&framerate1, &framerate2);
// Setup the output videoframe
- int videoFrameFormat = gnash::render::videoFrameFormat();
- if (videoFrameFormat == render::YUV) {
+ if (ns->m_videoFrameFormat == render::YUV) {
ns->m_imageframe = new image::yuv(width, height);
- } else if (videoFrameFormat == render::RGB) {
+ } else if (ns->m_videoFrameFormat == render::RGB) {
ns->m_imageframe = new image::rgb(width, height);
}
}
if (ns->m_imageframe) {
// ns->m_imageframe->update(GST_BUFFER_DATA(buffer));
- if (gnash::render::videoFrameFormat() == render::YUV) {
+ if (ns->m_videoFrameFormat == render::YUV) {
assert(0);
/* image::yuv* yuvframe =
static_cast<image::yuv*>(m_imageframe);
@@ -552,7 +544,7 @@
// Setup the capsfilter which demands either YUV or RGB
videoframe format
ns->videocaps = gst_element_factory_make ("capsfilter", NULL);
GstCaps* videooutcaps;
- if (gnash::render::videoFrameFormat() == render::YUV) {
+ if (ns->m_videoFrameFormat == render::YUV) {
videooutcaps = gst_caps_new_simple ("video/x-raw-yuv",
NULL);
} else {
videooutcaps = gst_caps_new_simple ("video/x-raw-rgb",
NULL);
@@ -623,26 +615,6 @@
return;
}
-image::image_base* NetStreamGst::get_video()
-{
- boost::mutex::scoped_lock lock(image_mutex);
-
- if (!m_imageframe) return NULL;
-
- image::image_base* ret_image;
- int videoFrameFormat = gnash::render::videoFrameFormat();
- if (videoFrameFormat == render::YUV) {
- ret_image = new image::yuv(m_imageframe->m_width,
m_imageframe->m_height);
- } else if (videoFrameFormat == render::RGB) {
- ret_image = new image::rgb(m_imageframe->m_width,
m_imageframe->m_height);
- } else {
- return NULL;
- }
-
- ret_image->update(m_imageframe->m_data);
- return ret_image;
-}
-
void
NetStreamGst::seek(double pos)
{
@@ -737,29 +709,6 @@
}
}
-long
-NetStreamGst::bytesLoaded()
-{
- return _netCon->getBytesLoaded();
-}
-
-long
-NetStreamGst::bytesTotal()
-{
- return _netCon->getBytesTotal();
-}
-
-bool
-NetStreamGst::newFrameReady()
-{
- if (m_newFrameReady) {
- m_newFrameReady = false;
- return true;
- } else {
- return false;
- }
-}
-
// Gstreamer callback function
int
NetStreamGst::readPacket(void* opaque, char* buf, int buf_size){
Index: server/asobj/NetStreamGst.h
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- server/asobj/NetStreamGst.h 8 May 2007 06:43:42 -0000 1.16
+++ server/asobj/NetStreamGst.h 15 May 2007 13:01:28 -0000 1.17
@@ -54,22 +54,12 @@
int play(const std::string& source);
void seek(double pos);
int64_t time();
- long bytesLoaded();
- long bytesTotal();
void advance();
- bool newFrameReady();
// Used for gstreamer data read and seek callbacks
static int readPacket(void* opaque, char* buf, int buf_size);
static int seekMedia(void *opaque, int offset, int whence);
- image::image_base* get_video();
-
- inline bool playing()
- {
- return m_go;
- }
-
static void startPlayback(NetStreamGst* ns);
static void callback_output (GstElement* /*c*/, GstBuffer *buffer,
GstPad* /*pad*/, gpointer user_data);
static void callback_newpad (GstElement *decodebin, GstPad *pad,
gboolean last, gpointer data);
@@ -78,14 +68,6 @@
private:
- bool _bufferLength;
- bool _bufferTime;
- bool _bytesLoaded;
- bool _bytesTotal;
- bool _currentFps;
- bool _onStatus;
- bool _time;
-
// gstreamer pipeline objects
GstElement *pipeline;
GstElement *audiosink;
@@ -107,49 +89,19 @@
GstElement *videoinputcaps;
GstElement *audioinputcaps;
- // Are the playing loop running or not
- volatile bool m_go;
-
- // The image/videoframe which is given to the renderer
- image::image_base* m_imageframe;
-
- boost::mutex image_mutex;
-
#ifndef DISABLE_START_THREAD
boost::thread *startThread;
#endif
- bool m_pause;
-
- long inputPos;
- std::string url;
-
// video info
int videowidth;
int videoheight;
- volatile bool m_newFrameReady;
-
volatile long m_clock_offset;
- // The status message
- std::string m_status;
-
- // The handler which is invoked on status change
- boost::intrusive_ptr<as_function> m_statusHandler;
-
- // Are we decoding a FLV?
- bool m_isFLV;
-
- // The parser for FLV
- FLVParser* m_parser;
-
// On next advance() should we pause?
volatile bool m_pausePlayback;
- // should we start when buffer is full?
- bool m_start_onbuffer;
-
};
} // gnash namespace
- [Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp serv..., Sandro Santilli, 2007/05/01
- [Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp serv..., Sandro Santilli, 2007/05/04
- [Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp serv..., Sandro Santilli, 2007/05/05
- [Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp serv...,
Tomas Groth <=
- [Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp serv..., Tomas Groth, 2007/05/16
- [Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp serv..., Sandro Santilli, 2007/05/28
- [Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp serv..., Tomas Groth, 2007/05/28
- [Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp serv..., Sandro Santilli, 2007/05/30
- [Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp serv..., Sandro Santilli, 2007/05/30
- [Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp serv..., Sandro Santilli, 2007/05/31
- [Gnash-commit] gnash ChangeLog server/asobj/NetStream.cpp serv..., Tomas Groth, 2007/05/31