After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 361260 - New element: nuvdemux
New element: nuvdemux
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: 0.10.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-10 20:38 UTC by Renato Araujo Oliveira Filho
Modified: 2006-10-17 16:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for apply on gst-plugins-bad (281 bytes, patch)
2006-10-10 20:39 UTC, Renato Araujo Oliveira Filho
committed Details | Review
this files you need descompress inside gst-plugins-bad/gst directory. (7.63 KB, application/x-compressed-tar)
2006-10-10 20:40 UTC, Renato Araujo Oliveira Filho
  Details
uncompressed source file (25.25 KB, text/plain)
2006-10-11 18:25 UTC, Renato Araujo Oliveira Filho
  Details
c source file (24.65 KB, text/plain)
2006-10-11 18:36 UTC, Renato Araujo Oliveira Filho
  Details
h source file (5.26 KB, text/plain)
2006-10-11 18:37 UTC, Renato Araujo Oliveira Filho
  Details

Description Renato Araujo Oliveira Filho 2006-10-10 20:38:21 UTC
This is a patch to new nuvdemux element without external dependecies.
Comment 1 Renato Araujo Oliveira Filho 2006-10-10 20:39:19 UTC
Created attachment 74440 [details] [review]
patch for apply on gst-plugins-bad
Comment 2 Renato Araujo Oliveira Filho 2006-10-10 20:40:30 UTC
Created attachment 74441 [details]
this files you need descompress inside gst-plugins-bad/gst directory.
Comment 3 René Stadler 2006-10-10 21:35:18 UTC
Tips about the utility functions: gst_nuv_demux_getdwle is unneeded, just use GST_READ_UINT32_LE (like you already do mostly, why are some places handled by gst_nuv_demux_getdwle?).

GetDoubleLE is a bit awkward, better make use of the existing byte order swapping macro for guint64 instead, like this:

#if G_BYTE_ORDER == G_BIG_ENDIAN
static inline gdouble
_gdouble_swap_le_be (gdouble d)
{
  union {
    guint64 i;
    gdouble d;
  } u;

  u.d = d;
  u.i = GUINT64_SWAP_LE_BE (u.i);
  return u.d;
}
#define READ_DOUBLE_FROM_LE(d) (_gdouble_swap_le_be(d))
#else /* G_BYTE_ORDER != G_BIG_ENDIAN
#define READ_DOUBLE_FROM_LE(d) (d)
#endif /* G_BYTE_ORDER != G_BIG_ENDIAN

(adapt it as needed)
Comment 4 René Stadler 2006-10-10 21:57:56 UTC
Instead of GST_WARNING, GST_ERROR, etc. use GST_OBJECT_WARNING, GST_OBJECT_ERROR.

In gst_nuv_demux_chain:

  if (NULL == nuv->adapter) {
    GST_ERROR (_("pull expected! Chain func should not be called"));

GST_(OBJECT_)ERROR generates a debug message, no need for translation here.  Better write nuv->adapter == NULL for readability.

In gst_nuv_demux_reset, all these

  if (nuv->h != NULL) {
    g_free (nuv->h);
    nuv->h = NULL;
  }

can be just written as

  g_free (nuv->h);
  nuv->h = NULL;

because g_free is just a no-op if the argument is NULL.
Comment 5 Renato Araujo Oliveira Filho 2006-10-11 18:25:47 UTC
Created attachment 74502 [details]
uncompressed source file

new source file fixed René Stadler points.
Comment 6 Renato Araujo Oliveira Filho 2006-10-11 18:36:47 UTC
Created attachment 74504 [details]
c source file

uncompressed files
Comment 7 Renato Araujo Oliveira Filho 2006-10-11 18:37:18 UTC
Created attachment 74505 [details]
h source file

uncompressed file
Comment 8 Edgard Lima 2006-10-17 14:25:50 UTC
just commited.

Renato, update all your gstreamer and please check it and then close this bug.
Comment 9 Tim-Philipp Müller 2006-10-17 16:53:53 UTC
 2006-10-17  Edgard Lima <edgard.lima@indt.org.br>

        * gst/nuvdemux/gstnuvdemux.c:
        Just a cast to make it compile oos big_endian systems.

 2006-10-17  Edgard Lima <edgard.lima@indt.org.br>

        Patch by: Renato Filho <renato.filho@indt.org.br> and Rosfran Borges
        <rosfran.borges@indt.org.br>

        * configure.ac:
        * gst/nuvdemux/:
        * gst/nuvdemux/Makefile.am:
        * gst/nuvdemux/gstnuvdemux.c:
        * gst/nuvdemux/gstnuvdemux.h:
        Created new element nuvdemux.