| GStreamer Bad Plugins 1.0 Library Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#define GST_BASE_VIDEO_CODEC_SINK_NAME #define GST_BASE_VIDEO_CODEC_SRC_NAME #define GST_BASE_VIDEO_CODEC_SRC_PAD (obj) #define GST_BASE_VIDEO_CODEC_SINK_PAD (obj) #define GST_BASE_VIDEO_CODEC_FLOW_NEED_DATA #define GST_BASE_VIDEO_CODEC_STREAM_LOCK (codec) #define GST_BASE_VIDEO_CODEC_STREAM_UNLOCK (codec) struct GstVideoState; struct GstVideoFrameState; struct GstBaseVideoCodec; struct GstBaseVideoCodecClass; GstVideoFrameState * gst_base_video_codec_new_frame (GstBaseVideoCodec *base_video_codec); void gst_base_video_codec_append_frame (GstBaseVideoCodec *codec,GstVideoFrameState *frame); void gst_base_video_codec_remove_frame (GstBaseVideoCodec *codec,GstVideoFrameState *frame); GType gst_video_frame_state_get_type (void); GstVideoFrameState * gst_video_frame_state_ref (GstVideoFrameState *frame); void gst_video_frame_state_unref (GstVideoFrameState *frame);
#define GST_BASE_VIDEO_CODEC_SINK_NAME "sink"
The name of the templates for the sink pad.
#define GST_BASE_VIDEO_CODEC_SRC_NAME "src"
The name of the templates for the source pad.
#define GST_BASE_VIDEO_CODEC_SRC_PAD(obj) (((GstBaseVideoCodec *) (obj))->srcpad)
Gives the pointer to the source GstPad object of the element.
|
base video codec instance |
#define GST_BASE_VIDEO_CODEC_SINK_PAD(obj) (((GstBaseVideoCodec *) (obj))->sinkpad)
Gives the pointer to the sink GstPad object of the element.
|
base video codec instance |
#define GST_BASE_VIDEO_CODEC_FLOW_NEED_DATA GST_FLOW_CUSTOM_SUCCESS
Returned while parsing to indicate more data is needed.
#define GST_BASE_VIDEO_CODEC_STREAM_LOCK(codec) g_rec_mutex_lock (&GST_BASE_VIDEO_CODEC (codec)->stream_lock)
Obtain a lock to protect the codec function from concurrent access.
|
video codec instance |
Since 0.10.22
#define GST_BASE_VIDEO_CODEC_STREAM_UNLOCK(codec) g_rec_mutex_unlock (&GST_BASE_VIDEO_CODEC (codec)->stream_lock)
Release the lock that protects the codec function from concurrent access.
|
video codec instance |
Since 0.10.22
struct GstVideoState {
GstCaps *caps;
GstVideoFormat format;
int width, height;
int fps_n, fps_d;
int par_n, par_d;
gboolean have_interlaced;
gboolean interlaced;
gboolean top_field_first;
int clean_width, clean_height;
int clean_offset_left, clean_offset_top;
int bytes_per_picture;
GstBuffer *codec_data;
};
Information about compressed video stream. FIXME: Re-use GstVideoInfo for more fields.
GstCaps * |
|
GstVideoFormat |
|
| Width in pixels (including borders) | |
| Height in pixels (including borders) | |
| Numerator of framerate | |
| Denominator of framerate | |
| Numerator of Pixel Aspect Ratio | |
| Denominator of Pixel Aspect Ratio | |
gboolean |
The content of the interlaced field is present and valid |
gboolean |
TRUE if the stream is interlaced |
gboolean |
TRUE if the interlaced frame is top-field-first |
| Useful width of video in pixels (i.e. without borders) | |
| Useful height of video in pixels (i.e. without borders) | |
| Horizontal offset (from the left) of useful region in pixels | |
| Vertical offset (from the top) of useful region in pixels | |
| Size in bytes of each picture | |
GstBuffer * |
Optional Codec Data for the stream |
struct GstVideoFrameState {
GstClockTime decode_timestamp;
GstClockTime presentation_timestamp;
GstClockTime presentation_duration;
gint system_frame_number;
gint decode_frame_number;
gint presentation_frame_number;
int distance_from_sync;
gboolean is_sync_point;
gboolean is_eos;
/* Frames that should not be pushed downstream and are
* not meant for display */
gboolean decode_only;
GstBuffer *sink_buffer;
GstBuffer *src_buffer;
int field_index;
int n_fields;
void *coder_hook;
GDestroyNotify coder_hook_destroy_notify;
GstClockTime deadline;
gboolean force_keyframe;
gboolean force_keyframe_headers;
/* Events that should be pushed downstream *before*
* the next src_buffer */
GList *events;
};
State of a video frame going through the codec
GstClockTime |
Decoding timestamp (aka DTS) |
GstClockTime |
Presentation timestamp (aka PTS) |
GstClockTime |
Duration of frame |
gint |
unique ID attributed when GstVideoFrameState is created |
gint |
Decoded frame number, increases in decoding order |
gint |
Presentation frame number, increases in presentation order. |
| Distance of the frame from a sync point, in number of frames. | |
gboolean |
TRUE if the frame is a synchronization point (like a keyframe) |
gboolean |
TRUE if the frame is the last one of a segment. |
gboolean |
If TRUE, the frame is only meant to be decoded but not pushed downstream |
GstBuffer * |
input buffer |
GstBuffer * |
output buffer |
| Number of fields since beginning of stream | |
| Number of fields present in frame (default 2) | |
Private data called with coder_hook_destroy_notify
|
|
GDestroyNotify |
Called when frame is destroyed |
GstClockTime |
Target clock time for display (running time) |
gboolean |
For encoders, if TRUE a keyframe must be generated |
gboolean |
For encoders, if TRUE new headers must be generated |
GList * |
List of GstEvent that must be pushed before the next src_buffer
|
struct GstBaseVideoCodecClass {
};
The opaque GstBaseVideoCodecClass data structure.
GstVideoFrameState * gst_base_video_codec_new_frame (GstBaseVideoCodec *base_video_codec);
Creates a new GstVideoFrameState for usage in decoders or encoders.
|
a GstBaseVideoCodec |
Returns : |
The new GstVideoFrameState, call
#gst_video_frame_state_unref() when done with it. [transfer full]
|
void gst_base_video_codec_append_frame (GstBaseVideoCodec *codec,GstVideoFrameState *frame);
Appends a frame to the list of frames handled by the codec.
Note: This should normally not be used by implementations.
|
a GstBaseVideoCodec |
|
the GstVideoFrameState to append |
void gst_base_video_codec_remove_frame (GstBaseVideoCodec *codec,GstVideoFrameState *frame);
GstVideoFrameState * gst_video_frame_state_ref (GstVideoFrameState *frame);
Increases the refcount of the given frame by one.
|
a GstVideoFrameState |
Returns : |
buf |
void gst_video_frame_state_unref (GstVideoFrameState *frame);
Decreases the refcount of the frame. If the refcount reaches 0, the frame will be freed.
|
a GstVideoFrameState |