Original address:
blog.csdn.net/android_lee/article/details/6789272
Own a little add:
Playbin2 has two properties: Audio-sink and Video-sink. The application only needs to instantiate the appropriate element and pass these two attributes to playbin2.
1. Directory structuregstreamer-0.10.21 DirectoryGST core file for functions such as GST component factoryComponents provided by the plugins gstreamer-0.10.21Lib cannot be applied to the calling component
Prerequisite Description: When doing the GStreamer project, it is necessary to actively send the data collected from the device to the server.This allows you to proactively send data to the specified server using the Tcpclientsink and Udpsink plugins.Tcpclientsink usageNote: If you want to proactively send data to the server, you can transfer it via the Tcpclientsink plugin.The specific code is as followsData-client:Send to Linux:0 - - - 5 4000000
Download GStreamer 1.3.2 in http://gstreamer.freedesktop.org/src/Enter the extracted directoryExecute chmod 777 Configure get read and Write permissionsExecution./configureMakeMake installThe library processing method may be missing during the installation process:Bison:apt-get Install BisonFlex:apt-get Install FlexGlib-2.0:apt-get Install Libglibmm-2.4-devIf you are running gst-launch-1.0, you are not prompted to find libstreamer-1.0.so.0You need to
Padactivation mechanism of gstreamer(translated by part-activation.txt)
ActivateWhen the status changes, pipeline sets the status of its elements in the order of sink-> source. When elements change from ready-> paused state, their pads are activated to prepare for processing data streams, and some pads start to drive data streams.An element activates its pad in the order of source pad-> sink pad, which ensures that when the sink pad is activated and
,\
(Gtypeflags) 0 );\
Additional_initializations (_ type );\
G_once_init_leave ( gonce_data, (gsize) _ type );\
}\
Return (gtype) gonce_data ;\
}
You may have noticed the function "maid". The implementation of this function can be found in the gstutils. c file,
The excerpt code is as follows:
--------------------------------------------------------------------------
.................
Gtypeinfo Info;
Info. class_size = class_size;Info. base_init = base_init;Info. base_finalize = base_finalize;I
Share and memo.
When using the gstreamer architecture for media development, GST-inspect and GST-launch are two very useful gadgets. The former is used to query all the elements in the library and their details, the latter is used to quickly build a pipeline. This command is the best, because you can feel the pleasure of playing with just one sentence. Let's just look at the example:
1 GST-inspect usage:
First enter the command line, and then type:
GS
By constructing different gstreamer pipelines, you can capture thumbnails in video files in multiple ways. The following is a brief introduction.
1. Get the image from gdkpixbufsinkThis method uses gdkpixbufsink's "last-pixbuf" to obtain the pixbuf of the image.
descr = g_strdup_printf ("uridecodebin uri=%s ! ffmpegcolorspace ! videoscale ! gdkpixbufsink name=sink", fileurl); pipeline = gst_parse_launch (descr, error); if (error
In the previous two articles, how to inject data and automatically probe data types and decode using APPSRC, but the sink section only enforces the use of alsasink to output sounds. For scenes that output both sound and images at the same time, GStreamer provides a playsink component for automatically selecting the appropriate video and audio sink. The Playsink is also a playbin back-end component, as the following code implements the Playsink config
Author: carlsonlee (carlsonlee.freec@hotmail.com), part of freecamera, freecamera source code exists: http://gitorious.org/freecamera
# Include # Include # Include # Include # Include # Include # Include # Include # Include # Include
# Include "cam_
# Pipeline translation of the ststpipeline File
Gstpipeline------------------------------Gstpipeline is a top-level bin that provides a clock for all sub-elements.Gstpipeline also provides a top-level gstbus.Gstpipeline calculates running_time
When gstpipeline is converted from paused to playing, it selects a clock and calculates the basetime. These two items are assigned to each element in the pipeline. How is this basetime calculated every time?
It turns out that this basetime is the
Let's look at this function: maid
Code: select all
gintgst_rtp_buffer_compare_seqnum (guint16 seqnum1, guint16 seqnum2){ return (gint16) (seqnum2 - seqnum1);}
A simple code can be used to determine whether seqnum1 and seqnum2 have
1. There are several ways to get the duration: (1) Listening to the stst_message_duration on the bus. If the message arrives, you can use the stst_message_parse_duration command. However, the element usually does not send such a message. (2) create
Want an element like xvimagesink/ximagesink to draw video in the window we specified? Simple:1. A new gtkdrawingarea2. connect its expose-event signal, e. g:// Drawing on our drawing AreaG_signal_connect (g_object (area), "expose-Event", g_callback (
First, Process brief:1, the first involves the plug-in type Textoverlay, the plug-in will detect whether the streaming media contains subtitles, if there is a subtitle will be called Pango and Cairo Library, the subtitle string into a picture,
Pre-roll translation from Part-preroll.txt
Pre-roll (Preroll)
-----------------
A sink element is only able to complete changes to the paused state when a buffer is buffered into the sink pad, and this process is called pre-roll (Preroll), so as
Ximagesink: XWindow output is supported.
Xvimagesink: xvideo extension output is supported only when a large number of libraries are installed in Ubuntu.
Sdlvideosink: The SDL Library output must be installed.
Dfbvideosink: Output Using the
Prerolling translation self-part-preroll.txt
Pre-rolling (preroll)-----------------A sink element can change the paused State only when a buffer is buffered into the sink pad. This process is called preroll ), in this way, you can enter the
Author: carlsonlee (carlsonlee.freec@hotmail.com), part of freecamera, freecamera source code exists: http://gitorious.org/freecamera
# Include # Include # Include # Include # Include # Include # Include # Include # Include # Include
# Include "cam_
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.