|
Gnash
0.8.11dev
|
VideoStream ActionScript object. More...
#include <Video.h>
Public Member Functions | |
| Video (as_object *object, const SWF::DefineVideoStreamTag *def, DisplayObject *parent) | |
| ~Video () | |
| virtual bool | pointInShape (std::int32_t x, std::int32_t y) const |
| Return true if the given point falls in this DisplayObject's shape. More... | |
| virtual SWFRect | getBounds () const |
| virtual void | construct (as_object *init=nullptr) |
| Register this video instance as a live DisplayObject. More... | |
| virtual void | display (Renderer &renderer, const Transform &xform) |
| Render the DisplayObject. More... | |
| void | add_invalidated_bounds (InvalidatedRanges &ranges, bool force) |
| Add the DisplayObject's invalidated bounds to the given ranges list. More... | |
| void | setStream (NetStream_as *ns) |
| Set the input stream for this video. More... | |
| void | clear () |
| int | height () const |
| Get the height of the video. More... | |
| int | width () const |
| Get the width of the video. More... | |
| bool | smoothing () const |
| Whether this Video object should request smoothing when scaled. More... | |
| void | setSmoothing (bool b) |
| Set whether smoothing is required. More... | |
Public Member Functions inherited from gnash::DisplayObject | |
| DisplayObject (movie_root &mr, as_object *object, DisplayObject *parent) | |
| Construct a DisplayObject. More... | |
| virtual | ~DisplayObject () |
| virtual as_environment & | get_environment () |
| Return a reference to the variable scope of this DisplayObject. More... | |
| virtual void | visitNonProperties (KeyVisitor &) const |
| Enumerate any non-proper properties. More... | |
| DisplayObject * | parent () const |
| Return the parent of this DisplayObject, or NULL if the DisplayObject has no parent. More... | |
| void | set_parent (DisplayObject *parent) |
| Set the parent of this DisplayObject. More... | |
| virtual MovieClip * | to_movie () |
| int | get_depth () const |
| void | set_depth (int d) |
| int | getVolume () const |
| Get sound volume for this DisplayObject. More... | |
| void | setVolume (int vol) |
| Set sound volume for this DisplayObject. More... | |
| int | getWorldVolume () const |
| Get concatenated sound volume for this DisplayObject. More... | |
| virtual int | getDefinitionVersion () const |
| DisplayObjects can return the version of the SWF they were parsed from. More... | |
| const Transform & | transform () const |
| void | setMatrix (const SWFMatrix &m, bool updateCache=false) |
| Set local transform SWFMatrix for this DisplayObject. More... | |
| void | set_x_scale (double factor) |
| Set the xscale value of current SWFMatrix. More... | |
| void | set_y_scale (double factor) |
| Set the yscale value of current SWFMatrix. More... | |
| void | set_rotation (double rot) |
| Set the rotation value of current SWFMatrix. More... | |
| virtual void | setWidth (double width) |
| Set the width of this DisplayObject, modifying its SWFMatrix. More... | |
| virtual void | setHeight (double height) |
| Set the height of this DisplayObject, modifying its SWFMatrix. More... | |
| void | setCxForm (const SWFCxForm &cx) |
| std::uint16_t | get_ratio () const |
| void | set_ratio (std::uint16_t r) |
| int | get_clip_depth () const |
| void | set_clip_depth (int d) |
| See get_clip_depth() More... | |
| bool | isMaskLayer () const |
| bool | isDynamicMask () const |
| DisplayObject * | getMask () const |
| Return the DisplayObject masking this instance (if any) More... | |
| void | setMask (DisplayObject *mask) |
| void | set_name (const ObjectURI &uri) |
| Set DisplayObject name, initializing the original target member. More... | |
| const ObjectURI & | get_name () const |
| std::unique_ptr< ExecutableCode > | get_event_handler (const event_id &id) const |
| Get the built-in function handlers code for the given event. More... | |
| void | add_event_handler (const event_id &id, const action_buffer &code) |
| Set a built-in function handler for the given event. More... | |
| virtual StaticText * | getStaticText (std::vector< const SWF::TextRecord *> &, size_t &) |
| Search for StaticText objects. More... | |
| bool | pointInBounds (std::int32_t x, std::int32_t y) const |
| Return true if the given point falls in this DisplayObject's bounds. More... | |
| virtual bool | pointInVisibleShape (std::int32_t x, std::int32_t y) const |
| true if the given point falls in this DisplayObject's visible shape More... | |
| virtual Movie * | get_root () const |
| Return the relative root of this DisplayObject. More... | |
| virtual MovieClip * | getAsRoot () |
| Return the _root ActionScript property of this DisplayObject. More... | |
| virtual as_object * | pathElement (const ObjectURI &uri) |
| bool | get_accept_anim_moves () const |
| Return true if PlaceObjects tag are allowed to move this DisplayObject. More... | |
| bool | isDynamic () const |
| Was this DisplayObject dynamically created ? More... | |
| void | setDynamic () |
| Mark this DisplayObject as dynamically created. More... | |
| void | transformedByScript () |
| Call this function when the sprite has been transformed due to ActionScript code. More... | |
| void | set_visible (bool visible) |
| Set whether this DisplayObject should be rendered. More... | |
| bool | visible () const |
| bool | hasEventHandler (const event_id &id) const |
| Return true if an handler for the given event is defined. More... | |
| virtual InteractiveObject * | topmostMouseEntity (std::int32_t, std::int32_t) |
| DisplayObjects are not a mouse entity by default. More... | |
| virtual const DisplayObject * | findDropTarget (std::int32_t x, std::int32_t y, DisplayObject *dragging) const |
| Point coordinates in global twips. More... | |
| bool | invalidated () const |
| Return whether this DisplayObject has been invalidated or not. More... | |
| bool | childInvalidated () const |
| Return whether this DisplayObject has and invalidated child or not. More... | |
| virtual void | update () |
| Notify a change in the DisplayObject's appearance. More... | |
| void | set_invalidated () |
| This function marks the DisplayObject as being modified in aspect and keeps track of current invalidated bounds the first time it's called after each call to clear_invalidated(). More... | |
| void | set_invalidated (const char *debug_file, int debug_line) |
| void | extend_invalidated_bounds (const InvalidatedRanges &ranges) |
| void | set_child_invalidated () |
| void | clear_invalidated () |
| virtual void | omit_display () |
| bool | unload () |
| Unload this instance from the stage. More... | |
| virtual void | getLoadedMovie (Movie *newMovie) |
| Accept a loaded Movie. More... | |
| bool | unloaded () const |
| Return true if this DisplayObject was unloaded from the stage. More... | |
| virtual void | destroy () |
| Mark this DisplayObject as destroyed. More... | |
| bool | isDestroyed () const |
| Return true if this DisplayObject was destroyed. More... | |
| bool | boundsInClippingArea (Renderer &renderer) const |
| std::string | getTargetPath () const |
| Return full path to this object, in slash notation. More... | |
| const std::string & | getOrigTarget () const |
| std::string DSOEXPORT | getTarget () const |
| Return full path to this object, in dot notation. More... | |
| virtual bool | isSelectableTextField () const |
| Return true if this DisplayObject is a selectable TextField. More... | |
| bool DSOEXPORT | allowHandCursor () const |
| Return true if this DisplayObject allows turning the cursor into an hand shape when it happens to be the one receiving mouse events. More... | |
| ObjectURI | getNextUnnamedInstanceName () |
| Used to assign a name to unnamed instances. More... | |
| BlendMode | getBlendMode () const |
| void | setBlendMode (BlendMode bm) |
| virtual bool | handleFocus () |
| Set the current focus to this DisplayObject. More... | |
| virtual void | killFocus () |
| Some DisplayObjects require actions on losing focus. More... | |
| double | rotation () const |
| double | scaleX () const |
| double | scaleY () const |
| as_object * | object () const |
| virtual void | markReachableResources () const |
| Mark all reachable resources. More... | |
| boost::tribool | focusRect () const |
| void | focusRect (boost::tribool focus) |
Public Member Functions inherited from gnash::GcResource | |
| GcResource (GC &gc) | |
| Create a Garbage-collected resource associated with a GC. More... | |
| void | setReachable () const |
| Mark this resource as being reachable. More... | |
| bool | isReachable () const |
| Return true if this object is marked as reachable. More... | |
| void | clearReachable () const |
| Clear the reachable flag. More... | |
Protected Member Functions | |
| virtual void | markOwnResources () const |
| Mark video-specific reachable resources. More... | |
Protected Member Functions inherited from gnash::DisplayObject | |
| virtual bool | unloadChildren () |
| movie_root & | stage () const |
| Get the movie_root to which this DisplayObject belongs. More... | |
| void | saveOriginalTarget () |
| const Events & | get_event_handlers () const |
| void | set_event_handlers (const Events ©from) |
| as_object * | getPathElementSeparator (string_table::key key) |
| look for '.', 'this', '..', '_parent', '_level0' and '_root' More... | |
Protected Member Functions inherited from gnash::GcResource | |
| virtual | ~GcResource () |
| Delete this resource. More... | |
VideoStream ActionScript object.
A VideoStream provides audio/video frames either embedded into the SWF itself or loaded from the network using an associated NetStream object.
| gnash::Video::Video | ( | as_object * | object, |
| const SWF::DefineVideoStreamTag * | def, | ||
| DisplayObject * | parent | ||
| ) |
| gnash::Video::~Video | ( | ) |
|
virtual |
Add the DisplayObject's invalidated bounds to the given ranges list.
NOTE that this method should include the bounds that it covered the last time clear_invalidated() was called, as those need to be rerendered as well (to clear the region previously occupied by this DisplayObject).
That's why it returns the union of old_invalidated_ranges and the current bounds. The function is also used internally by set_invalidated() to update m_old_invalidated_ranges itself (you may notice some kind of circular reference), but that's no problem since old_invalidated_ranges is NULL during that call.
It is used to determine what area needs to be re-rendered. The coordinates are world coordinates (in TWIPS). Only instances with _invalidated flag set are checked unless force is set.
Reimplemented from gnash::DisplayObject.
References gnash::geometry::SnappingRanges2d< T >::add(), gnash::SWFRect::expand_to_transformed_rect(), gnash::SWFRect::getRange(), gnash::getWorldMatrix(), gnash::DisplayObject::invalidated(), and gnash::DisplayObject::m_old_invalidated_ranges.
| void gnash::Video::clear | ( | ) |
References gnash::PlayHead::PLAY_PAUSED, gnash::NetStream_as::playbackState(), and gnash::DisplayObject::set_invalidated().
Referenced by gnash::registerVideoNative().
|
virtual |
Register this video instance as a live DisplayObject.
Reimplemented from gnash::DisplayObject.
References gnash::DisplayObject::saveOriginalTarget().
Render the DisplayObject.
All DisplayObjects must have a display() function.
Implements gnash::DisplayObject.
References _, gnash::key::_1, gnash::DisplayObject::clear_invalidated(), gnash::Renderer::drawVideoFrame(), gnash::DisplayObject::get_ratio(), gnash::NetStream_as::get_video(), gnash::DisplayObject::getTarget(), gnash::log_debug(), gnash::log_error(), LOG_ONCE, gnash::media::VideoDecoder::push(), and gnash::DisplayObject::transform().
|
virtual |
Implements gnash::DisplayObject.
| int gnash::Video::height | ( | ) | const |
Get the height of the video.
The method depends on whether it is an embedded or a live stream. This returns 0 until the height is known, which for FLV streams is only after decoding. The value may possibly vary during playback.
References gnash::NetStream_as::videoHeight().
Referenced by gnash::registerVideoNative().
|
protectedvirtual |
Mark video-specific reachable resources.
video-specific reachable resources are:
Reimplemented from gnash::DisplayObject.
References gnash::ActiveRelay::setReachable().
|
inlinevirtual |
Return true if the given point falls in this DisplayObject's shape.
| x | Point x coordinate in world space |
| y | Point y coordinate in world space |
Implements gnash::DisplayObject.
|
inline |
Set whether smoothing is required.
Referenced by gnash::registerVideoNative().
| void gnash::Video::setStream | ( | NetStream_as * | ns | ) |
Set the input stream for this video.
References gnash::NetStream_as::setInvalidatedVideo().
Referenced by gnash::registerVideoNative().
|
inline |
Whether this Video object should request smoothing when scaled.
Referenced by gnash::registerVideoNative().
| int gnash::Video::width | ( | ) | const |
Get the width of the video.
The method depends on whether it is an embedded or a live stream. This returns 0 until the height is known, which for FLV streams is only after decoding. The value may possibly vary during playback.
References gnash::NetStream_as::videoWidth().
Referenced by gnash::registerVideoNative().
1.8.12