mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 20:59:44 +00:00
Put tags into the Tag class instead of a new Tags class
Also remove the void ctor of the Tag class, it's not meant to be instantiated
This commit is contained in:
parent
90b4cbfa0b
commit
40fc4c1412
6 changed files with 73 additions and 69 deletions
|
@ -448,6 +448,8 @@
|
|||
|
||||
<attr path="/api/namespace/object[@name='Task']/field[@name='Func']" name="hidden">1</attr>
|
||||
|
||||
<attr path="/api/namespace/class[@name='Tag']" name="disable_void_ctor">1</attr>
|
||||
|
||||
<attr path="/api/namespace/enum[@name='TagFlag']" name="name">TagFlags</attr>
|
||||
|
||||
<attr path="/api/namespace/boxed[@name='TagList']/method[@name='CopyValue']/*/*[@name='dest']" name="pass_as">ref</attr>
|
||||
|
|
|
@ -42,7 +42,6 @@ sources = \
|
|||
Application.cs \
|
||||
Version.cs \
|
||||
AssemblyInfo.cs \
|
||||
Tags.cs \
|
||||
GError.cs \
|
||||
Value.cs \
|
||||
plugins-base/PlayBin.cs \
|
||||
|
@ -66,9 +65,8 @@ customs = \
|
|||
PadTemplate.custom \
|
||||
MiniObject.custom \
|
||||
Registry.custom \
|
||||
Structure.custom
|
||||
|
||||
|
||||
Structure.custom \
|
||||
Tag.custom
|
||||
|
||||
build_customs = $(addprefix $(srcdir)/, $(customs))
|
||||
|
||||
|
|
54
gstreamer-sharp/Tag.custom
Normal file
54
gstreamer-sharp/Tag.custom
Normal file
|
@ -0,0 +1,54 @@
|
|||
public const string Title = "title";
|
||||
public const string TitleSortname = "title-sortname";
|
||||
public const string Artist = "artist";
|
||||
public const string ArtistSortname = "musicbrainz-sortname";
|
||||
public const string Album = "album";
|
||||
public const string AlbumSortname = "album-sortname";
|
||||
public const string Composer = "composer";
|
||||
public const string Date = "date";
|
||||
public const string Genre = "genre";
|
||||
public const string Comment = "comment";
|
||||
public const string ExtendedComment = "extended-comment";
|
||||
public const string TrackNumber = "track-number";
|
||||
public const string TrackCount = "track-count";
|
||||
public const string AlbumVolumeNumber = "album-disc-number";
|
||||
public const string AlbumVolumeCount = "album-disc-count";
|
||||
public const string Location = "location";
|
||||
public const string Homepage = "homepage";
|
||||
public const string Description = "description";
|
||||
public const string Version = "version";
|
||||
public const string Isrc = "isrc";
|
||||
public const string Organization = "organization";
|
||||
public const string Copyright = "copyright";
|
||||
public const string CopyrightUri = "copyright-uri";
|
||||
public const string Contact = "contact";
|
||||
public const string License = "license";
|
||||
public const string LicenseUri = "license-uri";
|
||||
public const string Performer = "performer";
|
||||
public const string Duration = "duration";
|
||||
public const string Codec = "codec";
|
||||
public const string VideoCodec = "video-codec";
|
||||
public const string AudioCodec = "audio-codec";
|
||||
public const string SubtitleCodec = "subtitle-codec";
|
||||
public const string Bitrate = "bitrate";
|
||||
public const string NominalBitrate = "nominal-bitrate";
|
||||
public const string MinimumBitrate = "minimum-bitrate";
|
||||
public const string MaximumBitrate = "maximum-bitrate";
|
||||
public const string Serial = "serial";
|
||||
public const string Encoder = "encoder";
|
||||
public const string EncoderVersion = "encoder-version";
|
||||
public const string TrackGain = "replaygain-track-gain";
|
||||
public const string TrackPeak = "replaygain-track-peak";
|
||||
public const string AlbumGain = "replaygain-album-gain";
|
||||
public const string AlbumPeak = "replaygain-album-peak";
|
||||
public const string ReferenceLevel = "replaygain-reference-level";
|
||||
public const string LanguageCode = "language-code";
|
||||
public const string Image = "image";
|
||||
public const string PreviewImage = "preview-image";
|
||||
public const string Attachment = "attachment";
|
||||
public const string BeatsPerMinute = "beats-per-minute";
|
||||
public const string Keywords = "keywords";
|
||||
public const string GeoLocationName = "geo-location-name";
|
||||
public const string GeoLocationLatitude = "geo-location-latitude";
|
||||
public const string GeoLocationLongitude = "geo-location-longitude";
|
||||
public const string GeoLocationElevation = "geo-location-elevation";
|
|
@ -1,58 +0,0 @@
|
|||
namespace Gst {
|
||||
public static class Tags {
|
||||
public const string Title = "title";
|
||||
public const string TitleSortname = "title-sortname";
|
||||
public const string Artist = "artist";
|
||||
public const string ArtistSortname = "musicbrainz-sortname";
|
||||
public const string Album = "album";
|
||||
public const string AlbumSortname = "album-sortname";
|
||||
public const string Composer = "composer";
|
||||
public const string Date = "date";
|
||||
public const string Genre = "genre";
|
||||
public const string Comment = "comment";
|
||||
public const string ExtendedComment = "extended-comment";
|
||||
public const string TrackNumber = "track-number";
|
||||
public const string TrackCount = "track-count";
|
||||
public const string AlbumVolumeNumber = "album-disc-number";
|
||||
public const string AlbumVolumeCount = "album-disc-count";
|
||||
public const string Location = "location";
|
||||
public const string Homepage = "homepage";
|
||||
public const string Description = "description";
|
||||
public const string Version = "version";
|
||||
public const string Isrc = "isrc";
|
||||
public const string Organization = "organization";
|
||||
public const string Copyright = "copyright";
|
||||
public const string CopyrightUri = "copyright-uri";
|
||||
public const string Contact = "contact";
|
||||
public const string License = "license";
|
||||
public const string LicenseUri = "license-uri";
|
||||
public const string Performer = "performer";
|
||||
public const string Duration = "duration";
|
||||
public const string Codec = "codec";
|
||||
public const string VideoCodec = "video-codec";
|
||||
public const string AudioCodec = "audio-codec";
|
||||
public const string SubtitleCodec = "subtitle-codec";
|
||||
public const string Bitrate = "bitrate";
|
||||
public const string NominalBitrate = "nominal-bitrate";
|
||||
public const string MinimumBitrate = "minimum-bitrate";
|
||||
public const string MaximumBitrate = "maximum-bitrate";
|
||||
public const string Serial = "serial";
|
||||
public const string Encoder = "encoder";
|
||||
public const string EncoderVersion = "encoder-version";
|
||||
public const string TrackGain = "replaygain-track-gain";
|
||||
public const string TrackPeak = "replaygain-track-peak";
|
||||
public const string AlbumGain = "replaygain-album-gain";
|
||||
public const string AlbumPeak = "replaygain-album-peak";
|
||||
public const string ReferenceLevel = "replaygain-reference-level";
|
||||
public const string LanguageCode = "language-code";
|
||||
public const string Image = "image";
|
||||
public const string PreviewImage = "preview-image";
|
||||
public const string Attachment = "attachment";
|
||||
public const string BeatsPerMinute = "beats-per-minute";
|
||||
public const string Keywords = "keywords";
|
||||
public const string GeoLocationName = "geo-location-name";
|
||||
public const string GeoLocationLatitude = "geo-location-latitude";
|
||||
public const string GeoLocationLongitude = "geo-location-longitude";
|
||||
public const string GeoLocationElevation = "geo-location-elevation";
|
||||
}
|
||||
}
|
|
@ -3,14 +3,15 @@ using System.IO;
|
|||
|
||||
public class GenerateTags {
|
||||
public static int Main (string[] args) {
|
||||
if (args.Length != 3) {
|
||||
Console.WriteLine ("usage: gst-generate-tags --header=<filename> --namespace=<namespace> --class=<name>");
|
||||
if (args.Length != 3 && args.Length != 4) {
|
||||
Console.WriteLine ("usage: gst-generate-tags --header=<filename> --namespace=<namespace> --class=<name> [--only-body]");
|
||||
return 1;
|
||||
}
|
||||
|
||||
StreamReader header = null;
|
||||
string ns = "Gst";
|
||||
string cls = "Tags";
|
||||
bool only_body = false;
|
||||
|
||||
foreach (string arg in args) {
|
||||
|
||||
|
@ -29,14 +30,18 @@ public class GenerateTags {
|
|||
ns = arg.Substring (12);
|
||||
} else if (arg.StartsWith ("--class=")) {
|
||||
cls = arg.Substring (8);
|
||||
} else if (arg.StartsWith ("--only-body")) {
|
||||
only_body = true;
|
||||
} else {
|
||||
Console.WriteLine ("Invalid argument '" + arg + "'");
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine ("namespace " + ns + " {");
|
||||
Console.WriteLine ("\tpublic static class " + cls + " {");
|
||||
if (!only_body) {
|
||||
Console.WriteLine ("namespace " + ns + " {");
|
||||
Console.WriteLine ("\tpublic static class " + cls + " {");
|
||||
}
|
||||
|
||||
string line;
|
||||
while ( (line = header.ReadLine ()) != null) {
|
||||
|
@ -77,8 +82,10 @@ public class GenerateTags {
|
|||
|
||||
}
|
||||
|
||||
Console.WriteLine ("\t}");
|
||||
Console.WriteLine ("}");
|
||||
if (!only_body) {
|
||||
Console.WriteLine ("\t}");
|
||||
Console.WriteLine ("}");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -6,5 +6,6 @@ api:
|
|||
--header=../../gstreamer/gst/gsttaglist.h \
|
||||
--namespace=Gst \
|
||||
--class=Tags \
|
||||
> $(top_srcdir)/gstreamer-sharp/Tags.cs
|
||||
--only-body \
|
||||
> $(top_srcdir)/gstreamer-sharp/Tag.custom
|
||||
|
||||
|
|
Loading…
Reference in a new issue