~ubuntu-branches/ubuntu/precise/gst-plugins-base0.10/precise-updates

« back to all changes in this revision

Viewing changes to gst-libs/gst/audio/multichannel.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2011-12-12 12:40:13 UTC
  • mfrom: (36.1.15 experimental)
  • Revision ID: package-import@ubuntu.com-20111212124013-onyadfb150d8c5dk
Tags: 0.10.35.2-2
* debian/libgstreamer-plugins-base.install:
  + Add license translations file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
292
292
  return pos;
293
293
}
294
294
 
 
295
void priv_gst_audio_info_fill_default_channel_positions (GstAudioInfo * info);
 
296
 
 
297
void
 
298
priv_gst_audio_info_fill_default_channel_positions (GstAudioInfo * info)
 
299
{
 
300
  guint channels, i;
 
301
 
 
302
  g_assert (info != NULL);
 
303
 
 
304
  channels = GST_AUDIO_INFO_CHANNELS (info);
 
305
 
 
306
  g_assert (channels > 0);
 
307
 
 
308
  if (channels <= NUM_DEF_CHANS) {
 
309
    /* just return some default channel layout if we have one */
 
310
    for (i = 0; i < channels; ++i)
 
311
      info->position[i] = default_positions[channels - 1][i];
 
312
  } else {
 
313
    /* for many many channels, the positions are always NONE */
 
314
    for (i = 0; i < G_N_ELEMENTS (info->position); i++)
 
315
      info->position[i] = GST_AUDIO_CHANNEL_POSITION_NONE;
 
316
  }
 
317
 
 
318
  info->flags |= GST_AUDIO_FLAG_DEFAULT_POSITIONS;
 
319
}
 
320
 
295
321
/**
296
322
 * gst_audio_set_channel_positions:
297
323
 * @str: A #GstStructure to set channel positions on.