Пример #1
0
int visual_video_init (VisVideo *video)
{
	visual_return_val_if_fail (video != NULL, -VISUAL_ERROR_VIDEO_NULL);

	/* Do the VisObject initialization */
	visual_object_clear (VISUAL_OBJECT (video));
	visual_object_set_dtor (VISUAL_OBJECT (video), video_dtor);
	visual_object_set_allocated (VISUAL_OBJECT (video), FALSE);

	/* Reset the VisVideo data */
	video->buffer = visual_buffer_new ();

	video->pixel_rows = NULL;

	visual_video_set_attributes (video, 0, 0, 0, VISUAL_VIDEO_DEPTH_NONE);
	visual_video_set_buffer (video, NULL);
	visual_video_set_palette (video, NULL);

	video->parent = NULL;
	video->rect = visual_rectangle_new_empty ();

	/* Composite control */
	video->compositetype = VISUAL_VIDEO_COMPOSITE_TYPE_SRC;

	/* Colors */
	video->colorkey = visual_color_new ();

	return VISUAL_OK;
}
Пример #2
0
/** VisVideo.setAttributes() */
JNIEXPORT void JNICALL Java_org_libvisual_android_VisVideo_videoSetAttributes(JNIEnv * env, 
                                                                              jobject  obj, 
                                                                              jint video, 
                                                                              jint width, 
                                                                              jint height, 
                                                                              jint stride, 
                                                                              jint depth)
{
    LOGI("VisVideo.videoSetAttributes()");
        
    VisVideo *v = (VisVideo *) video;
    visual_video_set_attributes(v, width, height, stride, depth);
}