[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog libbase/gstgnashsrc.c libbase/g...
From: |
Tomas Groth |
Subject: |
[Gnash-commit] gnash ChangeLog libbase/gstgnashsrc.c libbase/g... |
Date: |
Mon, 15 Jan 2007 20:58:57 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Tomas Groth <tgc> 07/01/15 20:58:56
Modified files:
. : ChangeLog
libbase : gstgnashsrc.c gstgnashsrc.h
server/asobj : NetStreamGst.cpp NetStreamGst.h
Removed files:
server : video_yuv.cpp
testsuite/movies.all: yapc2006.swf
Log message:
* libbase/gstgnashsrc.{c,h}: Fixed some warnings.
* server/asobj/NetStreamGst.{cpp,h}: Fixed some warnings, and removed
some unused code.
* server/video_yuv.cpp: Removed since it function has been moved to
image::yuv.
* testsuite/movies.all/yapc2006.swf: Removed since it's just too big!
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2112&r2=1.2113
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/gstgnashsrc.c?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/gstgnashsrc.h?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/server/video_yuv.cpp?cvsroot=gnash&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.cpp?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.h?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/movies.all/yapc2006.swf?cvsroot=gnash&r1=1.1&r2=0
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2112
retrieving revision 1.2113
diff -u -b -r1.2112 -r1.2113
--- ChangeLog 15 Jan 2007 20:28:47 -0000 1.2112
+++ ChangeLog 15 Jan 2007 20:58:52 -0000 1.2113
@@ -1,3 +1,12 @@
+2007-01-15 Tomas Groth Christensen <address@hidden>
+
+ * libbase/gstgnashsrc.{c,h}: Fixed some warnings.
+ * server/asobj/NetStreamGst.{cpp,h}: Fixed some warnings, and removed
+ some unused code.
+ * server/video_yuv.cpp: Removed since it function has been moved to
+ image::yuv.
+ * testsuite/movies.all/yapc2006.swf: Removed since it's just too big!
+
2007-01-15 Sandro Santilli <address@hidden>
* server/font.h: proper include to avoid undefined
Index: libbase/gstgnashsrc.c
===================================================================
RCS file: /sources/gnash/gnash/libbase/gstgnashsrc.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- libbase/gstgnashsrc.c 13 Jan 2007 20:09:25 -0000 1.2
+++ libbase/gstgnashsrc.c 15 Jan 2007 20:58:53 -0000 1.3
@@ -76,6 +76,7 @@
static void
_do_init (GType gnashsrc_type)
{
+ UNUSEDPAR(gnashsrc_type);
/* static const GInterfaceInfo urihandler_info = {
gst_gnash_src_uri_handler_init,
NULL,
@@ -134,7 +135,7 @@
static void
gst_gnash_src_init (GstGnashSrc * src, GstGnashSrcClass * g_class)
{
-
+ UNUSEDPAR(g_class);
src->data = NULL;
src->callbacks = NULL;
src->read_position = 0;
@@ -179,7 +180,7 @@
GParamSpec * pspec)
{
GstGnashSrc *src;
-
+ UNUSEDPAR(value);
g_return_if_fail (GST_IS_GNASH_SRC (object));
src = GST_GNASH_SRC (object);
@@ -277,7 +278,6 @@
static gboolean
gst_gnash_src_get_size (GstBaseSrc * basesrc, guint64 * size)
{
- struct stat stat_results;
GstGnashSrc *src;
src = GST_GNASH_SRC (basesrc);
@@ -301,7 +301,6 @@
gst_gnash_src_start (GstBaseSrc * basesrc)
{
GstGnashSrc *src = GST_GNASH_SRC (basesrc);
- struct stat stat_results;
if (src->data == NULL || src->callbacks == NULL) {
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND,(("No data or callback struct
supplied.")), (NULL));
@@ -323,7 +322,7 @@
gst_gnash_src_stop (GstBaseSrc * basesrc)
{
GstGnashSrc *src = GST_GNASH_SRC (basesrc);
-
+ UNUSEDPAR(src);
return TRUE;
}
Index: libbase/gstgnashsrc.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/gstgnashsrc.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- libbase/gstgnashsrc.h 13 Jan 2007 20:09:25 -0000 1.2
+++ libbase/gstgnashsrc.h 15 Jan 2007 20:58:53 -0000 1.3
@@ -22,6 +22,9 @@
#ifndef __GST_GNASH_SRC_H__
#define __GST_GNASH_SRC_H__
+#define UNUSEDPAR(x) { x = x; }
+
+
#include <gst/gst.h>
#include <gst/base/gstpushsrc.h>
@@ -80,7 +83,7 @@
return gst_element_register (plugin, "gnashsrc", GST_RANK_NONE,
GST_TYPE_GNASH_SRC);
}
-static GstPluginDesc gnash_plugin_desc = {
+GstPluginDesc gnash_plugin_desc = {
0, // GST_VERSION_MAJOR
10, // GST_VERSION_MINOR
"gnashsrc",
Index: server/asobj/NetStreamGst.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- server/asobj/NetStreamGst.cpp 13 Jan 2007 20:09:25 -0000 1.2
+++ server/asobj/NetStreamGst.cpp 15 Jan 2007 20:58:53 -0000 1.3
@@ -51,9 +51,7 @@
m_go(false),
m_imageframe(NULL),
- m_video_clock(0),
m_pause(false),
- //m_unqueued_data(NULL),
inputPos(0),
videowidth(0),
videoheight(0)
@@ -93,11 +91,7 @@
{
if (m_go)
{
- // terminate thread
m_go = false;
-
- // wait till thread is complete before main continues
- //pthread_join(m_thread, NULL);
}
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
@@ -105,12 +99,6 @@
if (m_imageframe) delete m_imageframe;
- while (m_qvideo.size() > 0)
- {
- delete m_qvideo.front();
- m_qvideo.pop();
- }
-
}
Index: server/asobj/NetStreamGst.h
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- server/asobj/NetStreamGst.h 13 Jan 2007 20:09:25 -0000 1.2
+++ server/asobj/NetStreamGst.h 15 Jan 2007 20:58:53 -0000 1.3
@@ -25,125 +25,14 @@
#ifdef SOUND_GST
-#include <queue>
#include <pthread.h>
#include "impl.h"
#include "video_stream_instance.h"
#include <gst/gst.h>
#include "image.h"
-#include "StreamProvider.h"
namespace gnash {
-struct raw_videodata_t
-{
- raw_videodata_t():
- m_stream_index(-1),
- m_size(0),
- m_data(NULL),
- m_ptr(NULL),
- m_pts(0)
- {
- };
-
- ~raw_videodata_t()
- {
- if (m_data)
- {
- delete m_data;
- }
- };
-
- int m_stream_index;
- uint32_t m_size;
- uint8_t* m_data;
- uint8_t* m_ptr;
- double m_pts; // presentation timestamp in sec
-};
-
-template<class T>
-class multithread_queue
-{
- public:
-
- multithread_queue()
- {
- pthread_mutex_init(&m_mutex, NULL);
- };
-
- ~multithread_queue()
- {
- lock();
- while (m_queue.size() > 0)
- {
- T x = m_queue.front();
- m_queue.pop();
- delete x;
- }
- unlock();
-
- pthread_mutex_destroy(&m_mutex);
- }
-
- size_t size()
- {
- lock();
- size_t n = m_queue.size();
- unlock();
- return n;
- }
-
- bool push(T member)
- {
- bool rc = false;
- lock();
- if (m_queue.size() < 20) // hack
- {
- m_queue.push(member);
- rc = true;
- }
- unlock();
- return rc;
- }
-
- T front()
- {
- lock();
- T member = NULL;
- if (m_queue.size() > 0)
- {
- member = m_queue.front();
- }
- unlock();
- return member;
- }
-
- void pop()
- {
- lock();
- if (m_queue.size() > 0)
- {
- m_queue.pop();
- }
- unlock();
- }
-
- private:
-
- inline void lock()
- {
- pthread_mutex_lock(&m_mutex);
- }
-
- inline void unlock()
- {
- pthread_mutex_unlock(&m_mutex);
- }
-
- pthread_mutex_t m_mutex;
- std::queue < T > m_queue;
-};
-
class netstream_as_object;
class NetStreamGst {
@@ -175,7 +64,6 @@
}
static void* startPlayback(void* arg);
- //static void callback_input (GstElement* /*c*/, GstBuffer *buffer,
GstPad* /*pad*/, gpointer user_data);
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);
private:
@@ -201,30 +89,21 @@
GstElement *videoflip;
GstElement *audioconv;
- // video info
- int videowidth;
- int videoheight;
-
volatile bool m_go;
- unsigned int runtime;
image::image_base* m_imageframe;
- double m_video_clock;
-
- pthread_t m_thread;
pthread_t startThread;
- multithread_queue <raw_videodata_t*> m_qvideo;
bool m_pause;
-// double m_start_clock;
netstream_as_object* m_netstream_object;
-// raw_videodata_t* m_unqueued_data;
as_object* netCon;
- tu_file* input;
long inputPos;
- StreamProvider streamProvider;
std::string url;
+
+ // video info
+ int videowidth;
+ int videoheight;
};
} // gnash namespace
Index: server/video_yuv.cpp
===================================================================
RCS file: server/video_yuv.cpp
diff -N server/video_yuv.cpp
--- server/video_yuv.cpp 29 Oct 2006 18:34:11 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,109 +0,0 @@
-//
-// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-//
-//
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "gnash.h"
-
-namespace gnash {
-
-enum {Y, U, V, T, NB_TEXS};
-
-YUV_video::YUV_video(int w, int h):
- m_width(w),
- m_height(h)
-{
- planes[Y].w = m_width;
- planes[Y].h = m_height;
- planes[Y].size = m_width * m_height;
- planes[Y].offset = 0;
-
- planes[U] = planes[Y];
- planes[U].w >>= 1;
- planes[U].h >>= 1;
- planes[U].size >>= 2;
- planes[U].offset = planes[Y].size;
-
- planes[V] = planes[U];
- planes[V].offset += planes[U].size;
-
- m_size = planes[Y].size + (planes[U].size << 1);
-
- for (int i = 0; i < 3; ++i)
- {
- planes[i].id = 0; //texids[i];
-
- unsigned int ww = planes[i].w;
- unsigned int hh = planes[i].h;
- planes[i].unit = 0; // i[units];
- planes[i].p2w = (ww & (ww - 1)) ? video_nlpo2(ww) : ww;
- planes[i].p2h = (hh & (hh - 1)) ? video_nlpo2(hh) : hh;
- float tw = (double) ww / planes[i].p2w;
- float th = (double) hh / planes[i].p2h;
-
- planes[i].coords[0][0] = 0.0;
- planes[i].coords[0][1] = 0.0;
- planes[i].coords[1][0] = tw;
- planes[i].coords[1][1] = 0.0;
- planes[i].coords[2][0] = tw;
- planes[i].coords[2][1] = th;
- planes[i].coords[3][0] = 0.0;
- planes[i].coords[3][1] = th;
- }
-
- m_data = new uint8_t[m_size];
-
-// m_bounds->m_x_min = 0.0f;
-// m_bounds->m_x_max = 1.0f;
-// m_bounds->m_y_min = 0.0f;
-// m_bounds->m_y_max = 1.0f;
-}
-
-YUV_video::~YUV_video()
-{
- if (m_data) delete [] m_data;
-}
-
-unsigned int YUV_video::video_nlpo2(unsigned int x) const
-{
- x |= (x >> 1);
- x |= (x >> 2);
- x |= (x >> 4);
- x |= (x >> 8);
- x |= (x >> 16);
- return x + 1;
-}
-
-void YUV_video::update(uint8_t* data)
-{
- memcpy(m_data, data, m_size);
-}
-
-int YUV_video::size() const
-{
- return m_size;
-}
-
-void YUV_video::display(const matrix* m, const rect* bounds)
-{
-}
-
-} // namespace gnash
Index: testsuite/movies.all/yapc2006.swf
===================================================================
RCS file: testsuite/movies.all/yapc2006.swf
diff -N testsuite/movies.all/yapc2006.swf
Binary files /tmp/cvs9F3kDU and /dev/null differ
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog libbase/gstgnashsrc.c libbase/g...,
Tomas Groth <=