By Ed Butler
BBC News, Los Angeles
California's adult movie business is under pressure - internet piracy and the economic downturn have slashed revenues, while state regulators seem set to win their long battle to make actors wear condoms.
Light drizzle was falling as I pulled my car up outside a low-rise warehouse studio in northern Los Angeles.
I had been told just to pitch up - it would be fun, they had said, to see how we do things.
What I did see at first did not quite match my expectations but then again, I was not quite sure what to expect.
The porn shoot was Star Trek, the Next Generation - a triple-X parody, billed as a humorous tribute to the iconic TV space saga.
Performers in body-hugging Star Trek outfits, some with prosthetic noses to resemble aliens, wandered around looking slightly bored as a weary crew worried over lighting arrangements.
This morning was devoted to dialogue, I was told, although - as Sam, the film's artistically minded writer-director, explained to me with clear regret - there was not too much of that to be had.
Only 30 minutes of this two-hour sex film would involve plot, he sighed.
The demands of porn may not allow Sam to be the groundbreaking film-maker he clearly aspires to be, but at least there are films to be made.
The economic climate also means the industry is even less keen to accept California's increasingly stringent workplace regulations
The problem, increasingly, is revenue.
Like the music industry, pornographers are struggling to persuade their audience to pay for what they watch.
DVD sales have collapsed. Online, a great deal of porn can be accessed for free.
And the economic downturn does not help.
"What with the recession and piracy, we call it the perfect storm," one leading producer observed wistfully.
The economic climate also means the industry is even less keen to accept California's increasingly stringent workplace regulations.
For years, the authorities have been demanding that porn performers wear condoms.
Health scares - most notoriously in 2004 when three actors contracted HIV - have highlighted significant levels of infection on set.
But the industry says wearing condoms on-screen is a turn-off. The public do not want it, it will kill the fantasy, they say.
Back on the Star Trek set, I talked to Bobbi Starr, one of the lead performers.
Calls for greater safety increased after actors tested positive for HIV in 2004
A college graduate, a former national standard swimmer and professional oboist, she seems to have packed a lot into her 27 years.
She turned to porn, she said, out of a sense of sexual adventure.
"It's just fun," she said, "and when everyone around you is having fun too, what's not to love?"
Her packed schedule today involved a couple of lines, then a four-hour sex scene. Then a costume fitting on Tuesday and she was off to have her monthly health test after that.
Each day would be 15 hours long.
"Wow, you must be exhausted?" I suggested.
"You get used to it," she smiled.
"And what about the health risks," I asked. "Have you had many infections?"
"Well, just chlamydia a couple of times, gonorrhoea - nothing much. Anyway, we test each month so, when you're diagnosed, you just take your medication and you're good to go. No problem."
There was something very Californian about Bobbi, I decided.
In fact there was something very Californian about the entire business.
A combination of determined enthusiasm, combined with a rebel attitude, a sort of libertarian defiance towards the forces ranged against it.
It had taken a Supreme Court battle back in the 1980s to make porn legal in California in the first place, formally distinguishing it from common-or-garden prostitution.
Now, many I met spoke of the right not to wear condoms as a key aspect of their constitutional right to free speech, as set out by the Founding Fathers.
"How can I express myself as an artist," one producer said to me, "if you're going to clothe my performers in rubber?"
I struggled to picture Benjamin Franklin or Thomas Jefferson having this in mind as they penned the First Amendment.
But then I also struggled to picture hordes of Star Trek fans queuing up to see Captain Jean-Luc Picard going hard-core with the crew of the Star Trek Enterprise. So what did I know?
The authorities though are adamant. Construction workers wear hard hats, miners wear masks - these actors have to have suitable barrier protection.
It seems likely that porn will eventually lose its battle against the California regulators, not least because - as well as state penalties - the industry could be about to face some very expensive lawsuits brought by former performers.
A number of actors told me privately that regulation could not come soon enough for them.
The producers say this will not help workers but will only force production abroad, or underground - the public always gets what the public wants.
That view was echoed by Bobbi Starr - her parting words, in fact, as she began to disrobe for her epic sex scene.
I decided I had seen enough and slipped back out into the rain.
You can hear the documentary about Ed Butler's trip to California in this week's BBC World Service
How to listen to From Our Own Correspondent
BBC Radio 4:
A 30-minute programme on Saturdays, 1130.
Second 30-minute programme on Thursdays, 1100 (some weeks only).
Download the podcast
BBC World Service:
Hear daily 10-minute editions Monday to Friday, repeated through the day, also available to listen online.
Read more or
explore the archive