BVB Source Codes

cmus Show id3.h Source code

Return Download cmus: download id3.h Source code - Download cmus Source code - Type:.h
  1. /*
  2.  * Copyright 2008-2013 Various Authors
  3.  * Copyright 2005 Timo Hirvonen
  4.  *
  5.  * This program is free software; you can redistribute it and/or
  6.  * modify it under the terms of the GNU General Public License as
  7.  * published by the Free Software Foundation; either version 2 of the
  8.  * License, or (at your option) any later version.
  9.  *
  10.  * This program is distributed in the hope that it will be useful, but
  11.  * WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.  * General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU General Public License
  16.  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  17.  */
  18.  
  19. #ifndef CMUS_ID3_H
  20. #define CMUS_ID3_H
  21.  
  22. #include <stdint.h>
  23.  
  24. /* flags for id3_read_tags */
  25. #define ID3_V1  (1 << 0)
  26. #define ID3_V2  (1 << 1)
  27.  
  28. enum id3_key {
  29.         ID3_ARTIST,
  30.         ID3_ALBUM,
  31.         ID3_TITLE,
  32.         ID3_DATE,
  33.         ID3_ORIGINALDATE,
  34.         ID3_GENRE,
  35.         ID3_DISC,
  36.         ID3_TRACK,
  37.         ID3_ALBUMARTIST,
  38.         ID3_ARTISTSORT,
  39.         ID3_ALBUMARTISTSORT,
  40.         ID3_ALBUMSORT,
  41.         ID3_COMPILATION,
  42.         ID3_RG_TRACK_GAIN,
  43.         ID3_RG_TRACK_PEAK,
  44.         ID3_RG_ALBUM_GAIN,
  45.         ID3_RG_ALBUM_PEAK,
  46.         ID3_COMPOSER,
  47.         ID3_CONDUCTOR,
  48.         ID3_LYRICIST,
  49.         ID3_REMIXER,
  50.         ID3_LABEL,
  51.         ID3_PUBLISHER,
  52.         ID3_SUBTITLE,
  53.         ID3_COMMENT,
  54.         ID3_MUSICBRAINZ_TRACKID,
  55.         ID3_MEDIA,
  56.         ID3_BPM,
  57.  
  58.         NUM_ID3_KEYS
  59. };
  60.  
  61. struct id3tag {
  62.         char v1[128];
  63.         char *v2[NUM_ID3_KEYS];
  64.  
  65.         unsigned int has_v1 : 1;
  66.         unsigned int has_v2 : 1;
  67. };
  68.  
  69. extern const char * const id3_key_names[NUM_ID3_KEYS];
  70.  
  71. int id3_tag_size(const char *buf, int buf_size);
  72.  
  73. void id3_init(struct id3tag *id3);
  74. void id3_free(struct id3tag *id3);
  75.  
  76. int id3_read_tags(struct id3tag *id3, int fd, unsigned int flags);
  77. char *id3_get_comment(struct id3tag *id3, enum id3_key key);
  78.  
  79. char const *id3_get_genre(uint16_t id);
  80.  
  81. #endif
  82.  
downloadid3.h Source code - Download cmus Source code
Related Source Codes/Software:
Ink - An HTML5/CSS3 framework used at SAPO for fast and ... 2017-04-22
memory-stats.js - minimal monitor for JS Heap Size via performance.m... 2017-04-22
LayoutKit - LayoutKit is a fast view layout library for iOS, m... 2017-04-22
Cpp-Primer - C++ Primer 5 answer 2017-04-22
RBBAnimation - Block-based animations made easy, comes with easin... 2017-04-22
phpDocumentor2 - Documentation Generator for PHP ... 2017-04-22
flexboxfroggy - A game for learning CSS flexbox ... 2017-04-22
wicked - Use wicked to turn your controller into a wizard ... 2017-04-22
Begin-Latex-in-minutes - Brief Intro to LaTeX for beginners that helps you ... 2017-04-22
guard-livereload - Guard::LiveReload automatically reload your browse... 2017-04-22
swifter - Tiny http server engine written in Swift programmi... 2017-04-29
Chartbuilder - A front-end charting application that facilitates ... 2017-04-29
offline-first - 2017-04-29
plotly.py - An interactive, browser-based graphing library for... 2017-04-29
statsmodels - Statsmodels: statistical modeling and econometrics... 2017-04-29
android-maps-utils - Handy extensions to the Google Maps Android API. 2017-04-29
enyo - A JavaScript application framework emphasizing mod... 2017-04-29
darkforestGo - DarkForest, the Facebook Go engine. 2017-04-29
erpnext - ERP made Simple http://erpn... 2017-04-29
SwiftInFlux - An attempt to gather all that is in flux in Swift. 2017-04-29

 Back to top