Commit graph

6 commits

Author SHA1 Message Date
Joan Pau Beltran
3355f5b3ab dc1394src: prefix and file names according to Gstreamer conventions
Replace the type and function prefix to follow the conventions:

  - Use `GST_TYPE_DC1394_SRC` instead of `GST_TYPE_DC1394`.

  - Use `GstDC1394Src` and `GstDC1394SrcClass` instead of
    `GstDc1394` and `GstDc1394Class`.

  - Use `gst_dc1394_src` instead of `gst_dc1394`.

https://bugzilla.gnome.org/show_bug.cgi?id=763026
2016-06-09 21:47:58 +01:00
Joan Pau Beltran
e28b123608 dc1394src: port to 1.X
The dc1394src is a PushSrc element for IIDC cameras based on libdc1394.
The implementation from the 0.x series is deffective:
caps negotiation does not work, and some video formats
provided by the camera are not supported.

Refactor the code to port it to 1.X and enhance the support
for the full set of video options of IIDC cameras:

  - The IIDC specification includes a set of camera video modes
    (video format, frame size, and frame rates).
    They do not map perfectly to Gstreamer formats, but those that
    do not match are very rare (if used at all by any camera).
    In addition, although the specification includes a raw format,
    some cameras use mono video formats to capture in Bayer format.
    Map corresponding video modes to Gstreamer formats in capabilities,
    allowing both gray raw and Bayer video formats for mono video modes.

  - The specification includes scalable video modes (Format7),
    where the frame size and rate can be set to arbitrary values
    (within the limits of the camera and the bus transport).
    Allow the use of such mode, using the frame size and rate
    from the negotiatied caps, and set the camera frame rate
    adjusting the packet size as in:
    <http://damien.douxchamps.net/ieee1394/libdc1394/faq/#How_do_I_set_the_frame_rate>

    The scalable modes also allow for a custom ROI offset.
    Support for it can be easily added later using properties.

  - Camera operation using libdc1394 is as follows:

      1. Enumerate cameras on the system and open the camera
         identified the enumeration index or by a GUID (64bit hex code).

      2. Query the video formats supported by the camera.

      3. Configure the camera for the desired video format.

      4. Setup the capture resources for the configured video format
         and start the camera transmission.

      5. Capture frames from the camera and release them when not used.

      6. Stop the camera transmission and clear the capture resources.

      7. Close the camera freeing its resources.

    Do steps 2 and 3 when getting and setting the caps respectively.
    Ideally 4 and 6 would be done when going from PAUSED to PLAYING
    and viceversa, but since caps might not be set yet, the video mode
    is not properly configured leaving the camera in a broken state.
    Hence, setup capture and start transmission in the set caps method,
    and consequently clear the capture and stop the transmission
    when going from PAUSED to READY (instead of PLAYING to PAUSED).
    Symmetrycally, open the camera when going from READY to PAUSED,
    allowing to probe the camera caps in the negotiation stage.
    Implement that using the `start` and `stop` methods of `GstBaseSrc`,
    instead of the `change-state` method of `GstElement`.
    Stop the camera before setting new caps and restarting it again
    to handle caps reconfiguration while in PLAYING (it has no effect
    if the camera is not started).

  - Create buffers copying the bytes of the captured frames.
    Alternatively, the buffers could just wrap the bytes of the frames,
    releasing the frame in the buffer's destroy notify function,
    if all buffers were destroyed before going from PLAYING to PAUSED.

  - No timestamp nor offset is set when creating buffers.
    Timestamping is delegated to the parent class BaseSrc,
    setting `gst_base_src_set_live` TRUE, `gst_base_src_set_format`
    with GST_FORMAT_TIME and `gst_base_src_set_do_timestamp`.
    Captured frames have a timestamp field with the system time
    at the completion of the transmission of the frame,
    but it is not sure that this comes from a monotonic clock,
    and it seems to be left NULL in Windows.

  - Use GUID and unit properties to select the camera to operate on.
    The camera number used in version 0.X does not uniquely identify
    the device (it depends on the set of cameras currently detected).
    Since the GUID is 64bit identifier (same as MAC address),
    handle it with a string property with its hexadecimal representation.
    For practicality, operate on the first camera available if the GUID
    is null (default) and match any camera unit number if unit is -1.
    Alternatively, the GUID could be handed with an unsigned 64 bit
    integer type property, using `0xffffffffffffffff` as default value
    to select the first camera available (it is not a valid GUID value).

  - Keep name `GstDc1394` and prefix `gst_dc1394` as in version 0.X,
    although `GstDC1394Src` and `gst_dc1394_src` are more descriptive.

  - Adjust build files to reenable the compilation of the plugin.

    Remove dc1394 from the list of unported plugins in configure.ac.

    Add the missing flags and libraries to Makefile.
    Use `$()` for variable substitution, as many plugins do,
    although other plugins use `@@` instead.

https://bugzilla.gnome.org/show_bug.cgi?id=763026
2016-06-09 21:47:58 +01:00
Sebastian Dröge
e51cd4fe2f gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
David Schleef
a8f047f689 Remove setting of plugindir from Makefiles 2011-04-01 13:54:02 -07:00
Stefan Kost
a14e8e07df Don't install static libs for plugins. Fixes #550851 for -bad.
Original commit message from CVS:
* ext/alsaspdif/Makefile.am:
* ext/amrwb/Makefile.am:
* ext/apexsink/Makefile.am:
* ext/arts/Makefile.am:
* ext/artsd/Makefile.am:
* ext/audiofile/Makefile.am:
* ext/audioresample/Makefile.am:
* ext/bz2/Makefile.am:
* ext/cdaudio/Makefile.am:
* ext/celt/Makefile.am:
* ext/dc1394/Makefile.am:
* ext/dirac/Makefile.am:
* ext/directfb/Makefile.am:
* ext/divx/Makefile.am:
* ext/dts/Makefile.am:
* ext/faac/Makefile.am:
* ext/faad/Makefile.am:
* ext/gsm/Makefile.am:
* ext/hermes/Makefile.am:
* ext/ivorbis/Makefile.am:
* ext/jack/Makefile.am:
* ext/jp2k/Makefile.am:
* ext/ladspa/Makefile.am:
* ext/lcs/Makefile.am:
* ext/libfame/Makefile.am:
* ext/libmms/Makefile.am:
* ext/metadata/Makefile.am:
* ext/mpeg2enc/Makefile.am:
* ext/mplex/Makefile.am:
* ext/musepack/Makefile.am:
* ext/musicbrainz/Makefile.am:
* ext/mythtv/Makefile.am:
* ext/nas/Makefile.am:
* ext/neon/Makefile.am:
* ext/ofa/Makefile.am:
* ext/polyp/Makefile.am:
* ext/resindvd/Makefile.am:
* ext/sdl/Makefile.am:
* ext/shout/Makefile.am:
* ext/snapshot/Makefile.am:
* ext/sndfile/Makefile.am:
* ext/soundtouch/Makefile.am:
* ext/spc/Makefile.am:
* ext/swfdec/Makefile.am:
* ext/tarkin/Makefile.am:
* ext/theora/Makefile.am:
* ext/timidity/Makefile.am:
* ext/twolame/Makefile.am:
* ext/x264/Makefile.am:
* ext/xine/Makefile.am:
* ext/xvid/Makefile.am:
* gst-libs/gst/app/Makefile.am:
* gst-libs/gst/dshow/Makefile.am:
* gst/aiffparse/Makefile.am:
* gst/app/Makefile.am:
* gst/audiobuffer/Makefile.am:
* gst/bayer/Makefile.am:
* gst/cdxaparse/Makefile.am:
* gst/chart/Makefile.am:
* gst/colorspace/Makefile.am:
* gst/dccp/Makefile.am:
* gst/deinterlace/Makefile.am:
* gst/deinterlace2/Makefile.am:
* gst/dvdspu/Makefile.am:
* gst/festival/Makefile.am:
* gst/filter/Makefile.am:
* gst/flacparse/Makefile.am:
* gst/flv/Makefile.am:
* gst/games/Makefile.am:
* gst/h264parse/Makefile.am:
* gst/librfb/Makefile.am:
* gst/mixmatrix/Makefile.am:
* gst/modplug/Makefile.am:
* gst/mpeg1sys/Makefile.am:
* gst/mpeg4videoparse/Makefile.am:
* gst/mpegdemux/Makefile.am:
* gst/mpegtsmux/Makefile.am:
* gst/mpegvideoparse/Makefile.am:
* gst/mve/Makefile.am:
* gst/nsf/Makefile.am:
* gst/nuvdemux/Makefile.am:
* gst/overlay/Makefile.am:
* gst/passthrough/Makefile.am:
* gst/pcapparse/Makefile.am:
* gst/playondemand/Makefile.am:
* gst/rawparse/Makefile.am:
* gst/real/Makefile.am:
* gst/rtjpeg/Makefile.am:
* gst/rtpmanager/Makefile.am:
* gst/scaletempo/Makefile.am:
* gst/sdp/Makefile.am:
* gst/selector/Makefile.am:
* gst/smooth/Makefile.am:
* gst/smoothwave/Makefile.am:
* gst/speed/Makefile.am:
* gst/speexresample/Makefile.am:
* gst/stereo/Makefile.am:
* gst/subenc/Makefile.am:
* gst/tta/Makefile.am:
* gst/vbidec/Makefile.am:
* gst/videodrop/Makefile.am:
* gst/videosignal/Makefile.am:
* gst/virtualdub/Makefile.am:
* gst/vmnc/Makefile.am:
* gst/y4m/Makefile.am:
* sys/acmenc/Makefile.am:
* sys/cdrom/Makefile.am:
* sys/dshowdecwrapper/Makefile.am:
* sys/dshowsrcwrapper/Makefile.am:
* sys/dvb/Makefile.am:
* sys/dxr3/Makefile.am:
* sys/fbdev/Makefile.am:
* sys/oss4/Makefile.am:
* sys/qcam/Makefile.am:
* sys/qtwrapper/Makefile.am:
* sys/vcd/Makefile.am:
* sys/wininet/Makefile.am:
* win32/common/config.h:
Don't install static libs for plugins. Fixes #550851 for -bad.
2008-11-04 12:42:30 +00:00
Eric Jonas
96a1ebf963 Commit new dc1394src element.
Original commit message from CVS:
* configure.ac:
* ext/Makefile.am:
* ext/dc1394/Makefile.am:
* ext/dc1394/gstdc1394.c: (gst_dc1394_base_init),
(gst_dc1394_class_init), (gst_dc1394_init),
(gst_dc1394_src_fixate), (gst_dc1394_set_property),
(gst_dc1394_get_property), (gst_dc1394_getcaps),
(gst_dc1394_setcaps), (gst_dc1394_get_times), (gst_dc1394_create),
(gst_dc1394_parse_caps), (gst_dc1394_change_state),
(gst_dc1394_caps_set_format_vmode_caps),
(gst_dc1394_set_caps_color), (gst_dc1394_set_caps_framesize),
(gst_dc1394_set_caps_framesize_range),
(gst_dc1394_caps_set_framerate_list),
(gst_dc1394_framerate_const_to_frac),
(gst_dc1394_get_all_dc1394_caps), (gst_dc1394_get_cam_caps),
(gst_dc1394_framerate_frac_to_const),
(gst_dc1394_open_cam_with_best_caps),
(gst_dc1394_change_camera_transmission), (plugin_init):
* ext/dc1394/gstdc1394.h:
Commit new dc1394src element.
Patch By: Eric Jonas < jonas at mit dot edu >
Close: #387251
2007-06-29 13:03:27 +00:00