[farsight2/master] Remove FS_MEDIA_TYPE_APPLICATION
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:24:15 PST 2008
---
gst-libs/gst/farsight/fs-codec.c | 2 --
gst-libs/gst/farsight/fs-codec.h | 4 +---
tests/check/base/fscodec.c | 20 ++++++++++----------
3 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/gst-libs/gst/farsight/fs-codec.c b/gst-libs/gst/farsight/fs-codec.c
index f5038a6..4b3d7c7 100644
--- a/gst-libs/gst/farsight/fs-codec.c
+++ b/gst-libs/gst/farsight/fs-codec.c
@@ -421,8 +421,6 @@ fs_media_type_to_string (FsMediaType media_type)
return "audio";
} else if (media_type == FS_MEDIA_TYPE_VIDEO) {
return "video";
- } else if (media_type == FS_MEDIA_TYPE_APPLICATION) {
- return "application";
} else {
return NULL;
}
diff --git a/gst-libs/gst/farsight/fs-codec.h b/gst-libs/gst/farsight/fs-codec.h
index 72d15d8..cad75fe 100644
--- a/gst-libs/gst/farsight/fs-codec.h
+++ b/gst-libs/gst/farsight/fs-codec.h
@@ -45,7 +45,6 @@ typedef struct _FsCodecParameter FsCodecParameter;
* FsMediaType:
* @FS_MEDIA_TYPE_AUDIO: A media type that encodes audio.
* @FS_MEDIA_TYPE_VIDEO: A media type that encodes video.
- * @FS_MEDIA_TYPE_APPLICATION: A media type that ???
* @FS_MEDIA_TYPE_LAST: Largest valid #FsMediaType
*
* Enum used to signify the media type of a codec or stream.
@@ -54,8 +53,7 @@ typedef enum
{
FS_MEDIA_TYPE_AUDIO,
FS_MEDIA_TYPE_VIDEO,
- FS_MEDIA_TYPE_APPLICATION,
- FS_MEDIA_TYPE_LAST = FS_MEDIA_TYPE_APPLICATION
+ FS_MEDIA_TYPE_LAST = FS_MEDIA_TYPE_VIDEO
} FsMediaType;
/**
diff --git a/tests/check/base/fscodec.c b/tests/check/base/fscodec.c
index ca66659..a8f5c08 100644
--- a/tests/check/base/fscodec.c
+++ b/tests/check/base/fscodec.c
@@ -30,14 +30,14 @@ GST_START_TEST (test_fscodec_new)
{
FsCodec *codec = NULL;
- codec = fs_codec_new (1, "aa", FS_MEDIA_TYPE_APPLICATION, 650);
+ codec = fs_codec_new (1, "aa", FS_MEDIA_TYPE_VIDEO, 650);
fail_if (codec == NULL, "Allocation failed");
fail_unless (codec->id == 1, "Codec is incorrect");
fail_unless (!strcmp (codec->encoding_name, "aa"),
"Codec encoding name incorrect");;
- fail_unless (codec->media_type == FS_MEDIA_TYPE_APPLICATION,
+ fail_unless (codec->media_type == FS_MEDIA_TYPE_VIDEO,
"Codec media type incorrect");
fail_unless (codec->clock_rate == 650, "Codec clock rate incorrect");
@@ -48,35 +48,35 @@ GST_END_TEST;
GST_START_TEST (test_fscodec_are_equal)
{
- FsCodec *codec1 = fs_codec_new (1, "aa", FS_MEDIA_TYPE_APPLICATION, 650);
- FsCodec *codec2 = fs_codec_new (1, "aa", FS_MEDIA_TYPE_APPLICATION, 650);
+ FsCodec *codec1 = fs_codec_new (1, "aa", FS_MEDIA_TYPE_VIDEO, 650);
+ FsCodec *codec2 = fs_codec_new (1, "aa", FS_MEDIA_TYPE_VIDEO, 650);
fail_unless (fs_codec_are_equal (codec1, codec2) == TRUE,
"Identical codecs not recognized");
fs_codec_destroy (codec2);
- codec2 = fs_codec_new (2, "aa", FS_MEDIA_TYPE_APPLICATION, 650);
+ codec2 = fs_codec_new (2, "aa", FS_MEDIA_TYPE_VIDEO, 650);
fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
"Different codec ids not recognized");
fs_codec_destroy (codec2);
- codec2 = fs_codec_new (1, "aaa", FS_MEDIA_TYPE_APPLICATION, 650);
+ codec2 = fs_codec_new (1, "aaa", FS_MEDIA_TYPE_VIDEO, 650);
fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
"Different codec types not recognized");
fs_codec_destroy (codec2);
- codec2 = fs_codec_new (1, "aa", FS_MEDIA_TYPE_VIDEO, 650);
+ codec2 = fs_codec_new (1, "aa", FS_MEDIA_TYPE_AUDIO, 650);
fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
"Different media types not recognized");
fs_codec_destroy (codec2);
- codec2 = fs_codec_new (1, "aa", FS_MEDIA_TYPE_APPLICATION, 651);
+ codec2 = fs_codec_new (1, "aa", FS_MEDIA_TYPE_VIDEO, 651);
fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
"Different clock rates not recognized");
fs_codec_destroy (codec2);
- codec2 = fs_codec_new (1, NULL, FS_MEDIA_TYPE_APPLICATION, 650);
+ codec2 = fs_codec_new (1, NULL, FS_MEDIA_TYPE_VIDEO, 650);
fail_unless (fs_codec_are_equal (codec1, codec2) == FALSE,
"NULL encoding name not ignored");
fs_codec_destroy (codec2);
@@ -88,7 +88,7 @@ GST_END_TEST;
static FsCodec *
init_codec_with_three_params (void)
{
- FsCodec *codec = fs_codec_new (1, "aa", FS_MEDIA_TYPE_APPLICATION, 650);
+ FsCodec *codec = fs_codec_new (1, "aa", FS_MEDIA_TYPE_VIDEO, 650);
fs_codec_add_optional_parameter (codec, "aa1", "bb1");
fs_codec_add_optional_parameter (codec, "aa2", "bb2");
--
1.5.6.5
More information about the farsight-commits
mailing list