~ubuntu-branches/ubuntu/saucy/gstreamer0.10/saucy

« back to all changes in this revision

Viewing changes to plugins/elements/gstfilesink.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2011-12-11 18:52:12 UTC
  • mfrom: (32.1.14 experimental)
  • Revision ID: package-import@ubuntu.com-20111211185212-3k215ps4qtyz2qa5
Tags: 0.10.35.2-1
* New upstream pre-release:
  + debian/control.in:
    - Build-depend on GLib >= 2.24.
  + debian/patches/99_ltmain_as-needed.patch:
    - Refreshed to apply cleanly again.
  + debian/libgstreamer.symbols:
    - Update symbols file with new API.
* debian/rules:
  + Remove all dependency_libs from the .la files (Closes: #633319).
* debian/control.in:
  + Put GI package into section introspection.
* debian/compat,
  debian/control.in,
  debian/gir1.2-gstreamer.install,
  debian/libgstreamer-dev.install,
  debian/libgstreamer.install,
  debian/patches/79_multiarch-backwards-compat.patch,
  debian/patches/80_ia32-hack.patch,
  debian/rules:
  + Transition package to multi-arch (Closes: #647481).
    Patch taken from the Ubuntu package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
168
168
static gboolean gst_file_sink_get_current_offset (GstFileSink * filesink,
169
169
    guint64 * p_pos);
170
170
 
171
 
static gboolean gst_file_sink_query (GstPad * pad, GstQuery * query);
 
171
static gboolean gst_file_sink_query (GstBaseSink * bsink, GstQuery * query);
172
172
 
173
173
static void gst_file_sink_uri_handler_init (gpointer g_iface,
174
174
    gpointer iface_data);
246
246
 
247
247
  gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_file_sink_start);
248
248
  gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_file_sink_stop);
 
249
  gstbasesink_class->query = GST_DEBUG_FUNCPTR (gst_file_sink_query);
249
250
  gstbasesink_class->render = GST_DEBUG_FUNCPTR (gst_file_sink_render);
250
251
  gstbasesink_class->event = GST_DEBUG_FUNCPTR (gst_file_sink_event);
251
252
 
258
259
static void
259
260
gst_file_sink_init (GstFileSink * filesink, GstFileSinkClass * g_class)
260
261
{
261
 
  GstPad *pad;
262
 
 
263
 
  pad = GST_BASE_SINK_PAD (filesink);
264
 
 
265
 
  gst_pad_set_query_function (pad, GST_DEBUG_FUNCPTR (gst_file_sink_query));
266
 
 
267
262
  filesink->filename = NULL;
268
263
  filesink->file = NULL;
269
264
  filesink->buffer_mode = DEFAULT_BUFFER_MODE;
466
461
}
467
462
 
468
463
static gboolean
469
 
gst_file_sink_query (GstPad * pad, GstQuery * query)
 
464
gst_file_sink_query (GstBaseSink * bsink, GstQuery * query)
470
465
{
 
466
  gboolean res;
471
467
  GstFileSink *self;
472
468
  GstFormat format;
473
469
 
474
 
  self = GST_FILE_SINK (GST_PAD_PARENT (pad));
 
470
  self = GST_FILE_SINK (bsink);
475
471
 
476
472
  switch (GST_QUERY_TYPE (query)) {
477
473
    case GST_QUERY_POSITION:
478
474
      gst_query_parse_position (query, &format, NULL);
 
475
 
479
476
      switch (format) {
480
477
        case GST_FORMAT_DEFAULT:
481
478
        case GST_FORMAT_BYTES:
482
479
          gst_query_set_position (query, GST_FORMAT_BYTES, self->current_pos);
483
 
          return TRUE;
 
480
          res = TRUE;
 
481
          break;
484
482
        default:
485
 
          return FALSE;
 
483
          res = FALSE;
 
484
          break;
486
485
      }
 
486
      break;
487
487
 
488
488
    case GST_QUERY_FORMATS:
489
489
      gst_query_set_formats (query, 2, GST_FORMAT_DEFAULT, GST_FORMAT_BYTES);
490
 
      return TRUE;
 
490
      res = TRUE;
 
491
      break;
491
492
 
492
493
    case GST_QUERY_URI:
493
494
      gst_query_set_uri (query, self->uri);
494
 
      return TRUE;
 
495
      res = TRUE;
 
496
      break;
495
497
 
496
498
    default:
497
 
      return gst_pad_query_default (pad, query);
 
499
      res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
 
500
      break;
498
501
  }
 
502
  return res;
499
503
}
500
504
 
501
505
#ifdef HAVE_FSEEKO