Media subsystem settings
512259
protected function addgroup_media(){
		$this->registerGroup(BLang::_('ADMIN_CONFIG_SYSTEMS_MEDIA'),'media',array(
			new BConfigFieldPath(
				'MEDIA_PATH_ORIGINAL',
				BLang::_('ADMIN_CONFIG_SYSTEMS_MEDIA_PATH_ORIG'),
				BROOTPATH.'htdocs'.DIRECTORY_SEPARATOR.'media'.DIRECTORY_SEPARATOR.'original'
				),
			new BConfigFieldPath(
				'MEDIA_PATH_RESIZED',
				BLang::_('ADMIN_CONFIG_SYSTEMS_MEDIA_PATH_RESIZED'),
				BROOTPATH.'htdocs'.DIRECTORY_SEPARATOR.'media'.DIRECTORY_SEPARATOR.'resized'
				),
			new BConfigFieldString(
				'MEDIA_URL',
				BLang::_('ADMIN_CONFIG_SYSTEMS_MEDIA_URL'),
				'http://media.vidido.ua'
				),
			new BConfigFieldString(
				'MEDIA_TRUSTED_IMAGE_SIZES',
				BLang::_('ADMIN_CONFIG_SYSTEMS_MEDIA_TRUSTEDSIZES'),
				'127.0.0.1'
				),
			new BConfigFieldPath(
				'WATERMARK_PATH',
				'файл вотермарки',
				BROOTPATH.'htdocs'.DIRECTORY_SEPARATOR.'media'.DIRECTORY_SEPARATOR.'watermark.png'
				),
			new BConfigFieldList(
				'WATERMARK_POSITION',
				'Позиция вотермарки',
				array(
					1=>'лево верх',
					2=>'центр верх',
					3=>'право верх',
					4=>'лево центр',
					5=>'центр центр',
					6=>'право центр',
					7=>'лево низ',
					8=>'центр низ',
					9=>'право низ',
					)
				),
			new BConfigFieldInt(
				'WATERMARK_MINWIDTH',
				'минимальная ширина картинки для наложения',
				100
				),
			new BConfigFieldInt(
				'WATERMARK_MINHEIGHT',
				'минимальная высота картинки для наложения',
				100
				)
			));
		}
1197274
protected function getMediaFinderSettings() : array
    {
        $sMode = $this->getSettingValue(self::TYPE_MEDIA_FINDER);
        if (!in_array($sMode, ['file', 'image'])) {
            return [];
        }

        $arResult = [
            'type' => self::TYPE_MEDIA_FINDER,
            'mode' => $sMode,
        ];

        return $arResult;
    }
972838
def build_media(self):
        
        logger.debug("Building media directory")
        if self.verbosity > 1:
            self.stdout.write("Building media directory")
        if os.path.exists(self.media_root) and settings.MEDIA_URL:
            target_dir = path.join(self.fs_name, self.build_dir, settings.MEDIA_URL.lstrip('/'))
            logger.debug("Copying {}{} to {}{}".format("osfs://", self.media_root, self.fs_name, target_dir))
            copy.copy_dir("osfs:///", smart_text(self.media_root), self.fs, smart_text(target_dir))
375540
void setActiveSubMenu (PopupMenu newSubMenu) {
		if (activeSubMenu == newSubMenu) return;
		if (activeSubMenu != null) activeSubMenu.remove();
		activeSubMenu = newSubMenu;
		if (newSubMenu != null) {
			newSubMenu.setParentMenu(this);
		}
	}
401256
public function setupFilesystem()
    {
        $config = $this['config'];

        if (!is_dir($config->get('concrete.cache.directory'))) {
            @mkdir($config->get('concrete.cache.directory'), $config->get('concrete.filesystem.permissions.directory'));
            @touch($config->get('concrete.cache.directory') . '/index.html', $config->get('concrete.filesystem.permissions.file'));
        }
    }
680213
def display_system(sys, style='vdw'):
    '''

    '''
    
    v = QtViewer()

    #v.add_post_processing(FXAAEffect)
    v.add_post_processing(SSAOEffect)    
    
    if style == 'vdw':
        sr = v.add_renderer(AtomRenderer, sys.r_array, sys.type_array,
                            backend='impostors')
    if style == 'ball-and-stick':
        sr = v.add_renderer(BallAndStickRenderer,
                            sys.r_array,
                            sys.type_array,
                            sys.bonds)
    
    if sys.box_vectors is not None:
        v.add_renderer(BoxRenderer, sys.box_vectors)
        
        # We autozoom on the box
        a, b, c = sys.box_vectors
        box_vertices = np.array([[0.0, 0.0, 0.0],
                                 a, b, c,
                                 a + b, a + c, b + c,
                                 a + b + c])
        v.widget.camera.autozoom(box_vertices)
    else:
        v.widget.camera.autozoom(sys.r_array)
    
    v.run()
188707
private void configureDisplayView() {
        if (mDisplayView instanceof GLCameraEncoderView)
            ((GLCameraEncoderView) mDisplayView).setCameraEncoder(this);
        else if (mDisplayView instanceof GLCameraView)
            ((GLCameraView) mDisplayView).setCamera(mCamera);
    }
468979
void setMOD(MODSound sound) {
		if (!soundWorks) {
			return;
		}

		currentMusic = sources.get(0);
		stopSource(0);
		
		this.mod = sound;
		if (sound != null) {
			this.stream = null;
		}
		paused = false;
	}
340078
def set_sub_stream_format(self, format, callback=None):
        '''
        
        '''
        params = {'format': format}
        return self.execute_command('setSubStreamFormat',
                                        params, callback=callback)
599445
private function configureEnv() {
		if ($this->selfEdit) {
			chdir(__DIR__."/../../..");
			\putenv('COMPOSER=composer-mouf.json');
		} else {
			chdir(__DIR__."/../../../../../..");
		}
		
		$composerHome = getenv('COMPOSER_HOME');
		if (!$composerHome) {
			$composerTmpDir = sys_get_temp_dir().'/.mouf_composer/';
			if (function_exists('posix_getpwuid')) {
				$processUser = posix_getpwuid(posix_geteuid());
				$composerTmpDir .= $processUser['name'].'/';
			}
			\putenv('COMPOSER_HOME='.$composerTmpDir);
		}
		
	}
1370667
function bin(argv) {
  // setup config
  var config = require('../config/config.js')

  program
  .option('-d, --database <database>', 'Database')
  .option('-t, --tag <tag>', 'Tag')
  .parse(argv)

  var defaultDatabase = 'media'

  config.database = program.database || config.database || defaultDatabase
  var q = program.args[0] || ''

  params = {}
  params.q = q
  params.tag = program.tag

  qpm_media.search(params, config).then(function(ret){
    console.table(ret.ret[0])
    ret.conn.close()
  }).catch(function (err) {
    console.error(err)
  })


}
1089470
@Override
	public void configurationSave(Properties props)
	{
		ModConfigPanel configPanel = (ModConfigPanel)getConfigPanel();
		props.setProperty(PROPERTY_PLAYER_FREQUENCY, configPanel.getPlayerSetUp_SampleRate().getSelectedItem().toString());
		props.setProperty(PROPERTY_PLAYER_MSBUFFERSIZE, configPanel.getPlayerSetUp_BufferSize().getSelectedItem().toString());
		props.setProperty(PROPERTY_PLAYER_BITSPERSAMPLE, configPanel.getPlayerSetUp_BitsPerSample().getSelectedItem().toString());
		props.setProperty(PROPERTY_PLAYER_STEREO, configPanel.getPlayerSetUp_Channels().getSelectedItem().toString());
		props.setProperty(PROPERTY_PLAYER_ISP, Integer.toString(configPanel.getPlayerSetUp_Interpolation().getSelectedIndex()));
		props.setProperty(PROPERTY_PLAYER_WIDESTEREOMIX, Boolean.toString(configPanel.getPlayerSetUp_WideStereoMix().isSelected()));
		props.setProperty(PROPERTY_PLAYER_NOISEREDUCTION, Boolean.toString(configPanel.getPlayerSetUp_NoiseReduction().isSelected()));
		props.setProperty(PROPERTY_PLAYER_MEGABASS, Boolean.toString(configPanel.getPlayerSetUp_MegaBass().isSelected()));
		props.setProperty(PROPERTY_PLAYER_NOLOOPS, Integer.toString(configPanel.getLoopValue()));
	}
595209
def autodiscover_media_extensions():
    
    import copy
    from django.conf import settings
    from django.utils.module_loading import module_has_submodule

    for app in settings.INSTALLED_APPS:
        mod = import_module(app)
        try:
            import_module('%s.media_extension' % app)
        except:
            if module_has_submodule(mod, 'media_extension'):
                raise
615261
def add_media_file(self, input_file, output_file):
        
        if not os.path.exists(input_file):
            raise FFmpegNormalizeError("file " + input_file + " does not exist")

        ext = os.path.splitext(output_file)[1][1:]
        if (self.audio_codec is None or 'pcm' in self.audio_codec) and ext in PCM_INCOMPATIBLE_EXTS:
            raise FFmpegNormalizeError(
                "Output extension {} does not support PCM audio. Please choose a suitable audio codec with the -c:a option.".format(ext)
            )

        mf = MediaFile(self, input_file, output_file)
        self.media_files.append(mf)

        self.file_count += 1
132375
function bin(argv) {
  // setup config
  var config = require('../config/config.js')

  program
  .option('-d, --database <database>', 'Database')
  .parse(argv)

  var defaultDatabase = 'media'

  config.database = program.database || config.database || defaultDatabase


  qpm_media.createTables()

}
503880
public static void enableAllSubsystems(boolean enable) {
        if (enable_logging) {
            if (enable) {
                for (ISubsystem s : SUBSYSTEM.values()) {
                    mEnabledSubsystems.add(s);
                }
            } else {
                mEnabledSubsystems.clear();
            }
        }
    }
560414
public void addSystem(SubSystem system)
  {
    @SuppressWarnings("unchecked")
    Class<SubSystem> cl = (Class<SubSystem>) system.getClass();
    
    addSystem(cl, system);
  }