mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 09:38:17 +00:00
gst-libs/gst/riff/riff-media.c: Const-ify some arrays and use G_N_ELEMENTS instead of wasting oodles of RAM on termin...
Original commit message from CVS: * gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_template_caps), (gst_riff_create_audio_template_caps), (gst_riff_create_iavs_template_caps): Const-ify some arrays and use G_N_ELEMENTS instead of wasting oodles of RAM on terminator bits.
This commit is contained in:
parent
31d27aa08c
commit
27c5a22fd7
2 changed files with 21 additions and 15 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2006-08-22 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* gst-libs/gst/riff/riff-media.c:
|
||||||
|
(gst_riff_create_video_template_caps),
|
||||||
|
(gst_riff_create_audio_template_caps),
|
||||||
|
(gst_riff_create_iavs_template_caps):
|
||||||
|
Const-ify some arrays and use G_N_ELEMENTS instead
|
||||||
|
of wasting oodles of RAM on terminator bits.
|
||||||
|
|
||||||
2006-08-22 Tim-Philipp Müller <tim at centricular dot net>
|
2006-08-22 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* gst-libs/gst/tag/gstvorbistag.c:
|
* gst-libs/gst/tag/gstvorbistag.c:
|
||||||
|
|
|
@ -1039,7 +1039,7 @@ gst_riff_create_iavs_caps (guint32 codec_fcc,
|
||||||
GstCaps *
|
GstCaps *
|
||||||
gst_riff_create_video_template_caps (void)
|
gst_riff_create_video_template_caps (void)
|
||||||
{
|
{
|
||||||
guint32 tags[] = {
|
static const guint32 tags[] = {
|
||||||
GST_MAKE_FOURCC ('3', 'I', 'V', '1'),
|
GST_MAKE_FOURCC ('3', 'I', 'V', '1'),
|
||||||
GST_MAKE_FOURCC ('A', 'S', 'V', '1'),
|
GST_MAKE_FOURCC ('A', 'S', 'V', '1'),
|
||||||
GST_MAKE_FOURCC ('A', 'S', 'V', '2'),
|
GST_MAKE_FOURCC ('A', 'S', 'V', '2'),
|
||||||
|
@ -1088,15 +1088,14 @@ gst_riff_create_video_template_caps (void)
|
||||||
GST_MAKE_FOURCC ('Z', 'L', 'I', 'B'),
|
GST_MAKE_FOURCC ('Z', 'L', 'I', 'B'),
|
||||||
GST_MAKE_FOURCC ('c', 'v', 'i', 'd'),
|
GST_MAKE_FOURCC ('c', 'v', 'i', 'd'),
|
||||||
GST_MAKE_FOURCC ('h', '2', '6', '4'),
|
GST_MAKE_FOURCC ('h', '2', '6', '4'),
|
||||||
GST_MAKE_FOURCC ('m', 's', 'v', 'c'),
|
GST_MAKE_FOURCC ('m', 's', 'v', 'c')
|
||||||
/* FILL ME */
|
/* FILL ME */
|
||||||
0
|
|
||||||
};
|
};
|
||||||
guint i;
|
guint i;
|
||||||
GstCaps *caps, *one;
|
GstCaps *caps, *one;
|
||||||
|
|
||||||
caps = gst_caps_new_empty ();
|
caps = gst_caps_new_empty ();
|
||||||
for (i = 0; tags[i] != 0; i++) {
|
for (i = 0; i < G_N_ELEMENTS (tags); i++) {
|
||||||
one = gst_riff_create_video_caps (tags[i], NULL, NULL, NULL, NULL, NULL);
|
one = gst_riff_create_video_caps (tags[i], NULL, NULL, NULL, NULL, NULL);
|
||||||
if (one)
|
if (one)
|
||||||
gst_caps_append (caps, one);
|
gst_caps_append (caps, one);
|
||||||
|
@ -1108,7 +1107,7 @@ gst_riff_create_video_template_caps (void)
|
||||||
GstCaps *
|
GstCaps *
|
||||||
gst_riff_create_audio_template_caps (void)
|
gst_riff_create_audio_template_caps (void)
|
||||||
{
|
{
|
||||||
guint16 tags[] = {
|
static const guint16 tags[] = {
|
||||||
GST_RIFF_WAVE_FORMAT_MPEGL3,
|
GST_RIFF_WAVE_FORMAT_MPEGL3,
|
||||||
GST_RIFF_WAVE_FORMAT_MPEGL12,
|
GST_RIFF_WAVE_FORMAT_MPEGL12,
|
||||||
GST_RIFF_WAVE_FORMAT_PCM,
|
GST_RIFF_WAVE_FORMAT_PCM,
|
||||||
|
@ -1122,15 +1121,14 @@ gst_riff_create_audio_template_caps (void)
|
||||||
GST_RIFF_WAVE_FORMAT_WMAV1,
|
GST_RIFF_WAVE_FORMAT_WMAV1,
|
||||||
GST_RIFF_WAVE_FORMAT_WMAV2,
|
GST_RIFF_WAVE_FORMAT_WMAV2,
|
||||||
GST_RIFF_WAVE_FORMAT_WMAV3,
|
GST_RIFF_WAVE_FORMAT_WMAV3,
|
||||||
GST_RIFF_WAVE_FORMAT_SONY_ATRAC3,
|
GST_RIFF_WAVE_FORMAT_SONY_ATRAC3
|
||||||
/* FILL ME */
|
/* FILL ME */
|
||||||
0
|
|
||||||
};
|
};
|
||||||
guint i;
|
guint i;
|
||||||
GstCaps *caps, *one;
|
GstCaps *caps, *one;
|
||||||
|
|
||||||
caps = gst_caps_new_empty ();
|
caps = gst_caps_new_empty ();
|
||||||
for (i = 0; tags[i] != 0; i++) {
|
for (i = 0; i < G_N_ELEMENTS (tags); i++) {
|
||||||
one = gst_riff_create_audio_caps (tags[i], NULL, NULL, NULL, NULL, NULL);
|
one = gst_riff_create_audio_caps (tags[i], NULL, NULL, NULL, NULL, NULL);
|
||||||
if (one)
|
if (one)
|
||||||
gst_caps_append (caps, one);
|
gst_caps_append (caps, one);
|
||||||
|
@ -1144,16 +1142,15 @@ gst_riff_create_audio_template_caps (void)
|
||||||
GstCaps *
|
GstCaps *
|
||||||
gst_riff_create_iavs_template_caps (void)
|
gst_riff_create_iavs_template_caps (void)
|
||||||
{
|
{
|
||||||
guint32 tags[] = {
|
static const guint32 tags[] = {
|
||||||
GST_MAKE_FOURCC ('D', 'V', 'S', 'D'),
|
GST_MAKE_FOURCC ('D', 'V', 'S', 'D')
|
||||||
/* FILL ME */
|
/* FILL ME */
|
||||||
0
|
|
||||||
};
|
};
|
||||||
guint i;
|
guint i;
|
||||||
GstCaps *caps, *one;
|
GstCaps *caps, *one;
|
||||||
|
|
||||||
caps = gst_caps_new_empty ();
|
caps = gst_caps_new_empty ();
|
||||||
for (i = 0; tags[i] != 0; i++) {
|
for (i = 0; i < G_N_ELEMENTS (tags); i++) {
|
||||||
one = gst_riff_create_iavs_caps (tags[i], NULL, NULL, NULL, NULL, NULL);
|
one = gst_riff_create_iavs_caps (tags[i], NULL, NULL, NULL, NULL, NULL);
|
||||||
if (one)
|
if (one)
|
||||||
gst_caps_append (caps, one);
|
gst_caps_append (caps, one);
|
||||||
|
|
Loading…
Reference in a new issue