mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
assrender, ivfparse, jpegformat: fix compiler warnings with debugging disabled in core
This commit is contained in:
parent
a189cef9c8
commit
144d43bcef
3 changed files with 12 additions and 9 deletions
|
@ -157,9 +157,9 @@ gst_ass_render_class_init (GstAssRenderClass * klass)
|
||||||
|
|
||||||
#if defined(LIBASS_VERSION) && LIBASS_VERSION >= 0x00907000
|
#if defined(LIBASS_VERSION) && LIBASS_VERSION >= 0x00907000
|
||||||
static void
|
static void
|
||||||
_libass_message_cb (gint level, const gchar * fmt, va_list args, gpointer data)
|
_libass_message_cb (gint level, const gchar * fmt, va_list args,
|
||||||
|
gpointer render)
|
||||||
{
|
{
|
||||||
GstAssRender *render = GST_ASS_RENDER (data);
|
|
||||||
gchar *message = g_strdup_vprintf (fmt, args);
|
gchar *message = g_strdup_vprintf (fmt, args);
|
||||||
|
|
||||||
if (level < 2)
|
if (level < 2)
|
||||||
|
|
|
@ -188,7 +188,10 @@ gst_ivfparse_chain (GstPad * pad, GstBuffer * buf)
|
||||||
guint16 height = GST_READ_UINT16_LE (data + 14);
|
guint16 height = GST_READ_UINT16_LE (data + 14);
|
||||||
guint32 rate_num = GST_READ_UINT32_LE (data + 16);
|
guint32 rate_num = GST_READ_UINT32_LE (data + 16);
|
||||||
guint32 rate_den = GST_READ_UINT32_LE (data + 20);
|
guint32 rate_den = GST_READ_UINT32_LE (data + 20);
|
||||||
|
#ifndef GST_DISABLE_GST_DEBUG
|
||||||
guint32 num_frames = GST_READ_UINT32_LE (data + 24);
|
guint32 num_frames = GST_READ_UINT32_LE (data + 24);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* last 4 bytes unused */
|
/* last 4 bytes unused */
|
||||||
gst_adapter_flush (ivf->adapter, 32);
|
gst_adapter_flush (ivf->adapter, 32);
|
||||||
|
|
||||||
|
@ -233,8 +236,9 @@ gst_ivfparse_chain (GstPad * pad, GstBuffer * buf)
|
||||||
guint32 frame_size = GST_READ_UINT32_LE (data);
|
guint32 frame_size = GST_READ_UINT32_LE (data);
|
||||||
guint64 frame_pts = GST_READ_UINT64_LE (data + 4);
|
guint64 frame_pts = GST_READ_UINT64_LE (data + 4);
|
||||||
|
|
||||||
GST_LOG_OBJECT (ivf, "Read frame header: size %u, pts %" G_GUINT64_FORMAT,
|
GST_LOG_OBJECT (ivf,
|
||||||
frame_size, frame_pts);
|
"Read frame header: size %u, pts %" G_GUINT64_FORMAT, frame_size,
|
||||||
|
frame_pts);
|
||||||
|
|
||||||
if (gst_adapter_available (ivf->adapter) >= 12 + frame_size) {
|
if (gst_adapter_available (ivf->adapter) >= 12 + frame_size) {
|
||||||
GstBuffer *frame;
|
GstBuffer *frame;
|
||||||
|
|
|
@ -182,13 +182,12 @@ gst_jif_mux_finalize (GObject * object)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_jif_mux_sink_setcaps (GstPad * pad, GstCaps * caps)
|
gst_jif_mux_sink_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
{
|
{
|
||||||
GstJifMux *self = GST_JIF_MUX (GST_PAD_PARENT (pad));
|
|
||||||
GstStructure *s = gst_caps_get_structure (caps, 0);
|
GstStructure *s = gst_caps_get_structure (caps, 0);
|
||||||
const gchar *variant;
|
const gchar *variant;
|
||||||
|
|
||||||
/* should be {combined (default), EXIF, JFIF} */
|
/* should be {combined (default), EXIF, JFIF} */
|
||||||
if ((variant = gst_structure_get_string (s, "variant")) != NULL) {
|
if ((variant = gst_structure_get_string (s, "variant")) != NULL) {
|
||||||
GST_INFO_OBJECT (self, "muxing to '%s'", variant);
|
GST_INFO_OBJECT (pad, "muxing to '%s'", variant);
|
||||||
/* FIXME: do we want to switch it like this or use a gobject property ? */
|
/* FIXME: do we want to switch it like this or use a gobject property ? */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -635,7 +634,6 @@ static GstFlowReturn
|
||||||
gst_jif_mux_chain (GstPad * pad, GstBuffer * buf)
|
gst_jif_mux_chain (GstPad * pad, GstBuffer * buf)
|
||||||
{
|
{
|
||||||
GstJifMux *self = GST_JIF_MUX (GST_PAD_PARENT (pad));
|
GstJifMux *self = GST_JIF_MUX (GST_PAD_PARENT (pad));
|
||||||
guint8 *data = GST_BUFFER_DATA (buf);
|
|
||||||
GstFlowReturn fret = GST_FLOW_OK;
|
GstFlowReturn fret = GST_FLOW_OK;
|
||||||
|
|
||||||
if (GST_BUFFER_CAPS (buf) == NULL) {
|
if (GST_BUFFER_CAPS (buf) == NULL) {
|
||||||
|
@ -644,8 +642,9 @@ gst_jif_mux_chain (GstPad * pad, GstBuffer * buf)
|
||||||
return GST_FLOW_NOT_NEGOTIATED;
|
return GST_FLOW_NOT_NEGOTIATED;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_MEMDUMP ("jpeg beg", data, 64);
|
GST_MEMDUMP ("jpeg beg", GST_BUFFER_DATA (buf), 64);
|
||||||
GST_MEMDUMP ("jpeg end", &data[GST_BUFFER_SIZE (buf) - 64], 64);
|
GST_MEMDUMP ("jpeg end", GST_BUFFER_DATA (buf) + GST_BUFFER_SIZE (buf) - 64,
|
||||||
|
64);
|
||||||
|
|
||||||
/* we should have received a whole picture from SOI to EOI
|
/* we should have received a whole picture from SOI to EOI
|
||||||
* build a list of markers */
|
* build a list of markers */
|
||||||
|
|
Loading…
Reference in a new issue