rtaglib 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/TagLib.rb ADDED
@@ -0,0 +1,2 @@
1
+ require 'taglib/TagLib'
2
+
data/lib/TagLib_doc.rb ADDED
@@ -0,0 +1,2621 @@
1
+ # <b>
2
+ # A namespace for all TagLib related classes and functions. .</b>
3
+ #
4
+ #
5
+ # This namespace contains everything in TagLib. For projects working with TagLib extensively it may be conveniten to add a usingnamespaceTagLib;
6
+ #
7
+ #
8
+ module TagLib
9
+ # Singleton methods
10
+ def self.genreList()
11
+ end
12
+ def self.genreIndex()
13
+ end
14
+ def self.genre()
15
+ end
16
+ def self.genreMap()
17
+ end
18
+ # <b>
19
+ # This class provides a simple abstraction for creating and handling files. .</b>
20
+ #
21
+ #
22
+ # FileRef exists to provide a minimal, generic and value-based wrapper around a File. It is lightweight and implicitly shared, and as such suitable for pass-by-value use. This hides some of the uglier details of TagLib::File and the non-generic portions of the concrete file implementations.This class is useful in a &quot;simple usage&quot; situation where it is desirable to be able to get and set some of the tag information that is similar across file types.Also note that it is probably a good idea to plug this into your mime type system rather than using the constructor that accepts a file name using the FileTypeResolver.FileTypeResolver addFileTypeResolver()
23
+ #
24
+ #
25
+ class TagLib::FileRef
26
+ # Singleton methods
27
+ def self.defaultFileExtensions()
28
+ end
29
+ #
30
+ # Returns the audio properties for this FileRef. If no audio properties were read then this will returns a null pointer.
31
+ #
32
+ def audioProperties()
33
+ end
34
+ #
35
+ # Saves the file. Returns true on success.
36
+ #
37
+ def save()
38
+ end
39
+ #
40
+ # Returns a pointer to represented file&apos;s tag.This pointer will become invalid when this FileRef and all copies pass out of scope.
41
+ # File::tag()
42
+ #
43
+ #
44
+ def tag()
45
+ end
46
+ #
47
+ # Returns true if the file (and as such other pointers) are null.
48
+ #
49
+ def isNull()
50
+ end
51
+ def null?()
52
+ end
53
+ #
54
+ # Returns a pointer to the file represented by this handler class.As a general rule this call should be avoided since if you need to work with file objects directly, you are probably better served instantiating the File subclasses (i.e. MPEG::File) manually and working with their APIs.This handle exists to provide a minimal, generic and value-based wrapper around a File. Accessing the file directly generally indicates a moving away from this simplicity (and into things beyond the scope of FileRef).This pointer will become invalid when this FileRef and all copies pass out of scope.
55
+ #
56
+ #
57
+ def file()
58
+ end
59
+ end
60
+ class TagLib::FrameListMap
61
+ def isEmpty()
62
+ end
63
+ def contains()
64
+ end
65
+ def clear()
66
+ end
67
+ def size()
68
+ end
69
+ def empty?()
70
+ end
71
+ def insert()
72
+ end
73
+ def length()
74
+ end
75
+ end
76
+ # <b>
77
+ # A simple, generic interface to common audio meta data fields. .</b>
78
+ #
79
+ #
80
+ # This is an attempt to abstract away the difference in the meta data formats of various audio codecs and tagging schemes. As such it is generally a subset of what is available in the specific formats but should be suitable for most applications. This is meant to compliment the generic APIs found in TagLib::AudioProperties, TagLib::File and TagLib::FileRef.
81
+ #
82
+ class TagLib::Tag
83
+ #
84
+ # Returns true if the tag does not contain any data. This should be reimplemented in subclasses that provide more than the basic tagging abilities in this class.
85
+ #
86
+ def isEmpty()
87
+ end
88
+ #
89
+ # Returns the genre name; if no genre is present in the tag String::null will be returned.
90
+ #
91
+ def genre()
92
+ end
93
+ def genre=()
94
+ end
95
+ #
96
+ # Sets the comment to s. If s is String::null then this value will be cleared.
97
+ #
98
+ def setComment( s)
99
+ end
100
+ #
101
+ # Returns the year; if there is no year set, this will return 0.
102
+ #
103
+ def year()
104
+ end
105
+ #
106
+ # Returns the track number; if there is no track number set, this will return 0.
107
+ #
108
+ def track()
109
+ end
110
+ def year=()
111
+ end
112
+ def track=()
113
+ end
114
+ #
115
+ # Sets the genre to s. If s is String::null then this value will be cleared. For tag formats that use a fixed set of genres, the appropriate value will be selected based on a string comparison. A list of available genres for those formats should be available in that type&apos;s implementation.
116
+ #
117
+ def setGenre( s)
118
+ end
119
+ #
120
+ # Returns the track name; if no track name is present in the tag String::null will be returned.
121
+ #
122
+ def title()
123
+ end
124
+ def empty?()
125
+ end
126
+ def title=()
127
+ end
128
+ #
129
+ # Sets the title to s. If s is String::null then this value will be cleared.
130
+ #
131
+ def setTitle( s)
132
+ end
133
+ #
134
+ # Sets the year to i. If s is 0 then this value will be cleared.
135
+ #
136
+ def setYear(uint i)
137
+ end
138
+ #
139
+ # Returns the artist name; if no artist name is present in the tag String::null will be returned.
140
+ #
141
+ def artist()
142
+ end
143
+ def artist=()
144
+ end
145
+ #
146
+ # Sets the artist to s. If s is String::null then this value will be cleared.
147
+ #
148
+ def setArtist( s)
149
+ end
150
+ #
151
+ # Sets the track to i. If s is 0 then this value will be cleared.
152
+ #
153
+ def setTrack(uint i)
154
+ end
155
+ #
156
+ # Returns the track comment; if no comment is present in the tag String::null will be returned.
157
+ #
158
+ def comment()
159
+ end
160
+ #
161
+ # Returns the album name; if no album name is present in the tag String::null will be returned.
162
+ #
163
+ def album()
164
+ end
165
+ def comment=()
166
+ end
167
+ def album=()
168
+ end
169
+ #
170
+ # Sets the album to s. If s is String::null then this value will be cleared.
171
+ #
172
+ def setAlbum( s)
173
+ end
174
+ end
175
+ # <b>
176
+ # A wide string class suitable for unicode. .</b>
177
+ #
178
+ #
179
+ # This is an implicitly shared wide string. For storage it uses TagLib::wstring, but as this is an implementation detail this of course could change. Strings are stored internally as UTF-16BE. (Without the BOM (Byte Order Mark)The use of implicit sharing means that copying a string is cheap, the only cost comes into play when the copy is modified. Prior to that the string just has a pointer to the data of the parent String. This also makes this class suitable as a function return type.In addition to adding implicit sharing, this class keeps track of four possible encodings, which are the four supported by the ID3v2 standard.
180
+ #
181
+ class TagLib::String
182
+ #
183
+ # Creates and returns a C-String based on the data. This string is still owned by the String (class) and as such should not be deleted by the user.If unicode if false (the default) this string will be encoded in Latin1. If it is true the returned C-String will be UTF-8 encoded.This string remains valid until the String instance is destroyed or another export method is called.This however has the side effect that this C-String will remain in memory in addition to other memory that is consumed by the String instance. So, this method should not be used on large strings or where memory is critical.
184
+ #
185
+ #
186
+ def toCString(bool unicode = false)
187
+ end
188
+ end
189
+ class TagLib::FrameList
190
+ def isEmpty()
191
+ end
192
+ def contains()
193
+ end
194
+ def size()
195
+ end
196
+ end
197
+ # <b>
198
+ # A simple, abstract interface to common audio properties. .</b>
199
+ #
200
+ #
201
+ # The values here are common to most audio formats. For more specific, codec dependant values, please see see the subclasses APIs. This is meant to compliment the TagLib::File and TagLib::Tag APIs in providing a simple interface that is sufficient for most applications.
202
+ #
203
+ class TagLib::AudioProperties
204
+ #
205
+ # Returns the most appropriate bit rate for the file in kb/s. For constant bitrate formats this is simply the bitrate of the file. For variable bitrate formats this is either the average or nominal bitrate.
206
+ #
207
+ def bitrate()
208
+ end
209
+ #
210
+ # Returns the sample rate in Hz.
211
+ #
212
+ def sampleRate()
213
+ end
214
+ #
215
+ # Returns the number of audio channels.
216
+ #
217
+ def channels()
218
+ end
219
+ #
220
+ # Returns the length of the file in seconds.
221
+ #
222
+ def length()
223
+ end
224
+ end
225
+ # <b>
226
+ # A byte vector. .</b>
227
+ #
228
+ #
229
+ # This class provides a byte vector with some methods that are useful for tagging purposes. Many of the search functions are tailored to what is useful for finding tag related paterns in a data array.
230
+ #
231
+ class TagLib::ByteVector
232
+ #
233
+ # Returns a pointer to the internal data structure which may not be modified.
234
+ #
235
+ def data()
236
+ end
237
+ #
238
+ # Returns the size of the array.
239
+ #
240
+ def size()
241
+ end
242
+ end
243
+ class TagLib::GenreMap
244
+ def isEmpty()
245
+ end
246
+ def contains()
247
+ end
248
+ def clear()
249
+ end
250
+ def size()
251
+ end
252
+ def empty?()
253
+ end
254
+ def insert()
255
+ end
256
+ def length()
257
+ end
258
+ def []()
259
+ end
260
+ end
261
+ # <b>
262
+ # A list of ByteVectors. .</b>
263
+ #
264
+ #
265
+ # A List specialization with some handy features useful for ByteVectors.
266
+ #
267
+ class TagLib::ByteVectorList
268
+ def isEmpty()
269
+ end
270
+ def contains()
271
+ end
272
+ def size()
273
+ end
274
+ end
275
+ class TagLib::ItemListMap
276
+ def isEmpty()
277
+ end
278
+ def contains()
279
+ end
280
+ def clear()
281
+ end
282
+ def size()
283
+ end
284
+ def empty?()
285
+ end
286
+ def insert()
287
+ end
288
+ def length()
289
+ end
290
+ end
291
+ # <b>
292
+ # A list of strings. .</b>
293
+ #
294
+ #
295
+ # This is a spcialization of the List class with some members convention for string operations.
296
+ #
297
+ class TagLib::StringList
298
+ def isEmpty()
299
+ end
300
+ def contains()
301
+ end
302
+ def size()
303
+ end
304
+ end
305
+ # <b>
306
+ # A file class with some useful methods for tag manipulation. .</b>
307
+ #
308
+ #
309
+ # This class is a basic file class with some methods that are particularly useful for tag editors. It has methods to take advantage of ByteVector and a binary search method for finding patterns in a file.
310
+ #
311
+ class TagLib::File
312
+ #
313
+ # Returns the file name in the local file system encoding.
314
+ #
315
+ def name()
316
+ end
317
+ #
318
+ # Move the I/O pointer to offset in the file from position p. This defaults to seeking from the beginning of the file.Position
319
+ #
320
+ #
321
+ def seek(long offset,Position p = Beginning)
322
+ end
323
+ #
324
+ # Returns true if the file is read only (or if the file can not be opened).
325
+ #
326
+ def readOnly()
327
+ end
328
+ #
329
+ # Returns a pointer to this file&apos;s audio properties. This should be reimplemented in the concrete subclasses. If no audio properties were read then this will return a null pointer.
330
+ #
331
+ def audioProperties()
332
+ end
333
+ def find2()
334
+ end
335
+ #
336
+ # Reset the end-of-file and error flags on the file.
337
+ #
338
+ def clear()
339
+ end
340
+ def valid?()
341
+ end
342
+ #
343
+ # Save the file and its associated tags. This should be reimplemented in the concrete subclasses. Returns true if the save succeeds.On UNIX multiple processes are able to write to the same file at the same time. This can result in serious file corruption. If you are developing a program that makes use of TagLib from multiple processes you must insure that you are only doing writes to a particular file from one of them.
344
+ #
345
+ #
346
+ def save()
347
+ end
348
+ #
349
+ # Returns a pointer to this file&apos;s tag. This should be reimplemented in the concrete subclasses.
350
+ #
351
+ def tag()
352
+ end
353
+ def isWritable()
354
+ end
355
+ def find3()
356
+ end
357
+ def read_only?()
358
+ end
359
+ #
360
+ # Since the file can currently only be opened as an argument to the constructor (sort-of by design), this returns if that open succeeded.
361
+ #
362
+ def isOpen()
363
+ end
364
+ def writable?()
365
+ end
366
+ #
367
+ # Reads a block of size length at the current get pointer.
368
+ #
369
+ def readBlock(ulong length)
370
+ end
371
+ #
372
+ # Returns the offset in the file that pattern occurs at or -1 if it can not be found. If before is set, the search will only continue until the pattern before is found. This is useful for tagging purposes to search for a tag before the synch frame.Searching starts at fromOffset and proceeds from the that point to the beginning of the file and defaults to the end of the file.This has the practial limitation that pattern can not be longer than the buffer size used by readBlock(). Currently this is 1024 bytes.
373
+ #
374
+ #
375
+ def rfind( ByteVector pattern,long fromOffset = 0, ByteVector before = ByteVector::null)
376
+ end
377
+ #
378
+ # Insert data at position start in the file overwriting replace bytes of the original content.This method is slow since it requires rewriting all of the file after the insertion point.
379
+ #
380
+ #
381
+ def insert( ByteVector data,ulong start = 0,ulong replace = 0)
382
+ end
383
+ #
384
+ # Attempts to write the block data at the current get pointer. If the file is currently only opened read only -- i.e. readOnly() returns true -- this attempts to reopen the file in read/write mode.This should be used instead of using the streaming output operator for a ByteVector. And even this function is significantly slower than doing output with a char[].
385
+ #
386
+ #
387
+ def writeBlock( ByteVector data)
388
+ end
389
+ #
390
+ # Returns the current offset withing the file.
391
+ #
392
+ def tell()
393
+ end
394
+ #
395
+ # Removes a block of the file starting a start and continuing for length bytes.This method is slow since it involves rewriting all of the file after the removed portion.
396
+ #
397
+ #
398
+ def removeBlock(ulong start = 0,ulong length = 0)
399
+ end
400
+ def open?()
401
+ end
402
+ #
403
+ # Returns the length of the file.
404
+ #
405
+ def length()
406
+ end
407
+ #
408
+ # Returns true if the file is open and readble and valid information for the Tag and / or AudioProperties was found.
409
+ #
410
+ def isValid()
411
+ end
412
+ def find1()
413
+ end
414
+ end
415
+ class TagLib::FieldListMap
416
+ def isEmpty()
417
+ end
418
+ def contains()
419
+ end
420
+ def clear()
421
+ end
422
+ def size()
423
+ end
424
+ def empty?()
425
+ end
426
+ def insert()
427
+ end
428
+ def length()
429
+ end
430
+ def []()
431
+ end
432
+ end
433
+ # <b>
434
+ # A namespace for the classes used by Ogg-based metadata files. .</b>
435
+ #
436
+ #
437
+ #
438
+ #
439
+ module TagLib::Ogg
440
+ # <b>
441
+ # An implementation of the page headers associated with each Ogg::Page. .</b>
442
+ #
443
+ #
444
+ # This class implements Ogg page headers which contain the information about Ogg pages needed to break them into packets which can be passed on to the codecs.
445
+ #
446
+ class TagLib::Ogg::PageHeader
447
+ #
448
+ # Marks this page as the last page of the Ogg stream.lastPageOfStream()
449
+ #
450
+ #
451
+ def setLastPageOfStream(bool last)
452
+ end
453
+ #
454
+ # Ogg pages contain a list of packets (which are used by the contained codecs). The sizes of these pages is encoded in the page header. This returns a list of the packet sizes in bytes.setPacketSizes()
455
+ #
456
+ #
457
+ def packetSizes()
458
+ end
459
+ #
460
+ # Returns the index of the page within the Ogg stream. This helps make it possible to determine if pages have been lost.setPageSequenceNumber()
461
+ #
462
+ #
463
+ def pageSequenceNumber()
464
+ end
465
+ #
466
+ # Sets the internal flag indicating if the last packet in this page is complete to completed.lastPacketCompleted()
467
+ #
468
+ #
469
+ def setLastPacketCompleted(bool completed)
470
+ end
471
+ #
472
+ # A special value of containing the position of the packet to be interpreted by the codec. In the case of Vorbis this contains the PCM value and is used to calculate the length of the stream.setAbsoluteGranularPosition()
473
+ #
474
+ #
475
+ def absoluteGranularPosition()
476
+ end
477
+ #
478
+ # Sets the sizes of the packets in this page to sizes. Internally this updates the lacing values in the header.packetSizes()
479
+ #
480
+ #
481
+ def setPacketSizes( List&lt; int &gt; sizes)
482
+ end
483
+ #
484
+ # Sets the page&apos;s position in the stream to sequenceNumber.pageSequenceNumber()
485
+ #
486
+ #
487
+ def setPageSequenceNumber(int sequenceNumber)
488
+ end
489
+ #
490
+ # Returns the complete header size.
491
+ #
492
+ def size()
493
+ end
494
+ #
495
+ # This returns true if this is the first page of the Ogg (logical) stream.setFirstPageOfStream()
496
+ #
497
+ #
498
+ def firstPageOfStream()
499
+ end
500
+ #
501
+ # A special value of containing the position of the packet to be interpreted by the codec. It is only supported here so that it may be coppied from one page to another.absoluteGranularPosition()
502
+ #
503
+ #
504
+ def setAbsoluteGranularPosition(long long agp)
505
+ end
506
+ #
507
+ # Some packets can be continued across multiple pages. If the first packet in the current page is a continuation this will return true. If this is page starts with a new packet this will return false.lastPacketCompleted() setFirstPacketContinued()
508
+ #
509
+ #
510
+ def firstPacketContinued()
511
+ end
512
+ #
513
+ # Returns the size of the data portion of the page -- i.e. the size of the page less the header size.
514
+ #
515
+ def dataSize()
516
+ end
517
+ #
518
+ # Marks this page as the first page of the Ogg stream.firstPageOfStream()
519
+ #
520
+ #
521
+ def setFirstPageOfStream(bool first)
522
+ end
523
+ #
524
+ # Every Ogg logical stream is given a random serial number which is common to every page in that logical stream. This returns the serial number of the stream associated with this packet.setStreamSerialNumber()
525
+ #
526
+ #
527
+ def streamSerialNumber()
528
+ end
529
+ #
530
+ # Sets the internal flag indicating if the first packet in this page is continued to continued.firstPacketContinued()
531
+ #
532
+ #
533
+ def setFirstPacketContinued(bool continued)
534
+ end
535
+ #
536
+ # This returns true if this is the last page of the Ogg (logical) stream.setLastPageOfStream()
537
+ #
538
+ #
539
+ def lastPageOfStream()
540
+ end
541
+ #
542
+ # Every Ogg logical stream is given a random serial number which is common to every page in that logical stream. This sets this pages serial number. This method should be used when adding new pages to a logical stream.streamSerialNumber()
543
+ #
544
+ #
545
+ def setStreamSerialNumber(uint n)
546
+ end
547
+ #
548
+ # Returns true if the header parsed properly and is valid.
549
+ #
550
+ def isValid()
551
+ end
552
+ #
553
+ # Render the page header to binary data.The checksum -- bytes 22 - 25 -- will be left empty and must be filled in when rendering the entire page.
554
+ #
555
+ #
556
+ def render()
557
+ end
558
+ #
559
+ # Returns true if the last packet of this page is completely contained in this page.firstPacketContinued() setLastPacketCompleted()
560
+ #
561
+ #
562
+ def lastPacketCompleted()
563
+ end
564
+ end
565
+ # <b>
566
+ # An implementation of Ogg pages. .</b>
567
+ #
568
+ #
569
+ # This is an implementation of the pages that make up an Ogg stream. This handles parsing pages and breaking them down into packets and handles the details of packets spanning multiple pages and pages that contiain multiple packets.In most Xiph.org formats the comments are found in the first few packets, this however is a reasonably complete implementation of Ogg pages that could potentially be useful for non-meta data purposes.
570
+ #
571
+ class TagLib::Ogg::Page
572
+ #
573
+ # Checks to see if the specified packet is contained in the current page.ContainsPacketFlags
574
+ #
575
+ #
576
+ def containsPacket(int index)
577
+ end
578
+ #
579
+ # Returns the page&apos;s position within the file (in bytes).
580
+ #
581
+ def fileOffset()
582
+ end
583
+ #
584
+ # Returns the number of packets (whole or partial) in this page.
585
+ #
586
+ def packetCount()
587
+ end
588
+ #
589
+ # Returns the size of the page in bytes.
590
+ #
591
+ def size()
592
+ end
593
+ #
594
+ # Returns a pointer to the header for this page. This pointer will become invalid when the page is deleted.
595
+ #
596
+ def header()
597
+ end
598
+ #
599
+ # Returns a list of the packets in this page.Either or both the first and last packets may be only partial.
600
+ # PageHeader::firstPacketContinued()
601
+ #
602
+ #
603
+ def packets()
604
+ end
605
+ #
606
+ # Returns the index of the first packet wholly or partially contained in this page.setFirstPacketIndex()
607
+ #
608
+ #
609
+ def firstPacketIndex()
610
+ end
611
+ #
612
+ # Sets the index of the first packet in the page.firstPacketIndex()
613
+ #
614
+ #
615
+ def setFirstPacketIndex(int index)
616
+ end
617
+ #
618
+ #
619
+ #
620
+ def render()
621
+ end
622
+ end
623
+ # <b>
624
+ # Ogg Vorbis comment implementation. .</b>
625
+ #
626
+ #
627
+ # This class is an implementation of the Ogg Vorbis comment specification, to be found in section 5 of the Ogg Vorbis specification. Because this format is also used in other (currently unsupported) Xiph.org formats, it has been made part of a generic implementation rather than being limited to strictly Vorbis.Vorbis comments are a simple vector of keys and values, called fields. Multiple values for a given key are supported.fieldListMap()
628
+ #
629
+ #
630
+ class TagLib::Ogg::XiphComment < TagLib::Tag
631
+ #
632
+ # Returns true if the tag does not contain any data. This should be reimplemented in subclasses that provide more than the basic tagging abilities in this class.
633
+ #
634
+ def isEmpty()
635
+ end
636
+ #
637
+ # Returns a reference to the map of field lists. Because Xiph comments support multiple fields with the same key, a pure Map would not work. As such this is a Map of string lists, keyed on the comment field name.The standard set of Xiph/Vorbis fields (which may or may not be contained in any specific comment) is:
638
+ #
639
+ # TITLE
640
+ #
641
+ # VERSION
642
+ #
643
+ # ALBUM
644
+ #
645
+ # ARTIST
646
+ #
647
+ # PERFORMER
648
+ #
649
+ # COPYRIGHT
650
+ #
651
+ # ORGANIZATION
652
+ #
653
+ # DESCRIPTION
654
+ #
655
+ # GENRE
656
+ #
657
+ # DATE
658
+ #
659
+ # LOCATION
660
+ #
661
+ # CONTACT
662
+ #
663
+ # ISRC
664
+ #
665
+ # For a more detailed description of these fields, please see the Ogg Vorbis specification, section 5.2.2.1.The Ogg Vorbis comment specification does allow these key values to be either upper or lower case. However, it is conventional for them to be upper case. As such, TagLib, when parsing a Xiph/Vorbis comment, converts all fields to uppercase. When you are using this data structure, you will need to specify the field name in upper case.
666
+ # You should not modify this data structure directly, instead use addField() and removeField().
667
+ #
668
+ #
669
+ def fieldListMap()
670
+ end
671
+ #
672
+ # Returns true if the field is contained within the comment.This is safer than checking for membership in the FieldListMap.
673
+ #
674
+ #
675
+ def contains( key)
676
+ end
677
+ #
678
+ # Returns the genre name; if no genre is present in the tag String::null will be returned.
679
+ #
680
+ def genre()
681
+ end
682
+ def genre=()
683
+ end
684
+ #
685
+ # Sets the comment to s. If s is String::null then this value will be cleared.
686
+ #
687
+ def setComment( s)
688
+ end
689
+ #
690
+ # Returns the year; if there is no year set, this will return 0.
691
+ #
692
+ def year()
693
+ end
694
+ #
695
+ # Returns the track number; if there is no track number set, this will return 0.
696
+ #
697
+ def track()
698
+ end
699
+ #
700
+ # Returns the vendor ID of the Ogg Vorbis encoder. libvorbis 1.0 as the most common case always returns &quot;Xiph.Org libVorbis I 20020717&quot;.
701
+ #
702
+ def vendorID()
703
+ end
704
+ def year=()
705
+ end
706
+ def track=()
707
+ end
708
+ #
709
+ # Sets the genre to s. If s is String::null then this value will be cleared. For tag formats that use a fixed set of genres, the appropriate value will be selected based on a string comparison. A list of available genres for those formats should be available in that type&apos;s implementation.
710
+ #
711
+ def setGenre( s)
712
+ end
713
+ #
714
+ # Returns the track name; if no track name is present in the tag String::null will be returned.
715
+ #
716
+ def title()
717
+ end
718
+ def empty?()
719
+ end
720
+ def title=()
721
+ end
722
+ #
723
+ # Sets the title to s. If s is String::null then this value will be cleared.
724
+ #
725
+ def setTitle( s)
726
+ end
727
+ #
728
+ # Add the field specified by key with the data value. If replace is true, then all of the other fields with the same key will be removed first.If the field value is empty, the field will be removed.
729
+ #
730
+ def addField( key, value,bool replace = true)
731
+ end
732
+ #
733
+ # Sets the year to i. If s is 0 then this value will be cleared.
734
+ #
735
+ def setYear(uint i)
736
+ end
737
+ #
738
+ # Returns the artist name; if no artist name is present in the tag String::null will be returned.
739
+ #
740
+ def artist()
741
+ end
742
+ def artist=()
743
+ end
744
+ #
745
+ # Sets the artist to s. If s is String::null then this value will be cleared.
746
+ #
747
+ def setArtist( s)
748
+ end
749
+ #
750
+ # Remove the field specified by key with the data value. If value is null, all of the fields with the given key will be removed.
751
+ #
752
+ def removeField( key, value = String::null)
753
+ end
754
+ #
755
+ # Sets the track to i. If s is 0 then this value will be cleared.
756
+ #
757
+ def setTrack(uint i)
758
+ end
759
+ #
760
+ # Returns the track comment; if no comment is present in the tag String::null will be returned.
761
+ #
762
+ def comment()
763
+ end
764
+ #
765
+ # Returns the album name; if no album name is present in the tag String::null will be returned.
766
+ #
767
+ def album()
768
+ end
769
+ #
770
+ # Returns the number of fields present in the comment.
771
+ #
772
+ def fieldCount()
773
+ end
774
+ def comment=()
775
+ end
776
+ #
777
+ # Renders the comment to a ByteVector suitable for inserting into a file.If addFramingBit is true the standard Vorbis comment framing bit will be appended. However some formats (notably FLAC) do not work with this in place.
778
+ #
779
+ def render(bool addFramingBit)
780
+ end
781
+ def album=()
782
+ end
783
+ #
784
+ # Sets the album to s. If s is String::null then this value will be cleared.
785
+ #
786
+ def setAlbum( s)
787
+ end
788
+ end
789
+ # <b>
790
+ # An implementation of TagLib::File with some helpers for Ogg based formats. .</b>
791
+ #
792
+ #
793
+ # This is an implementation of Ogg file page and packet rendering and is of use to Ogg based formats. While the API is small this handles the non-trivial details of breaking up an Ogg stream into packets and makes these available (via subclassing) to the codec meta data implementations.
794
+ #
795
+ class TagLib::Ogg::File < TagLib::File
796
+ #
797
+ # Sets the packet with index i to the value p.
798
+ #
799
+ def setPacket(uint i, ByteVector p)
800
+ end
801
+ def name()
802
+ end
803
+ def seek()
804
+ end
805
+ def readOnly()
806
+ end
807
+ def audioProperties()
808
+ end
809
+ def find2()
810
+ end
811
+ #
812
+ # Returns a pointer to the PageHeader for the first page in the stream or null if the page could not be found.
813
+ #
814
+ def firstPageHeader()
815
+ end
816
+ def clear()
817
+ end
818
+ def valid?()
819
+ end
820
+ #
821
+ # Save the file and its associated tags. This should be reimplemented in the concrete subclasses. Returns true if the save succeeds.On UNIX multiple processes are able to write to the same file at the same time. This can result in serious file corruption. If you are developing a program that makes use of TagLib from multiple processes you must insure that you are only doing writes to a particular file from one of them.
822
+ #
823
+ #
824
+ def save()
825
+ end
826
+ def tag()
827
+ end
828
+ def isWritable()
829
+ end
830
+ def find3()
831
+ end
832
+ #
833
+ # Returns a pointer to the PageHeader for the last page in the stream or null if the page could not be found.
834
+ #
835
+ def lastPageHeader()
836
+ end
837
+ def read_only?()
838
+ end
839
+ def isOpen()
840
+ end
841
+ def writable?()
842
+ end
843
+ def readBlock()
844
+ end
845
+ def rfind()
846
+ end
847
+ def insert()
848
+ end
849
+ def writeBlock()
850
+ end
851
+ #
852
+ # Returns the packet contents for the i-th packet (starting from zero) in the Ogg bitstream.The requires reading at least the packet header for every page up to the requested page.
853
+ #
854
+ #
855
+ def packet(uint i)
856
+ end
857
+ def tell()
858
+ end
859
+ def removeBlock()
860
+ end
861
+ def open?()
862
+ end
863
+ def length()
864
+ end
865
+ def isValid()
866
+ end
867
+ def find1()
868
+ end
869
+ end
870
+ # <b>
871
+ # A namespace containing classes for Speex metadata. .</b>
872
+ #
873
+ #
874
+ #
875
+ #
876
+ module TagLib::Ogg::Speex
877
+ # <b>
878
+ # An implementation of audio property reading for Ogg Speex. .</b>
879
+ #
880
+ #
881
+ # This reads the data from an Ogg Speex stream found in the AudioProperties API.
882
+ #
883
+ class TagLib::Ogg::Speex::Properties < TagLib::AudioProperties
884
+ #
885
+ # Returns the most appropriate bit rate for the file in kb/s. For constant bitrate formats this is simply the bitrate of the file. For variable bitrate formats this is either the average or nominal bitrate.
886
+ #
887
+ def bitrate()
888
+ end
889
+ #
890
+ # Returns the Speex version, currently &quot;0&quot; (as specified by the spec).
891
+ #
892
+ def speexVersion()
893
+ end
894
+ #
895
+ # Returns the sample rate in Hz.
896
+ #
897
+ def sampleRate()
898
+ end
899
+ #
900
+ # Returns the number of audio channels.
901
+ #
902
+ def channels()
903
+ end
904
+ #
905
+ # Returns the length of the file in seconds.
906
+ #
907
+ def length()
908
+ end
909
+ end
910
+ # <b>
911
+ # An implementation of Ogg::File with Speex specific methods. .</b>
912
+ #
913
+ #
914
+ # This is the central class in the Ogg Speex metadata processing collection of classes. It&apos;s built upon Ogg::File which handles processing of the Ogg logical bitstream and breaking it down into pages which are handled by the codec implementations, in this case Speex specifically.
915
+ #
916
+ class TagLib::Ogg::Speex::File < TagLib::Ogg::File
917
+ def setPacket()
918
+ end
919
+ def name()
920
+ end
921
+ def seek()
922
+ end
923
+ def readOnly()
924
+ end
925
+ #
926
+ # Returns the Speex::Properties for this file. If no audio properties were read then this will return a null pointer.
927
+ #
928
+ def audioProperties()
929
+ end
930
+ def find2()
931
+ end
932
+ def firstPageHeader()
933
+ end
934
+ def clear()
935
+ end
936
+ def valid?()
937
+ end
938
+ #
939
+ # Save the file and its associated tags. This should be reimplemented in the concrete subclasses. Returns true if the save succeeds.On UNIX multiple processes are able to write to the same file at the same time. This can result in serious file corruption. If you are developing a program that makes use of TagLib from multiple processes you must insure that you are only doing writes to a particular file from one of them.
940
+ #
941
+ #
942
+ def save()
943
+ end
944
+ #
945
+ # Returns the XiphComment for this file. XiphComment implements the tag interface, so this serves as the reimplementation of TagLib::File::tag().
946
+ #
947
+ def tag()
948
+ end
949
+ def isWritable()
950
+ end
951
+ def find3()
952
+ end
953
+ def lastPageHeader()
954
+ end
955
+ def read_only?()
956
+ end
957
+ def isOpen()
958
+ end
959
+ def writable?()
960
+ end
961
+ def readBlock()
962
+ end
963
+ def rfind()
964
+ end
965
+ def insert()
966
+ end
967
+ def writeBlock()
968
+ end
969
+ def packet()
970
+ end
971
+ def tell()
972
+ end
973
+ def removeBlock()
974
+ end
975
+ def open?()
976
+ end
977
+ def length()
978
+ end
979
+ def isValid()
980
+ end
981
+ def find1()
982
+ end
983
+ end
984
+ end
985
+ module TagLib::Ogg::Flac
986
+ class TagLib::Ogg::Flac::File < TagLib::Ogg::File
987
+ def setPacket()
988
+ end
989
+ def name()
990
+ end
991
+ def seek()
992
+ end
993
+ def readOnly()
994
+ end
995
+ def audioProperties()
996
+ end
997
+ def find2()
998
+ end
999
+ def firstPageHeader()
1000
+ end
1001
+ def clear()
1002
+ end
1003
+ def valid?()
1004
+ end
1005
+ def save()
1006
+ end
1007
+ def tag()
1008
+ end
1009
+ def isWritable()
1010
+ end
1011
+ def find3()
1012
+ end
1013
+ def lastPageHeader()
1014
+ end
1015
+ def read_only?()
1016
+ end
1017
+ def isOpen()
1018
+ end
1019
+ def writable?()
1020
+ end
1021
+ def readBlock()
1022
+ end
1023
+ def rfind()
1024
+ end
1025
+ def insert()
1026
+ end
1027
+ def writeBlock()
1028
+ end
1029
+ def packet()
1030
+ end
1031
+ def tell()
1032
+ end
1033
+ def removeBlock()
1034
+ end
1035
+ def open?()
1036
+ end
1037
+ def length()
1038
+ end
1039
+ def isValid()
1040
+ end
1041
+ def streamLength()
1042
+ end
1043
+ def find1()
1044
+ end
1045
+ end
1046
+ end
1047
+ end
1048
+ # <b>
1049
+ # An ID3v1 implementation. .</b>
1050
+ #
1051
+ #
1052
+ #
1053
+ #
1054
+ module TagLib::ID3v1
1055
+ # <b>
1056
+ # The main class in the ID3v1 implementation. .</b>
1057
+ #
1058
+ #
1059
+ # This is an implementation of the ID3v1 format. ID3v1 is both the simplist and most common of tag formats but is rather limited. Because of its pervasiveness and the way that applications have been written around the fields that it provides, the generic TagLib::Tag API is a mirror of what is provided by ID3v1.ID3v1 tags should generally only contain Latin1 information. However because many applications do not follow this rule there is now support for overriding the ID3v1 string handling using the ID3v1::StringHandler class. Please see the documentation for that class for more information.StringHandler
1060
+ # Most fields are truncated to a maximum of 28-30 bytes. The truncation happens automatically when the tag is rendered.
1061
+ #
1062
+ #
1063
+ class TagLib::ID3v1::Tag < TagLib::Tag
1064
+ def isEmpty()
1065
+ end
1066
+ #
1067
+ # Returns the genre name; if no genre is present in the tag String::null will be returned.
1068
+ #
1069
+ def genre()
1070
+ end
1071
+ def genre=()
1072
+ end
1073
+ #
1074
+ # Sets the comment to s. If s is String::null then this value will be cleared.
1075
+ #
1076
+ def setComment( s)
1077
+ end
1078
+ #
1079
+ # Returns the year; if there is no year set, this will return 0.
1080
+ #
1081
+ def year()
1082
+ end
1083
+ #
1084
+ # Returns the track number; if there is no track number set, this will return 0.
1085
+ #
1086
+ def track()
1087
+ end
1088
+ def year=()
1089
+ end
1090
+ def track=()
1091
+ end
1092
+ #
1093
+ # Sets the genre to s. If s is String::null then this value will be cleared. For tag formats that use a fixed set of genres, the appropriate value will be selected based on a string comparison. A list of available genres for those formats should be available in that type&apos;s implementation.
1094
+ #
1095
+ def setGenre( s)
1096
+ end
1097
+ #
1098
+ # Returns the track name; if no track name is present in the tag String::null will be returned.
1099
+ #
1100
+ def title()
1101
+ end
1102
+ def empty?()
1103
+ end
1104
+ def title=()
1105
+ end
1106
+ #
1107
+ # Sets the title to s. If s is String::null then this value will be cleared.
1108
+ #
1109
+ def setTitle( s)
1110
+ end
1111
+ #
1112
+ # Sets the year to i. If s is 0 then this value will be cleared.
1113
+ #
1114
+ def setYear(uint i)
1115
+ end
1116
+ #
1117
+ # Returns the artist name; if no artist name is present in the tag String::null will be returned.
1118
+ #
1119
+ def artist()
1120
+ end
1121
+ def artist=()
1122
+ end
1123
+ #
1124
+ # Sets the artist to s. If s is String::null then this value will be cleared.
1125
+ #
1126
+ def setArtist( s)
1127
+ end
1128
+ #
1129
+ # Sets the track to i. If s is 0 then this value will be cleared.
1130
+ #
1131
+ def setTrack(uint i)
1132
+ end
1133
+ #
1134
+ # Returns the track comment; if no comment is present in the tag String::null will be returned.
1135
+ #
1136
+ def comment()
1137
+ end
1138
+ #
1139
+ # Returns the album name; if no album name is present in the tag String::null will be returned.
1140
+ #
1141
+ def album()
1142
+ end
1143
+ def comment=()
1144
+ end
1145
+ #
1146
+ # Renders the in memory values to a ByteVector suitable for writing to the file.
1147
+ #
1148
+ def render()
1149
+ end
1150
+ def album=()
1151
+ end
1152
+ #
1153
+ # Sets the album to s. If s is String::null then this value will be cleared.
1154
+ #
1155
+ def setAlbum( s)
1156
+ end
1157
+ end
1158
+ end
1159
+ # <b>
1160
+ # A namespace containing classes for Vorbis metadata. .</b>
1161
+ #
1162
+ #
1163
+ #
1164
+ #
1165
+ module TagLib::Vorbis
1166
+ # <b>
1167
+ # An implementation of audio property reading for Ogg Vorbis. .</b>
1168
+ #
1169
+ #
1170
+ # This reads the data from an Ogg Vorbis stream found in the AudioProperties API.
1171
+ #
1172
+ class TagLib::Vorbis::Properties < TagLib::AudioProperties
1173
+ #
1174
+ # Returns the nominal bitrate as read from the Vorbis identification header.
1175
+ #
1176
+ def bitrateNominal()
1177
+ end
1178
+ #
1179
+ # Returns the minimum bitrate as read from the Vorbis identification header.
1180
+ #
1181
+ def bitrateMinimum()
1182
+ end
1183
+ #
1184
+ # Returns the most appropriate bit rate for the file in kb/s. For constant bitrate formats this is simply the bitrate of the file. For variable bitrate formats this is either the average or nominal bitrate.
1185
+ #
1186
+ def bitrate()
1187
+ end
1188
+ #
1189
+ # Returns the sample rate in Hz.
1190
+ #
1191
+ def sampleRate()
1192
+ end
1193
+ #
1194
+ # Returns the Vorbis version, currently &quot;0&quot; (as specified by the spec).
1195
+ #
1196
+ def vorbisVersion()
1197
+ end
1198
+ #
1199
+ # Returns the number of audio channels.
1200
+ #
1201
+ def channels()
1202
+ end
1203
+ #
1204
+ # Returns the maximum bitrate as read from the Vorbis identification header.
1205
+ #
1206
+ def bitrateMaximum()
1207
+ end
1208
+ #
1209
+ # Returns the length of the file in seconds.
1210
+ #
1211
+ def length()
1212
+ end
1213
+ end
1214
+ # <b>
1215
+ # An implementation of Ogg::File with Vorbis specific methods. .</b>
1216
+ #
1217
+ #
1218
+ # This is the central class in the Ogg Vorbis metadata processing collection of classes. It&apos;s built upon Ogg::File which handles processing of the Ogg logical bitstream and breaking it down into pages which are handled by the codec implementations, in this case Vorbis specifically.
1219
+ #
1220
+ class TagLib::Vorbis::File < TagLib::Ogg::File
1221
+ def setPacket()
1222
+ end
1223
+ def name()
1224
+ end
1225
+ def seek()
1226
+ end
1227
+ def readOnly()
1228
+ end
1229
+ #
1230
+ # Returns the Vorbis::Properties for this file. If no audio properties were read then this will return a null pointer.
1231
+ #
1232
+ def audioProperties()
1233
+ end
1234
+ def find2()
1235
+ end
1236
+ def firstPageHeader()
1237
+ end
1238
+ def clear()
1239
+ end
1240
+ def valid?()
1241
+ end
1242
+ #
1243
+ # Save the file and its associated tags. This should be reimplemented in the concrete subclasses. Returns true if the save succeeds.On UNIX multiple processes are able to write to the same file at the same time. This can result in serious file corruption. If you are developing a program that makes use of TagLib from multiple processes you must insure that you are only doing writes to a particular file from one of them.
1244
+ #
1245
+ #
1246
+ def save()
1247
+ end
1248
+ #
1249
+ # Returns the XiphComment for this file. XiphComment implements the tag interface, so this serves as the reimplementation of TagLib::File::tag().
1250
+ #
1251
+ def tag()
1252
+ end
1253
+ def isWritable()
1254
+ end
1255
+ def find3()
1256
+ end
1257
+ def lastPageHeader()
1258
+ end
1259
+ def read_only?()
1260
+ end
1261
+ def isOpen()
1262
+ end
1263
+ def writable?()
1264
+ end
1265
+ def readBlock()
1266
+ end
1267
+ def rfind()
1268
+ end
1269
+ def insert()
1270
+ end
1271
+ def writeBlock()
1272
+ end
1273
+ def packet()
1274
+ end
1275
+ def tell()
1276
+ end
1277
+ def removeBlock()
1278
+ end
1279
+ def open?()
1280
+ end
1281
+ def length()
1282
+ end
1283
+ def isValid()
1284
+ end
1285
+ def find1()
1286
+ end
1287
+ end
1288
+ end
1289
+ # <b>
1290
+ # An implementation of TagLib::File with MPEG (MP3) specific methods. .</b>
1291
+ #
1292
+ #
1293
+ #
1294
+ #
1295
+ module TagLib::MPEG
1296
+ # <b>
1297
+ # An implementation of audio property reading for MP3. .</b>
1298
+ #
1299
+ #
1300
+ # This reads the data from an MPEG Layer III stream found in the AudioProperties API.
1301
+ #
1302
+ class TagLib::MPEG::Properties < TagLib::AudioProperties
1303
+ #
1304
+ # Returns true if the copyrighted bit is set.
1305
+ #
1306
+ def isCopyrighted()
1307
+ end
1308
+ #
1309
+ # Returns the layer version. This will be between the values 1-3.
1310
+ #
1311
+ def layer()
1312
+ end
1313
+ #
1314
+ # Returns the MPEG Version of the file.
1315
+ #
1316
+ def version()
1317
+ end
1318
+ #
1319
+ # Returns true if the &quot;original&quot; bit is set.
1320
+ #
1321
+ def isOriginal()
1322
+ end
1323
+ #
1324
+ # Returns the most appropriate bit rate for the file in kb/s. For constant bitrate formats this is simply the bitrate of the file. For variable bitrate formats this is either the average or nominal bitrate.
1325
+ #
1326
+ def bitrate()
1327
+ end
1328
+ #
1329
+ # Returns true if the MPEG protection bit is enabled.
1330
+ #
1331
+ def protectionEnabled()
1332
+ end
1333
+ #
1334
+ # Returns a pointer to the XingHeader if one exists or null if no XingHeader was found.
1335
+ #
1336
+ def xingHeader()
1337
+ end
1338
+ #
1339
+ # Returns the sample rate in Hz.
1340
+ #
1341
+ def sampleRate()
1342
+ end
1343
+ #
1344
+ # Returns the number of audio channels.
1345
+ #
1346
+ def channels()
1347
+ end
1348
+ #
1349
+ # Returns the channel mode for this frame.
1350
+ #
1351
+ def channelMode()
1352
+ end
1353
+ #
1354
+ # Returns the length of the file in seconds.
1355
+ #
1356
+ def length()
1357
+ end
1358
+ end
1359
+ # <b>
1360
+ # An implementation of MP3 frame headers. .</b>
1361
+ #
1362
+ #
1363
+ # This is an implementation of MPEG Layer III headers. The API follows more or less the binary format of these headers. I&apos;ve used this document as a reference.
1364
+ #
1365
+ class TagLib::MPEG::Header
1366
+ #
1367
+ # Returns true if the copyrighted bit is set.
1368
+ #
1369
+ def isCopyrighted()
1370
+ end
1371
+ #
1372
+ # Returns the layer version. This will be between the values 1-3.
1373
+ #
1374
+ def layer()
1375
+ end
1376
+ #
1377
+ # Returns the MPEG Version of the header.
1378
+ #
1379
+ def version()
1380
+ end
1381
+ #
1382
+ # Returns true if the &quot;original&quot; bit is set.
1383
+ #
1384
+ def isOriginal()
1385
+ end
1386
+ #
1387
+ # Returns the bitrate encoded in the header.
1388
+ #
1389
+ def bitrate()
1390
+ end
1391
+ #
1392
+ # Returns true if the MPEG protection bit is enabled.
1393
+ #
1394
+ def protectionEnabled()
1395
+ end
1396
+ #
1397
+ # Returns the frame length.
1398
+ #
1399
+ def frameLength()
1400
+ end
1401
+ #
1402
+ # Returns the sample rate in Hz.
1403
+ #
1404
+ def sampleRate()
1405
+ end
1406
+ #
1407
+ # Returns true if the frame is padded.
1408
+ #
1409
+ def isPadded()
1410
+ end
1411
+ #
1412
+ # Returns the number of frames per sample.
1413
+ #
1414
+ def samplesPerFrame()
1415
+ end
1416
+ #
1417
+ # Returns the channel mode for this frame.
1418
+ #
1419
+ def channelMode()
1420
+ end
1421
+ #
1422
+ # Returns true if the frame is at least an appropriate size and has legal values.
1423
+ #
1424
+ def isValid()
1425
+ end
1426
+ end
1427
+ # <b>
1428
+ # An implementation of the Xing VBR headers. .</b>
1429
+ #
1430
+ #
1431
+ # This is a minimalistic implementation of the Xing VBR headers. Xing headers are often added to VBR (variable bit rate) MP3 streams to make it easy to compute the length and quality of a VBR stream. Our implementation is only concerned with the total size of the stream (so that we can calculate the total playing time and the average bitrate). It uses this text and the XMMS sources as references.
1432
+ #
1433
+ class TagLib::MPEG::XingHeader
1434
+ #
1435
+ # Returns the total number of frames.
1436
+ #
1437
+ def totalFrames()
1438
+ end
1439
+ #
1440
+ # Returns the total size of stream in bytes.
1441
+ #
1442
+ def totalSize()
1443
+ end
1444
+ #
1445
+ # Returns true if the data was parsed properly and if there is a valid Xing header present.
1446
+ #
1447
+ def isValid()
1448
+ end
1449
+ end
1450
+ # <b>
1451
+ # An MPEG file class with some useful methods specific to MPEG. .</b>
1452
+ #
1453
+ #
1454
+ # This implements the generic TagLib::File API and additionally provides access to properties that are distinct to MPEG files, notably access to the different ID3 tags.
1455
+ #
1456
+ class TagLib::MPEG::File < TagLib::File
1457
+ def name()
1458
+ end
1459
+ def seek()
1460
+ end
1461
+ def readOnly()
1462
+ end
1463
+ #
1464
+ # Returns a pointer to the APE tag of the file.If create is false (the default) this will return a null pointer if there is no valid APE tag. If create is true it will create an APE tag if one does not exist.The Tag is still owned by the MPEG::File and should not be deleted by the user. It will be deleted when the file (object) is destroyed.
1465
+ #
1466
+ #
1467
+ def APETag(bool create = false)
1468
+ end
1469
+ #
1470
+ # Returns the MPEG::Properties for this file. If no audio properties were read then this will return a null pointer.
1471
+ #
1472
+ def audioProperties()
1473
+ end
1474
+ #
1475
+ # Returns the position in the file of the previous MPEG frame, using the current position as start
1476
+ #
1477
+ def previousFrameOffset(long position)
1478
+ end
1479
+ def find2()
1480
+ end
1481
+ def clear()
1482
+ end
1483
+ def valid?()
1484
+ end
1485
+ #
1486
+ # Save the file. This will attempt to save all of the tag types that are specified by OR-ing together TagTypes values. The save() method above uses AllTags. This returns true if saving was successful.If stripOthers is true this strips all tags not included in the mask, but does not modify them in memory, so later calls to save() which make use of these tags will remain valid. This also strips empty tags.
1487
+ #
1488
+ def save(int tags,bool stripOthers)
1489
+ end
1490
+ #
1491
+ # Returns a pointer to the ID3v2 tag of the file.If create is false (the default) this will return a null pointer if there is no valid ID3v2 tag. If create is true it will create an ID3v2 tag if one does not exist.The Tag is still owned by the MPEG::File and should not be deleted by the user. It will be deleted when the file (object) is destroyed.
1492
+ #
1493
+ #
1494
+ def ID3v2Tag(bool create = false)
1495
+ end
1496
+ #
1497
+ # Returns a pointer to a tag that is the union of the ID3v2 and ID3v1 tags. The ID3v2 tag is given priority in reading the information -- if requested information exists in both the ID3v2 tag and the ID3v1 tag, the information from the ID3v2 tag will be returned.If you would like more granular control over the content of the tags, with the concession of generality, use the tag-type specific calls.As this tag is not implemented as an ID3v2 tag or an ID3v1 tag, but a union of the two this pointer may not be cast to the specific tag types.
1498
+ # ID3v1Tag() ID3v2Tag() APETag()
1499
+ #
1500
+ #
1501
+ def tag()
1502
+ end
1503
+ def isWritable()
1504
+ end
1505
+ #
1506
+ # Returns the position in the file of the last MPEG frame.
1507
+ #
1508
+ def lastFrameOffset()
1509
+ end
1510
+ def find3()
1511
+ end
1512
+ def read_only?()
1513
+ end
1514
+ def isOpen()
1515
+ end
1516
+ def writable?()
1517
+ end
1518
+ def readBlock()
1519
+ end
1520
+ #
1521
+ # This will strip the tags that match the OR-ed together TagTypes from the file. By default it strips all tags. It returns true if the tags are successfully stripped.If freeMemory is true the ID3 and APE tags will be deleted and pointers to them will be invalidated.
1522
+ #
1523
+ def strip(int tags,bool freeMemory)
1524
+ end
1525
+ #
1526
+ # Returns a pointer to the ID3v1 tag of the file.If create is false (the default) this will return a null pointer if there is no valid ID3v1 tag. If create is true it will create an ID3v1 tag if one does not exist.The Tag is still owned by the MPEG::File and should not be deleted by the user. It will be deleted when the file (object) is destroyed.
1527
+ #
1528
+ #
1529
+ def ID3v1Tag(bool create = false)
1530
+ end
1531
+ def rfind()
1532
+ end
1533
+ def insert()
1534
+ end
1535
+ #
1536
+ # Returns the position in the file of the first MPEG frame.
1537
+ #
1538
+ def firstFrameOffset()
1539
+ end
1540
+ def writeBlock()
1541
+ end
1542
+ def tell()
1543
+ end
1544
+ def removeBlock()
1545
+ end
1546
+ def open?()
1547
+ end
1548
+ #
1549
+ # Set the ID3v2::FrameFactory to something other than the default.ID3v2FrameFactory
1550
+ #
1551
+ #
1552
+ def setID3v2FrameFactory( ID3v2::FrameFactory factory)
1553
+ end
1554
+ def length()
1555
+ end
1556
+ def isValid()
1557
+ end
1558
+ #
1559
+ # Returns the position in the file of the next MPEG frame, using the current position as start
1560
+ #
1561
+ def nextFrameOffset(long position)
1562
+ end
1563
+ def find1()
1564
+ end
1565
+ end
1566
+ end
1567
+ # <b>
1568
+ # An implementation of the APE tagging format. .</b>
1569
+ #
1570
+ #
1571
+ #
1572
+ #
1573
+ module TagLib::APE
1574
+ # <b>
1575
+ # An APE tag implementation. .</b>
1576
+ #
1577
+ #
1578
+ #
1579
+ #
1580
+ class TagLib::APE::Tag < TagLib::Tag
1581
+ #
1582
+ # Returns a reference to the item list map. This is an ItemListMap of all of the items in the tag.This is the most powerfull structure for accessing the items of the tag.You should not modify this data structure directly, instead use setItem() and removeItem().
1583
+ #
1584
+ #
1585
+ def itemListMap()
1586
+ end
1587
+ def isEmpty()
1588
+ end
1589
+ #
1590
+ # Returns the genre name; if no genre is present in the tag String::null will be returned.
1591
+ #
1592
+ def genre()
1593
+ end
1594
+ def genre=()
1595
+ end
1596
+ #
1597
+ # Sets the comment to s. If s is String::null then this value will be cleared.
1598
+ #
1599
+ def setComment( s)
1600
+ end
1601
+ #
1602
+ # Removes the key item from the tag
1603
+ #
1604
+ def removeItem( key)
1605
+ end
1606
+ #
1607
+ # Returns the year; if there is no year set, this will return 0.
1608
+ #
1609
+ def year()
1610
+ end
1611
+ #
1612
+ # Returns the track number; if there is no track number set, this will return 0.
1613
+ #
1614
+ def track()
1615
+ end
1616
+ def year=()
1617
+ end
1618
+ def track=()
1619
+ end
1620
+ #
1621
+ # Sets the genre to s. If s is String::null then this value will be cleared. For tag formats that use a fixed set of genres, the appropriate value will be selected based on a string comparison. A list of available genres for those formats should be available in that type&apos;s implementation.
1622
+ #
1623
+ def setGenre( s)
1624
+ end
1625
+ #
1626
+ # Adds to the item specified by key the data value. If replace is true, then all of the other values on the same key will be removed first.
1627
+ #
1628
+ def addValue( key, value,bool replace = true)
1629
+ end
1630
+ #
1631
+ # Returns the track name; if no track name is present in the tag String::null will be returned.
1632
+ #
1633
+ def title()
1634
+ end
1635
+ def empty?()
1636
+ end
1637
+ def title=()
1638
+ end
1639
+ #
1640
+ # Sets the title to s. If s is String::null then this value will be cleared.
1641
+ #
1642
+ def setTitle( s)
1643
+ end
1644
+ #
1645
+ # Sets the year to i. If s is 0 then this value will be cleared.
1646
+ #
1647
+ def setYear(uint i)
1648
+ end
1649
+ #
1650
+ # Sets the key item to the value of item. If an item with the key is already present, it will be replaced.
1651
+ #
1652
+ def setItem( key, Item item)
1653
+ end
1654
+ #
1655
+ # Returns the artist name; if no artist name is present in the tag String::null will be returned.
1656
+ #
1657
+ def artist()
1658
+ end
1659
+ def artist=()
1660
+ end
1661
+ #
1662
+ # Sets the artist to s. If s is String::null then this value will be cleared.
1663
+ #
1664
+ def setArtist( s)
1665
+ end
1666
+ #
1667
+ # Returns a pointer to the tag&apos;s footer.
1668
+ #
1669
+ def footer()
1670
+ end
1671
+ #
1672
+ # Sets the track to i. If s is 0 then this value will be cleared.
1673
+ #
1674
+ def setTrack(uint i)
1675
+ end
1676
+ #
1677
+ # Returns the track comment; if no comment is present in the tag String::null will be returned.
1678
+ #
1679
+ def comment()
1680
+ end
1681
+ #
1682
+ # Returns the album name; if no album name is present in the tag String::null will be returned.
1683
+ #
1684
+ def album()
1685
+ end
1686
+ def comment=()
1687
+ end
1688
+ #
1689
+ # Renders the in memory values to a ByteVector suitable for writing to the file.
1690
+ #
1691
+ def render()
1692
+ end
1693
+ def album=()
1694
+ end
1695
+ #
1696
+ # Sets the album to s. If s is String::null then this value will be cleared.
1697
+ #
1698
+ def setAlbum( s)
1699
+ end
1700
+ end
1701
+ # <b>
1702
+ # An implementation of APE-items. .</b>
1703
+ #
1704
+ #
1705
+ # This class provides the features of items in the APEv2 standard.
1706
+ #
1707
+ class TagLib::APE::Item
1708
+ #
1709
+ # Returns if the item has any real content.
1710
+ #
1711
+ def isEmpty()
1712
+ end
1713
+ #
1714
+ # Returns the binary value.DeprecatedThis will be removed in the next binary incompatible version as it is not kept in sync with the things that are set using setValue() and friends.
1715
+ #
1716
+ def value()
1717
+ end
1718
+ #
1719
+ # Appends value to create (or extend) the current list of values.toString()
1720
+ #
1721
+ #
1722
+ def appendValue( value)
1723
+ end
1724
+ #
1725
+ # Parse the item from the ByteVector data.
1726
+ #
1727
+ def parse( ByteVector data)
1728
+ end
1729
+ #
1730
+ # Returns the list of values.
1731
+ #
1732
+ def values()
1733
+ end
1734
+ #
1735
+ # Set the item to read-only.
1736
+ #
1737
+ def setReadOnly(bool readOnly)
1738
+ end
1739
+ #
1740
+ # Returns the key.
1741
+ #
1742
+ def key()
1743
+ end
1744
+ #
1745
+ # Appends values to extend the current list of values.toStringList()
1746
+ #
1747
+ #
1748
+ def appendValues( List values)
1749
+ end
1750
+ #
1751
+ # Return true if the item is read-only.
1752
+ #
1753
+ def isReadOnly()
1754
+ end
1755
+ #
1756
+ # Returns the size of the full item.
1757
+ #
1758
+ def size()
1759
+ end
1760
+ #
1761
+ # Sets the key for the item to key.
1762
+ #
1763
+ def setKey( key)
1764
+ end
1765
+ #
1766
+ # Returns the value as a single string. In case of multiple strings, the first is returned.
1767
+ #
1768
+ def toString()
1769
+ end
1770
+ #
1771
+ # Sets the type of the item to type.ItemTypes
1772
+ #
1773
+ #
1774
+ def setType(ItemTypes type)
1775
+ end
1776
+ #
1777
+ # Sets the value of the item to value and clears any previous contents.toString()
1778
+ #
1779
+ #
1780
+ def setValue( value)
1781
+ end
1782
+ #
1783
+ # Deprecatedvalues
1784
+ #
1785
+ #
1786
+ def toStringList()
1787
+ end
1788
+ #
1789
+ # Sets the value of the item to the list of values in value and clears any previous contents.toStringList()
1790
+ #
1791
+ #
1792
+ def setValues( List values)
1793
+ end
1794
+ #
1795
+ # Render the item to a ByteVector.
1796
+ #
1797
+ def render()
1798
+ end
1799
+ end
1800
+ # <b>
1801
+ # An implementation of APE footers. .</b>
1802
+ #
1803
+ #
1804
+ # This class implements APE footers (and headers). It attempts to follow, both semantically and programatically, the structure specified in the APE v2.0 standard. The API is based on the properties of APE footer and headers specified there.
1805
+ #
1806
+ class TagLib::APE::Footer
1807
+ #
1808
+ # Returns the number of items in the tag.
1809
+ #
1810
+ def itemCount()
1811
+ end
1812
+ #
1813
+ # Sets the data that will be used as the footer. 32 bytes, starting from data will be used.
1814
+ #
1815
+ def setData( ByteVector data)
1816
+ end
1817
+ #
1818
+ # Returns true if a header is present in the tag.
1819
+ #
1820
+ def headerPresent()
1821
+ end
1822
+ #
1823
+ # Returns the version number. (Note: This is the 1000 or 2000.)
1824
+ #
1825
+ def version()
1826
+ end
1827
+ #
1828
+ # Set the item count to s. itemCount()
1829
+ #
1830
+ #
1831
+ def setItemCount(uint s)
1832
+ end
1833
+ #
1834
+ # Renders the footer back to binary format.
1835
+ #
1836
+ def renderFooter()
1837
+ end
1838
+ #
1839
+ # Returns true if a footer is present in the tag.
1840
+ #
1841
+ def footerPresent()
1842
+ end
1843
+ #
1844
+ # Returns the tag size in bytes. This is the size of the frame content and footer. The size of the entire tag will be this plus the header size, if present.completeTagSize()
1845
+ #
1846
+ #
1847
+ def tagSize()
1848
+ end
1849
+ #
1850
+ # Renders the header corresponding to the footer. If headerPresent is set to false, it returns an empty ByteVector.
1851
+ #
1852
+ def renderHeader()
1853
+ end
1854
+ #
1855
+ # Returns true this is actually the header.
1856
+ #
1857
+ def isHeader()
1858
+ end
1859
+ #
1860
+ # Returns the tag size, including if present, the header size.tagSize()
1861
+ #
1862
+ #
1863
+ def completeTagSize()
1864
+ end
1865
+ #
1866
+ # Sets whether the header should be rendered or not
1867
+ #
1868
+ def setHeaderPresent(bool b)
1869
+ end
1870
+ #
1871
+ # Set the tag size to s. tagSize()
1872
+ #
1873
+ #
1874
+ def setTagSize(uint s)
1875
+ end
1876
+ end
1877
+ end
1878
+ # <b>
1879
+ # An implementation of MPC metadata. .</b>
1880
+ #
1881
+ #
1882
+ # This is implementation of MPC metadata.This supports ID3v1 and APE (v1 and v2) style comments as well as reading stream properties from the file. ID3v2 tags are invalid in MPC-files, but will be skipped and ignored.
1883
+ #
1884
+ module TagLib::MPC
1885
+ # <b>
1886
+ # An implementation of audio property reading for MPC. .</b>
1887
+ #
1888
+ #
1889
+ # This reads the data from an MPC stream found in the AudioProperties API.
1890
+ #
1891
+ class TagLib::MPC::Properties < TagLib::AudioProperties
1892
+ #
1893
+ # Returns the version of the bitstream (SV4-SV7)
1894
+ #
1895
+ def mpcVersion()
1896
+ end
1897
+ #
1898
+ # Returns the most appropriate bit rate for the file in kb/s. For constant bitrate formats this is simply the bitrate of the file. For variable bitrate formats this is either the average or nominal bitrate.
1899
+ #
1900
+ def bitrate()
1901
+ end
1902
+ #
1903
+ # Returns the sample rate in Hz.
1904
+ #
1905
+ def sampleRate()
1906
+ end
1907
+ #
1908
+ # Returns the number of audio channels.
1909
+ #
1910
+ def channels()
1911
+ end
1912
+ #
1913
+ # Returns the length of the file in seconds.
1914
+ #
1915
+ def length()
1916
+ end
1917
+ end
1918
+ # <b>
1919
+ # An implementation of TagLib::File with MPC specific methods. .</b>
1920
+ #
1921
+ #
1922
+ # This implements and provides an interface for MPC files to the TagLib::Tag and TagLib::AudioProperties interfaces by way of implementing the abstract TagLib::File API as well as providing some additional information specific to MPC files. The only invalid tag combination supported is an ID3v1 tag after an APE tag.
1923
+ #
1924
+ class TagLib::MPC::File < TagLib::File
1925
+ def name()
1926
+ end
1927
+ def seek()
1928
+ end
1929
+ def readOnly()
1930
+ end
1931
+ #
1932
+ # Returns a pointer to the APE tag of the file.If create is false (the default) this will return a null pointer if there is no valid APE tag. If create is true it will create a APE tag if one does not exist. If there is already an ID3v1 tag, thes new APE tag will be placed before it.The Tag is still owned by the APE::File and should not be deleted by the user. It will be deleted when the file (object) is destroyed.
1933
+ #
1934
+ #
1935
+ def APETag(bool create = false)
1936
+ end
1937
+ #
1938
+ # Returns the MPC::Properties for this file. If no audio properties were read then this will return a null pointer.
1939
+ #
1940
+ def audioProperties()
1941
+ end
1942
+ def find2()
1943
+ end
1944
+ def clear()
1945
+ end
1946
+ def valid?()
1947
+ end
1948
+ #
1949
+ # Saves the file.
1950
+ #
1951
+ def save()
1952
+ end
1953
+ #
1954
+ # Returns the Tag for this file. This will be an APE tag, an ID3v1 tag or a combination of the two.
1955
+ #
1956
+ def tag()
1957
+ end
1958
+ def isWritable()
1959
+ end
1960
+ def find3()
1961
+ end
1962
+ def read_only?()
1963
+ end
1964
+ def isOpen()
1965
+ end
1966
+ def writable?()
1967
+ end
1968
+ def readBlock()
1969
+ end
1970
+ #
1971
+ # This will remove the tags that match the OR-ed together TagTypes from the file. By default it removes all tags.This will also invalidate pointers to the tags as their memory will be freed.
1972
+ # In order to make the removal permanent save() still needs to be called.
1973
+ #
1974
+ #
1975
+ def strip(int tags = AllTags)
1976
+ end
1977
+ #
1978
+ # Returns a pointer to the ID3v1 tag of the file.If create is false (the default) this will return a null pointer if there is no valid ID3v1 tag. If create is true it will create an ID3v1 tag if one does not exist. If there is already an APE tag, the new ID3v1 tag will be placed after it.The Tag is still owned by the APE::File and should not be deleted by the user. It will be deleted when the file (object) is destroyed.
1979
+ #
1980
+ #
1981
+ def ID3v1Tag(bool create = false)
1982
+ end
1983
+ def rfind()
1984
+ end
1985
+ def insert()
1986
+ end
1987
+ def writeBlock()
1988
+ end
1989
+ def tell()
1990
+ end
1991
+ #
1992
+ # Deprecatedstrip
1993
+ #
1994
+ #
1995
+ def remove(int tags = AllTags)
1996
+ end
1997
+ def removeBlock()
1998
+ end
1999
+ def open?()
2000
+ end
2001
+ def length()
2002
+ end
2003
+ def isValid()
2004
+ end
2005
+ def find1()
2006
+ end
2007
+ end
2008
+ end
2009
+ # <b>
2010
+ # An implementation of FLAC metadata. .</b>
2011
+ #
2012
+ #
2013
+ # This is implementation of FLAC metadata for non-Ogg FLAC files. At some point when Ogg / FLAC is more common there will be a similar implementation under the Ogg hiearchy.This supports ID3v1, ID3v2 and Xiph style comments as well as reading stream properties from the file.
2014
+ #
2015
+ module TagLib::FLAC
2016
+ # <b>
2017
+ # An implementation of audio property reading for FLAC. .</b>
2018
+ #
2019
+ #
2020
+ # This reads the data from an FLAC stream found in the AudioProperties API.
2021
+ #
2022
+ class TagLib::FLAC::Properties < TagLib::AudioProperties
2023
+ #
2024
+ # Returns the sample width as read from the FLAC identification header.
2025
+ #
2026
+ def sampleWidth()
2027
+ end
2028
+ #
2029
+ # Returns the most appropriate bit rate for the file in kb/s. For constant bitrate formats this is simply the bitrate of the file. For variable bitrate formats this is either the average or nominal bitrate.
2030
+ #
2031
+ def bitrate()
2032
+ end
2033
+ #
2034
+ # Returns the sample rate in Hz.
2035
+ #
2036
+ def sampleRate()
2037
+ end
2038
+ #
2039
+ # Returns the number of audio channels.
2040
+ #
2041
+ def channels()
2042
+ end
2043
+ #
2044
+ # Returns the length of the file in seconds.
2045
+ #
2046
+ def length()
2047
+ end
2048
+ end
2049
+ # <b>
2050
+ # An implementation of TagLib::File with FLAC specific methods. .</b>
2051
+ #
2052
+ #
2053
+ # This implements and provides an interface for FLAC files to the TagLib::Tag and TagLib::AudioProperties interfaces by way of implementing the abstract TagLib::File API as well as providing some additional information specific to FLAC files.
2054
+ #
2055
+ class TagLib::FLAC::File < TagLib::File
2056
+ def name()
2057
+ end
2058
+ def seek()
2059
+ end
2060
+ def readOnly()
2061
+ end
2062
+ #
2063
+ # Returns the FLAC::Properties for this file. If no audio properties were read then this will return a null pointer.
2064
+ #
2065
+ def audioProperties()
2066
+ end
2067
+ #
2068
+ # Returns the block of data used by FLAC::Properties for parsing the stream properties.DeprecatedThis method will not be public in a future release.
2069
+ #
2070
+ def streamInfoData()
2071
+ end
2072
+ def find2()
2073
+ end
2074
+ def clear()
2075
+ end
2076
+ def valid?()
2077
+ end
2078
+ #
2079
+ # Save the file. This will primarily save the XiphComment, but will also keep any old ID3-tags up to date. If the file has no XiphComment, one will be constructed from the ID3-tags.This returns true if the save was successful.
2080
+ #
2081
+ def save()
2082
+ end
2083
+ #
2084
+ # Returns a pointer to the ID3v2 tag of the file.If create is false (the default) this will return a null pointer if there is no valid ID3v2 tag. If create is true it will create an ID3v2 tag if one does not exist.The Tag is still owned by the FLAC::File and should not be deleted by the user. It will be deleted when the file (object) is destroyed.
2085
+ #
2086
+ #
2087
+ def ID3v2Tag(bool create = false)
2088
+ end
2089
+ #
2090
+ # Returns the Tag for this file. This will be a union of XiphComment, ID3v1 and ID3v2 tags.ID3v2Tag() ID3v1Tag() XiphComment()
2091
+ #
2092
+ #
2093
+ def tag()
2094
+ end
2095
+ def isWritable()
2096
+ end
2097
+ def find3()
2098
+ end
2099
+ def read_only?()
2100
+ end
2101
+ def isOpen()
2102
+ end
2103
+ def writable?()
2104
+ end
2105
+ def readBlock()
2106
+ end
2107
+ #
2108
+ # Returns a pointer to the ID3v1 tag of the file.If create is false (the default) this will return a null pointer if there is no valid ID3v1 tag. If create is true it will create an ID3v1 tag if one does not exist.The Tag is still owned by the FLAC::File and should not be deleted by the user. It will be deleted when the file (object) is destroyed.
2109
+ #
2110
+ #
2111
+ def ID3v1Tag(bool create = false)
2112
+ end
2113
+ def rfind()
2114
+ end
2115
+ #
2116
+ # Returns a pointer to the XiphComment for the file.If create is false (the default) this will return a null pointer if there is no valid XiphComment. If create is true it will create a XiphComment if one does not exist.The Tag is still owned by the FLAC::File and should not be deleted by the user. It will be deleted when the file (object) is destroyed.
2117
+ #
2118
+ #
2119
+ def xiphComment(bool create = false)
2120
+ end
2121
+ def insert()
2122
+ end
2123
+ def writeBlock()
2124
+ end
2125
+ def tell()
2126
+ end
2127
+ def removeBlock()
2128
+ end
2129
+ def open?()
2130
+ end
2131
+ #
2132
+ # Set the ID3v2::FrameFactory to something other than the default. This can be used to specify the way that ID3v2 frames will be interpreted whenID3v2FrameFactory
2133
+ #
2134
+ #
2135
+ def setID3v2FrameFactory( ID3v2::FrameFactory factory)
2136
+ end
2137
+ def length()
2138
+ end
2139
+ def isValid()
2140
+ end
2141
+ #
2142
+ # Returns the length of the audio-stream, used by FLAC::Properties for calculating the bitrate.DeprecatedThis method will not be public in a future release.
2143
+ #
2144
+ def streamLength()
2145
+ end
2146
+ def find1()
2147
+ end
2148
+ end
2149
+ end
2150
+ # <b>
2151
+ # An implementation of WavPack metadata. .</b>
2152
+ #
2153
+ #
2154
+ # This is implementation of WavPack metadata.This supports ID3v1 and APE (v1 and v2) style comments as well as reading stream properties from the file.
2155
+ #
2156
+ module TagLib::WavPack
2157
+ # <b>
2158
+ # An implementation of audio property reading for WavPack. .</b>
2159
+ #
2160
+ #
2161
+ # This reads the data from an WavPack stream found in the AudioProperties API.
2162
+ #
2163
+ class TagLib::WavPack::Properties < TagLib::AudioProperties
2164
+ #
2165
+ # Returns number of bits per sample.
2166
+ #
2167
+ def bitsPerSample()
2168
+ end
2169
+ #
2170
+ # Returns WavPack version.
2171
+ #
2172
+ def version()
2173
+ end
2174
+ #
2175
+ # Returns the most appropriate bit rate for the file in kb/s. For constant bitrate formats this is simply the bitrate of the file. For variable bitrate formats this is either the average or nominal bitrate.
2176
+ #
2177
+ def bitrate()
2178
+ end
2179
+ #
2180
+ # Returns the sample rate in Hz.
2181
+ #
2182
+ def sampleRate()
2183
+ end
2184
+ #
2185
+ # Returns the number of audio channels.
2186
+ #
2187
+ def channels()
2188
+ end
2189
+ #
2190
+ # Returns the length of the file in seconds.
2191
+ #
2192
+ def length()
2193
+ end
2194
+ end
2195
+ # <b>
2196
+ # An implementation of TagLib::File with WavPack specific methods. .</b>
2197
+ #
2198
+ #
2199
+ # This implements and provides an interface for WavPack files to the TagLib::Tag and TagLib::AudioProperties interfaces by way of implementing the abstract TagLib::File API as well as providing some additional information specific to WavPack files.
2200
+ #
2201
+ class TagLib::WavPack::File < TagLib::File
2202
+ def name()
2203
+ end
2204
+ def seek()
2205
+ end
2206
+ def readOnly()
2207
+ end
2208
+ #
2209
+ # Returns a pointer to the APE tag of the file.If create is false (the default) this will return a null pointer if there is no valid APE tag. If create is true it will create a APE tag if one does not exist.The Tag is still owned by the APE::File and should not be deleted by the user. It will be deleted when the file (object) is destroyed.
2210
+ #
2211
+ #
2212
+ def APETag(bool create = false)
2213
+ end
2214
+ #
2215
+ # Returns the MPC::Properties for this file. If no audio properties were read then this will return a null pointer.
2216
+ #
2217
+ def audioProperties()
2218
+ end
2219
+ def find2()
2220
+ end
2221
+ def clear()
2222
+ end
2223
+ def valid?()
2224
+ end
2225
+ #
2226
+ # Saves the file.
2227
+ #
2228
+ def save()
2229
+ end
2230
+ #
2231
+ # Returns the Tag for this file. This will be an APE tag, an ID3v1 tag or a combination of the two.
2232
+ #
2233
+ def tag()
2234
+ end
2235
+ def isWritable()
2236
+ end
2237
+ def find3()
2238
+ end
2239
+ def read_only?()
2240
+ end
2241
+ def isOpen()
2242
+ end
2243
+ def writable?()
2244
+ end
2245
+ def readBlock()
2246
+ end
2247
+ #
2248
+ # This will remove the tags that match the OR-ed together TagTypes from the file. By default it removes all tags.This will also invalidate pointers to the tags as their memory will be freed. In order to make the removal permanent save() still needs to be called
2249
+ #
2250
+ #
2251
+ def strip(int tags = AllTags)
2252
+ end
2253
+ #
2254
+ # Returns a pointer to the ID3v1 tag of the file.If create is false (the default) this will return a null pointer if there is no valid ID3v1 tag. If create is true it will create an ID3v1 tag if one does not exist. If there is already an APE tag, the new ID3v1 tag will be placed after it.The Tag is still owned by the APE::File and should not be deleted by the user. It will be deleted when the file (object) is destroyed.
2255
+ #
2256
+ #
2257
+ def ID3v1Tag(bool create = false)
2258
+ end
2259
+ def rfind()
2260
+ end
2261
+ def insert()
2262
+ end
2263
+ def writeBlock()
2264
+ end
2265
+ def tell()
2266
+ end
2267
+ def removeBlock()
2268
+ end
2269
+ def open?()
2270
+ end
2271
+ def length()
2272
+ end
2273
+ def isValid()
2274
+ end
2275
+ def find1()
2276
+ end
2277
+ end
2278
+ end
2279
+ # <b>
2280
+ # An ID3v2 implementation. .</b>
2281
+ #
2282
+ #
2283
+ # This is a relatively complete and flexible framework for working with ID3v2 tags.ID3v2::Tag
2284
+ #
2285
+ #
2286
+ module TagLib::ID3v2
2287
+ # <b>
2288
+ # An ID3v2 attached picture frame implementation. .</b>
2289
+ #
2290
+ #
2291
+ # This is an implementation of ID3v2 attached pictures. Pictures may be included in tags, one per APIC frame (but there may be multiple APIC frames in a single tag). These pictures are usually in either JPEG or PNG format.
2292
+ #
2293
+ class TagLib::ID3v2::AttachedPictureFrame
2294
+ #
2295
+ # Set the text encoding used for the description.description()
2296
+ #
2297
+ #
2298
+ def setTextEncoding(::Type t)
2299
+ end
2300
+ #
2301
+ # Sets the image data to p. p should be of the type specified in this frame&apos;s mime-type specification.picture() mimeType() setMimeType()
2302
+ #
2303
+ #
2304
+ def setPicture( ByteVector p)
2305
+ end
2306
+ #
2307
+ # Returns the mime type of the image. This should in most cases be &quot;image/png&quot; or &quot;image/jpeg&quot;.
2308
+ #
2309
+ def mimeType()
2310
+ end
2311
+ #
2312
+ # Returns a string containing the description and mime-type
2313
+ #
2314
+ def toString()
2315
+ end
2316
+ #
2317
+ # Sets the mime type of the image. This should in most cases be &quot;image/png&quot; or &quot;image/jpeg&quot;.
2318
+ #
2319
+ def setMimeType( m)
2320
+ end
2321
+ #
2322
+ # Sets the type for the image.Type type()
2323
+ #
2324
+ #
2325
+ def setType(Type t)
2326
+ end
2327
+ #
2328
+ # Returns a text description of the image.setDescription() textEncoding() setTextEncoding()
2329
+ #
2330
+ #
2331
+ def description()
2332
+ end
2333
+ #
2334
+ # Sets a textual description of the image to desc.description() textEncoding() setTextEncoding()
2335
+ #
2336
+ #
2337
+ def setDescription( desc)
2338
+ end
2339
+ #
2340
+ # Returns the text encoding used for the description.setTextEncoding() description()
2341
+ #
2342
+ #
2343
+ def textEncoding()
2344
+ end
2345
+ #
2346
+ # Returns the image data as a ByteVector.ByteVector has a data() method that returns a const char * which should make it easy to export this data to external programs.
2347
+ # setPicture() mimeType()
2348
+ #
2349
+ #
2350
+ def picture()
2351
+ end
2352
+ end
2353
+ # <b>
2354
+ # An implementation of ID3v2 comments. .</b>
2355
+ #
2356
+ #
2357
+ # This implements the ID3v2 comment format. An ID3v2 comment concists of a language encoding, a description and a single text field.
2358
+ #
2359
+ class TagLib::ID3v2::CommentsFrame
2360
+ end
2361
+ # <b>
2362
+ # The main class in the ID3v2 implementation. .</b>
2363
+ #
2364
+ #
2365
+ # This is the main class in the ID3v2 implementation. It serves two functions. This first, as is obvious from the public API, is to provide a container for the other ID3v2 related classes. In addition, through the read() and parse() protected methods, it provides the most basic level of parsing. In these methods the ID3v2 tag is extracted from the file and split into data components.ID3v2 tags have several parts, TagLib attempts to provide an interface for them all. header(), footer() and extendedHeader() corespond to those data structures in the ID3v2 standard and the APIs for the classes that they return attempt to reflect this.Also ID3v2 tags are built up from a list of frames, which are in turn have a header and a list of fields. TagLib provides two ways of accessing the list of frames that are in a given ID3v2 tag. The first is simply via the frameList() method. This is just a list of pointers to the frames. The second is a map from the frame type -- i.e. &quot;COMM&quot; for comments -- and a list of frames of that type. (In some cases ID3v2 allows for multiple frames of the same type, hence this being a map to a list rather than just a map to an individual frame.)More information on the structure of frames can be found in the ID3v2::Frame class.read() and parse() pass binary data to the other ID3v2 class structures, they do not handle parsing of flags or fields, for instace. Those are handled by similar functions within those classes.All pointers to data structures within the tag will become invalid when the tag is destroyed.
2366
+ # Dealing with the nasty details of ID3v2 is not for the faint of heart and should not be done without much meditation on the spec. It&apos;s rather long, but if you&apos;re planning on messing with this class and others that deal with the details of ID3v2 (rather than the nice, safe, abstract TagLib::Tag and friends), it&apos;s worth your time to familiarize yourself with said spec (which is distrubuted with the TagLib sources). TagLib tries to do most of the work, but with a little luck, you can still convince it to generate invalid ID3v2 tags. The APIs for ID3v2 assume a working knowledge of ID3v2 structure. You&apos;re been warned.
2367
+ #
2368
+ #
2369
+ class TagLib::ID3v2::Tag < TagLib::Tag
2370
+ #
2371
+ # Returns true if the tag does not contain any data. This should be reimplemented in subclasses that provide more than the basic tagging abilities in this class.
2372
+ #
2373
+ def isEmpty()
2374
+ end
2375
+ #
2376
+ # Returns the genre name; if no genre is present in the tag String::null will be returned.
2377
+ #
2378
+ def genre()
2379
+ end
2380
+ def genre=()
2381
+ end
2382
+ #
2383
+ # Sets the comment to s. If s is String::null then this value will be cleared.
2384
+ #
2385
+ def setComment( s)
2386
+ end
2387
+ #
2388
+ # Returns the year; if there is no year set, this will return 0.
2389
+ #
2390
+ def year()
2391
+ end
2392
+ #
2393
+ # Returns the track number; if there is no track number set, this will return 0.
2394
+ #
2395
+ def track()
2396
+ end
2397
+ def year=()
2398
+ end
2399
+ def track=()
2400
+ end
2401
+ #
2402
+ # Sets the genre to s. If s is String::null then this value will be cleared. For tag formats that use a fixed set of genres, the appropriate value will be selected based on a string comparison. A list of available genres for those formats should be available in that type&apos;s implementation.
2403
+ #
2404
+ def setGenre( s)
2405
+ end
2406
+ #
2407
+ # Returns the track name; if no track name is present in the tag String::null will be returned.
2408
+ #
2409
+ def title()
2410
+ end
2411
+ #
2412
+ # Returns a pointer to the tag&apos;s header.
2413
+ #
2414
+ def header()
2415
+ end
2416
+ def empty?()
2417
+ end
2418
+ def title=()
2419
+ end
2420
+ #
2421
+ # Sets the title to s. If s is String::null then this value will be cleared.
2422
+ #
2423
+ def setTitle( s)
2424
+ end
2425
+ #
2426
+ # Sets the year to i. If s is 0 then this value will be cleared.
2427
+ #
2428
+ def setYear(uint i)
2429
+ end
2430
+ #
2431
+ # Returns the artist name; if no artist name is present in the tag String::null will be returned.
2432
+ #
2433
+ def artist()
2434
+ end
2435
+ def artist=()
2436
+ end
2437
+ #
2438
+ # Sets the artist to s. If s is String::null then this value will be cleared.
2439
+ #
2440
+ def setArtist( s)
2441
+ end
2442
+ #
2443
+ # Sets the track to i. If s is 0 then this value will be cleared.
2444
+ #
2445
+ def setTrack(uint i)
2446
+ end
2447
+ #
2448
+ # Returns the track comment; if no comment is present in the tag String::null will be returned.
2449
+ #
2450
+ def comment()
2451
+ end
2452
+ #
2453
+ # Returns the album name; if no album name is present in the tag String::null will be returned.
2454
+ #
2455
+ def album()
2456
+ end
2457
+ def comment=()
2458
+ end
2459
+ def album=()
2460
+ end
2461
+ #
2462
+ # Sets the album to s. If s is String::null then this value will be cleared.
2463
+ #
2464
+ def setAlbum( s)
2465
+ end
2466
+ end
2467
+ # <b>
2468
+ # An implementation of ID3v2 headers. .</b>
2469
+ #
2470
+ #
2471
+ # This class implements ID3v2 headers. It attempts to follow, both semantically and programatically, the structure specified in the ID3v2 standard. The API is based on the properties of ID3v2 headers specified there. If any of the terms used in this documentation are unclear please check the specification in the linked section. (Structure, 3.1)
2472
+ #
2473
+ class TagLib::ID3v2::Header
2474
+ end
2475
+ # <b>
2476
+ # A factory for creating ID3v2 frames during parsing. .</b>
2477
+ #
2478
+ #
2479
+ # This factory abstracts away the frame creation process and instantiates the appropriate ID3v2::Frame subclasses based on the contents of the data.Reimplementing this factory is the key to adding support for frame types not directly supported by TagLib to your application. To do so you would subclass this factory reimplement createFrame(). Then by setting your factory to be the default factory in ID3v2::Tag constructor or with MPEG::File::setID3v2FrameFactory() you can implement behavior that will allow for new ID3v2::Frame subclasses (also provided by you) to be used.This implements both abstract factory and singleton patterns of which more information is available on the web and in software design textbooks (Notably Design Patters).You do not need to use this factory to create new frames to add to an ID3v2::Tag. You can instantiate frame subclasses directly (with new) and add them to a tag using ID3v2::Tag::addFrame()
2480
+ # ID3v2::Tag::addFrame()
2481
+ #
2482
+ #
2483
+ class TagLib::ID3v2::FrameFactory
2484
+ end
2485
+ end
2486
+ # <b>
2487
+ # An implementation of TrueAudio metadata. .</b>
2488
+ #
2489
+ #
2490
+ # This is implementation of TrueAudio metadata.This supports ID3v1 and ID3v2 tags as well as reading stream properties from the file.
2491
+ #
2492
+ module TagLib::TrueAudio
2493
+ # <b>
2494
+ # An implementation of audio property reading for TrueAudio. .</b>
2495
+ #
2496
+ #
2497
+ # This reads the data from an TrueAudio stream found in the AudioProperties API.
2498
+ #
2499
+ class TagLib::TrueAudio::Properties < TagLib::AudioProperties
2500
+ #
2501
+ # Returns number of bits per sample.
2502
+ #
2503
+ def bitsPerSample()
2504
+ end
2505
+ #
2506
+ # Returns the most appropriate bit rate for the file in kb/s. For constant bitrate formats this is simply the bitrate of the file. For variable bitrate formats this is either the average or nominal bitrate.
2507
+ #
2508
+ def bitrate()
2509
+ end
2510
+ #
2511
+ # Returns the major version number.
2512
+ #
2513
+ def ttaVersion()
2514
+ end
2515
+ #
2516
+ # Returns the sample rate in Hz.
2517
+ #
2518
+ def sampleRate()
2519
+ end
2520
+ #
2521
+ # Returns the number of audio channels.
2522
+ #
2523
+ def channels()
2524
+ end
2525
+ #
2526
+ # Returns the length of the file in seconds.
2527
+ #
2528
+ def length()
2529
+ end
2530
+ end
2531
+ # <b>
2532
+ # An implementation of TagLib::File with TrueAudio specific methods. .</b>
2533
+ #
2534
+ #
2535
+ # This implements and provides an interface for TrueAudio files to the TagLib::Tag and TagLib::AudioProperties interfaces by way of implementing the abstract TagLib::File API as well as providing some additional information specific to TrueAudio files.
2536
+ #
2537
+ class TagLib::TrueAudio::File < TagLib::File
2538
+ def name()
2539
+ end
2540
+ def seek()
2541
+ end
2542
+ def readOnly()
2543
+ end
2544
+ #
2545
+ # Returns the TrueAudio::Properties for this file. If no audio properties were read then this will return a null pointer.
2546
+ #
2547
+ def audioProperties()
2548
+ end
2549
+ def find2()
2550
+ end
2551
+ def clear()
2552
+ end
2553
+ def valid?()
2554
+ end
2555
+ #
2556
+ # Saves the file.
2557
+ #
2558
+ def save()
2559
+ end
2560
+ #
2561
+ # Returns a pointer to the ID3v1 tag of the file.If create is false (the default) this will return a null pointer if there is no valid ID3v1 tag. If create is true it will create an ID3v1 tag if one does not exist. If there is already an APE tag, the new ID3v1 tag will be placed after it.The Tag is still owned by the TrueAudio::File and should not be deleted by the user. It will be deleted when the file (object) is destroyed.
2562
+ #
2563
+ #
2564
+ def ID3v2Tag(bool create = false)
2565
+ end
2566
+ #
2567
+ # Returns the Tag for this file.
2568
+ #
2569
+ def tag()
2570
+ end
2571
+ def isWritable()
2572
+ end
2573
+ def find3()
2574
+ end
2575
+ def read_only?()
2576
+ end
2577
+ def isOpen()
2578
+ end
2579
+ def writable?()
2580
+ end
2581
+ def readBlock()
2582
+ end
2583
+ #
2584
+ # This will remove the tags that match the OR-ed together TagTypes from the file. By default it removes all tags.This will also invalidate pointers to the tags as their memory will be freed. In order to make the removal permanent save() still needs to be called
2585
+ #
2586
+ #
2587
+ def strip(int tags = AllTags)
2588
+ end
2589
+ #
2590
+ # Returns a pointer to the ID3v2 tag of the file.If create is false (the default) this will return a null pointer if there is no valid ID3v2 tag. If create is true it will create an ID3v1 tag if one does not exist. If there is already an APE tag, the new ID3v1 tag will be placed after it.The Tag is still owned by the TrueAudio::File and should not be deleted by the user. It will be deleted when the file (object) is destroyed.
2591
+ #
2592
+ #
2593
+ def ID3v1Tag(bool create = false)
2594
+ end
2595
+ def rfind()
2596
+ end
2597
+ def insert()
2598
+ end
2599
+ def writeBlock()
2600
+ end
2601
+ def tell()
2602
+ end
2603
+ def removeBlock()
2604
+ end
2605
+ def open?()
2606
+ end
2607
+ #
2608
+ # Set the ID3v2::FrameFactory to something other than the default.ID3v2FrameFactory
2609
+ #
2610
+ #
2611
+ def setID3v2FrameFactory( ID3v2::FrameFactory factory)
2612
+ end
2613
+ def length()
2614
+ end
2615
+ def isValid()
2616
+ end
2617
+ def find1()
2618
+ end
2619
+ end
2620
+ end
2621
+ end