# InkblotVideoCursor

from pandac.PandaModules import InkblotVideoCursor

Class : InkblotVideoCursor
Description : A cellular automaton that generates an amusing pattern of swirling colors.

## Inheritance:

InkblotVideoCursor: MovieVideoCursor
MovieVideoCursor: TypedWritableReferenceCount
TypedWritableReferenceCount: TypedWritable ReferenceCount
TypedWritable: TypedObject
TypedObject: MemoryBase
MemoryBase:
ReferenceCount: MemoryBase

## Methods of InkblotVideoCursor:

InkblotVideoCursor (Constructor)
getClassType

## Methods of MovieVideoCursor:

MovieVideoCursor (Constructor)
aborted
canSeek
canSeekFast
fetchIntoBitbucket
fetchIntoTexture
fetchIntoTextureAlpha
fetchIntoTextureRgb
getClassType
getNumComponents
getSource
lastStart
length
nextStart
ready
setupTexture
sizeX
sizeY
streaming

## Methods of TypedWritableReferenceCount:

getClassType

## Methods of TypedWritable:

getClassType

## Methods of TypedObject:

getClassType
getType
getTypeIndex
isExactType
isOfType

## Methods of ReferenceCount:

getClassType
getRefCount
ref
testRefCountIntegrity
testRefCountNonzero
unref

InkblotVideoCursor InkblotVideoCursor::InkblotVideoCursor(InkblotVideo *src); Description: xxx

getClassType static TypeHandle InkblotVideoCursor::get_class_type(void); Undocumented function.

MovieVideoCursor MovieVideoCursor::MovieVideoCursor(MovieVideo *src); Description: This constructor returns a null video stream --- a stream of plain blue and white frames that last one second each. To get more interesting video, you need to construct a subclass of this class.

aborted bool MovieVideoCursor::aborted(void) const; Description: Returns true if the video has aborted prematurely. For example, this could occur if the Movie was actually an internet TV station, and the connection was lost. Reaching the normal end of the video does not constitute an 'abort' condition.

canSeek bool MovieVideoCursor::can_seek(void) const; Description: Returns true if the movie can seek. If this is true, seeking is still not guaranteed to be fast: for some movies, seeking is implemented by rewinding to the beginning and then fast-forwarding to the desired location. Even if the movie cannot seek, the fetch methods can still advance to an arbitrary location by reading frames and discarding them. However, to move backward, can_seek must return true.

canSeekFast bool MovieVideoCursor::can_seek_fast(void) const; Description: Returns true if seek operations are constant time.

fetchIntoBitbucket virtual void MovieVideoCursor::fetch_into_bitbucket(double time); Description: Discards the next video frame. Still sets last_start and next_start. See fetch_into_buffer for more details.

fetchIntoTexture virtual void MovieVideoCursor::fetch_into_texture(double time, Texture *t, int page); Description: Reads the specified video frame into the specified texture. See fetch_into_buffer for more details.

fetchIntoTextureAlpha virtual void MovieVideoCursor::fetch_into_texture_alpha(double time, Texture *t, int page, int alpha_src); Description: Reads the specified video frame into the alpha channel of the supplied texture. The RGB channels of the texture are not touched. See fetch_into_buffer for more details.

fetchIntoTextureRgb virtual void MovieVideoCursor::fetch_into_texture_rgb(double time, Texture *t, int page); Description: Reads the specified video frame into the RGB channels of the supplied texture. The alpha channel of the texture is not touched. See fetch_into_buffer for more details.

getClassType static TypeHandle MovieVideoCursor::get_class_type(void); Undocumented function.

getNumComponents int MovieVideoCursor::get_num_components(void) const; Description: Returns 4 if the movie has an alpha channel, 3 otherwise.

getSource PointerTo< MovieVideo > MovieVideoCursor::get_source(void) const; Filename: movieVideoCursor.I Created by: jyelon (02Jul07) PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. All rights reserved. All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE." Description: Get the MovieVideo which this cursor references.

lastStart double MovieVideoCursor::last_start(void) const; Description: Returns the start time of the last frame you read. MovieVideoCursor streams have variable frame rates. Each frame will specify how long it is to be displayed. These lengths may not be equal from frame to frame.

length double MovieVideoCursor::length(void) const; Description: Returns the length of the movie. Some kinds of Movie, such as internet TV station, might not have a predictable length. In that case, the length will be set to a very large number: 1.0E10. If the internet TV station goes offline, the video or audio stream will set its abort flag. Reaching the end of the movie (ie, the specified length) normally does not cause the abort flag to be set. The video and audio streams produced by get_video and get_audio are always of unlimited duration - you can always read another video frame or another audio sample. This is true even if the specified length is reached, or an abort is flagged. If either stream runs out of data, it will synthesize blank video frames and silent audio samples as necessary to satisfy read requests. Some AVI files have incorrect length values encoded into them - usually, they're a second or two long or short. When playing such an AVI using the Movie class, you may see a slightly truncated video, or a slightly elongated video (padded with black frames). There are utilities out there to fix the length values in AVI files.

nextStart double MovieVideoCursor::next_start(void) const; Description: Returns the start time of the next frame you can read. MovieVideoCursor streams have variable frame rates. Each frame will specify how long it is to be displayed. These lengths may not be equal from frame to frame.

ready bool MovieVideoCursor::ready(void) const; Description: Returns true if the cursor is a streaming source, and if a video frame is ready to be read. For non- streaming sources, this is always false.

setupTexture void MovieVideoCursor::setup_texture(Texture *tex) const; Description: Set up the specified Texture object to contain content from this movie. This should be called once, not every frame.

sizeX int MovieVideoCursor::size_x(void) const; Description: Get the horizontal size of the movie.

sizeY int MovieVideoCursor::size_y(void) const; Description: Get the vertical size of the movie.

streaming bool MovieVideoCursor::streaming(void) const; Description: Returns true if the video frames are being "pushed" at us by something that operates at its own speed - for example, a webcam. In this case, the frames come when they're ready to come. Attempting to read too soon will produce nothing, reading too late will cause frames to be dropped. In this case, the ready flag can be used to determine whether or not a frame is ready for reading. When streaming, you should still pay attention to last_start, but the value of next_start is only a guess.

getClassType static TypeHandle TypedWritableReferenceCount::get_class_type(void); Undocumented function.

getClassType static TypeHandle TypedWritable::get_class_type(void); Undocumented function.

getClassType static TypeHandle TypedObject::get_class_type(void); Undocumented function.

getType virtual TypeHandle TypedObject::get_type(void) const = 0; Derived classes should override this function to return get_class_type().

getTypeIndex int TypedObject::get_type_index(void) const; Description: Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index().

isExactType bool TypedObject::is_exact_type(TypeHandle handle) const; Description: Returns true if the current object is the indicated type exactly.

isOfType bool TypedObject::is_of_type(TypeHandle handle) const; Description: Returns true if the current object is or derives from the indicated type.

getClassType static TypeHandle ReferenceCount::get_class_type(void); Undocumented function.

getRefCount int ReferenceCount::get_ref_count(void) const; Description: Returns the current reference count.

ref void ReferenceCount::ref(void) const; Description: Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

testRefCountIntegrity bool ReferenceCount::test_ref_count_integrity(void) const; Description: Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise.

testRefCountNonzero bool ReferenceCount::test_ref_count_nonzero(void) const; Description: Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise.

unref bool ReferenceCount::unref(void) const; Description: Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is true if the new reference count is nonzero, false if it is zero.