参考:
Media Types and Properties
https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/media-types.html?gi-language=c#list-of-defined-types
概述:
GStreamer是一个数据处理管线,因此各个element需要互相知晓peer传递给自己数据的类型,这个过程通常发生在pad negotiation阶段。因此要求peer互相只有有一套公认的数据类型集合。GStreamer已经提供了一套尽可能详细的数据类型表,这个表里的数据类型能覆盖目前近乎所有的应用场景。因此我们在进行pad注册并指定pad数据类型的时候可以参考这个表。
如果想要添加自己的媒体数据类型:
如果想要添加自定义的类型,那么需要保证这个类型能够被所使用的所有element认识,如果pipeline里使用了开源公共的element,那么自定义的类型是无法使用的,除非你在开源社区里公布自己的数据类型并说服所有开源element开发者都认可你的数据类型并修改他们自己的element代码以匹配你的数据类型。
表:
Table of Audio Types
Table of Audio Types
Media Type | Description |
---|
All audio types. |
audio/* | All audio types |
channels | integer |
channel-mask | bitmask |
format | string |
layout | string |
All raw audio types. |
audio/x-raw | Unstructured and uncompressed raw audio data. |
All encoded audio types. |
audio/x-ac3 | AC-3 or A52 audio streams. |
audio/x-adpcm | ADPCM Audio streams. |
block_align | integer |
audio/x-cinepak | Audio as provided in a Cinepak (Quicktime) stream. |
audio/x-dv | Audio as provided in a Digital Video stream. |
audio/x-flac | Free Lossless Audio codec (FLAC). |
audio/x-gsm | Data encoded by the GSM codec. |
audio/x-alaw | A-Law Audio. |
audio/x-mulaw | Mu-Law Audio. |
audio/x-mace | MACE Audio (used in Quicktime). |
audio/mpeg | Audio data compressed using the MPEG audio encoding scheme. |
framed | boolean |
layer | integer |
bitrate | integer |
audio/x-qdm2 | Data encoded by the QDM version 2 codec. |
audio/x-pn-realaudio | Realmedia Audio data. |
audio/x-speex | Data encoded by the Speex audio codec |
audio/x-vorbis | Vorbis audio data |
audio/x-wma | Windows Media Audio |
audio/x-paris | Ensoniq PARIS audio |
audio/x-svx | Amiga IFF / SVX8 / SV16 audio |
audio/x-nist | Sphere NIST audio |
audio/x-voc | Sound Blaster VOC audio |
audio/x-ircam | Berkeley/IRCAM/CARL audio |
audio/x-w64 | Sonic Foundry's 64 bit RIFF/WAV |
Table of Video Types
Table of Video Types
Media Type | Description |
---|
All video types. |
video/* | All video types |
height | integer |
framerate | fraction |
max-framerate | fraction |
views | integer |
interlace-mode | string |
chroma-site | string |
colorimetry | string |
pixel-aspect-ratio | fraction |
format | string |
All raw video types. |
video/x-raw | Unstructured and uncompressed raw video data. |
All encoded video types. |
video/x-3ivx | 3ivx video. |
video/x-divx | DivX video. |
video/x-dv | Digital Video. |
video/x-ffv | FFMpeg video. |
video/x-h263 | H-263 video. |
h263version | string |
video/x-h264 | H-264 video. |
video/x-huffyuv | Huffyuv video. |
video/x-indeo | Indeo video. |
video/x-intel-h263 | H-263 video. |
video/x-jpeg | Motion-JPEG video. |
video/mpeg | MPEG video. |
systemstream | boolean |
video/x-msmpeg | Microsoft MPEG-4 video deviations. |
video/x-msvideocodec | Microsoft Video 1 (oldish codec). |
video/x-pn-realvideo | Realmedia video. |
video/x-rle | RLE animation format. |
depth | integer |
palette_data | GstBuffer |
video/x-svq | Sorensen Video. |
video/x-tarkin | Tarkin video. |
video/x-theora | Theora video. |
video/x-vp3 | VP-3 video. |
video/x-wmv | Windows Media Video |
video/x-xvid | XviD video. |
All image types. |
image/gif | Graphics Interchange Format. |
image/jpeg | Joint Picture Expert Group Image. |
image/png | Portable Network Graphics Image. |
image/tiff | Tagged Image File Format. |
Table of Container Types
Table of Container Types
Media Type | Description |
---|
video/x-ms-asf | Advanced Streaming Format (ASF). |
video/x-msvideo | AVI. |
video/x-dv | Digital Video. |
video/x-matroska | Matroska. |
video/mpeg | Motion Pictures Expert Group System Stream. |
application/ogg | Ogg. |
video/quicktime | Quicktime. |
application/vnd.rn-realmedia | RealMedia. |
audio/x-wav | WAV. |