Top | ![]() |
![]() |
![]() |
![]() |
A collection of objects and methods to assist with handling Ancillary Data present in Vertical Blanking Interval as well as Closed Caption.
#define GST_VIDEO_ANCILLARY_DID16(anc) ((guint16)((anc)->DID) << 8 | (guint16)((anc)->SDID_block_number))
Returns the GstVideoAncillaryDID16 of the ancillary data.
Since: 1.16
GstVideoVBIParser * gst_video_vbi_parser_new (GstVideoFormat format
,guint32 pixel_width
);
Create a new GstVideoVBIParser for the specified format
and pixel_width
.
Since: 1.16
void
gst_video_vbi_parser_free (GstVideoVBIParser *parser
);
Frees the parser
.
Since: 1.16
void gst_video_vbi_parser_add_line (GstVideoVBIParser *parser
,const guint8 *data
);
Provide a new line of data to the parser
. Call gst_video_vbi_parser_get_ancillary()
to get the Ancillary data that might be present on that line.
Since: 1.16
GstVideoVBIParserResult gst_video_vbi_parser_get_ancillary (GstVideoVBIParser *parser
,GstVideoAncillary *anc
);
Parse the line provided previously by gst_video_vbi_parser_add_line()
.
parser |
||
anc |
a GstVideoAncillary to start the eventual ancillary data. |
[out caller-allocates] |
GST_VIDEO_VBI_PARSER_RESULT_OK
if ancillary data was found and
anc
was filled. GST_VIDEO_VBI_PARSER_RESULT_DONE
if there wasn't any
data.
Since: 1.16
GstVideoVBIParser *
gst_video_vbi_parser_copy (const GstVideoVBIParser *parser
);
GstVideoVBIEncoder * gst_video_vbi_encoder_new (GstVideoFormat format
,guint32 pixel_width
);
Create a new GstVideoVBIEncoder for the specified format
and pixel_width
.
Since: 1.16
void
gst_video_vbi_encoder_free (GstVideoVBIEncoder *encoder
);
Frees the encoder
.
Since: 1.16
gboolean gst_video_vbi_encoder_add_ancillary (GstVideoVBIEncoder *encoder
,gboolean composite
,guint8 DID
,guint8 SDID_block_number
,const guint8 *data
,guint data_count
);
Stores Video Ancillary data, according to SMPTE-291M specification.
Note that the contents of the data are always read as 8bit data (i.e. do not contain the parity check bits).
encoder |
||
composite |
|
|
DID |
The Data Identifier |
|
SDID_block_number |
The Secondary Data Identifier (if type 2) or the Data Block Number (if type 1) |
|
data_count |
The amount of data (in bytes) in |
|
data |
The user data content of the Ancillary packet. Does not contain the ADF, DID, SDID nor CS. |
[array length=data_count] |
Since: 1.16
void gst_video_vbi_encoder_write_line (GstVideoVBIEncoder *encoder
,guint8 *data
);
GstVideoVBIEncoder *
gst_video_vbi_encoder_copy (const GstVideoVBIEncoder *encoder
);
#define gst_buffer_get_video_caption_meta(b)
Gets the GstVideoCaptionMeta that might be present on b
.
Since: 1.16
GstVideoCaptionMeta * gst_buffer_add_video_caption_meta (GstBuffer *buffer
,GstVideoCaptionType caption_type
,const guint8 *data
,gsize size
);
Attaches GstVideoCaptionMeta metadata to buffer
with the given
parameters.
buffer |
a GstBuffer |
|
caption_type |
The type of Closed Caption to add |
|
data |
The Closed Caption data. |
[array length=size][transfer none] |
size |
The size of |
Since: 1.16
GstVideoCaptionType
gst_video_caption_type_from_caps (const GstCaps *caps
);
Parses fixed Closed Caption GstCaps and returns the corresponding caption
type, or GST_VIDEO_CAPTION_TYPE_UNKNOWN
.
Since: 1.16
GstCaps *
gst_video_caption_type_to_caps (GstVideoCaptionType type
);
Creates new caps corresponding to type
.
Since: 1.16
struct GstVideoAncillary { guint8 DID; guint8 SDID_block_number; guint8 data_count; guint8 data[256]; };
Video Ancillary data, according to SMPTE-291M specification.
Note that the contents of the data are always stored as 8bit data (i.e. do not contain the parity check bits).
The Data Identifier |
||
The Secondary Data Identifier (if type 2) or the Data Block Number (if type 1) |
||
The amount of data (in bytes) in |
||
The user data content of the Ancillary packet. Does not contain the ADF, DID, SDID nor CS. |
[array length=data_count] |
Since: 1.16
typedef struct _GstVideoVBIParser GstVideoVBIParser;
A parser for detecting and extracting GstVideoAncillary
data from
Vertical Blanking Interval lines of component signals.
Since: 1.16
Return values for GstVideoVBIParser
No line were provided, or no more Ancillary data was found. |
||
A GstVideoAncillary was found. |
||
An error occured |
Since: 1.16
typedef struct _GstVideoVBIEncoder GstVideoVBIEncoder;
An encoder for writing ancillary data to the Vertical Blanking Interval lines of component signals.
Since: 1.16
The various known types of Closed Caption (CC).
Unknown type of CC |
||
CEA-608 as byte pairs. Note that
this format is not recommended since is does not specify to
which field the caption comes from and therefore assumes
it comes from the first field (and that there is no information
on the second field). Use |
||
CEA-608 as byte triplets as defined in SMPTE S334-1 Annex A. The second and third byte of the byte triplet is the raw CEA608 data, the first byte is a bitfield: The top/7th bit is 0 for the second field, 1 for the first field, bit 6 and 5 are 0 and bits 4 to 0 are a 5 bit unsigned integer that represents the line offset relative to the base-line of the original image format (line 9 for 525-line field 1, line 272 for 525-line field 2, line 5 for 625-line field 1 and line 318 for 625-line field 2). |
||
CEA-708 as cc_data byte triplets. They can also contain 608-in-708 and the first byte of each triplet has to be inspected for detecting the type. |
||
CEA-708 (and optionally CEA-608) in a CDP (Caption Distribution Packet) defined by SMPTE S-334-2. Contains the whole CDP (starting with 0x9669). |
Since: 1.16
typedef struct { GstMeta meta; GstVideoCaptionType caption_type; guint8 *data; gsize size; } GstVideoCaptionMeta;
Extra buffer metadata providing Closed Caption.
parent GstMeta |
||
GstVideoCaptionType |
The type of Closed Caption contained in the meta. |
|
The Closed Caption data. |
[array length=size] | |
The size in bytes of |
Since: 1.16