src/app/transcode/fwinfo.cpp
void FWSrcInfo::initInternal(Transcode* module)
{
    BOOST_ASSERT(module);

    IFactory* factory = module->getFactory();
    IMessageFactory* msgfactory = factory->getMessageFactory();
    IMessagePtr req = msgfactory->getMessage(msg::id::IEEE1394START);
    BOOST_ASSERT(req);
    req->setData(msg::key::MODINFOUUID, getUUID());
    IMessagePtr res;
    module->sendSyncMessage(req, res);
    BOOST_ASSERT(res);
    if (res->getValue(msg::key::STATUS) != msg::key::OK)
    {
        // net module reject it
        throw Exception(__FILE__, __LINE__,
                        "IEEE1394 module rejected request. Name: %s, UUID: '%s'",
                        getName().c_str(),
                        getUUID().c_str());
    }

    // set the module instance for future cleanup
    m_module = module;

    /*
      port                : Port number (-1 automatic)
                        flags: readable, writable
                        Integer. Range: -1 - 16 Default: -1 Current: -1
     */
    int port = boost::lexical_cast<int>(res->getValue(msg::key::IEEE1394PORT));

    initElement("dv1394src", module->getFactory());
    g_object_set(G_OBJECT (m_element), "port", port, NULL);
}
// Inits IEEE1394 element assosiated with the source
// Typical usage is the following
// gst-launch dv1394src ! queue ! decodebin name=d ffmux_flv name=mux !
// tcpclientsink host=127.0.0.1 port=20000 d.  ! ffmpegcolorspace !
// "video/x-raw-yuv",format=\(fourcc\)I420 ! deinterlace ! videoscale !
// "video/x-raw-yuv",width=320,height=240 ! ffenc_flv bitrate=600000 ! mux.
// d. ! queue ! audioconvert ! audioresample ! audio/x-raw-int,rate=44100 !
// ffenc_libmp3lame bitrate=64000 ! mp3parse ! mux.
Inits IEEE1394 element assosiated with the source
Typical usage is the following
gst-launch dv1394src . queue . decodebin name=d ffmux_flv name=mux .
Inits IEEE1394 element assosiated with the source Typical usage is the following gst - launch dv1394src . queue . decodebin name = d ffmux_flv name = mux .
void FWSrcInfo::initInternal(Transcode* module)
{
    BOOST_ASSERT(module);
    IFactory* factory = module->getFactory();
    IMessageFactory* msgfactory = factory->getMessageFactory();
    IMessagePtr req = msgfactory->getMessage(msg::id::IEEE1394START);
    BOOST_ASSERT(req);
    req->setData(msg::key::MODINFOUUID, getUUID());
    IMessagePtr res;
    module->sendSyncMessage(req, res);
    BOOST_ASSERT(res);
    if (res->getValue(msg::key::STATUS) != msg::key::OK)
    {
        throw Exception(__FILE__, __LINE__,
                        "IEEE1394 module rejected request. Name: %s, UUID: '%s'",
                        getName().c_str(),
                        getUUID().c_str());
    }
    m_module = module;
    int port = boost::lexical_cast<int>(res->getValue(msg::key::IEEE1394PORT));
    initElement("dv1394src", module->getFactory());
    g_object_set(G_OBJECT (m_element), "port", port, NULL);
}
void FWSrcInfo :: initInternal ( Transcode * module ) { BOOST_ASSERT ( module ) ; IFactory * factory = module -> getFactory ( ) ; IMessageFactory * msgfactory = factory -> getMessageFactory ( ) ; IMessagePtr req = msgfactory -> getMessage ( msg :: id :: IEEE1394START ) ; BOOST_ASSERT ( req ) ; req -> setData ( msg :: key :: MODINFOUUID , getUUID ( ) ) ; IMessagePtr res ; module -> sendSyncMessage ( req , res ) ; BOOST_ASSERT ( res ) ; if ( res -> getValue ( msg :: key :: STATUS ) != msg :: key :: OK ) { throw Exception ( __FILE__ , __LINE__ , " " , getName ( ) . c_str ( ) , getUUID ( ) . c_str ( ) ) ; } m_module = module ; int port = boost :: lexical_cast < int > ( res -> getValue ( msg :: key :: IEEE1394PORT ) ) ; initElement ( " " , module -> getFactory ( ) ) ; g_object_set ( G_OBJECT ( m_element ) , " " , port , NULL ) ; }
Inits IEEE1394 element assosiated with the source
Typical usage is the following
gst-launch dv1394src !
Inits IEEE1394 element assosiated with the source Typical usage is the following gst - launch dv1394src !
// net module reject it // set the module instance for future cleanup /*
      port                : Port number (-1 automatic)
                        flags: readable, writable
                        Integer. Range: -1 - 16 Default: -1 Current: -1
     */